Reduce the argument count of ecma_op_object_get_property_names#2598
Merged
LaszloLango merged 1 commit intojerryscript-project:masterfrom Nov 15, 2018
Merged
Conversation
zherczeg
requested changes
Nov 14, 2018
jerry-core/ecma/base/ecma-globals.h
Outdated
| /** | ||
| * List array indices and enumerable properties. | ||
| */ | ||
| #define ECMA_LIST_ARRAY_INDICES_ENUMERABLE (ECMA_LIST_ARRAY_INDICES | ECMA_LIST_ENUMERABLE) |
Member
There was a problem hiding this comment.
Some defines from this list is not used. Please remove them. We will introduce them if needed.
Introduce ECMA_LIST_ARRAY_INDICES[_ENUMBERABLE[_PROTOTYPE]] flags instead of passing 3 boolean arguments. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
a692b03 to
c02b7c4
Compare
LaszloLango
reviewed
Nov 14, 2018
| bool is_enumerable_only, /**< true - exclude non-enumerable properties */ | ||
| bool is_with_prototype_chain) /**< true - list properties from prototype chain, | ||
| * false - list only own properties */ | ||
| uint32_t opts) /**< any combination of ecma_list_properties_options_t values */ |
Member
Author
There was a problem hiding this comment.
Since argument passing could happen via registers (which work with at least 32 bit operands), it would be a waste of 3 bytes if we limit it to uint8_t. However this procedure also could happen via pushing them into the stack where your suggestion is more profitable. I'm not insist to uint32_t but i think it's more time resistant choice.
legendecas
added a commit
to yodaos-project/ShadowNode
that referenced
this pull request
Nov 26, 2018
Merged
3 tasks
yorkie
pushed a commit
to yodaos-project/ShadowNode
that referenced
this pull request
Nov 26, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce ECMA_LIST_ARRAY_INDICES[_ENUMBERABLE[_PROTOTYPE]] flags instead of passing 3 boolean arguments.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu