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

Side by Side Diff: src/ia32/full-codegen-ia32.cc

Issue 565873002: Removing ic.h from code-stubs.h (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE and mips. Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
11 #include "src/codegen.h" 11 #include "src/codegen.h"
12 #include "src/compiler.h" 12 #include "src/compiler.h"
13 #include "src/debug.h" 13 #include "src/debug.h"
14 #include "src/full-codegen.h" 14 #include "src/full-codegen.h"
15 #include "src/ic/ic.h"
15 #include "src/isolate-inl.h" 16 #include "src/isolate-inl.h"
16 #include "src/parser.h" 17 #include "src/parser.h"
17 #include "src/scopes.h" 18 #include "src/scopes.h"
18 19
19 namespace v8 { 20 namespace v8 {
20 namespace internal { 21 namespace internal {
21 22
22 #define __ ACCESS_MASM(masm_) 23 #define __ ACCESS_MASM(masm_)
23 24
24 25
(...skipping 2514 matching lines...) Expand 10 before | Expand all | Expand 10 after
2539 TypeFeedbackId ast_id) { 2540 TypeFeedbackId ast_id) {
2540 ic_total_count_++; 2541 ic_total_count_++;
2541 __ call(code, RelocInfo::CODE_TARGET, ast_id); 2542 __ call(code, RelocInfo::CODE_TARGET, ast_id);
2542 } 2543 }
2543 2544
2544 2545
2545 // Code common for calls using the IC. 2546 // Code common for calls using the IC.
2546 void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) { 2547 void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) {
2547 Expression* callee = expr->expression(); 2548 Expression* callee = expr->expression();
2548 2549
2549 CallIC::CallType call_type = callee->IsVariableProxy() 2550 CallICState::CallType call_type =
2550 ? CallIC::FUNCTION 2551 callee->IsVariableProxy() ? CallICState::FUNCTION : CallICState::METHOD;
2551 : CallIC::METHOD;
2552 // Get the target function. 2552 // Get the target function.
2553 if (call_type == CallIC::FUNCTION) { 2553 if (call_type == CallICState::FUNCTION) {
2554 { StackValueContext context(this); 2554 { StackValueContext context(this);
2555 EmitVariableLoad(callee->AsVariableProxy()); 2555 EmitVariableLoad(callee->AsVariableProxy());
2556 PrepareForBailout(callee, NO_REGISTERS); 2556 PrepareForBailout(callee, NO_REGISTERS);
2557 } 2557 }
2558 // Push undefined as receiver. This is patched in the method prologue if it 2558 // Push undefined as receiver. This is patched in the method prologue if it
2559 // is a sloppy mode method. 2559 // is a sloppy mode method.
2560 __ push(Immediate(isolate()->factory()->undefined_value())); 2560 __ push(Immediate(isolate()->factory()->undefined_value()));
2561 } else { 2561 } else {
2562 // Load the function from the receiver. 2562 // Load the function from the receiver.
2563 DCHECK(callee->IsProperty()); 2563 DCHECK(callee->IsProperty());
(...skipping 21 matching lines...) Expand all
2585 DCHECK(callee->IsProperty()); 2585 DCHECK(callee->IsProperty());
2586 __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0)); 2586 __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0));
2587 __ mov(LoadDescriptor::NameRegister(), eax); 2587 __ mov(LoadDescriptor::NameRegister(), eax);
2588 EmitKeyedPropertyLoad(callee->AsProperty()); 2588 EmitKeyedPropertyLoad(callee->AsProperty());
2589 PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG); 2589 PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
2590 2590
2591 // Push the target function under the receiver. 2591 // Push the target function under the receiver.
2592 __ push(Operand(esp, 0)); 2592 __ push(Operand(esp, 0));
2593 __ mov(Operand(esp, kPointerSize), eax); 2593 __ mov(Operand(esp, kPointerSize), eax);
2594 2594
2595 EmitCall(expr, CallIC::METHOD); 2595 EmitCall(expr, CallICState::METHOD);
2596 } 2596 }
2597 2597
2598 2598
2599 void FullCodeGenerator::EmitCall(Call* expr, CallIC::CallType call_type) { 2599 void FullCodeGenerator::EmitCall(Call* expr, CallICState::CallType call_type) {
2600 // Load the arguments. 2600 // Load the arguments.
2601 ZoneList<Expression*>* args = expr->arguments(); 2601 ZoneList<Expression*>* args = expr->arguments();
2602 int arg_count = args->length(); 2602 int arg_count = args->length();
2603 { PreservePositionScope scope(masm()->positions_recorder()); 2603 { PreservePositionScope scope(masm()->positions_recorder());
2604 for (int i = 0; i < arg_count; i++) { 2604 for (int i = 0; i < arg_count; i++) {
2605 VisitForStackValue(args->at(i)); 2605 VisitForStackValue(args->at(i));
2606 } 2606 }
2607 } 2607 }
2608 2608
2609 // Record source position of the IC call. 2609 // Record source position of the IC call.
(...skipping 2213 matching lines...) Expand 10 before | Expand all | Expand 10 after
4823 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4823 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4824 Assembler::target_address_at(call_target_address, 4824 Assembler::target_address_at(call_target_address,
4825 unoptimized_code)); 4825 unoptimized_code));
4826 return OSR_AFTER_STACK_CHECK; 4826 return OSR_AFTER_STACK_CHECK;
4827 } 4827 }
4828 4828
4829 4829
4830 } } // namespace v8::internal 4830 } } // namespace v8::internal
4831 4831
4832 #endif // V8_TARGET_ARCH_IA32 4832 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698