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

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

Issue 352583008: Rollback to Version 3.28.4 (based on bleeding_edge revision r22031) (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 6 years, 5 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/x64/debug-x64.cc ('k') | src/x64/ic-x64.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_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after
1365 __ cmpp(ContextOperand(temp, Context::EXTENSION_INDEX), Immediate(0)); 1365 __ cmpp(ContextOperand(temp, Context::EXTENSION_INDEX), Immediate(0));
1366 __ j(not_equal, slow); 1366 __ j(not_equal, slow);
1367 // Load next context in chain. 1367 // Load next context in chain.
1368 __ movp(temp, ContextOperand(temp, Context::PREVIOUS_INDEX)); 1368 __ movp(temp, ContextOperand(temp, Context::PREVIOUS_INDEX));
1369 __ jmp(&next); 1369 __ jmp(&next);
1370 __ bind(&fast); 1370 __ bind(&fast);
1371 } 1371 }
1372 1372
1373 // All extension objects were empty and it is safe to use a global 1373 // All extension objects were empty and it is safe to use a global
1374 // load IC call. 1374 // load IC call.
1375 __ movp(LoadIC::ReceiverRegister(), GlobalObjectOperand()); 1375 __ movp(rax, GlobalObjectOperand());
1376 __ Move(LoadIC::NameRegister(), var->name()); 1376 __ Move(rcx, var->name());
1377 ContextualMode mode = (typeof_state == INSIDE_TYPEOF) 1377 ContextualMode mode = (typeof_state == INSIDE_TYPEOF)
1378 ? NOT_CONTEXTUAL 1378 ? NOT_CONTEXTUAL
1379 : CONTEXTUAL; 1379 : CONTEXTUAL;
1380 CallLoadIC(mode); 1380 CallLoadIC(mode);
1381 } 1381 }
1382 1382
1383 1383
1384 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var, 1384 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var,
1385 Label* slow) { 1385 Label* slow) {
1386 ASSERT(var->IsContextSlot()); 1386 ASSERT(var->IsContextSlot());
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1445 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) { 1445 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
1446 // Record position before possible IC call. 1446 // Record position before possible IC call.
1447 SetSourcePosition(proxy->position()); 1447 SetSourcePosition(proxy->position());
1448 Variable* var = proxy->var(); 1448 Variable* var = proxy->var();
1449 1449
1450 // Three cases: global variables, lookup variables, and all other types of 1450 // Three cases: global variables, lookup variables, and all other types of
1451 // variables. 1451 // variables.
1452 switch (var->location()) { 1452 switch (var->location()) {
1453 case Variable::UNALLOCATED: { 1453 case Variable::UNALLOCATED: {
1454 Comment cmnt(masm_, "[ Global variable"); 1454 Comment cmnt(masm_, "[ Global variable");
1455 __ Move(LoadIC::NameRegister(), var->name()); 1455 // Use inline caching. Variable name is passed in rcx and the global
1456 __ movp(LoadIC::ReceiverRegister(), GlobalObjectOperand()); 1456 // object on the stack.
1457 __ Move(rcx, var->name());
1458 __ movp(rax, GlobalObjectOperand());
1457 CallLoadIC(CONTEXTUAL); 1459 CallLoadIC(CONTEXTUAL);
1458 context()->Plug(rax); 1460 context()->Plug(rax);
1459 break; 1461 break;
1460 } 1462 }
1461 1463
1462 case Variable::PARAMETER: 1464 case Variable::PARAMETER:
1463 case Variable::LOCAL: 1465 case Variable::LOCAL:
1464 case Variable::CONTEXT: { 1466 case Variable::CONTEXT: {
1465 Comment cmnt(masm_, var->IsContextSlot() ? "[ Context slot" 1467 Comment cmnt(masm_, var->IsContextSlot() ? "[ Context slot"
1466 : "[ Stack slot"); 1468 : "[ Stack slot");
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
2035 __ CallRuntime(Runtime::kSuspendJSGeneratorObject, 1); 2037 __ CallRuntime(Runtime::kSuspendJSGeneratorObject, 1);
2036 __ movp(context_register(), 2038 __ movp(context_register(),
2037 Operand(rbp, StandardFrameConstants::kContextOffset)); 2039 Operand(rbp, StandardFrameConstants::kContextOffset));
2038 __ Pop(rax); // result 2040 __ Pop(rax); // result
2039 EmitReturnSequence(); 2041 EmitReturnSequence();
2040 __ bind(&l_resume); // received in rax 2042 __ bind(&l_resume); // received in rax
2041 __ PopTryHandler(); 2043 __ PopTryHandler();
2042 2044
2043 // receiver = iter; f = 'next'; arg = received; 2045 // receiver = iter; f = 'next'; arg = received;
2044 __ bind(&l_next); 2046 __ bind(&l_next);
2045 Register keyedload_receiver = KeyedLoadIC::ReceiverRegister();
2046 Register keyedload_name = KeyedLoadIC::NameRegister();
2047 ASSERT(keyedload_receiver.is(rdx));
2048 ASSERT(keyedload_name.is(rax));
2049
2050 __ LoadRoot(rcx, Heap::knext_stringRootIndex); // "next" 2047 __ LoadRoot(rcx, Heap::knext_stringRootIndex); // "next"
2051 __ Push(rcx); 2048 __ Push(rcx);
2052 __ Push(Operand(rsp, 2 * kPointerSize)); // iter 2049 __ Push(Operand(rsp, 2 * kPointerSize)); // iter
2053 __ Push(rax); // received 2050 __ Push(rax); // received
2054 2051
2055 // result = receiver[f](arg); 2052 // result = receiver[f](arg);
2056 __ bind(&l_call); 2053 __ bind(&l_call);
2057 __ movp(keyedload_receiver, Operand(rsp, kPointerSize)); 2054 __ movp(rdx, Operand(rsp, kPointerSize));
2058 __ movp(keyedload_name, Operand(rsp, 2 * kPointerSize)); 2055 __ movp(rax, Operand(rsp, 2 * kPointerSize));
2059 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); 2056 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
2060 CallIC(ic, TypeFeedbackId::None()); 2057 CallIC(ic, TypeFeedbackId::None());
2061 __ movp(rdi, rax); 2058 __ movp(rdi, rax);
2062 __ movp(Operand(rsp, 2 * kPointerSize), rdi); 2059 __ movp(Operand(rsp, 2 * kPointerSize), rdi);
2063 CallFunctionStub stub(isolate(), 1, CALL_AS_METHOD); 2060 CallFunctionStub stub(isolate(), 1, CALL_AS_METHOD);
2064 __ CallStub(&stub); 2061 __ CallStub(&stub);
2065 2062
2066 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); 2063 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset));
2067 __ Drop(1); // The function is still on the stack; drop it. 2064 __ Drop(1); // The function is still on the stack; drop it.
2068 2065
2069 // if (!result.done) goto l_try; 2066 // if (!result.done) goto l_try;
2070 __ bind(&l_loop); 2067 __ bind(&l_loop);
2071 Register load_receiver = LoadIC::ReceiverRegister(); 2068 __ Push(rax); // save result
2072 Register load_name = LoadIC::NameRegister(); 2069 __ LoadRoot(rcx, Heap::kdone_stringRootIndex); // "done"
2073 ASSERT(load_receiver.is(rax)); 2070 CallLoadIC(NOT_CONTEXTUAL); // result.done in rax
2074 ASSERT(load_name.is(rcx));
2075
2076 __ Push(load_receiver); // save result
2077 __ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done"
2078 CallLoadIC(NOT_CONTEXTUAL); // rax=result.done
2079 Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate()); 2071 Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate());
2080 CallIC(bool_ic); 2072 CallIC(bool_ic);
2081 __ testp(result_register(), result_register()); 2073 __ testp(result_register(), result_register());
2082 __ j(zero, &l_try); 2074 __ j(zero, &l_try);
2083 2075
2084 // result.value 2076 // result.value
2085 __ Pop(load_receiver); // result 2077 __ Pop(rax); // result
2086 __ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value" 2078 __ LoadRoot(rcx, Heap::kvalue_stringRootIndex); // "value"
2087 CallLoadIC(NOT_CONTEXTUAL); // result.value in rax 2079 CallLoadIC(NOT_CONTEXTUAL); // result.value in rax
2088 context()->DropAndPlug(2, rax); // drop iter and g 2080 context()->DropAndPlug(2, rax); // drop iter and g
2089 break; 2081 break;
2090 } 2082 }
2091 } 2083 }
2092 } 2084 }
2093 2085
2094 2086
2095 void FullCodeGenerator::EmitGeneratorResume(Expression *generator, 2087 void FullCodeGenerator::EmitGeneratorResume(Expression *generator,
2096 Expression *value, 2088 Expression *value,
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
2237 // Only the value field needs a write barrier, as the other values are in the 2229 // Only the value field needs a write barrier, as the other values are in the
2238 // root set. 2230 // root set.
2239 __ RecordWriteField(rax, JSGeneratorObject::kResultValuePropertyOffset, 2231 __ RecordWriteField(rax, JSGeneratorObject::kResultValuePropertyOffset,
2240 rcx, rdx, kDontSaveFPRegs); 2232 rcx, rdx, kDontSaveFPRegs);
2241 } 2233 }
2242 2234
2243 2235
2244 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { 2236 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
2245 SetSourcePosition(prop->position()); 2237 SetSourcePosition(prop->position());
2246 Literal* key = prop->key()->AsLiteral(); 2238 Literal* key = prop->key()->AsLiteral();
2247 __ Move(LoadIC::NameRegister(), key->value()); 2239 __ Move(rcx, key->value());
2248 CallLoadIC(NOT_CONTEXTUAL, prop->PropertyFeedbackId()); 2240 CallLoadIC(NOT_CONTEXTUAL, prop->PropertyFeedbackId());
2249 } 2241 }
2250 2242
2251 2243
2252 void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) { 2244 void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
2253 SetSourcePosition(prop->position()); 2245 SetSourcePosition(prop->position());
2254 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); 2246 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
2255 CallIC(ic, prop->PropertyFeedbackId()); 2247 CallIC(ic, prop->PropertyFeedbackId());
2256 } 2248 }
2257 2249
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
2496 context()->Plug(rax); 2488 context()->Plug(rax);
2497 } 2489 }
2498 2490
2499 2491
2500 void FullCodeGenerator::VisitProperty(Property* expr) { 2492 void FullCodeGenerator::VisitProperty(Property* expr) {
2501 Comment cmnt(masm_, "[ Property"); 2493 Comment cmnt(masm_, "[ Property");
2502 Expression* key = expr->key(); 2494 Expression* key = expr->key();
2503 2495
2504 if (key->IsPropertyName()) { 2496 if (key->IsPropertyName()) {
2505 VisitForAccumulatorValue(expr->obj()); 2497 VisitForAccumulatorValue(expr->obj());
2506 ASSERT(rax.is(LoadIC::ReceiverRegister()));
2507 EmitNamedPropertyLoad(expr); 2498 EmitNamedPropertyLoad(expr);
2508 PrepareForBailoutForId(expr->LoadId(), TOS_REG); 2499 PrepareForBailoutForId(expr->LoadId(), TOS_REG);
2509 context()->Plug(rax); 2500 context()->Plug(rax);
2510 } else { 2501 } else {
2511 VisitForStackValue(expr->obj()); 2502 VisitForStackValue(expr->obj());
2512 VisitForAccumulatorValue(expr->key()); 2503 VisitForAccumulatorValue(expr->key());
2513 ASSERT(rax.is(KeyedLoadIC::NameRegister())); 2504 __ Pop(rdx);
2514 __ Pop(KeyedLoadIC::ReceiverRegister());
2515 EmitKeyedPropertyLoad(expr); 2505 EmitKeyedPropertyLoad(expr);
2516 context()->Plug(rax); 2506 context()->Plug(rax);
2517 } 2507 }
2518 } 2508 }
2519 2509
2520 2510
2521 void FullCodeGenerator::CallIC(Handle<Code> code, 2511 void FullCodeGenerator::CallIC(Handle<Code> code,
2522 TypeFeedbackId ast_id) { 2512 TypeFeedbackId ast_id) {
2523 ic_total_count_++; 2513 ic_total_count_++;
2524 __ call(code, RelocInfo::CODE_TARGET, ast_id); 2514 __ call(code, RelocInfo::CODE_TARGET, ast_id);
(...skipping 12 matching lines...) Expand all
2537 { StackValueContext context(this); 2527 { StackValueContext context(this);
2538 EmitVariableLoad(callee->AsVariableProxy()); 2528 EmitVariableLoad(callee->AsVariableProxy());
2539 PrepareForBailout(callee, NO_REGISTERS); 2529 PrepareForBailout(callee, NO_REGISTERS);
2540 } 2530 }
2541 // Push undefined as receiver. This is patched in the method prologue if it 2531 // Push undefined as receiver. This is patched in the method prologue if it
2542 // is a sloppy mode method. 2532 // is a sloppy mode method.
2543 __ Push(isolate()->factory()->undefined_value()); 2533 __ Push(isolate()->factory()->undefined_value());
2544 } else { 2534 } else {
2545 // Load the function from the receiver. 2535 // Load the function from the receiver.
2546 ASSERT(callee->IsProperty()); 2536 ASSERT(callee->IsProperty());
2547 __ movp(LoadIC::ReceiverRegister(), Operand(rsp, 0)); 2537 __ movp(rax, Operand(rsp, 0));
2548 EmitNamedPropertyLoad(callee->AsProperty()); 2538 EmitNamedPropertyLoad(callee->AsProperty());
2549 PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG); 2539 PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
2550 // Push the target function under the receiver. 2540 // Push the target function under the receiver.
2551 __ Push(Operand(rsp, 0)); 2541 __ Push(Operand(rsp, 0));
2552 __ movp(Operand(rsp, kPointerSize), rax); 2542 __ movp(Operand(rsp, kPointerSize), rax);
2553 } 2543 }
2554 2544
2555 EmitCall(expr, call_type); 2545 EmitCall(expr, call_type);
2556 } 2546 }
2557 2547
2558 2548
2559 // Common code for calls using the IC. 2549 // Common code for calls using the IC.
2560 void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr, 2550 void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr,
2561 Expression* key) { 2551 Expression* key) {
2562 // Load the key. 2552 // Load the key.
2563 VisitForAccumulatorValue(key); 2553 VisitForAccumulatorValue(key);
2564 ASSERT(rax.is(KeyedLoadIC::NameRegister()));
2565 2554
2566 Expression* callee = expr->expression(); 2555 Expression* callee = expr->expression();
2567 2556
2568 // Load the function from the receiver. 2557 // Load the function from the receiver.
2569 ASSERT(callee->IsProperty()); 2558 ASSERT(callee->IsProperty());
2570 __ movp(KeyedLoadIC::ReceiverRegister(), Operand(rsp, 0)); 2559 __ movp(rdx, Operand(rsp, 0));
2571 EmitKeyedPropertyLoad(callee->AsProperty()); 2560 EmitKeyedPropertyLoad(callee->AsProperty());
2572 PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG); 2561 PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
2573 2562
2574 // Push the target function under the receiver. 2563 // Push the target function under the receiver.
2575 __ Push(Operand(rsp, 0)); 2564 __ Push(Operand(rsp, 0));
2576 __ movp(Operand(rsp, kPointerSize), rax); 2565 __ movp(Operand(rsp, kPointerSize), rax);
2577 2566
2578 EmitCall(expr, CallIC::METHOD); 2567 EmitCall(expr, CallIC::METHOD);
2579 } 2568 }
2580 2569
(...skipping 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after
4038 Comment cmnt(masm_, "[ CallRuntime"); 4027 Comment cmnt(masm_, "[ CallRuntime");
4039 ZoneList<Expression*>* args = expr->arguments(); 4028 ZoneList<Expression*>* args = expr->arguments();
4040 int arg_count = args->length(); 4029 int arg_count = args->length();
4041 4030
4042 if (expr->is_jsruntime()) { 4031 if (expr->is_jsruntime()) {
4043 // Push the builtins object as receiver. 4032 // Push the builtins object as receiver.
4044 __ movp(rax, GlobalObjectOperand()); 4033 __ movp(rax, GlobalObjectOperand());
4045 __ Push(FieldOperand(rax, GlobalObject::kBuiltinsOffset)); 4034 __ Push(FieldOperand(rax, GlobalObject::kBuiltinsOffset));
4046 4035
4047 // Load the function from the receiver. 4036 // Load the function from the receiver.
4048 __ movp(LoadIC::ReceiverRegister(), Operand(rsp, 0)); 4037 __ movp(rax, Operand(rsp, 0));
4049 __ Move(LoadIC::NameRegister(), expr->name()); 4038 __ Move(rcx, expr->name());
4050 CallLoadIC(NOT_CONTEXTUAL, expr->CallRuntimeFeedbackId()); 4039 CallLoadIC(NOT_CONTEXTUAL, expr->CallRuntimeFeedbackId());
4051 4040
4052 // Push the target function under the receiver. 4041 // Push the target function under the receiver.
4053 __ Push(Operand(rsp, 0)); 4042 __ Push(Operand(rsp, 0));
4054 __ movp(Operand(rsp, kPointerSize), rax); 4043 __ movp(Operand(rsp, kPointerSize), rax);
4055 4044
4056 // Push the arguments ("left-to-right"). 4045 // Push the arguments ("left-to-right").
4057 for (int i = 0; i < arg_count; i++) { 4046 for (int i = 0; i < arg_count; i++) {
4058 VisitForStackValue(args->at(i)); 4047 VisitForStackValue(args->at(i));
4059 } 4048 }
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
4218 ASSERT(expr->expression()->AsVariableProxy()->var() != NULL); 4207 ASSERT(expr->expression()->AsVariableProxy()->var() != NULL);
4219 AccumulatorValueContext context(this); 4208 AccumulatorValueContext context(this);
4220 EmitVariableLoad(expr->expression()->AsVariableProxy()); 4209 EmitVariableLoad(expr->expression()->AsVariableProxy());
4221 } else { 4210 } else {
4222 // Reserve space for result of postfix operation. 4211 // Reserve space for result of postfix operation.
4223 if (expr->is_postfix() && !context()->IsEffect()) { 4212 if (expr->is_postfix() && !context()->IsEffect()) {
4224 __ Push(Smi::FromInt(0)); 4213 __ Push(Smi::FromInt(0));
4225 } 4214 }
4226 if (assign_type == NAMED_PROPERTY) { 4215 if (assign_type == NAMED_PROPERTY) {
4227 VisitForAccumulatorValue(prop->obj()); 4216 VisitForAccumulatorValue(prop->obj());
4228 ASSERT(rax.is(LoadIC::ReceiverRegister()));
4229 __ Push(rax); // Copy of receiver, needed for later store. 4217 __ Push(rax); // Copy of receiver, needed for later store.
4230 EmitNamedPropertyLoad(prop); 4218 EmitNamedPropertyLoad(prop);
4231 } else { 4219 } else {
4232 VisitForStackValue(prop->obj()); 4220 VisitForStackValue(prop->obj());
4233 VisitForAccumulatorValue(prop->key()); 4221 VisitForAccumulatorValue(prop->key());
4234 ASSERT(rax.is(KeyedLoadIC::NameRegister())); 4222 __ movp(rdx, Operand(rsp, 0)); // Leave receiver on stack
4235 // Leave receiver on stack 4223 __ Push(rax); // Copy of key, needed for later store.
4236 __ movp(KeyedLoadIC::ReceiverRegister(), Operand(rsp, 0));
4237 // Copy of key, needed for later store.
4238 __ Push(KeyedLoadIC::NameRegister());
4239 EmitKeyedPropertyLoad(prop); 4224 EmitKeyedPropertyLoad(prop);
4240 } 4225 }
4241 } 4226 }
4242 4227
4243 // We need a second deoptimization point after loading the value 4228 // We need a second deoptimization point after loading the value
4244 // in case evaluating the property load my have a side effect. 4229 // in case evaluating the property load my have a side effect.
4245 if (assign_type == VARIABLE) { 4230 if (assign_type == VARIABLE) {
4246 PrepareForBailout(expr->expression(), TOS_REG); 4231 PrepareForBailout(expr->expression(), TOS_REG);
4247 } else { 4232 } else {
4248 PrepareForBailoutForId(prop->LoadId(), TOS_REG); 4233 PrepareForBailoutForId(prop->LoadId(), TOS_REG);
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
4381 } 4366 }
4382 4367
4383 4368
4384 void FullCodeGenerator::VisitForTypeofValue(Expression* expr) { 4369 void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
4385 VariableProxy* proxy = expr->AsVariableProxy(); 4370 VariableProxy* proxy = expr->AsVariableProxy();
4386 ASSERT(!context()->IsEffect()); 4371 ASSERT(!context()->IsEffect());
4387 ASSERT(!context()->IsTest()); 4372 ASSERT(!context()->IsTest());
4388 4373
4389 if (proxy != NULL && proxy->var()->IsUnallocated()) { 4374 if (proxy != NULL && proxy->var()->IsUnallocated()) {
4390 Comment cmnt(masm_, "[ Global variable"); 4375 Comment cmnt(masm_, "[ Global variable");
4391 __ Move(LoadIC::NameRegister(), proxy->name()); 4376 __ Move(rcx, proxy->name());
4392 __ movp(LoadIC::ReceiverRegister(), GlobalObjectOperand()); 4377 __ movp(rax, GlobalObjectOperand());
4393 // Use a regular load, not a contextual load, to avoid a reference 4378 // Use a regular load, not a contextual load, to avoid a reference
4394 // error. 4379 // error.
4395 CallLoadIC(NOT_CONTEXTUAL); 4380 CallLoadIC(NOT_CONTEXTUAL);
4396 PrepareForBailout(expr, TOS_REG); 4381 PrepareForBailout(expr, TOS_REG);
4397 context()->Plug(rax); 4382 context()->Plug(rax);
4398 } else if (proxy != NULL && proxy->var()->IsLookupSlot()) { 4383 } else if (proxy != NULL && proxy->var()->IsLookupSlot()) {
4399 Comment cmnt(masm_, "[ Lookup slot"); 4384 Comment cmnt(masm_, "[ Lookup slot");
4400 Label done, slow; 4385 Label done, slow;
4401 4386
4402 // Generate code for loading from variables potentially shadowed 4387 // Generate code for loading from variables potentially shadowed
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
4819 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4804 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4820 Assembler::target_address_at(call_target_address, 4805 Assembler::target_address_at(call_target_address,
4821 unoptimized_code)); 4806 unoptimized_code));
4822 return OSR_AFTER_STACK_CHECK; 4807 return OSR_AFTER_STACK_CHECK;
4823 } 4808 }
4824 4809
4825 4810
4826 } } // namespace v8::internal 4811 } } // namespace v8::internal
4827 4812
4828 #endif // V8_TARGET_ARCH_X64 4813 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/debug-x64.cc ('k') | src/x64/ic-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698