From 696b4831eb40d6853693e63bf92625724a1555d6 Mon Sep 17 00:00:00 2001 From: Michael Leon Date: Thu, 12 Dec 2024 16:44:05 -0800 Subject: [PATCH] Rename PutOwn bytecode instructions to DefineOwn Summary: Name the store instructions more accurately. Reviewed By: neildhar Differential Revision: D67061814 fbshipit-source-id: 94f1c797f7e1a700f22946e1b499fce0e920a08a --- include/hermes/BCGen/HBC/BytecodeList.def | 10 ++++---- include/hermes/VM/Interpreter.h | 4 ++-- lib/BCGen/HBC/ISel.cpp | 15 ++++++------ lib/BCGen/HBC/Passes.cpp | 2 +- lib/BCGen/SH/LoadConstants.cpp | 2 +- lib/BCGen/SH/SH.cpp | 2 +- lib/VM/Interpreter-slowpaths.cpp | 28 +++++++++++------------ lib/VM/Interpreter.cpp | 24 +++++++++---------- lib/VM/JIT/arm64/JIT.cpp | 25 ++++++++++---------- lib/VM/JIT/arm64/JitEmitter.cpp | 14 ++++++++---- lib/VM/JIT/arm64/JitEmitter.h | 6 ++--- lib/VM/StaticH.cpp | 2 +- test/BCGen/HBC/array.js | 6 ++--- test/BCGen/HBC/gettersetter.js | 6 ++--- test/BCGen/HBC/hbc_object_literals.js | 10 ++++---- test/BCGen/HBC/new-array-debug.js | 6 ++--- 16 files changed, 84 insertions(+), 78 deletions(-) diff --git a/include/hermes/BCGen/HBC/BytecodeList.def b/include/hermes/BCGen/HBC/BytecodeList.def index 03a2708533a..e17db27beee 100644 --- a/include/hermes/BCGen/HBC/BytecodeList.def +++ b/include/hermes/BCGen/HBC/BytecodeList.def @@ -99,7 +99,7 @@ DEFINE_OPCODE_1(NewObject, Reg8) DEFINE_OPCODE_2(NewObjectWithParent, Reg8, Reg8) /// Create an array from a static list of values, as for var=[1,2,3]. -/// Any non-constant elements can be set afterwards with PutOwnByIndex. +/// Any non-constant elements can be set afterwards with DefineOwnByIndex. /// Arg1 is the destination. /// Arg2 is a preallocation size hint. /// Arg3 is the number of static elements. @@ -411,8 +411,8 @@ ASSERT_MONOTONE_INCREASING( /// enumerable. This is used (potentially in conjunction with /// NewArrayWithBuffer) for arr=[foo,bar] initializations. /// Arg1[Arg3] = Arg2; -DEFINE_OPCODE_3(PutOwnByIndex, Reg8, Reg8, UInt8) -DEFINE_OPCODE_3(PutOwnByIndexL, Reg8, Reg8, UInt32) +DEFINE_OPCODE_3(DefineOwnByIndex, Reg8, Reg8, UInt8) +DEFINE_OPCODE_3(DefineOwnByIndexL, Reg8, Reg8, UInt32) /// Set an own property identified by value. /// Arg1 is the destination object. @@ -421,7 +421,7 @@ DEFINE_OPCODE_3(PutOwnByIndexL, Reg8, Reg8, UInt32) /// Arg4 : bool -> enumerable. If true, the property is created as enumerable, /// non-enumerable otherwise. /// Arg1[Arg3] = Arg2; -DEFINE_OPCODE_4(PutOwnByVal, Reg8, Reg8, Reg8, UInt8) +DEFINE_OPCODE_4(DefineOwnByVal, Reg8, Reg8, Reg8, UInt8) /// Get a property by value. Constants string values should instead use GetById. /// Arg1 = Arg2[Arg3] @@ -449,7 +449,7 @@ DEFINE_OPCODE_4(DelByVal, Reg8, Reg8, Reg8, UInt8) /// Arg3 is the getter closure or undefined /// Arg4 is the setter closure or undefined /// Arg5 : boolean - if true, the property will be enumerable. -DEFINE_OPCODE_5(PutOwnGetterSetterByVal, Reg8, Reg8, Reg8, Reg8, UInt8) +DEFINE_OPCODE_5(DefineOwnGetterSetterByVal, Reg8, Reg8, Reg8, Reg8, UInt8) /// Get the list of properties from an object to implement for..in loop. /// Returns Arg1, which is the register that holds array of properties. diff --git a/include/hermes/VM/Interpreter.h b/include/hermes/VM/Interpreter.h index 887d07f2493..ee61ce4f0b0 100644 --- a/include/hermes/VM/Interpreter.h +++ b/include/hermes/VM/Interpreter.h @@ -219,12 +219,12 @@ class Interpreter { PinnedHermesValue *frameRegs, const inst::Inst *ip); - static ExecutionStatus casePutOwnByVal( + static ExecutionStatus caseDefineOwnByVal( Runtime &runtime, PinnedHermesValue *frameRegs, const inst::Inst *ip); - static ExecutionStatus casePutOwnGetterSetterByVal( + static ExecutionStatus caseDefineOwnGetterSetterByVal( Runtime &runtime, PinnedHermesValue *frameRegs, const inst::Inst *ip); diff --git a/lib/BCGen/HBC/ISel.cpp b/lib/BCGen/HBC/ISel.cpp index c331c0f631a..abf5c000216 100644 --- a/lib/BCGen/HBC/ISel.cpp +++ b/lib/BCGen/HBC/ISel.cpp @@ -911,15 +911,15 @@ void HBCISel::generateDefineOwnPropertyInst( // If the property is a LiteralNumber, the property is enumerable, and it is a // valid array index, it is coming from an array initialization and we will - // emit it as PutByIndex. + // emit it as DefineOwnByIndex. auto *numProp = llvh::dyn_cast(prop); if (numProp && isEnumerable) { if (auto arrayIndex = numProp->convertToArrayIndex()) { uint32_t index = arrayIndex.getValue(); if (index <= UINT8_MAX) { - BCFGen_->emitPutOwnByIndex(objReg, valueReg, index); + BCFGen_->emitDefineOwnByIndex(objReg, valueReg, index); } else { - BCFGen_->emitPutOwnByIndexL(objReg, valueReg, index); + BCFGen_->emitDefineOwnByIndexL(objReg, valueReg, index); } return; @@ -928,7 +928,8 @@ void HBCISel::generateDefineOwnPropertyInst( // It is a register operand. auto propReg = encodeValue(Inst->getProperty()); - BCFGen_->emitPutOwnByVal(objReg, valueReg, propReg, Inst->getIsEnumerable()); + BCFGen_->emitDefineOwnByVal( + objReg, valueReg, propReg, Inst->getIsEnumerable()); } void HBCISel::generateDefineNewOwnPropertyInst( @@ -945,9 +946,9 @@ void HBCISel::generateDefineNewOwnPropertyInst( "No way to generate non-enumerable indexed DefineNewOwnPropertyInst."); uint32_t index = *numProp->convertToArrayIndex(); if (index <= UINT8_MAX) { - BCFGen_->emitPutOwnByIndex(objReg, valueReg, index); + BCFGen_->emitDefineOwnByIndex(objReg, valueReg, index); } else { - BCFGen_->emitPutOwnByIndexL(objReg, valueReg, index); + BCFGen_->emitDefineOwnByIndexL(objReg, valueReg, index); } return; } @@ -977,7 +978,7 @@ void HBCISel::generateDefineOwnGetterSetterInst( BasicBlock *next) { auto objReg = encodeValue(Inst->getObject()); auto ident = encodeValue(Inst->getProperty()); - BCFGen_->emitPutOwnGetterSetterByVal( + BCFGen_->emitDefineOwnGetterSetterByVal( objReg, ident, encodeValue(Inst->getStoredGetter()), diff --git a/lib/BCGen/HBC/Passes.cpp b/lib/BCGen/HBC/Passes.cpp index aa4038a0ef2..8cefa95c3b0 100644 --- a/lib/BCGen/HBC/Passes.cpp +++ b/lib/BCGen/HBC/Passes.cpp @@ -94,7 +94,7 @@ bool LoadConstants::operandMustBeLiteral(Instruction *Inst, unsigned opIndex) { // If the propery is a LiteralNumber, the property is enumerable, and it // is a valid array index, it is coming from an array initialization and - // we will emit it as PutByIndex. + // we will emit it as DefineOwnByIndex. if (auto *LN = llvh::dyn_cast(Inst->getOperand(opIndex))) { if (SOP->getIsEnumerable() && LN->convertToArrayIndex().hasValue()) return true; diff --git a/lib/BCGen/SH/LoadConstants.cpp b/lib/BCGen/SH/LoadConstants.cpp index d011226a78d..958962872e9 100644 --- a/lib/BCGen/SH/LoadConstants.cpp +++ b/lib/BCGen/SH/LoadConstants.cpp @@ -51,7 +51,7 @@ bool operandMustBeLiteral(Instruction *Inst, unsigned opIndex) { // If the propery is a LiteralNumber, the property is enumerable, and it // is a valid array index, it is coming from an array initialization and - // we will emit it as PutByIndex. + // we will emit it as DefineOwnByIndex. if (auto *LN = llvh::dyn_cast(Inst->getOperand(opIndex))) { if (SOP->getIsEnumerable() && LN->convertToArrayIndex().hasValue()) return true; diff --git a/lib/BCGen/SH/SH.cpp b/lib/BCGen/SH/SH.cpp index 506bdc2292d..2fa69b26fc8 100644 --- a/lib/BCGen/SH/SH.cpp +++ b/lib/BCGen/SH/SH.cpp @@ -1209,7 +1209,7 @@ class InstrGen { // If the property is a LiteralNumber, the property is enumerable, and it is // a valid array index, it is coming from an array initialization and we - // will emit it as PutByIndex. + // will emit it as DefineOwnByIndex. auto *numProp = llvh::dyn_cast(prop); if (numProp && isEnumerable) { if (auto arrayIndex = numProp->convertToArrayIndex()) { diff --git a/lib/VM/Interpreter-slowpaths.cpp b/lib/VM/Interpreter-slowpaths.cpp index 29c21be8898..85660eaf7ed 100644 --- a/lib/VM/Interpreter-slowpaths.cpp +++ b/lib/VM/Interpreter-slowpaths.cpp @@ -123,23 +123,23 @@ ExecutionStatus Interpreter::caseDirectEval( return ExecutionStatus::RETURNED; } -ExecutionStatus Interpreter::casePutOwnByVal( +ExecutionStatus Interpreter::caseDefineOwnByVal( Runtime &runtime, PinnedHermesValue *frameRegs, const Inst *ip) { return JSObject::defineOwnComputed( - Handle::vmcast(&O1REG(PutOwnByVal)), + Handle::vmcast(&O1REG(DefineOwnByVal)), runtime, - Handle<>(&O3REG(PutOwnByVal)), - ip->iPutOwnByVal.op4 + Handle<>(&O3REG(DefineOwnByVal)), + ip->iDefineOwnByVal.op4 ? DefinePropertyFlags::getDefaultNewPropertyFlags() : DefinePropertyFlags::getNewNonEnumerableFlags(), - Handle<>(&O2REG(PutOwnByVal)), + Handle<>(&O2REG(DefineOwnByVal)), PropOpFlags().plusThrowOnError()) .getStatus(); } -ExecutionStatus Interpreter::casePutOwnGetterSetterByVal( +ExecutionStatus Interpreter::caseDefineOwnGetterSetterByVal( Runtime &runtime, PinnedHermesValue *frameRegs, const inst::Inst *ip) { @@ -147,29 +147,29 @@ ExecutionStatus Interpreter::casePutOwnGetterSetterByVal( dpFlags.setConfigurable = 1; dpFlags.configurable = 1; dpFlags.setEnumerable = 1; - dpFlags.enumerable = ip->iPutOwnGetterSetterByVal.op5; + dpFlags.enumerable = ip->iDefineOwnGetterSetterByVal.op5; MutableHandle getter(runtime); MutableHandle setter(runtime); - if (LLVM_LIKELY(!O3REG(PutOwnGetterSetterByVal).isUndefined())) { + if (LLVM_LIKELY(!O3REG(DefineOwnGetterSetterByVal).isUndefined())) { dpFlags.setGetter = 1; - getter = vmcast(O3REG(PutOwnGetterSetterByVal)); + getter = vmcast(O3REG(DefineOwnGetterSetterByVal)); } - if (LLVM_LIKELY(!O4REG(PutOwnGetterSetterByVal).isUndefined())) { + if (LLVM_LIKELY(!O4REG(DefineOwnGetterSetterByVal).isUndefined())) { dpFlags.setSetter = 1; - setter = vmcast(O4REG(PutOwnGetterSetterByVal)); + setter = vmcast(O4REG(DefineOwnGetterSetterByVal)); } assert( (dpFlags.setSetter || dpFlags.setGetter) && - "No accessor set in PutOwnGetterSetterByVal"); + "No accessor set in DefineOwnGetterSetterByVal"); auto accessor = runtime.makeHandle( PropertyAccessor::create(runtime, getter, setter)); return JSObject::defineOwnComputed( - Handle::vmcast(&O1REG(PutOwnGetterSetterByVal)), + Handle::vmcast(&O1REG(DefineOwnGetterSetterByVal)), runtime, - Handle<>(&O2REG(PutOwnGetterSetterByVal)), + Handle<>(&O2REG(DefineOwnGetterSetterByVal)), dpFlags, accessor) .getStatus(); diff --git a/lib/VM/Interpreter.cpp b/lib/VM/Interpreter.cpp index dc42efa273f..38c2fe768b1 100644 --- a/lib/VM/Interpreter.cpp +++ b/lib/VM/Interpreter.cpp @@ -2648,23 +2648,23 @@ CallResult Interpreter::interpretFunction( DISPATCH; } - CASE(PutOwnByIndexL) { - nextIP = NEXTINST(PutOwnByIndexL); - idVal = ip->iPutOwnByIndexL.op3; - goto putOwnByIndex; + CASE(DefineOwnByIndexL) { + nextIP = NEXTINST(DefineOwnByIndexL); + idVal = ip->iDefineOwnByIndexL.op3; + goto DefineOwnByIndex; } - CASE(PutOwnByIndex) { - nextIP = NEXTINST(PutOwnByIndex); - idVal = ip->iPutOwnByIndex.op3; + CASE(DefineOwnByIndex) { + nextIP = NEXTINST(DefineOwnByIndex); + idVal = ip->iDefineOwnByIndex.op3; } - putOwnByIndex: { + DefineOwnByIndex: { tmpHandle = HermesValue::encodeTrustedNumberValue(idVal); CAPTURE_IP(JSObject::defineOwnComputedPrimitive( - Handle::vmcast(&O1REG(PutOwnByIndex)), + Handle::vmcast(&O1REG(DefineOwnByIndex)), runtime, tmpHandle, DefinePropertyFlags::getDefaultNewPropertyFlags(), - Handle<>(&O2REG(PutOwnByIndex)), + Handle<>(&O2REG(DefineOwnByIndex)), PropOpFlags().plusThrowOnError())); gcScope.flushToSmallCount(KEEP_HANDLES); tmpHandle.clear(); @@ -3641,8 +3641,8 @@ CallResult Interpreter::interpretFunction( DISPATCH; } - CASE_OUTOFLINE(PutOwnByVal); - CASE_OUTOFLINE(PutOwnGetterSetterByVal); + CASE_OUTOFLINE(DefineOwnByVal); + CASE_OUTOFLINE(DefineOwnGetterSetterByVal); CASE_OUTOFLINE(DirectEval); CASE_OUTOFLINE(IteratorBegin); diff --git a/lib/VM/JIT/arm64/JIT.cpp b/lib/VM/JIT/arm64/JIT.cpp index 77450b366a6..52713818a1c 100644 --- a/lib/VM/JIT/arm64/JIT.cpp +++ b/lib/VM/JIT/arm64/JIT.cpp @@ -687,24 +687,25 @@ inline void JITContext::Compiler::emitGetByIndex( em_.getByIndex(FR(inst->op1), FR(inst->op2), inst->op3); } -inline void JITContext::Compiler::emitPutOwnByIndex( - const inst::PutOwnByIndexInst *inst) { - em_.putOwnByIndex(FR(inst->op1), FR(inst->op2), inst->op3); +inline void JITContext::Compiler::emitDefineOwnByIndex( + const inst::DefineOwnByIndexInst *inst) { + em_.defineOwnByIndex(FR(inst->op1), FR(inst->op2), inst->op3); } -inline void JITContext::Compiler::emitPutOwnByIndexL( - const inst::PutOwnByIndexLInst *inst) { - em_.putOwnByIndex(FR(inst->op1), FR(inst->op2), inst->op3); +inline void JITContext::Compiler::emitDefineOwnByIndexL( + const inst::DefineOwnByIndexLInst *inst) { + em_.defineOwnByIndex(FR(inst->op1), FR(inst->op2), inst->op3); } -inline void JITContext::Compiler::emitPutOwnByVal( - const inst::PutOwnByValInst *inst) { - em_.putOwnByVal(FR(inst->op1), FR(inst->op2), FR(inst->op3), (bool)inst->op4); +inline void JITContext::Compiler::emitDefineOwnByVal( + const inst::DefineOwnByValInst *inst) { + em_.defineOwnByVal( + FR(inst->op1), FR(inst->op2), FR(inst->op3), (bool)inst->op4); } -inline void JITContext::Compiler::emitPutOwnGetterSetterByVal( - const inst::PutOwnGetterSetterByValInst *inst) { - em_.putOwnGetterSetterByVal( +inline void JITContext::Compiler::emitDefineOwnGetterSetterByVal( + const inst::DefineOwnGetterSetterByValInst *inst) { + em_.defineOwnGetterSetterByVal( FR(inst->op1), FR(inst->op2), FR(inst->op3), diff --git a/lib/VM/JIT/arm64/JitEmitter.cpp b/lib/VM/JIT/arm64/JitEmitter.cpp index fd793be7101..223a47fb377 100644 --- a/lib/VM/JIT/arm64/JitEmitter.cpp +++ b/lib/VM/JIT/arm64/JitEmitter.cpp @@ -3722,7 +3722,7 @@ asmjit::Label Emitter::newPrefLabel(const char *pref, size_t index) { return a.newNamedLabel(buf); } -void Emitter::putOwnByIndex(FR frTarget, FR frValue, uint32_t key) { +void Emitter::defineOwnByIndex(FR frTarget, FR frValue, uint32_t key) { comment( "// putOwnByIdx r%u, r%u, %u", frTarget.index(), frValue.index(), key); @@ -3741,9 +3741,13 @@ void Emitter::putOwnByIndex(FR frTarget, FR frValue, uint32_t key) { _sh_ljs_put_own_by_index); } -void Emitter::putOwnByVal(FR frTarget, FR frValue, FR frKey, bool enumerable) { +void Emitter::defineOwnByVal( + FR frTarget, + FR frValue, + FR frKey, + bool enumerable) { comment( - "// PutOwnByVal r%u, r%u, r%u", + "// DefineOwnByVal r%u, r%u, r%u", frTarget.index(), frValue.index(), frKey.index()); @@ -3773,14 +3777,14 @@ void Emitter::putOwnByVal(FR frTarget, FR frValue, FR frKey, bool enumerable) { } } -void Emitter::putOwnGetterSetterByVal( +void Emitter::defineOwnGetterSetterByVal( FR frTarget, FR frKey, FR frGetter, FR frSetter, bool enumerable) { comment( - "// PutOwnGetterSetterByVal r%u, r%u, r%u, r%u, %d", + "// DefineOwnGetterSetterByVal r%u, r%u, r%u, r%u, %d", frTarget.index(), frKey.index(), frGetter.index(), diff --git a/lib/VM/JIT/arm64/JitEmitter.h b/lib/VM/JIT/arm64/JitEmitter.h index cf1a011ce5e..cde2d820393 100644 --- a/lib/VM/JIT/arm64/JitEmitter.h +++ b/lib/VM/JIT/arm64/JitEmitter.h @@ -708,9 +708,9 @@ class Emitter { "tryPutByIdStrict", _sh_ljs_try_put_by_id_strict_rjs); - void putOwnByIndex(FR frTarget, FR frValue, uint32_t key); - void putOwnByVal(FR frTarget, FR frValue, FR frKey, bool enumerable); - void putOwnGetterSetterByVal( + void defineOwnByIndex(FR frTarget, FR frValue, uint32_t key); + void defineOwnByVal(FR frTarget, FR frValue, FR frKey, bool enumerable); + void defineOwnGetterSetterByVal( FR frTarget, FR frKey, FR frGetter, diff --git a/lib/VM/StaticH.cpp b/lib/VM/StaticH.cpp index e8b9858c441..a863af98efb 100644 --- a/lib/VM/StaticH.cpp +++ b/lib/VM/StaticH.cpp @@ -1353,7 +1353,7 @@ extern "C" void _sh_ljs_put_own_getter_setter_by_val( } assert( (dpFlags.setSetter || dpFlags.setGetter) && - "No accessor set in PutOwnGetterSetterByVal"); + "No accessor set in DefineOwnGetterSetterByVal"); auto res = PropertyAccessor::create(runtime, getterCallable, setterCallable); diff --git a/test/BCGen/HBC/array.js b/test/BCGen/HBC/array.js index b06d0aea422..fc4243feac9 100644 --- a/test/BCGen/HBC/array.js +++ b/test/BCGen/HBC/array.js @@ -37,9 +37,9 @@ var z = [{}]; //CHECK-NEXT: DeclareGlobalVar "z" //CHECK-NEXT: NewArrayWithBuffer r3, 6, 4, 0 //CHECK-NEXT: LoadConstUndefined r2 -//CHECK-NEXT: PutOwnByIndex r3, r2, 4 +//CHECK-NEXT: DefineOwnByIndex r3, r2, 4 //CHECK-NEXT: LoadConstNull r1 -//CHECK-NEXT: PutOwnByIndex r3, r1, 5 +//CHECK-NEXT: DefineOwnByIndex r3, r1, 5 //CHECK-NEXT: GetGlobalObject r5 //CHECK-NEXT: PutByIdLoose r5, r3, 1, "x" //CHECK-NEXT: NewArrayWithBuffer r3, 5, 3, 11 @@ -48,6 +48,6 @@ var z = [{}]; //CHECK-NEXT: PutByIdLoose r5, r3, 3, "y" //CHECK-NEXT: NewArray r3, 1 //CHECK-NEXT: NewObject r4 -//CHECK-NEXT: PutOwnByIndex r3, r4, 0 +//CHECK-NEXT: DefineOwnByIndex r3, r4, 0 //CHECK-NEXT: PutByIdLoose r5, r3, 4, "z" //CHECK-NEXT: Ret r2 diff --git a/test/BCGen/HBC/gettersetter.js b/test/BCGen/HBC/gettersetter.js index 9344604bf65..f04cec455b3 100644 --- a/test/BCGen/HBC/gettersetter.js +++ b/test/BCGen/HBC/gettersetter.js @@ -51,14 +51,14 @@ var obj = { // CHECK-NEXT: CreateClosure r4, r1, Function // CHECK-NEXT: CreateClosure r3, r1, Function // CHECK-NEXT: LoadConstString r2, "b" -// CHECK-NEXT: PutOwnGetterSetterByVal r5, r2, r4, r3, 1 +// CHECK-NEXT: DefineOwnGetterSetterByVal r5, r2, r4, r3, 1 // CHECK-NEXT: CreateClosure r3, r1, Function // CHECK-NEXT: LoadConstUndefined r0 // CHECK-NEXT: LoadConstString r2, "c" -// CHECK-NEXT: PutOwnGetterSetterByVal r5, r2, r3, r0, 1 +// CHECK-NEXT: DefineOwnGetterSetterByVal r5, r2, r3, r0, 1 // CHECK-NEXT: CreateClosure r2, r1, Function // CHECK-NEXT: LoadConstString r1, "d" -// CHECK-NEXT: PutOwnGetterSetterByVal r5, r1, r0, r2, 1 +// CHECK-NEXT: DefineOwnGetterSetterByVal r5, r1, r0, r2, 1 // CHECK-NEXT: GetGlobalObject r1 // CHECK-NEXT: PutByIdLoose r1, r5, 1, "obj" // CHECK-NEXT: Ret r0 diff --git a/test/BCGen/HBC/hbc_object_literals.js b/test/BCGen/HBC/hbc_object_literals.js index 85504ca067c..c7024fae3d7 100644 --- a/test/BCGen/HBC/hbc_object_literals.js +++ b/test/BCGen/HBC/hbc_object_literals.js @@ -412,14 +412,14 @@ function obj7() { // BCGEN-NEXT:Offset in debug table: source 0x002e, lexical 0x0000 // BCGEN-NEXT: NewObjectWithBuffer r1, 2, 83 // BCGEN-NEXT: LoadConstUndefined r0 -// BCGEN-NEXT: PutOwnByIndex r1, r0, 1 +// BCGEN-NEXT: DefineOwnByIndex r1, r0, 1 // BCGEN-NEXT: Ret r1 // BCGEN:Function(1 params, 2 registers, 0 numbers, 1 non-pointers): // BCGEN-NEXT:Offset in debug table: source 0x0035, lexical 0x0000 // BCGEN-NEXT: NewObjectWithBuffer r1, 2, 83 // BCGEN-NEXT: LoadConstUndefined r0 -// BCGEN-NEXT: PutOwnByIndex r1, r0, 1 +// BCGEN-NEXT: DefineOwnByIndex r1, r0, 1 // BCGEN-NEXT: Ret r1 // BCGEN:Function(1 params, 1 registers, 0 numbers, 0 non-pointers): @@ -430,9 +430,9 @@ function obj7() { // BCGEN-NEXT:Offset in debug table: source 0x003c, lexical 0x0000 // BCGEN-NEXT: NewObjectWithBuffer r1, 3, 65 // BCGEN-NEXT: LoadConstUndefined r0 -// BCGEN-NEXT: PutOwnByIndex r1, r0, 1 -// BCGEN-NEXT: PutOwnByIndex r1, r0, 3 -// BCGEN-NEXT: PutOwnByIndex r1, r0, 2 +// BCGEN-NEXT: DefineOwnByIndex r1, r0, 1 +// BCGEN-NEXT: DefineOwnByIndex r1, r0, 3 +// BCGEN-NEXT: DefineOwnByIndex r1, r0, 2 // BCGEN-NEXT: Ret r1 // BCGEN:Function(1 params, 2 registers, 0 numbers, 1 non-pointers): diff --git a/test/BCGen/HBC/new-array-debug.js b/test/BCGen/HBC/new-array-debug.js index 84731ae9e38..4937a46bcc5 100644 --- a/test/BCGen/HBC/new-array-debug.js +++ b/test/BCGen/HBC/new-array-debug.js @@ -48,11 +48,11 @@ function foo() { // CHECK-NEXT:Offset in debug table: source 0x000a, lexical 0x0000 // CHECK-NEXT:[@ 0] NewArray 1, 3 // CHECK-NEXT:[@ 4] NewArray 0, 0 -// CHECK-NEXT:[@ 8] PutOwnByIndex 1, 0, 0 +// CHECK-NEXT:[@ 8] DefineOwnByIndex 1, 0, 0 // CHECK-NEXT:[@ 12] NewArray 0, 0 -// CHECK-NEXT:[@ 16] PutOwnByIndex 1, 0, 1 +// CHECK-NEXT:[@ 16] DefineOwnByIndex 1, 0, 1 // CHECK-NEXT:[@ 20] NewArray 0, 0 -// CHECK-NEXT:[@ 24] PutOwnByIndex 1, 0, 2 +// CHECK-NEXT:[@ 24] DefineOwnByIndex 1, 0, 2 // CHECK-NEXT:[@ 28] Ret 1 // CHECK:Debug filename table: