Change llint operand macros to inline functions
authorkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Feb 2019 03:23:05 +0000 (03:23 +0000)
committerkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Feb 2019 03:23:05 +0000 (03:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=194248

Reviewed by Mark Lam.

* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::getNonConstantOperand):
(JSC::LLInt::getOperand):
(JSC::LLInt::llint_trace_value):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::getByVal):
(JSC::LLInt::genericCall):
(JSC::LLInt::varargsSetup):
(JSC::LLInt::commonCallEval):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240960 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/llint/LLIntSlowPaths.cpp

index 4d70226..27b9869 100644 (file)
@@ -1,3 +1,20 @@
+2019-02-04  Keith Miller  <keith_miller@apple.com>
+
+        Change llint operand macros to inline functions
+        https://bugs.webkit.org/show_bug.cgi?id=194248
+
+        Reviewed by Mark Lam.
+
+        * llint/LLIntSlowPaths.cpp:
+        (JSC::LLInt::getNonConstantOperand):
+        (JSC::LLInt::getOperand):
+        (JSC::LLInt::llint_trace_value):
+        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
+        (JSC::LLInt::getByVal):
+        (JSC::LLInt::genericCall):
+        (JSC::LLInt::varargsSetup):
+        (JSC::LLInt::commonCallEval):
+
 2019-02-04  Robin Morisset  <rmorisset@apple.com>
 
         when lowering AssertNotEmpty, create the value before creating the patchpoint
index 527d395..2b3c7cb 100644 (file)
@@ -94,8 +94,8 @@ namespace JSC { namespace LLInt {
     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,14 +142,14 @@ namespace JSC { namespace LLInt {
 #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)
 
 #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 @@ extern "C" SlowPathReturnType llint_trace_value(ExecState* exec, const Instructi
     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_SLOW_PATH_DECL(slow_path_new_array)
     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,14 +587,14 @@ LLINT_SLOW_PATH_DECL(slow_path_new_array_with_size)
     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)
 {
     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_SLOW_PATH_DECL(slow_path_instanceof)
 {
     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_SLOW_PATH_DECL(slow_path_instanceof_custom)
     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 @@ LLINT_SLOW_PATH_DECL(slow_path_try_get_by_id)
     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 @@ LLINT_SLOW_PATH_DECL(slow_path_get_by_id_direct)
     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 @@ LLINT_SLOW_PATH_DECL(slow_path_get_by_id)
     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 @@ LLINT_SLOW_PATH_DECL(slow_path_put_by_id)
     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_SLOW_PATH_DECL(slow_path_del_by_id)
     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 @@ LLINT_SLOW_PATH_DECL(slow_path_del_by_id)
 
 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_SLOW_PATH_DECL(slow_path_put_by_val)
     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_SLOW_PATH_DECL(slow_path_put_by_val_direct)
     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_SLOW_PATH_DECL(slow_path_del_by_val)
 {
     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_SLOW_PATH_DECL(slow_path_put_getter_by_id)
 {
     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_SLOW_PATH_DECL(slow_path_put_setter_by_id)
 {
     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_SLOW_PATH_DECL(slow_path_put_getter_setter_by_id)
 {
     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_SLOW_PATH_DECL(slow_path_put_getter_by_val)
 {
     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_SLOW_PATH_DECL(slow_path_put_setter_by_val)
 {
     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,105 +1188,105 @@ LLINT_SLOW_PATH_DECL(slow_path_jtrue)
 {
     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)
 {
     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)
 {
     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)
 {
     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)
 {
     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)
 {
     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)
 {
     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)
 {
     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)
 {
     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)
 {
     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)
 {
     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)
 {
     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)
 {
     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)
 {
     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)
 {
     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_SLOW_PATH_DECL(slow_path_switch_char)
 {
     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_SLOW_PATH_DECL(slow_path_switch_string)
 {
     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_SLOW_PATH_DECL(slow_path_set_function_name)
 {
     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 @@ inline SlowPathReturnType genericCall(ExecState* exec, Op&& bytecode, CodeSpecia
     // - 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,21 +1609,21 @@ LLINT_SLOW_PATH_DECL(slow_path_size_frame_for_varargs)
     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;
     }
     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;
     }
     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 @@ inline SlowPathReturnType varargsSetup(ExecState* exec, const Instruction* pc, C
     // - 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 @@ inline SlowPathReturnType commonCallEval(ExecState* exec, const Instruction* pc,
 {
     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,21 +1747,21 @@ LLINT_SLOW_PATH_DECL(slow_path_strcat)
 {
     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)
 {
     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)
 {
     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 @@ LLINT_SLOW_PATH_DECL(slow_path_get_from_scope)
     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 @@ LLINT_SLOW_PATH_DECL(slow_path_put_to_scope)
     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_SLOW_PATH_DECL(slow_path_log_shadow_chicken_tail)
     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)