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

Side by Side Diff: src/x87/code-stubs-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/x64/code-stubs-x64.cc ('k') | no next file » | 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/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 5192 matching lines...) Expand 10 before | Expand all | Expand 10 after
5203 __ mov(Operand::StaticVariable(limit_address), edi); 5203 __ mov(Operand::StaticVariable(limit_address), edi);
5204 __ mov(edi, eax); 5204 __ mov(edi, eax);
5205 __ mov(Operand(esp, 0), 5205 __ mov(Operand(esp, 0),
5206 Immediate(ExternalReference::isolate_address(isolate))); 5206 Immediate(ExternalReference::isolate_address(isolate)));
5207 __ mov(eax, Immediate(delete_extensions)); 5207 __ mov(eax, Immediate(delete_extensions));
5208 __ call(eax); 5208 __ call(eax);
5209 __ mov(eax, edi); 5209 __ mov(eax, edi);
5210 __ jmp(&leave_exit_frame); 5210 __ jmp(&leave_exit_frame);
5211 } 5211 }
5212 5212
5213
5213 static void CallApiFunctionStubHelper(MacroAssembler* masm, 5214 static void CallApiFunctionStubHelper(MacroAssembler* masm,
5214 const ParameterCount& argc, 5215 const ParameterCount& argc,
5215 bool return_first_arg, 5216 bool return_first_arg,
5216 bool call_data_undefined, bool is_lazy) { 5217 bool call_data_undefined) {
5217 // ----------- S t a t e ------------- 5218 // ----------- S t a t e -------------
5218 // -- edi : callee 5219 // -- edi : callee
5219 // -- ebx : call_data 5220 // -- ebx : call_data
5220 // -- ecx : holder 5221 // -- ecx : holder
5221 // -- edx : api_function_address 5222 // -- edx : api_function_address
5222 // -- esi : context 5223 // -- esi : context
5223 // -- eax : number of arguments if argc is a register 5224 // -- eax : number of arguments if argc is a register
5224 // -- 5225 // --
5225 // -- esp[0] : return address 5226 // -- esp[0] : return address
5226 // -- esp[4] : last argument 5227 // -- esp[4] : last argument
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
5280 // isolate 5281 // isolate
5281 __ push(Immediate(reinterpret_cast<int>(masm->isolate()))); 5282 __ push(Immediate(reinterpret_cast<int>(masm->isolate())));
5282 // holder 5283 // holder
5283 __ push(holder); 5284 __ push(holder);
5284 5285
5285 __ mov(scratch, esp); 5286 __ mov(scratch, esp);
5286 5287
5287 // push return address 5288 // push return address
5288 __ push(return_address); 5289 __ push(return_address);
5289 5290
5290 if (!is_lazy) { 5291 // load context from callee
5291 // load context from callee 5292 __ mov(context, FieldOperand(callee, JSFunction::kContextOffset));
5292 __ mov(context, FieldOperand(callee, JSFunction::kContextOffset));
5293 }
5294 5293
5295 // API function gets reference to the v8::Arguments. If CPU profiler 5294 // API function gets reference to the v8::Arguments. If CPU profiler
5296 // is enabled wrapper function will be called and we need to pass 5295 // is enabled wrapper function will be called and we need to pass
5297 // address of the callback as additional parameter, always allocate 5296 // address of the callback as additional parameter, always allocate
5298 // space for it. 5297 // space for it.
5299 const int kApiArgc = 1 + 1; 5298 const int kApiArgc = 1 + 1;
5300 5299
5301 // Allocate the v8::Arguments structure in the arguments' space since 5300 // Allocate the v8::Arguments structure in the arguments' space since
5302 // it's not controlled by GC. 5301 // it's not controlled by GC.
5303 const int kApiStackSpace = 4; 5302 const int kApiStackSpace = 4;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
5355 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, 5354 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref,
5356 ApiParameterOperand(1), stack_space, 5355 ApiParameterOperand(1), stack_space,
5357 stack_space_operand, return_value_operand, 5356 stack_space_operand, return_value_operand,
5358 &context_restore_operand); 5357 &context_restore_operand);
5359 } 5358 }
5360 5359
5361 5360
5362 void CallApiFunctionStub::Generate(MacroAssembler* masm) { 5361 void CallApiFunctionStub::Generate(MacroAssembler* masm) {
5363 bool call_data_undefined = this->call_data_undefined(); 5362 bool call_data_undefined = this->call_data_undefined();
5364 CallApiFunctionStubHelper(masm, ParameterCount(eax), false, 5363 CallApiFunctionStubHelper(masm, ParameterCount(eax), false,
5365 call_data_undefined, false); 5364 call_data_undefined);
5366 } 5365 }
5367 5366
5368 5367
5369 void CallApiAccessorStub::Generate(MacroAssembler* masm) { 5368 void CallApiAccessorStub::Generate(MacroAssembler* masm) {
5370 bool is_store = this->is_store(); 5369 bool is_store = this->is_store();
5371 int argc = this->argc(); 5370 int argc = this->argc();
5372 bool call_data_undefined = this->call_data_undefined(); 5371 bool call_data_undefined = this->call_data_undefined();
5373 bool is_lazy = this->is_lazy();
5374 CallApiFunctionStubHelper(masm, ParameterCount(argc), is_store, 5372 CallApiFunctionStubHelper(masm, ParameterCount(argc), is_store,
5375 call_data_undefined, is_lazy); 5373 call_data_undefined);
5376 } 5374 }
5377 5375
5378 5376
5379 void CallApiGetterStub::Generate(MacroAssembler* masm) { 5377 void CallApiGetterStub::Generate(MacroAssembler* masm) {
5380 // ----------- S t a t e ------------- 5378 // ----------- S t a t e -------------
5381 // -- esp[0] : return address 5379 // -- esp[0] : return address
5382 // -- esp[4] : name 5380 // -- esp[4] : name
5383 // -- esp[8 .. (8 + kArgsLength*4)] : v8::PropertyCallbackInfo::args_ 5381 // -- esp[8 .. (8 + kArgsLength*4)] : v8::PropertyCallbackInfo::args_
5384 // -- ... 5382 // -- ...
5385 // -- edx : api_function_address 5383 // -- edx : api_function_address
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
5424 return_value_operand, NULL); 5422 return_value_operand, NULL);
5425 } 5423 }
5426 5424
5427 5425
5428 #undef __ 5426 #undef __
5429 5427
5430 } // namespace internal 5428 } // namespace internal
5431 } // namespace v8 5429 } // namespace v8
5432 5430
5433 #endif // V8_TARGET_ARCH_X87 5431 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698