-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Reduce code duplication in EngineInterfaceObject #5676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce code duplication in EngineInterfaceObject #5676
Conversation
lib/Runtime/Base/JnDirectFields.h
Outdated
| ENTRY(builtInGlobalObjectEntryIsNaN) | ||
| ENTRY(builtInGlobalObjectEval) | ||
| ENTRY(builtInJavascriptArrayEntryConcat) | ||
| ENTRY(builtInJavascriptArrayEntryIndexOf) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these 3 special and not included in the header?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because the header goes hand in hand with installing JavascriptArray::EntryInfo::IndexOf and the like onto the engine interface object, but since theyre jsbuiltins, the jsbuiltin interface object goes and basically monkey-patches it (if I remember correctly). @sigatrev would know more.
397c46e to
3c50600
Compare
3c50600 to
650528b
Compare
…bject Merge pull request #5676 from jackhorton:engineinterface-cleanup This has been bothering me for a while. This also reduces the size of ChakraCore.dll by 16KiB by removing a bunch of duplicate EntryInfos
| * @param {String} key the specific key we are looking for in the extension, such as "co" | ||
| */ | ||
| const UnicodeExtensionValue = function (extension, key) { | ||
| raise.assert(key.length === 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
raise.assert(key.length === 2); [](start = 8, length = 31)
was this assert not valid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meh -- the spec has lots of lines like "assert x equals some condition." this was intended to replicate that, but its not clear what value it has (its not clear to me what error we should throw on such an assert or if we should failfast, and we already have numerous failfasts in the internal c++ bits.
|
FWIW LGTM |
This has been bothering me for a while. This also reduces the size of ChakraCore.dll by 16KiB by removing a bunch of duplicate EntryInfos