Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Side by Side Diff: src/ic/x87/handler-compiler-x87.cc

Issue 1679683004: Revert of Do not eagerly instantiate accessors' JSFunction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ic/x64/handler-compiler-x64.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/ic/call-optimization.h" 7 #include "src/ic/call-optimization.h"
8 #include "src/ic/handler-compiler.h" 8 #include "src/ic/handler-compiler.h"
9 #include "src/ic/ic.h" 9 #include "src/ic/ic.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 190 }
191 191
192 Isolate* isolate = masm->isolate(); 192 Isolate* isolate = masm->isolate();
193 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); 193 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info();
194 bool call_data_undefined = false; 194 bool call_data_undefined = false;
195 // Put call data in place. 195 // Put call data in place.
196 if (api_call_info->data()->IsUndefined()) { 196 if (api_call_info->data()->IsUndefined()) {
197 call_data_undefined = true; 197 call_data_undefined = true;
198 __ mov(data, Immediate(isolate->factory()->undefined_value())); 198 __ mov(data, Immediate(isolate->factory()->undefined_value()));
199 } else { 199 } else {
200 if (optimization.is_constant_call()) { 200 __ mov(data, FieldOperand(callee, JSFunction::kSharedFunctionInfoOffset));
201 __ mov(data, FieldOperand(callee, JSFunction::kSharedFunctionInfoOffset)); 201 __ mov(data, FieldOperand(data, SharedFunctionInfo::kFunctionDataOffset));
202 __ mov(data, FieldOperand(data, SharedFunctionInfo::kFunctionDataOffset)); 202 __ mov(data, FieldOperand(data, FunctionTemplateInfo::kCallCodeOffset));
203 __ mov(data, FieldOperand(data, FunctionTemplateInfo::kCallCodeOffset));
204 } else {
205 __ mov(data, FieldOperand(callee, FunctionTemplateInfo::kCallCodeOffset));
206 }
207 __ mov(data, FieldOperand(data, CallHandlerInfo::kDataOffset)); 203 __ mov(data, FieldOperand(data, CallHandlerInfo::kDataOffset));
208 } 204 }
209 205
210 if (api_call_info->fast_handler()->IsCode()) { 206 if (api_call_info->fast_handler()->IsCode()) {
211 // Just tail call into the code. 207 // Just tail call into the code.
212 __ Jump(handle(Code::cast(api_call_info->fast_handler())), 208 __ Jump(handle(Code::cast(api_call_info->fast_handler())),
213 RelocInfo::CODE_TARGET); 209 RelocInfo::CODE_TARGET);
214 return; 210 return;
215 } 211 }
216 // Put api_function_address in place. 212 // Put api_function_address in place.
217 Address function_address = v8::ToCData<Address>(api_call_info->callback()); 213 Address function_address = v8::ToCData<Address>(api_call_info->callback());
218 __ mov(api_function_address, Immediate(function_address)); 214 __ mov(api_function_address, Immediate(function_address));
219 215
220 // Jump to stub. 216 // Jump to stub.
221 CallApiAccessorStub stub(isolate, is_store, call_data_undefined, 217 CallApiAccessorStub stub(isolate, is_store, call_data_undefined);
222 !optimization.is_constant_call());
223 __ TailCallStub(&stub); 218 __ TailCallStub(&stub);
224 } 219 }
225 220
226 221
227 // Generate code to check that a global property cell is empty. Create 222 // Generate code to check that a global property cell is empty. Create
228 // the property cell at compilation time if no cell exists for the 223 // the property cell at compilation time if no cell exists for the
229 // property. 224 // property.
230 void PropertyHandlerCompiler::GenerateCheckPropertyCell( 225 void PropertyHandlerCompiler::GenerateCheckPropertyCell(
231 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name, 226 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name,
232 Register scratch, Label* miss) { 227 Register scratch, Label* miss) {
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 // Return the generated code. 807 // Return the generated code.
813 return GetCode(kind(), Code::NORMAL, name); 808 return GetCode(kind(), Code::NORMAL, name);
814 } 809 }
815 810
816 811
817 #undef __ 812 #undef __
818 } // namespace internal 813 } // namespace internal
819 } // namespace v8 814 } // namespace v8
820 815
821 #endif // V8_TARGET_ARCH_X87 816 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/ic/x64/handler-compiler-x64.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698