Index: src/arm/stub-cache-arm.cc |
diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc |
index f2f8d1152391b57573b5bf3af3ad137d01ecfeaa..7fd229570a62842bffd3d80bed1a0dfd5933286b 100644 |
--- a/src/arm/stub-cache-arm.cc |
+++ b/src/arm/stub-cache-arm.cc |
@@ -1457,8 +1457,10 @@ void CallStubCompiler::GenerateLoadFunctionFromCell(JSGlobalPropertyCell* cell, |
MaybeObject* CallStubCompiler::GenerateMissBranch() { |
- MaybeObject* maybe_obj = masm()->isolate()->stub_cache()->ComputeCallMiss( |
- arguments().immediate(), kind_); |
+ MaybeObject* maybe_obj = |
+ isolate()->stub_cache()->ComputeCallMiss(arguments().immediate(), |
+ kind_, |
+ extra_ic_state_); |
Object* obj; |
if (!maybe_obj->ToObject(&obj)) return maybe_obj; |
__ Jump(Handle<Code>(Code::cast(obj)), RelocInfo::CODE_TARGET); |
@@ -1778,7 +1780,9 @@ MaybeObject* CallStubCompiler::CompileStringCharCodeAtCall( |
Label index_out_of_range; |
Label* index_out_of_range_label = &index_out_of_range; |
- if (kind_ == Code::CALL_IC && extra_ic_state_ == DEFAULT_STRING_STUB) { |
+ if (kind_ == Code::CALL_IC && |
+ (CallICBase::StringStubState::decode(extra_ic_state_) == |
+ DEFAULT_STRING_STUB)) { |
index_out_of_range_label = &miss; |
} |
@@ -1862,7 +1866,9 @@ MaybeObject* CallStubCompiler::CompileStringCharAtCall( |
Label index_out_of_range; |
Label* index_out_of_range_label = &index_out_of_range; |
- if (kind_ == Code::CALL_IC && extra_ic_state_ == DEFAULT_STRING_STUB) { |
+ if (kind_ == Code::CALL_IC && |
+ (CallICBase::StringStubState::decode(extra_ic_state_) == |
+ DEFAULT_STRING_STUB)) { |
index_out_of_range_label = &miss; |
} |
@@ -2489,11 +2495,13 @@ MaybeObject* CallStubCompiler::CompileCallInterceptor(JSObject* object, |
} |
-MaybeObject* CallStubCompiler::CompileCallGlobal(JSObject* object, |
- GlobalObject* holder, |
- JSGlobalPropertyCell* cell, |
- JSFunction* function, |
- String* name) { |
+MaybeObject* CallStubCompiler::CompileCallGlobal( |
+ JSObject* object, |
+ GlobalObject* holder, |
+ JSGlobalPropertyCell* cell, |
+ JSFunction* function, |
+ String* name, |
+ Code::ExtraICState extra_ic_state) { |
// ----------- S t a t e ------------- |
// -- r2 : name |
// -- lr : return address |
@@ -2535,15 +2543,19 @@ MaybeObject* CallStubCompiler::CompileCallGlobal(JSObject* object, |
ASSERT(function->is_compiled()); |
Handle<Code> code(function->code()); |
ParameterCount expected(function->shared()->formal_parameter_count()); |
+ CallKind call_kind = CallICBase::Contextual::decode(extra_ic_state) |
+ ? CALL_AS_FUNCTION |
+ : CALL_AS_METHOD; |
if (V8::UseCrankshaft()) { |
// TODO(kasperl): For now, we always call indirectly through the |
// code field in the function to allow recompilation to take effect |
// without changing any of the call sites. |
__ ldr(r3, FieldMemOperand(r1, JSFunction::kCodeEntryOffset)); |
- __ InvokeCode(r3, expected, arguments(), JUMP_FUNCTION); |
+ __ InvokeCode(r3, expected, arguments(), JUMP_FUNCTION, |
+ NullCallWrapper(), call_kind); |
} else { |
- __ InvokeCode(code, expected, arguments(), |
- RelocInfo::CODE_TARGET, JUMP_FUNCTION); |
+ __ InvokeCode(code, expected, arguments(), RelocInfo::CODE_TARGET, |
+ JUMP_FUNCTION, call_kind); |
} |
// Handle call cache miss. |