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

Side by Side Diff: src/arm64/full-codegen-arm64.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/arm64/code-stubs-arm64.cc ('k') | src/arm64/lithium-codegen-arm64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 7 #if V8_TARGET_ARCH_ARM64
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 #include "src/arm64/code-stubs-arm64.h" 20 #include "src/arm64/code-stubs-arm64.h"
20 #include "src/arm64/macro-assembler-arm64.h" 21 #include "src/arm64/macro-assembler-arm64.h"
21 22
22 namespace v8 { 23 namespace v8 {
23 namespace internal { 24 namespace internal {
24 25
(...skipping 2259 matching lines...) Expand 10 before | Expand all | Expand 10 after
2284 // All calls must have a predictable size in full-codegen code to ensure that 2285 // All calls must have a predictable size in full-codegen code to ensure that
2285 // the debugger can patch them correctly. 2286 // the debugger can patch them correctly.
2286 __ Call(code, RelocInfo::CODE_TARGET, ast_id); 2287 __ Call(code, RelocInfo::CODE_TARGET, ast_id);
2287 } 2288 }
2288 2289
2289 2290
2290 // Code common for calls using the IC. 2291 // Code common for calls using the IC.
2291 void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) { 2292 void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) {
2292 Expression* callee = expr->expression(); 2293 Expression* callee = expr->expression();
2293 2294
2294 CallIC::CallType call_type = callee->IsVariableProxy() 2295 CallICState::CallType call_type =
2295 ? CallIC::FUNCTION 2296 callee->IsVariableProxy() ? CallICState::FUNCTION : CallICState::METHOD;
2296 : CallIC::METHOD;
2297 2297
2298 // Get the target function. 2298 // Get the target function.
2299 if (call_type == CallIC::FUNCTION) { 2299 if (call_type == CallICState::FUNCTION) {
2300 { StackValueContext context(this); 2300 { StackValueContext context(this);
2301 EmitVariableLoad(callee->AsVariableProxy()); 2301 EmitVariableLoad(callee->AsVariableProxy());
2302 PrepareForBailout(callee, NO_REGISTERS); 2302 PrepareForBailout(callee, NO_REGISTERS);
2303 } 2303 }
2304 // Push undefined as receiver. This is patched in the method prologue if it 2304 // Push undefined as receiver. This is patched in the method prologue if it
2305 // is a sloppy mode method. 2305 // is a sloppy mode method.
2306 __ Push(isolate()->factory()->undefined_value()); 2306 __ Push(isolate()->factory()->undefined_value());
2307 } else { 2307 } else {
2308 // Load the function from the receiver. 2308 // Load the function from the receiver.
2309 DCHECK(callee->IsProperty()); 2309 DCHECK(callee->IsProperty());
(...skipping 21 matching lines...) Expand all
2331 DCHECK(callee->IsProperty()); 2331 DCHECK(callee->IsProperty());
2332 __ Peek(LoadDescriptor::ReceiverRegister(), 0); 2332 __ Peek(LoadDescriptor::ReceiverRegister(), 0);
2333 __ Move(LoadDescriptor::NameRegister(), x0); 2333 __ Move(LoadDescriptor::NameRegister(), x0);
2334 EmitKeyedPropertyLoad(callee->AsProperty()); 2334 EmitKeyedPropertyLoad(callee->AsProperty());
2335 PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG); 2335 PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
2336 2336
2337 // Push the target function under the receiver. 2337 // Push the target function under the receiver.
2338 __ Pop(x10); 2338 __ Pop(x10);
2339 __ Push(x0, x10); 2339 __ Push(x0, x10);
2340 2340
2341 EmitCall(expr, CallIC::METHOD); 2341 EmitCall(expr, CallICState::METHOD);
2342 } 2342 }
2343 2343
2344 2344
2345 void FullCodeGenerator::EmitCall(Call* expr, CallIC::CallType call_type) { 2345 void FullCodeGenerator::EmitCall(Call* expr, CallICState::CallType call_type) {
2346 // Load the arguments. 2346 // Load the arguments.
2347 ZoneList<Expression*>* args = expr->arguments(); 2347 ZoneList<Expression*>* args = expr->arguments();
2348 int arg_count = args->length(); 2348 int arg_count = args->length();
2349 { PreservePositionScope scope(masm()->positions_recorder()); 2349 { PreservePositionScope scope(masm()->positions_recorder());
2350 for (int i = 0; i < arg_count; i++) { 2350 for (int i = 0; i < arg_count; i++) {
2351 VisitForStackValue(args->at(i)); 2351 VisitForStackValue(args->at(i));
2352 } 2352 }
2353 } 2353 }
2354 // Record source position of the IC call. 2354 // Record source position of the IC call.
2355 SetSourcePosition(expr->position()); 2355 SetSourcePosition(expr->position());
(...skipping 2553 matching lines...) Expand 10 before | Expand all | Expand 10 after
4909 return previous_; 4909 return previous_;
4910 } 4910 }
4911 4911
4912 4912
4913 #undef __ 4913 #undef __
4914 4914
4915 4915
4916 } } // namespace v8::internal 4916 } } // namespace v8::internal
4917 4917
4918 #endif // V8_TARGET_ARCH_ARM64 4918 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698