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

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

Issue 397973002: Rename [Load/Delete]ContextSlot for consistency after r22379. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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/arm64/full-codegen-arm64.cc ('k') | src/mips/full-codegen-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 #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-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 1492
1493 case Variable::LOOKUP: { 1493 case Variable::LOOKUP: {
1494 Comment cmnt(masm_, "[ Lookup variable"); 1494 Comment cmnt(masm_, "[ Lookup variable");
1495 Label done, slow; 1495 Label done, slow;
1496 // Generate code for loading from variables potentially shadowed 1496 // Generate code for loading from variables potentially shadowed
1497 // by eval-introduced variables. 1497 // by eval-introduced variables.
1498 EmitDynamicLookupFastCase(var, NOT_INSIDE_TYPEOF, &slow, &done); 1498 EmitDynamicLookupFastCase(var, NOT_INSIDE_TYPEOF, &slow, &done);
1499 __ bind(&slow); 1499 __ bind(&slow);
1500 __ push(esi); // Context. 1500 __ push(esi); // Context.
1501 __ push(Immediate(var->name())); 1501 __ push(Immediate(var->name()));
1502 __ CallRuntime(Runtime::kLoadContextSlot, 2); 1502 __ CallRuntime(Runtime::kLoadLookupSlot, 2);
1503 __ bind(&done); 1503 __ bind(&done);
1504 context()->Plug(eax); 1504 context()->Plug(eax);
1505 break; 1505 break;
1506 } 1506 }
1507 } 1507 }
1508 } 1508 }
1509 1509
1510 1510
1511 void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) { 1511 void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) {
1512 Comment cmnt(masm_, "[ RegExpLiteral"); 1512 Comment cmnt(masm_, "[ RegExpLiteral");
(...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after
2680 { PreservePositionScope scope(masm()->positions_recorder()); 2680 { PreservePositionScope scope(masm()->positions_recorder());
2681 // Generate code for loading from variables potentially shadowed by 2681 // Generate code for loading from variables potentially shadowed by
2682 // eval-introduced variables. 2682 // eval-introduced variables.
2683 EmitDynamicLookupFastCase(proxy->var(), NOT_INSIDE_TYPEOF, &slow, &done); 2683 EmitDynamicLookupFastCase(proxy->var(), NOT_INSIDE_TYPEOF, &slow, &done);
2684 } 2684 }
2685 __ bind(&slow); 2685 __ bind(&slow);
2686 // Call the runtime to find the function to call (returned in eax) and 2686 // Call the runtime to find the function to call (returned in eax) and
2687 // the object holding it (returned in edx). 2687 // the object holding it (returned in edx).
2688 __ push(context_register()); 2688 __ push(context_register());
2689 __ push(Immediate(proxy->name())); 2689 __ push(Immediate(proxy->name()));
2690 __ CallRuntime(Runtime::kLoadContextSlot, 2); 2690 __ CallRuntime(Runtime::kLoadLookupSlot, 2);
2691 __ push(eax); // Function. 2691 __ push(eax); // Function.
2692 __ push(edx); // Receiver. 2692 __ push(edx); // Receiver.
2693 2693
2694 // If fast case code has been generated, emit code to push the function 2694 // If fast case code has been generated, emit code to push the function
2695 // and receiver and have the slow path jump around this code. 2695 // and receiver and have the slow path jump around this code.
2696 if (done.is_linked()) { 2696 if (done.is_linked()) {
2697 Label call; 2697 Label call;
2698 __ jmp(&call, Label::kNear); 2698 __ jmp(&call, Label::kNear);
2699 __ bind(&done); 2699 __ bind(&done);
2700 // Push function. 2700 // Push function.
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after
4086 } else if (var->IsStackAllocated() || var->IsContextSlot()) { 4086 } else if (var->IsStackAllocated() || var->IsContextSlot()) {
4087 // Result of deleting non-global variables is false. 'this' is 4087 // Result of deleting non-global variables is false. 'this' is
4088 // not really a variable, though we implement it as one. The 4088 // not really a variable, though we implement it as one. The
4089 // subexpression does not have side effects. 4089 // subexpression does not have side effects.
4090 context()->Plug(var->is_this()); 4090 context()->Plug(var->is_this());
4091 } else { 4091 } else {
4092 // Non-global variable. Call the runtime to try to delete from the 4092 // Non-global variable. Call the runtime to try to delete from the
4093 // context where the variable was introduced. 4093 // context where the variable was introduced.
4094 __ push(context_register()); 4094 __ push(context_register());
4095 __ push(Immediate(var->name())); 4095 __ push(Immediate(var->name()));
4096 __ CallRuntime(Runtime::kDeleteContextSlot, 2); 4096 __ CallRuntime(Runtime::kDeleteLookupSlot, 2);
4097 context()->Plug(eax); 4097 context()->Plug(eax);
4098 } 4098 }
4099 } else { 4099 } else {
4100 // Result of deleting non-property, non-variable reference is true. 4100 // Result of deleting non-property, non-variable reference is true.
4101 // The subexpression may have side effects. 4101 // The subexpression may have side effects.
4102 VisitForEffect(expr->expression()); 4102 VisitForEffect(expr->expression());
4103 context()->Plug(true); 4103 context()->Plug(true);
4104 } 4104 }
4105 break; 4105 break;
4106 } 4106 }
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
4379 Comment cmnt(masm_, "[ Lookup slot"); 4379 Comment cmnt(masm_, "[ Lookup slot");
4380 Label done, slow; 4380 Label done, slow;
4381 4381
4382 // Generate code for loading from variables potentially shadowed 4382 // Generate code for loading from variables potentially shadowed
4383 // by eval-introduced variables. 4383 // by eval-introduced variables.
4384 EmitDynamicLookupFastCase(proxy->var(), INSIDE_TYPEOF, &slow, &done); 4384 EmitDynamicLookupFastCase(proxy->var(), INSIDE_TYPEOF, &slow, &done);
4385 4385
4386 __ bind(&slow); 4386 __ bind(&slow);
4387 __ push(esi); 4387 __ push(esi);
4388 __ push(Immediate(proxy->name())); 4388 __ push(Immediate(proxy->name()));
4389 __ CallRuntime(Runtime::kLoadContextSlotNoReferenceError, 2); 4389 __ CallRuntime(Runtime::kLoadLookupSlotNoReferenceError, 2);
4390 PrepareForBailout(expr, TOS_REG); 4390 PrepareForBailout(expr, TOS_REG);
4391 __ bind(&done); 4391 __ bind(&done);
4392 4392
4393 context()->Plug(eax); 4393 context()->Plug(eax);
4394 } else { 4394 } else {
4395 // This expression cannot throw a reference error at the top level. 4395 // This expression cannot throw a reference error at the top level.
4396 VisitInDuplicateContext(expr); 4396 VisitInDuplicateContext(expr);
4397 } 4397 }
4398 } 4398 }
4399 4399
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
4796 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4796 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4797 Assembler::target_address_at(call_target_address, 4797 Assembler::target_address_at(call_target_address,
4798 unoptimized_code)); 4798 unoptimized_code));
4799 return OSR_AFTER_STACK_CHECK; 4799 return OSR_AFTER_STACK_CHECK;
4800 } 4800 }
4801 4801
4802 4802
4803 } } // namespace v8::internal 4803 } } // namespace v8::internal
4804 4804
4805 #endif // V8_TARGET_ARCH_IA32 4805 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm64/full-codegen-arm64.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698