Index: src/ia32/stub-cache-ia32.cc |
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc |
index 3379ff00fdd5b4db01865c5472b7b133a3f78ee7..164088b68a4649291acc2d74a234ce1ee9ac6570 100644 |
--- a/src/ia32/stub-cache-ia32.cc |
+++ b/src/ia32/stub-cache-ia32.cc |
@@ -1322,7 +1322,8 @@ void CallStubCompiler::GenerateLoadFunctionFromCell(JSGlobalPropertyCell* cell, |
MaybeObject* CallStubCompiler::GenerateMissBranch() { |
MaybeObject* maybe_obj = |
isolate()->stub_cache()->ComputeCallMiss(arguments().immediate(), |
- kind_); |
+ kind_, |
+ extra_ic_state_); |
Object* obj; |
if (!maybe_obj->ToObject(&obj)) return maybe_obj; |
__ jmp(Handle<Code>(Code::cast(obj)), RelocInfo::CODE_TARGET); |
@@ -1649,7 +1650,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; |
} |
@@ -1733,7 +1736,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; |
} |
@@ -2364,11 +2369,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 ------------- |
// -- ecx : name |
// -- esp[0] : return address |
@@ -2411,16 +2418,21 @@ MaybeObject* CallStubCompiler::CompileCallGlobal(JSObject* object, |
__ IncrementCounter(counters->call_global_inline(), 1); |
ASSERT(function->is_compiled()); |
ParameterCount expected(function->shared()->formal_parameter_count()); |
+ ReceiverType receiver_type = CallICBase::Contextual::decode(extra_ic_state) |
+ ? IMPLICIT_RECEIVER |
+ : EXPLICIT_RECEIVER; |
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. |
__ InvokeCode(FieldOperand(edi, JSFunction::kCodeEntryOffset), |
- expected, arguments(), JUMP_FUNCTION); |
+ expected, arguments(), JUMP_FUNCTION, |
+ NullCallWrapper(), receiver_type); |
} else { |
Handle<Code> code(function->code()); |
__ InvokeCode(code, expected, arguments(), |
- RelocInfo::CODE_TARGET, JUMP_FUNCTION); |
+ RelocInfo::CODE_TARGET, JUMP_FUNCTION, |
+ NullCallWrapper(), receiver_type); |
} |
// Handle call cache miss. |