WebKit Bugzilla
Attachment 361120 Details for
Bug 194248
: Change llint operand macros to inline functions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194248-20190204161528.patch (text/plain), 27.21 KB, created by
Keith Miller
on 2019-02-04 16:15:29 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Keith Miller
Created:
2019-02-04 16:15:29 PST
Size:
27.21 KB
patch
obsolete
>Subversion Revision: 240928 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 5efd343acdb30d8521068585c6e9a27ebddc1100..9270588e07ca6d306577fda3db98c98eb9db87f8 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -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 NOBODY (OOPS!). >+ >+ * llint/LLIntSlowPaths.cpp: >+ (JSC::LLInt::getOperand): >+ (JSC::LLInt::getConstantOperand): >+ (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 Mark Lam <mark.lam@apple.com> > > DFG's doesGC() is incorrect about the SameValue node's behavior. >diff --git a/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp b/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp >index 527d395d8d795c48efc4437ff3edc1e5110c3004..a709ea7852fd32fa99d4f3cf984a1b921ffcf329 100644 >--- a/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp >+++ b/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp >@@ -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 getOperand(ExecState* exec, const VirtualRegister& operand) { return exec->uncheckedR(operand.offset()).jsValue(); } >+inline JSValue getConstantOperand(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; \ >+ getOperand(exec, 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; \ >+ getOperand(exec, 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 = getConstantOperand(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(), getConstantOperand(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*>(getConstantOperand(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 = getConstantOperand(exec, bytecode.m_value); >+ JSValue proto = getConstantOperand(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 = getConstantOperand(exec, bytecode.m_value); >+ JSValue constructor = getConstantOperand(exec, bytecode.m_constructor); >+ JSValue hasInstanceValue = getConstantOperand(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 = getConstantOperand(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 = getConstantOperand(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 = getConstantOperand(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; >+ getOperand(exec, 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 = getConstantOperand(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, getConstantOperand(exec, bytecode.m_value), slot); > else >- baseValue.putInline(exec, ident, LLINT_OP_C(bytecode.m_value).jsValue(), slot); >+ baseValue.putInline(exec, ident, getConstantOperand(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 = getConstantOperand(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 = getConstantOperand(exec, bytecode.m_base); >+ JSValue subscript = getConstantOperand(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 = getConstantOperand(exec, bytecode.m_base); >+ JSValue subscript = getConstantOperand(exec, bytecode.m_property); >+ JSValue value = getConstantOperand(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 = getConstantOperand(exec, bytecode.m_base); >+ JSValue subscript = getConstantOperand(exec, bytecode.m_property); >+ JSValue value = getConstantOperand(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 = getConstantOperand(exec, bytecode.m_base); > JSObject* baseObject = baseValue.toObject(exec); > LLINT_CHECK_EXCEPTION(); > >- JSValue subscript = LLINT_OP_C(bytecode.m_property).jsValue(); >+ JSValue subscript = getConstantOperand(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(getOperand(exec, bytecode.m_base).isObject()); >+ JSObject* baseObj = asObject(getOperand(exec, bytecode.m_base)); > > unsigned options = bytecode.m_attributes; > >- JSValue getter = LLINT_OP(bytecode.m_accessor).jsValue(); >+ JSValue getter = getOperand(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(getOperand(exec, bytecode.m_base).isObject()); >+ JSObject* baseObj = asObject(getOperand(exec, bytecode.m_base)); > > unsigned options = bytecode.m_attributes; > >- JSValue setter = LLINT_OP(bytecode.m_accessor).jsValue(); >+ JSValue setter = getOperand(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(getOperand(exec, bytecode.m_base).isObject()); >+ JSObject* baseObject = asObject(getOperand(exec, bytecode.m_base)); > >- JSValue getter = LLINT_OP(bytecode.m_getter).jsValue(); >- JSValue setter = LLINT_OP(bytecode.m_setter).jsValue(); >+ JSValue getter = getOperand(exec, bytecode.m_getter); >+ JSValue setter = getOperand(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(getOperand(exec, bytecode.m_base).isObject()); >+ JSObject* baseObj = asObject(getOperand(exec, bytecode.m_base)); >+ JSValue subscript = getConstantOperand(exec, bytecode.m_property); > > unsigned options = bytecode.m_attributes; > >- JSValue getter = LLINT_OP(bytecode.m_accessor).jsValue(); >+ JSValue getter = getOperand(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(getOperand(exec, bytecode.m_base).isObject()); >+ JSObject* baseObj = asObject(getOperand(exec, bytecode.m_base)); >+ JSValue subscript = getConstantOperand(exec, bytecode.m_property); > > unsigned options = bytecode.m_attributes; > >- JSValue setter = LLINT_OP(bytecode.m_accessor).jsValue(); >+ JSValue setter = getOperand(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(getConstantOperand(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(!getConstantOperand(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, getConstantOperand(exec, bytecode.m_lhs), getConstantOperand(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, getConstantOperand(exec, bytecode.m_lhs), getConstantOperand(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, getConstantOperand(exec, bytecode.m_rhs), getConstantOperand(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, getConstantOperand(exec, bytecode.m_rhs), getConstantOperand(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, getConstantOperand(exec, bytecode.m_lhs), getConstantOperand(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, getConstantOperand(exec, bytecode.m_lhs), getConstantOperand(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, getConstantOperand(exec, bytecode.m_rhs), getConstantOperand(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, getConstantOperand(exec, bytecode.m_rhs), getConstantOperand(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, getConstantOperand(exec, bytecode.m_lhs), getConstantOperand(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, getConstantOperand(exec, bytecode.m_lhs), getConstantOperand(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, getConstantOperand(exec, bytecode.m_lhs), getConstantOperand(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, getConstantOperand(exec, bytecode.m_lhs), getConstantOperand(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 = getConstantOperand(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 = getConstantOperand(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 = getConstantOperand(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*>(getOperand(exec, bytecode.m_function)); >+ JSValue name = getConstantOperand(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 = getConstantOperand(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 = getConstantOperand(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 = getConstantOperand(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 = getConstantOperand(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 = getConstantOperand(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, getConstantOperand(exec, bytecode.m_thisValue), getConstantOperand(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, getConstantOperand(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 = getOperand(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(getConstantOperand(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(getConstantOperand(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*>(getOperand(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*>(getOperand(exec, bytecode.m_scope)); >+ JSValue value = getConstantOperand(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 = getOperand(exec, bytecode.m_thisValue); > JSScope* scope = exec->uncheckedR(bytecode.m_scope).Register::scope(); > > #if USE(JSVALUE64)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194248
:
361120
|
361129