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

Side by Side Diff: src/x87/full-codegen-x87.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/x64/full-codegen-x64.cc ('k') | tools/generate-runtime-tests.py » ('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_X87 7 #if V8_TARGET_ARCH_X87
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 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after
1489 1489
1490 case Variable::LOOKUP: { 1490 case Variable::LOOKUP: {
1491 Comment cmnt(masm_, "[ Lookup variable"); 1491 Comment cmnt(masm_, "[ Lookup variable");
1492 Label done, slow; 1492 Label done, slow;
1493 // Generate code for loading from variables potentially shadowed 1493 // Generate code for loading from variables potentially shadowed
1494 // by eval-introduced variables. 1494 // by eval-introduced variables.
1495 EmitDynamicLookupFastCase(var, NOT_INSIDE_TYPEOF, &slow, &done); 1495 EmitDynamicLookupFastCase(var, NOT_INSIDE_TYPEOF, &slow, &done);
1496 __ bind(&slow); 1496 __ bind(&slow);
1497 __ push(esi); // Context. 1497 __ push(esi); // Context.
1498 __ push(Immediate(var->name())); 1498 __ push(Immediate(var->name()));
1499 __ CallRuntime(Runtime::kLoadContextSlot, 2); 1499 __ CallRuntime(Runtime::kLoadLookupSlot, 2);
1500 __ bind(&done); 1500 __ bind(&done);
1501 context()->Plug(eax); 1501 context()->Plug(eax);
1502 break; 1502 break;
1503 } 1503 }
1504 } 1504 }
1505 } 1505 }
1506 1506
1507 1507
1508 void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) { 1508 void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) {
1509 Comment cmnt(masm_, "[ RegExpLiteral"); 1509 Comment cmnt(masm_, "[ RegExpLiteral");
(...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after
2674 { PreservePositionScope scope(masm()->positions_recorder()); 2674 { PreservePositionScope scope(masm()->positions_recorder());
2675 // Generate code for loading from variables potentially shadowed by 2675 // Generate code for loading from variables potentially shadowed by
2676 // eval-introduced variables. 2676 // eval-introduced variables.
2677 EmitDynamicLookupFastCase(proxy->var(), NOT_INSIDE_TYPEOF, &slow, &done); 2677 EmitDynamicLookupFastCase(proxy->var(), NOT_INSIDE_TYPEOF, &slow, &done);
2678 } 2678 }
2679 __ bind(&slow); 2679 __ bind(&slow);
2680 // Call the runtime to find the function to call (returned in eax) and 2680 // Call the runtime to find the function to call (returned in eax) and
2681 // the object holding it (returned in edx). 2681 // the object holding it (returned in edx).
2682 __ push(context_register()); 2682 __ push(context_register());
2683 __ push(Immediate(proxy->name())); 2683 __ push(Immediate(proxy->name()));
2684 __ CallRuntime(Runtime::kLoadContextSlot, 2); 2684 __ CallRuntime(Runtime::kLoadLookupSlot, 2);
2685 __ push(eax); // Function. 2685 __ push(eax); // Function.
2686 __ push(edx); // Receiver. 2686 __ push(edx); // Receiver.
2687 2687
2688 // If fast case code has been generated, emit code to push the function 2688 // If fast case code has been generated, emit code to push the function
2689 // and receiver and have the slow path jump around this code. 2689 // and receiver and have the slow path jump around this code.
2690 if (done.is_linked()) { 2690 if (done.is_linked()) {
2691 Label call; 2691 Label call;
2692 __ jmp(&call, Label::kNear); 2692 __ jmp(&call, Label::kNear);
2693 __ bind(&done); 2693 __ bind(&done);
2694 // Push function. 2694 // Push function.
(...skipping 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after
4079 } else if (var->IsStackAllocated() || var->IsContextSlot()) { 4079 } else if (var->IsStackAllocated() || var->IsContextSlot()) {
4080 // Result of deleting non-global variables is false. 'this' is 4080 // Result of deleting non-global variables is false. 'this' is
4081 // not really a variable, though we implement it as one. The 4081 // not really a variable, though we implement it as one. The
4082 // subexpression does not have side effects. 4082 // subexpression does not have side effects.
4083 context()->Plug(var->is_this()); 4083 context()->Plug(var->is_this());
4084 } else { 4084 } else {
4085 // Non-global variable. Call the runtime to try to delete from the 4085 // Non-global variable. Call the runtime to try to delete from the
4086 // context where the variable was introduced. 4086 // context where the variable was introduced.
4087 __ push(context_register()); 4087 __ push(context_register());
4088 __ push(Immediate(var->name())); 4088 __ push(Immediate(var->name()));
4089 __ CallRuntime(Runtime::kDeleteContextSlot, 2); 4089 __ CallRuntime(Runtime::kDeleteLookupSlot, 2);
4090 context()->Plug(eax); 4090 context()->Plug(eax);
4091 } 4091 }
4092 } else { 4092 } else {
4093 // Result of deleting non-property, non-variable reference is true. 4093 // Result of deleting non-property, non-variable reference is true.
4094 // The subexpression may have side effects. 4094 // The subexpression may have side effects.
4095 VisitForEffect(expr->expression()); 4095 VisitForEffect(expr->expression());
4096 context()->Plug(true); 4096 context()->Plug(true);
4097 } 4097 }
4098 break; 4098 break;
4099 } 4099 }
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
4372 Comment cmnt(masm_, "[ Lookup slot"); 4372 Comment cmnt(masm_, "[ Lookup slot");
4373 Label done, slow; 4373 Label done, slow;
4374 4374
4375 // Generate code for loading from variables potentially shadowed 4375 // Generate code for loading from variables potentially shadowed
4376 // by eval-introduced variables. 4376 // by eval-introduced variables.
4377 EmitDynamicLookupFastCase(proxy->var(), INSIDE_TYPEOF, &slow, &done); 4377 EmitDynamicLookupFastCase(proxy->var(), INSIDE_TYPEOF, &slow, &done);
4378 4378
4379 __ bind(&slow); 4379 __ bind(&slow);
4380 __ push(esi); 4380 __ push(esi);
4381 __ push(Immediate(proxy->name())); 4381 __ push(Immediate(proxy->name()));
4382 __ CallRuntime(Runtime::kLoadContextSlotNoReferenceError, 2); 4382 __ CallRuntime(Runtime::kLoadLookupSlotNoReferenceError, 2);
4383 PrepareForBailout(expr, TOS_REG); 4383 PrepareForBailout(expr, TOS_REG);
4384 __ bind(&done); 4384 __ bind(&done);
4385 4385
4386 context()->Plug(eax); 4386 context()->Plug(eax);
4387 } else { 4387 } else {
4388 // This expression cannot throw a reference error at the top level. 4388 // This expression cannot throw a reference error at the top level.
4389 VisitInDuplicateContext(expr); 4389 VisitInDuplicateContext(expr);
4390 } 4390 }
4391 } 4391 }
4392 4392
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
4789 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4789 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4790 Assembler::target_address_at(call_target_address, 4790 Assembler::target_address_at(call_target_address,
4791 unoptimized_code)); 4791 unoptimized_code));
4792 return OSR_AFTER_STACK_CHECK; 4792 return OSR_AFTER_STACK_CHECK;
4793 } 4793 }
4794 4794
4795 4795
4796 } } // namespace v8::internal 4796 } } // namespace v8::internal
4797 4797
4798 #endif // V8_TARGET_ARCH_X87 4798 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | tools/generate-runtime-tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698