Modified: trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp (240959 => 240960)
--- trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp 2019-02-05 01:36:28 UTC (rev 240959)
+++ trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp 2019-02-05 03:23:05 UTC (rev 240960)
@@ -94,8 +94,8 @@
LLINT_BEGIN_NO_SET_PC(); \
LLINT_SET_PC_FOR_STUBS()
-#define LLINT_OP(__r) (exec->uncheckedR(__r.offset()))
-#define LLINT_OP_C(__r) (exec->r(__r.offset()))
+inline JSValue getNonConstantOperand(ExecState* exec, const VirtualRegister& operand) { return exec->uncheckedR(operand.offset()).jsValue(); }
+inline JSValue getOperand(ExecState* exec, const VirtualRegister& operand) { return exec->r(operand.offset()).jsValue(); }
#define LLINT_RETURN_TWO(first, second) do { \
return encodeResult(first, second); \
@@ -142,7 +142,7 @@
#define LLINT_RETURN(value) do { \
JSValue __r_returnValue = (value); \
LLINT_CHECK_EXCEPTION(); \
- LLINT_OP(bytecode.m_dst) = __r_returnValue; \
+ exec->uncheckedR(bytecode.m_dst) = __r_returnValue; \
LLINT_END_IMPL(); \
} while (false)
@@ -149,7 +149,7 @@
#define LLINT_RETURN_PROFILED(value) do { \
JSValue __rp_returnValue = (value); \
LLINT_CHECK_EXCEPTION(); \
- LLINT_OP(bytecode.m_dst) = __rp_returnValue; \
+ exec->uncheckedR(bytecode.m_dst) = __rp_returnValue; \
LLINT_PROFILE_VALUE(__rp_returnValue); \
LLINT_END_IMPL(); \
} while (false)
@@ -244,7 +244,7 @@
if (!Options::traceLLIntExecution())
LLINT_END_IMPL();
- JSValue value = LLINT_OP_C(operand).jsValue();
+ JSValue value = getOperand(exec, operand);
union {
struct {
uint32_t tag;
@@ -579,7 +579,7 @@
LLINT_BEGIN();
auto bytecode = pc->as<OpNewArray>();
auto& metadata = bytecode.metadata(exec);
- LLINT_RETURN(constructArrayNegativeIndexed(exec, &metadata.m_arrayAllocationProfile, bitwise_cast<JSValue*>(&LLINT_OP(bytecode.m_argv)), bytecode.m_argc));
+ LLINT_RETURN(constructArrayNegativeIndexed(exec, &metadata.m_arrayAllocationProfile, bitwise_cast<JSValue*>(&exec->uncheckedR(bytecode.m_argv)), bytecode.m_argc));
}
LLINT_SLOW_PATH_DECL(slow_path_new_array_with_size)
@@ -587,7 +587,7 @@
LLINT_BEGIN();
auto bytecode = pc->as<OpNewArrayWithSize>();
auto& metadata = bytecode.metadata(exec);
- LLINT_RETURN(constructArrayWithSizeQuirk(exec, &metadata.m_arrayAllocationProfile, exec->lexicalGlobalObject(), LLINT_OP_C(bytecode.m_length).jsValue()));
+ LLINT_RETURN(constructArrayWithSizeQuirk(exec, &metadata.m_arrayAllocationProfile, exec->lexicalGlobalObject(), getOperand(exec, bytecode.m_length)));
}
LLINT_SLOW_PATH_DECL(slow_path_new_regexp)
@@ -594,7 +594,7 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpNewRegexp>();
- RegExp* regExp = jsCast<RegExp*>(LLINT_OP_C(bytecode.m_regexp).jsValue());
+ RegExp* regExp = jsCast<RegExp*>(getOperand(exec, bytecode.m_regexp));
ASSERT(regExp->isValid());
LLINT_RETURN(RegExpObject::create(vm, exec->lexicalGlobalObject()->regExpStructure(), regExp));
}
@@ -603,8 +603,8 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpInstanceof>();
- JSValue value = LLINT_OP_C(bytecode.m_value).jsValue();
- JSValue proto = LLINT_OP_C(bytecode.m_prototype).jsValue();
+ JSValue value = getOperand(exec, bytecode.m_value);
+ JSValue proto = getOperand(exec, bytecode.m_prototype);
LLINT_RETURN(jsBoolean(JSObject::defaultHasInstance(exec, value, proto)));
}
@@ -613,9 +613,9 @@
LLINT_BEGIN();
auto bytecode = pc->as<OpInstanceofCustom>();
- JSValue value = LLINT_OP_C(bytecode.m_value).jsValue();
- JSValue constructor = LLINT_OP_C(bytecode.m_constructor).jsValue();
- JSValue hasInstanceValue = LLINT_OP_C(bytecode.m_hasInstanceValue).jsValue();
+ JSValue value = getOperand(exec, bytecode.m_value);
+ JSValue constructor = getOperand(exec, bytecode.m_constructor);
+ JSValue hasInstanceValue = getOperand(exec, bytecode.m_hasInstanceValue);
ASSERT(constructor.isObject());
ASSERT(hasInstanceValue != exec->lexicalGlobalObject()->functionProtoHasInstanceSymbolFunction() || !constructor.getObject()->structure(vm)->typeInfo().implementsDefaultHasInstance());
@@ -630,7 +630,7 @@
auto bytecode = pc->as<OpTryGetById>();
CodeBlock* codeBlock = exec->codeBlock();
const Identifier& ident = codeBlock->identifier(bytecode.m_property);
- JSValue baseValue = LLINT_OP_C(bytecode.m_base).jsValue();
+ JSValue baseValue = getOperand(exec, bytecode.m_base);
PropertySlot slot(baseValue, PropertySlot::PropertySlot::InternalMethodType::VMInquiry);
baseValue.getPropertySlot(exec, ident, slot);
@@ -645,7 +645,7 @@
auto bytecode = pc->as<OpGetByIdDirect>();
CodeBlock* codeBlock = exec->codeBlock();
const Identifier& ident = codeBlock->identifier(bytecode.m_property);
- JSValue baseValue = LLINT_OP_C(bytecode.m_base).jsValue();
+ JSValue baseValue = getOperand(exec, bytecode.m_base);
PropertySlot slot(baseValue, PropertySlot::PropertySlot::InternalMethodType::GetOwnProperty);
bool found = baseValue.getOwnPropertySlot(exec, ident, slot);
@@ -758,12 +758,12 @@
auto& metadata = bytecode.metadata(exec);
CodeBlock* codeBlock = exec->codeBlock();
const Identifier& ident = codeBlock->identifier(bytecode.m_property);
- JSValue baseValue = LLINT_OP_C(bytecode.m_base).jsValue();
+ JSValue baseValue = getOperand(exec, bytecode.m_base);
PropertySlot slot(baseValue, PropertySlot::PropertySlot::InternalMethodType::Get);
JSValue result = baseValue.get(exec, ident, slot);
LLINT_CHECK_EXCEPTION();
- LLINT_OP(bytecode.m_dst) = result;
+ exec->uncheckedR(bytecode.m_dst) = result;
if (!LLINT_ALWAYS_ACCESS_SLOW
&& baseValue.isCell()
@@ -844,12 +844,12 @@
CodeBlock* codeBlock = exec->codeBlock();
const Identifier& ident = codeBlock->identifier(bytecode.m_property);
- JSValue baseValue = LLINT_OP_C(bytecode.m_base).jsValue();
+ JSValue baseValue = getOperand(exec, bytecode.m_base);
PutPropertySlot slot(baseValue, codeBlock->isStrictMode(), codeBlock->putByIdContext());
if (bytecode.m_flags & PutByIdIsDirect)
- CommonSlowPaths::putDirectWithReify(vm, exec, asObject(baseValue), ident, LLINT_OP_C(bytecode.m_value).jsValue(), slot);
+ CommonSlowPaths::putDirectWithReify(vm, exec, asObject(baseValue), ident, getOperand(exec, bytecode.m_value), slot);
else
- baseValue.putInline(exec, ident, LLINT_OP_C(bytecode.m_value).jsValue(), slot);
+ baseValue.putInline(exec, ident, getOperand(exec, bytecode.m_value), slot);
LLINT_CHECK_EXCEPTION();
if (!LLINT_ALWAYS_ACCESS_SLOW
@@ -922,7 +922,7 @@
LLINT_BEGIN();
auto bytecode = pc->as<OpDelById>();
CodeBlock* codeBlock = exec->codeBlock();
- JSObject* baseObject = LLINT_OP_C(bytecode.m_base).jsValue().toObject(exec);
+ JSObject* baseObject = getOperand(exec, bytecode.m_base).toObject(exec);
LLINT_CHECK_EXCEPTION();
bool couldDelete = baseObject->methodTable(vm)->deleteProperty(baseObject, exec, codeBlock->identifier(bytecode.m_property));
LLINT_CHECK_EXCEPTION();
@@ -933,8 +933,8 @@
static ALWAYS_INLINE JSValue getByVal(VM& vm, ExecState* exec, OpGetByVal bytecode)
{
- JSValue baseValue = LLINT_OP_C(bytecode.m_base).jsValue();
- JSValue subscript = LLINT_OP_C(bytecode.m_property).jsValue();
+ JSValue baseValue = getOperand(exec, bytecode.m_base);
+ JSValue subscript = getOperand(exec, bytecode.m_property);
auto scope = DECLARE_THROW_SCOPE(vm);
if (LIKELY(baseValue.isCell() && subscript.isString())) {
@@ -1000,9 +1000,9 @@
LLINT_BEGIN();
auto bytecode = pc->as<OpPutByVal>();
- JSValue baseValue = LLINT_OP_C(bytecode.m_base).jsValue();
- JSValue subscript = LLINT_OP_C(bytecode.m_property).jsValue();
- JSValue value = LLINT_OP_C(bytecode.m_value).jsValue();
+ JSValue baseValue = getOperand(exec, bytecode.m_base);
+ JSValue subscript = getOperand(exec, bytecode.m_property);
+ JSValue value = getOperand(exec, bytecode.m_value);
bool isStrictMode = exec->codeBlock()->isStrictMode();
if (LIKELY(subscript.isUInt32())) {
@@ -1031,9 +1031,9 @@
LLINT_BEGIN();
auto bytecode = pc->as<OpPutByValDirect>();
- JSValue baseValue = LLINT_OP_C(bytecode.m_base).jsValue();
- JSValue subscript = LLINT_OP_C(bytecode.m_property).jsValue();
- JSValue value = LLINT_OP_C(bytecode.m_value).jsValue();
+ JSValue baseValue = getOperand(exec, bytecode.m_base);
+ JSValue subscript = getOperand(exec, bytecode.m_property);
+ JSValue value = getOperand(exec, bytecode.m_value);
RELEASE_ASSERT(baseValue.isObject());
JSObject* baseObject = asObject(baseValue);
bool isStrictMode = exec->codeBlock()->isStrictMode();
@@ -1071,11 +1071,11 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpDelByVal>();
- JSValue baseValue = LLINT_OP_C(bytecode.m_base).jsValue();
+ JSValue baseValue = getOperand(exec, bytecode.m_base);
JSObject* baseObject = baseValue.toObject(exec);
LLINT_CHECK_EXCEPTION();
- JSValue subscript = LLINT_OP_C(bytecode.m_property).jsValue();
+ JSValue subscript = getOperand(exec, bytecode.m_property);
bool couldDelete;
@@ -1100,12 +1100,12 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpPutGetterById>();
- ASSERT(LLINT_OP(bytecode.m_base).jsValue().isObject());
- JSObject* baseObj = asObject(LLINT_OP(bytecode.m_base).jsValue());
+ ASSERT(getNonConstantOperand(exec, bytecode.m_base).isObject());
+ JSObject* baseObj = asObject(getNonConstantOperand(exec, bytecode.m_base));
unsigned options = bytecode.m_attributes;
- JSValue getter = LLINT_OP(bytecode.m_accessor).jsValue();
+ JSValue getter = getNonConstantOperand(exec, bytecode.m_accessor);
ASSERT(getter.isObject());
baseObj->putGetter(exec, exec->codeBlock()->identifier(bytecode.m_property), asObject(getter), options);
@@ -1116,12 +1116,12 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpPutSetterById>();
- ASSERT(LLINT_OP(bytecode.m_base).jsValue().isObject());
- JSObject* baseObj = asObject(LLINT_OP(bytecode.m_base).jsValue());
+ ASSERT(getNonConstantOperand(exec, bytecode.m_base).isObject());
+ JSObject* baseObj = asObject(getNonConstantOperand(exec, bytecode.m_base));
unsigned options = bytecode.m_attributes;
- JSValue setter = LLINT_OP(bytecode.m_accessor).jsValue();
+ JSValue setter = getNonConstantOperand(exec, bytecode.m_accessor);
ASSERT(setter.isObject());
baseObj->putSetter(exec, exec->codeBlock()->identifier(bytecode.m_property), asObject(setter), options);
@@ -1132,11 +1132,11 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpPutGetterSetterById>();
- ASSERT(LLINT_OP(bytecode.m_base).jsValue().isObject());
- JSObject* baseObject = asObject(LLINT_OP(bytecode.m_base).jsValue());
+ ASSERT(getNonConstantOperand(exec, bytecode.m_base).isObject());
+ JSObject* baseObject = asObject(getNonConstantOperand(exec, bytecode.m_base));
- JSValue getter = LLINT_OP(bytecode.m_getter).jsValue();
- JSValue setter = LLINT_OP(bytecode.m_setter).jsValue();
+ JSValue getter = getNonConstantOperand(exec, bytecode.m_getter);
+ JSValue setter = getNonConstantOperand(exec, bytecode.m_setter);
ASSERT(getter.isObject() || setter.isObject());
GetterSetter* accessor = GetterSetter::create(vm, exec->lexicalGlobalObject(), getter, setter);
@@ -1148,13 +1148,13 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpPutGetterByVal>();
- ASSERT(LLINT_OP(bytecode.m_base).jsValue().isObject());
- JSObject* baseObj = asObject(LLINT_OP(bytecode.m_base).jsValue());
- JSValue subscript = LLINT_OP_C(bytecode.m_property).jsValue();
+ ASSERT(getNonConstantOperand(exec, bytecode.m_base).isObject());
+ JSObject* baseObj = asObject(getNonConstantOperand(exec, bytecode.m_base));
+ JSValue subscript = getOperand(exec, bytecode.m_property);
unsigned options = bytecode.m_attributes;
- JSValue getter = LLINT_OP(bytecode.m_accessor).jsValue();
+ JSValue getter = getNonConstantOperand(exec, bytecode.m_accessor);
ASSERT(getter.isObject());
auto property = subscript.toPropertyKey(exec);
@@ -1168,13 +1168,13 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpPutSetterByVal>();
- ASSERT(LLINT_OP(bytecode.m_base).jsValue().isObject());
- JSObject* baseObj = asObject(LLINT_OP(bytecode.m_base).jsValue());
- JSValue subscript = LLINT_OP_C(bytecode.m_property).jsValue();
+ ASSERT(getNonConstantOperand(exec, bytecode.m_base).isObject());
+ JSObject* baseObj = asObject(getNonConstantOperand(exec, bytecode.m_base));
+ JSValue subscript = getOperand(exec, bytecode.m_property);
unsigned options = bytecode.m_attributes;
- JSValue setter = LLINT_OP(bytecode.m_accessor).jsValue();
+ JSValue setter = getNonConstantOperand(exec, bytecode.m_accessor);
ASSERT(setter.isObject());
auto property = subscript.toPropertyKey(exec);
@@ -1188,7 +1188,7 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpJtrue>();
- LLINT_BRANCH(LLINT_OP_C(bytecode.m_condition).jsValue().toBoolean(exec));
+ LLINT_BRANCH(getOperand(exec, bytecode.m_condition).toBoolean(exec));
}
LLINT_SLOW_PATH_DECL(slow_path_jfalse)
@@ -1195,7 +1195,7 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpJfalse>();
- LLINT_BRANCH(!LLINT_OP_C(bytecode.m_condition).jsValue().toBoolean(exec));
+ LLINT_BRANCH(!getOperand(exec, bytecode.m_condition).toBoolean(exec));
}
LLINT_SLOW_PATH_DECL(slow_path_jless)
@@ -1202,7 +1202,7 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpJless>();
- LLINT_BRANCH(jsLess<true>(exec, LLINT_OP_C(bytecode.m_lhs).jsValue(), LLINT_OP_C(bytecode.m_rhs).jsValue()));
+ LLINT_BRANCH(jsLess<true>(exec, getOperand(exec, bytecode.m_lhs), getOperand(exec, bytecode.m_rhs)));
}
LLINT_SLOW_PATH_DECL(slow_path_jnless)
@@ -1209,7 +1209,7 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpJnless>();
- LLINT_BRANCH(!jsLess<true>(exec, LLINT_OP_C(bytecode.m_lhs).jsValue(), LLINT_OP_C(bytecode.m_rhs).jsValue()));
+ LLINT_BRANCH(!jsLess<true>(exec, getOperand(exec, bytecode.m_lhs), getOperand(exec, bytecode.m_rhs)));
}
LLINT_SLOW_PATH_DECL(slow_path_jgreater)
@@ -1216,7 +1216,7 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpJgreater>();
- LLINT_BRANCH(jsLess<false>(exec, LLINT_OP_C(bytecode.m_rhs).jsValue(), LLINT_OP_C(bytecode.m_lhs).jsValue()));
+ LLINT_BRANCH(jsLess<false>(exec, getOperand(exec, bytecode.m_rhs), getOperand(exec, bytecode.m_lhs)));
}
LLINT_SLOW_PATH_DECL(slow_path_jngreater)
@@ -1223,7 +1223,7 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpJngreater>();
- LLINT_BRANCH(!jsLess<false>(exec, LLINT_OP_C(bytecode.m_rhs).jsValue(), LLINT_OP_C(bytecode.m_lhs).jsValue()));
+ LLINT_BRANCH(!jsLess<false>(exec, getOperand(exec, bytecode.m_rhs), getOperand(exec, bytecode.m_lhs)));
}
LLINT_SLOW_PATH_DECL(slow_path_jlesseq)
@@ -1230,7 +1230,7 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpJlesseq>();
- LLINT_BRANCH(jsLessEq<true>(exec, LLINT_OP_C(bytecode.m_lhs).jsValue(), LLINT_OP_C(bytecode.m_rhs).jsValue()));
+ LLINT_BRANCH(jsLessEq<true>(exec, getOperand(exec, bytecode.m_lhs), getOperand(exec, bytecode.m_rhs)));
}
LLINT_SLOW_PATH_DECL(slow_path_jnlesseq)
@@ -1237,7 +1237,7 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpJnlesseq>();
- LLINT_BRANCH(!jsLessEq<true>(exec, LLINT_OP_C(bytecode.m_lhs).jsValue(), LLINT_OP_C(bytecode.m_rhs).jsValue()));
+ LLINT_BRANCH(!jsLessEq<true>(exec, getOperand(exec, bytecode.m_lhs), getOperand(exec, bytecode.m_rhs)));
}
LLINT_SLOW_PATH_DECL(slow_path_jgreatereq)
@@ -1244,7 +1244,7 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpJgreatereq>();
- LLINT_BRANCH(jsLessEq<false>(exec, LLINT_OP_C(bytecode.m_rhs).jsValue(), LLINT_OP_C(bytecode.m_lhs).jsValue()));
+ LLINT_BRANCH(jsLessEq<false>(exec, getOperand(exec, bytecode.m_rhs), getOperand(exec, bytecode.m_lhs)));
}
LLINT_SLOW_PATH_DECL(slow_path_jngreatereq)
@@ -1251,7 +1251,7 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpJngreatereq>();
- LLINT_BRANCH(!jsLessEq<false>(exec, LLINT_OP_C(bytecode.m_rhs).jsValue(), LLINT_OP_C(bytecode.m_lhs).jsValue()));
+ LLINT_BRANCH(!jsLessEq<false>(exec, getOperand(exec, bytecode.m_rhs), getOperand(exec, bytecode.m_lhs)));
}
LLINT_SLOW_PATH_DECL(slow_path_jeq)
@@ -1258,7 +1258,7 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpJeq>();
- LLINT_BRANCH(JSValue::equal(exec, LLINT_OP_C(bytecode.m_lhs).jsValue(), LLINT_OP_C(bytecode.m_rhs).jsValue()));
+ LLINT_BRANCH(JSValue::equal(exec, getOperand(exec, bytecode.m_lhs), getOperand(exec, bytecode.m_rhs)));
}
LLINT_SLOW_PATH_DECL(slow_path_jneq)
@@ -1265,7 +1265,7 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpJneq>();
- LLINT_BRANCH(!JSValue::equal(exec, LLINT_OP_C(bytecode.m_lhs).jsValue(), LLINT_OP_C(bytecode.m_rhs).jsValue()));
+ LLINT_BRANCH(!JSValue::equal(exec, getOperand(exec, bytecode.m_lhs), getOperand(exec, bytecode.m_rhs)));
}
LLINT_SLOW_PATH_DECL(slow_path_jstricteq)
@@ -1272,7 +1272,7 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpJstricteq>();
- LLINT_BRANCH(JSValue::strictEqual(exec, LLINT_OP_C(bytecode.m_lhs).jsValue(), LLINT_OP_C(bytecode.m_rhs).jsValue()));
+ LLINT_BRANCH(JSValue::strictEqual(exec, getOperand(exec, bytecode.m_lhs), getOperand(exec, bytecode.m_rhs)));
}
LLINT_SLOW_PATH_DECL(slow_path_jnstricteq)
@@ -1279,7 +1279,7 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpJnstricteq>();
- LLINT_BRANCH(!JSValue::strictEqual(exec, LLINT_OP_C(bytecode.m_lhs).jsValue(), LLINT_OP_C(bytecode.m_rhs).jsValue()));
+ LLINT_BRANCH(!JSValue::strictEqual(exec, getOperand(exec, bytecode.m_lhs), getOperand(exec, bytecode.m_rhs)));
}
LLINT_SLOW_PATH_DECL(slow_path_switch_imm)
@@ -1286,7 +1286,7 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpSwitchImm>();
- JSValue scrutinee = LLINT_OP_C(bytecode.m_scrutinee).jsValue();
+ JSValue scrutinee = getOperand(exec, bytecode.m_scrutinee);
ASSERT(scrutinee.isDouble());
double value = scrutinee.asDouble();
int32_t intValue = static_cast<int32_t>(value);
@@ -1303,7 +1303,7 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpSwitchChar>();
- JSValue scrutinee = LLINT_OP_C(bytecode.m_scrutinee).jsValue();
+ JSValue scrutinee = getOperand(exec, bytecode.m_scrutinee);
ASSERT(scrutinee.isString());
JSString* string = asString(scrutinee);
ASSERT(string->length() == 1);
@@ -1318,7 +1318,7 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpSwitchString>();
- JSValue scrutinee = LLINT_OP_C(bytecode.m_scrutinee).jsValue();
+ JSValue scrutinee = getOperand(exec, bytecode.m_scrutinee);
int defaultOffset = JUMP_OFFSET(bytecode.m_defaultOffset);
if (!scrutinee.isString())
JUMP_TO(defaultOffset);
@@ -1421,8 +1421,8 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpSetFunctionName>();
- JSFunction* func = jsCast<JSFunction*>(LLINT_OP(bytecode.m_function).Register::unboxedCell());
- JSValue name = LLINT_OP_C(bytecode.m_name).Register::jsValue();
+ JSFunction* func = jsCast<JSFunction*>(getNonConstantOperand(exec, bytecode.m_function));
+ JSValue name = getOperand(exec, bytecode.m_name);
func->setFunctionName(exec, name);
LLINT_END();
}
@@ -1566,7 +1566,7 @@
// - If possible, link the call's inline cache.
// - Return a tuple of machine code address to call and the new call frame.
- JSValue calleeAsValue = LLINT_OP_C(bytecode.m_callee).jsValue();
+ JSValue calleeAsValue = getOperand(exec, bytecode.m_callee);
ExecState* execCallee = exec - bytecode.m_argv;
@@ -1609,7 +1609,7 @@
case op_call_varargs: {
auto bytecode = pc->as<OpCallVarargs>();
numUsedStackSlots = -bytecode.m_firstFree.offset();
- arguments = LLINT_OP_C(bytecode.m_arguments).jsValue();
+ arguments = getOperand(exec, bytecode.m_arguments);
firstVarArg = bytecode.m_firstVarArg;
break;
}
@@ -1616,7 +1616,7 @@
case op_tail_call_varargs: {
auto bytecode = pc->as<OpTailCallVarargs>();
numUsedStackSlots = -bytecode.m_firstFree.offset();
- arguments = LLINT_OP_C(bytecode.m_arguments).jsValue();
+ arguments = getOperand(exec, bytecode.m_arguments);
firstVarArg = bytecode.m_firstVarArg;
break;
}
@@ -1623,7 +1623,7 @@
case op_construct_varargs: {
auto bytecode = pc->as<OpConstructVarargs>();
numUsedStackSlots = -bytecode.m_firstFree.offset();
- arguments = LLINT_OP_C(bytecode.m_arguments).jsValue();
+ arguments = getOperand(exec, bytecode.m_arguments);
firstVarArg = bytecode.m_firstVarArg;
break;
}
@@ -1674,15 +1674,15 @@
// - Return a tuple of machine code address to call and the new call frame.
auto bytecode = pc->as<Op>();
- JSValue calleeAsValue = LLINT_OP_C(bytecode.m_callee).jsValue();
+ JSValue calleeAsValue = getOperand(exec, bytecode.m_callee);
ExecState* execCallee = vm.newCallFrameReturnValue;
if (set == SetArgumentsWith::Object) {
- setupVarargsFrameAndSetThis(exec, execCallee, LLINT_OP_C(bytecode.m_thisValue).jsValue(), LLINT_OP_C(bytecode.m_arguments).jsValue(), bytecode.m_firstVarArg, vm.varargsLength);
+ setupVarargsFrameAndSetThis(exec, execCallee, getOperand(exec, bytecode.m_thisValue), getOperand(exec, bytecode.m_arguments), bytecode.m_firstVarArg, vm.varargsLength);
LLINT_CALL_CHECK_EXCEPTION(exec, exec);
} else
- setupForwardArgumentsFrameAndSetThis(exec, execCallee, LLINT_OP_C(bytecode.m_thisValue).jsValue(), vm.varargsLength);
+ setupForwardArgumentsFrameAndSetThis(exec, execCallee, getOperand(exec, bytecode.m_thisValue), vm.varargsLength);
execCallee->setCallerFrame(exec);
execCallee->uncheckedR(CallFrameSlot::callee) = calleeAsValue;
@@ -1715,7 +1715,7 @@
{
LLINT_BEGIN_NO_SET_PC();
auto bytecode = pc->as<OpCallEval>();
- JSValue calleeAsValue = LLINT_OP(bytecode.m_callee).jsValue();
+ JSValue calleeAsValue = getNonConstantOperand(exec, bytecode.m_callee);
ExecState* execCallee = exec - bytecode.m_argv;
@@ -1747,7 +1747,7 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpStrcat>();
- LLINT_RETURN(jsStringFromRegisterArray(exec, &LLINT_OP(bytecode.m_src), bytecode.m_count));
+ LLINT_RETURN(jsStringFromRegisterArray(exec, &exec->uncheckedR(bytecode.m_src), bytecode.m_count));
}
LLINT_SLOW_PATH_DECL(slow_path_to_primitive)
@@ -1754,7 +1754,7 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpToPrimitive>();
- LLINT_RETURN(LLINT_OP_C(bytecode.m_src).jsValue().toPrimitive(exec));
+ LLINT_RETURN(getOperand(exec, bytecode.m_src).toPrimitive(exec));
}
LLINT_SLOW_PATH_DECL(slow_path_throw)
@@ -1761,7 +1761,7 @@
{
LLINT_BEGIN();
auto bytecode = pc->as<OpThrow>();
- LLINT_THROW(LLINT_OP_C(bytecode.m_value).jsValue());
+ LLINT_THROW(getOperand(exec, bytecode.m_value));
}
LLINT_SLOW_PATH_DECL(slow_path_handle_traps)
@@ -1796,7 +1796,7 @@
auto bytecode = pc->as<OpGetFromScope>();
auto& metadata = bytecode.metadata(exec);
const Identifier& ident = exec->codeBlock()->identifier(bytecode.m_var);
- JSObject* scope = jsCast<JSObject*>(LLINT_OP(bytecode.m_scope).jsValue());
+ JSObject* scope = jsCast<JSObject*>(getNonConstantOperand(exec, bytecode.m_scope));
// ModuleVar is always converted to ClosureVar for get_from_scope.
ASSERT(metadata.m_getPutInfo.resolveType() != ModuleVar);
@@ -1832,8 +1832,8 @@
auto& metadata = bytecode.metadata(exec);
CodeBlock* codeBlock = exec->codeBlock();
const Identifier& ident = codeBlock->identifier(bytecode.m_var);
- JSObject* scope = jsCast<JSObject*>(LLINT_OP(bytecode.m_scope).jsValue());
- JSValue value = LLINT_OP_C(bytecode.m_value).jsValue();
+ JSObject* scope = jsCast<JSObject*>(getNonConstantOperand(exec, bytecode.m_scope));
+ JSValue value = getOperand(exec, bytecode.m_value);
if (metadata.m_getPutInfo.resolveType() == LocalClosureVar) {
JSLexicalEnvironment* environment = jsCast<JSLexicalEnvironment*>(scope);
environment->variableAt(ScopeOffset(metadata.m_operand)).set(vm, environment, value);
@@ -1897,7 +1897,7 @@
LLINT_BEGIN();
auto bytecode = pc->as<OpLogShadowChickenTail>();
- JSValue thisValue = LLINT_OP(bytecode.m_thisValue).jsValue();
+ JSValue thisValue = getNonConstantOperand(exec, bytecode.m_thisValue);
JSScope* scope = exec->uncheckedR(bytecode.m_scope).Register::scope();
#if USE(JSVALUE64)