author | André Bargull <andre.bargull@gmail.com> |
Fri, 06 Mar 2020 21:11:59 +0000 | |
changeset 517431 | 44fe840e94ff9c4c4aee67b148ed5ddecb47b83e |
parent 517430 | 8b170b754a5bb744debc0beebe1fb0fda3c8b07c |
child 517432 | 6c8fa3e00997cc77f60fc5bb6068c50f32e1bcad |
push id | 37190 |
push user | aciure@mozilla.com |
push date | Sat, 07 Mar 2020 21:33:39 +0000 |
treeherder | mozilla-central@d2ac41047c10 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mgaudet |
bugs | 1619007 |
milestone | 75.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
js/src/frontend/BytecodeEmitter.cpp | file | annotate | diff | comparison | revisions | |
js/src/frontend/BytecodeEmitter.h | file | annotate | diff | comparison | revisions |
--- a/js/src/frontend/BytecodeEmitter.cpp +++ b/js/src/frontend/BytecodeEmitter.cpp @@ -9198,41 +9198,16 @@ MOZ_NEVER_INLINE bool BytecodeEmitter::e if (!oe.emitEnd()) { // [stack] OBJ return false; } return true; } -bool BytecodeEmitter::replaceNewInitWithNewObject(JSObject* obj, - BytecodeOffset offset) { - ObjectBox* objbox = parser->newObjectBox(obj); - if (!objbox) { - return false; - } - - static_assert( - JSOpLength_NewInit == JSOpLength_NewObject, - "newinit and newobject must have equal length to edit in-place"); - - uint32_t index; - if (!perScriptData().gcThingList().append(objbox, &index)) { - return false; - } - - jsbytecode* code = bytecodeSection().code(offset); - - MOZ_ASSERT(JSOp(code[0]) == JSOp::NewInit); - code[0] = jsbytecode(JSOp::NewObject); - SET_UINT32(code, index); - - return true; -} - bool BytecodeEmitter::emitArrayLiteral(ListNode* array) { bool isSingleton = checkSingletonContext(); if (!array->hasNonConstInitializer() && array->head()) { // If the array consists entirely of primitive values, make a // template object with copy on write elements that can be reused // every time the initializer executes. In non-singleton mode, don't do // this if the array is small: copying the elements lazily is not worth it // in that case.
--- a/js/src/frontend/BytecodeEmitter.h +++ b/js/src/frontend/BytecodeEmitter.h @@ -487,19 +487,16 @@ struct MOZ_STACK_CLASS BytecodeEmitter { MOZ_MUST_USE bool emitRegExp(uint32_t index); MOZ_NEVER_INLINE MOZ_MUST_USE bool emitFunction( FunctionNode* funNode, bool needsProto = false, ListNode* classContentsIfConstructor = nullptr); MOZ_NEVER_INLINE MOZ_MUST_USE bool emitObject(ListNode* objNode, bool isInner = false); - MOZ_MUST_USE bool replaceNewInitWithNewObject(JSObject* obj, - BytecodeOffset offset); - MOZ_MUST_USE bool emitHoistedFunctionsInList(ListNode* stmtList); // Can we use the object-literal writer either in singleton-object mode (with // values) or in template mode (field names only, no values) for the property // list? void isPropertyListObjLiteralCompatible(ListNode* obj, PropListType type, bool* withValues, bool* withoutValues);