| Index: src/ia32/stub-cache-ia32.cc
|
| diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc
|
| index c790a14e87e538792e5fbd6b58d516a2ccf8cc07..a5b93b9b22ebf4ffc6ae62cc42114701efb0ea67 100644
|
| --- a/src/ia32/stub-cache-ia32.cc
|
| +++ b/src/ia32/stub-cache-ia32.cc
|
| @@ -422,14 +422,13 @@ static void CompileCallLoadPropertyWithInterceptor(
|
| // This function uses push() to generate smaller, faster code than
|
| // the version above. It is an optimization that should will be removed
|
| // when api call ICs are generated in hydrogen.
|
| -void StubCompiler::GenerateFastApiCall(MacroAssembler* masm,
|
| - const CallOptimization& optimization,
|
| - Handle<Map> receiver_map,
|
| - Register receiver,
|
| - Register scratch_in,
|
| - bool is_store,
|
| - int argc,
|
| - Register* values) {
|
| +static void GenerateFastApiCall(MacroAssembler* masm,
|
| + const CallOptimization& optimization,
|
| + Handle<Map> receiver_map,
|
| + Register receiver,
|
| + Register scratch_in,
|
| + int argc,
|
| + Register* values) {
|
| // Copy return value.
|
| __ pop(scratch_in);
|
| // receiver
|
| @@ -494,7 +493,7 @@ void StubCompiler::GenerateFastApiCall(MacroAssembler* masm,
|
| __ mov(api_function_address, Immediate(function_address));
|
|
|
| // Jump to stub.
|
| - CallApiFunctionStub stub(is_store, call_data_undefined, argc);
|
| + CallApiFunctionStub stub(true, call_data_undefined, argc);
|
| __ TailCallStub(&stub);
|
| }
|
|
|
| @@ -861,6 +860,9 @@ Register StubCompiler::CheckPrototypes(Handle<HeapType> type,
|
| Label* miss,
|
| PrototypeCheckType check) {
|
| Handle<Map> receiver_map(IC::TypeToMap(*type, isolate()));
|
| + // Make sure that the type feedback oracle harvests the receiver map.
|
| + // TODO(svenpanne) Remove this hack when all ICs are reworked.
|
| + __ mov(scratch1, receiver_map);
|
|
|
| // Make sure there's no overlap between holder and object registers.
|
| ASSERT(!scratch1.is(object_reg) && !scratch1.is(holder_reg));
|
| @@ -1064,6 +1066,15 @@ void LoadStubCompiler::GenerateLoadField(Register reg,
|
|
|
|
|
| void LoadStubCompiler::GenerateLoadCallback(
|
| + const CallOptimization& call_optimization,
|
| + Handle<Map> receiver_map) {
|
| + GenerateFastApiCall(
|
| + masm(), call_optimization, receiver_map,
|
| + receiver(), scratch1(), 0, NULL);
|
| +}
|
| +
|
| +
|
| +void LoadStubCompiler::GenerateLoadCallback(
|
| Register reg,
|
| Handle<ExecutableAccessorInfo> callback) {
|
| // Insert additional parameters into the stack frame above return address.
|
| @@ -1252,6 +1263,24 @@ Handle<Code> StoreStubCompiler::CompileStoreCallback(
|
| }
|
|
|
|
|
| +Handle<Code> StoreStubCompiler::CompileStoreCallback(
|
| + Handle<JSObject> object,
|
| + Handle<JSObject> holder,
|
| + Handle<Name> name,
|
| + const CallOptimization& call_optimization) {
|
| + HandlerFrontend(IC::CurrentTypeOf(object, isolate()),
|
| + receiver(), holder, name);
|
| +
|
| + Register values[] = { value() };
|
| + GenerateFastApiCall(
|
| + masm(), call_optimization, handle(object->map()),
|
| + receiver(), scratch1(), 1, values);
|
| +
|
| + // Return the generated code.
|
| + return GetCode(kind(), Code::FAST, name);
|
| +}
|
| +
|
| +
|
| #undef __
|
| #define __ ACCESS_MASM(masm)
|
|
|
|
|