Bug 1541641 - Emit JSOP_TOID for computed field keys. r=jorendorff
authorAshley Hauck <khyperia@mozilla.com>
Wed, 24 Apr 2019 18:02:54 +0000
changeset 530006 a1ac474e747d1a96779e383a6bed943abfb85ce9
parent 530005 f146cd3df506df2fe946a5c0c331248cdd624f70
child 530007 afb947a236befa6eb6f23783405bd9c334aa4129
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs1541641
milestone68.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
Bug 1541641 - Emit JSOP_TOID for computed field keys. r=jorendorff Differential Revision: https://phabricator.services.mozilla.com/D27549
js/src/frontend/BytecodeEmitter.cpp
js/src/tests/jstests.list
--- a/js/src/frontend/BytecodeEmitter.cpp
+++ b/js/src/frontend/BytecodeEmitter.cpp
@@ -7987,16 +7987,21 @@ bool BytecodeEmitter::emitCreateFieldKey
       if (field->name().getKind() == ParseNodeKind::ComputedName) {
         ParseNode* nameExpr = field->name().as<UnaryNode>().kid();
 
         if (!emitTree(nameExpr)) {
           //        [stack] ARRAY KEY
           return false;
         }
 
+        if (!emit1(JSOP_TOID)) {
+          //        [stack] ARRAY KEY
+          return false;
+        }
+
         if (!emitUint32Operand(JSOP_INITELEM_ARRAY, curFieldKeyIndex)) {
           //        [stack] ARRAY
           return false;
         }
 
         curFieldKeyIndex++;
       }
     }
--- a/js/src/tests/jstests.list
+++ b/js/src/tests/jstests.list
@@ -589,28 +589,16 @@ skip script test262/language/statements/
 skip script test262/language/statements/class/elements/direct-eval-err-contains-arguments.js
 skip script test262/language/statements/class/elements/private-derived-cls-direct-eval-err-contains-supercall-1.js
 skip script test262/language/statements/class/elements/private-derived-cls-direct-eval-err-contains-supercall-2.js
 skip script test262/language/statements/class/elements/private-derived-cls-direct-eval-err-contains-supercall.js
 skip script test262/language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-1.js
 skip script test262/language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-2.js
 skip script test262/language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall.js
 
-# https://bugzilla.mozilla.org/show_bug.cgi?id=1541641
-skip script test262/language/expressions/class/elements/evaluation-error/computed-name-toprimitive-err.js
-skip script test262/language/expressions/class/elements/evaluation-error/computed-name-toprimitive-returns-noncallable.js
-skip script test262/language/expressions/class/elements/evaluation-error/computed-name-toprimitive-returns-nonobject.js
-skip script test262/language/expressions/class/elements/evaluation-error/computed-name-tostring-err.js
-skip script test262/language/expressions/class/elements/evaluation-error/computed-name-valueof-err.js
-skip script test262/language/statements/class/elements/evaluation-error/computed-name-toprimitive-err.js
-skip script test262/language/statements/class/elements/evaluation-error/computed-name-toprimitive-returns-noncallable.js
-skip script test262/language/statements/class/elements/evaluation-error/computed-name-toprimitive-returns-nonobject.js
-skip script test262/language/statements/class/elements/evaluation-error/computed-name-tostring-err.js
-skip script test262/language/statements/class/elements/evaluation-error/computed-name-valueof-err.js
-
 
 ###########################################################
 # Tests disabled due to issues in test262 importer script #
 ###########################################################
 
 # test262 importer merges all includes in a per directory shell.js file, breaking this harness test case.
 skip script test262/harness/detachArrayBuffer.js