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

Side by Side Diff: src/arm64/full-codegen-arm64.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/arm/full-codegen-arm.cc ('k') | src/ia32/full-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 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-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after
1549 1549
1550 case Variable::LOOKUP: { 1550 case Variable::LOOKUP: {
1551 Label done, slow; 1551 Label done, slow;
1552 // Generate code for loading from variables potentially shadowed by 1552 // Generate code for loading from variables potentially shadowed by
1553 // eval-introduced variables. 1553 // eval-introduced variables.
1554 EmitDynamicLookupFastCase(var, NOT_INSIDE_TYPEOF, &slow, &done); 1554 EmitDynamicLookupFastCase(var, NOT_INSIDE_TYPEOF, &slow, &done);
1555 __ Bind(&slow); 1555 __ Bind(&slow);
1556 Comment cmnt(masm_, "Lookup variable"); 1556 Comment cmnt(masm_, "Lookup variable");
1557 __ Mov(x1, Operand(var->name())); 1557 __ Mov(x1, Operand(var->name()));
1558 __ Push(cp, x1); // Context and name. 1558 __ Push(cp, x1); // Context and name.
1559 __ CallRuntime(Runtime::kLoadContextSlot, 2); 1559 __ CallRuntime(Runtime::kLoadLookupSlot, 2);
1560 __ Bind(&done); 1560 __ Bind(&done);
1561 context()->Plug(x0); 1561 context()->Plug(x0);
1562 break; 1562 break;
1563 } 1563 }
1564 } 1564 }
1565 } 1565 }
1566 1566
1567 1567
1568 void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) { 1568 void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) {
1569 Comment cmnt(masm_, "[ RegExpLiteral"); 1569 Comment cmnt(masm_, "[ RegExpLiteral");
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after
2453 // Generate code for loading from variables potentially shadowed 2453 // Generate code for loading from variables potentially shadowed
2454 // by eval-introduced variables. 2454 // by eval-introduced variables.
2455 EmitDynamicLookupFastCase(proxy->var(), NOT_INSIDE_TYPEOF, &slow, &done); 2455 EmitDynamicLookupFastCase(proxy->var(), NOT_INSIDE_TYPEOF, &slow, &done);
2456 } 2456 }
2457 2457
2458 __ Bind(&slow); 2458 __ Bind(&slow);
2459 // Call the runtime to find the function to call (returned in x0) 2459 // Call the runtime to find the function to call (returned in x0)
2460 // and the object holding it (returned in x1). 2460 // and the object holding it (returned in x1).
2461 __ Mov(x10, Operand(proxy->name())); 2461 __ Mov(x10, Operand(proxy->name()));
2462 __ Push(context_register(), x10); 2462 __ Push(context_register(), x10);
2463 __ CallRuntime(Runtime::kLoadContextSlot, 2); 2463 __ CallRuntime(Runtime::kLoadLookupSlot, 2);
2464 __ Push(x0, x1); // Receiver, function. 2464 __ Push(x0, x1); // Receiver, function.
2465 2465
2466 // If fast case code has been generated, emit code to push the 2466 // If fast case code has been generated, emit code to push the
2467 // function and receiver and have the slow path jump around this 2467 // function and receiver and have the slow path jump around this
2468 // code. 2468 // code.
2469 if (done.is_linked()) { 2469 if (done.is_linked()) {
2470 Label call; 2470 Label call;
2471 __ B(&call); 2471 __ B(&call);
2472 __ Bind(&done); 2472 __ Bind(&done);
2473 // Push function. 2473 // Push function.
(...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after
3807 context()->Plug(x0); 3807 context()->Plug(x0);
3808 } else if (var->IsStackAllocated() || var->IsContextSlot()) { 3808 } else if (var->IsStackAllocated() || var->IsContextSlot()) {
3809 // Result of deleting non-global, non-dynamic variables is false. 3809 // Result of deleting non-global, non-dynamic variables is false.
3810 // The subexpression does not have side effects. 3810 // The subexpression does not have side effects.
3811 context()->Plug(var->is_this()); 3811 context()->Plug(var->is_this());
3812 } else { 3812 } else {
3813 // Non-global variable. Call the runtime to try to delete from the 3813 // Non-global variable. Call the runtime to try to delete from the
3814 // context where the variable was introduced. 3814 // context where the variable was introduced.
3815 __ Mov(x2, Operand(var->name())); 3815 __ Mov(x2, Operand(var->name()));
3816 __ Push(context_register(), x2); 3816 __ Push(context_register(), x2);
3817 __ CallRuntime(Runtime::kDeleteContextSlot, 2); 3817 __ CallRuntime(Runtime::kDeleteLookupSlot, 2);
3818 context()->Plug(x0); 3818 context()->Plug(x0);
3819 } 3819 }
3820 } else { 3820 } else {
3821 // Result of deleting non-property, non-variable reference is true. 3821 // Result of deleting non-property, non-variable reference is true.
3822 // The subexpression may have side effects. 3822 // The subexpression may have side effects.
3823 VisitForEffect(expr->expression()); 3823 VisitForEffect(expr->expression());
3824 context()->Plug(true); 3824 context()->Plug(true);
3825 } 3825 }
3826 break; 3826 break;
3827 break; 3827 break;
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
4088 } else if (proxy != NULL && proxy->var()->IsLookupSlot()) { 4088 } else if (proxy != NULL && proxy->var()->IsLookupSlot()) {
4089 Label done, slow; 4089 Label done, slow;
4090 4090
4091 // Generate code for loading from variables potentially shadowed 4091 // Generate code for loading from variables potentially shadowed
4092 // by eval-introduced variables. 4092 // by eval-introduced variables.
4093 EmitDynamicLookupFastCase(proxy->var(), INSIDE_TYPEOF, &slow, &done); 4093 EmitDynamicLookupFastCase(proxy->var(), INSIDE_TYPEOF, &slow, &done);
4094 4094
4095 __ Bind(&slow); 4095 __ Bind(&slow);
4096 __ Mov(x0, Operand(proxy->name())); 4096 __ Mov(x0, Operand(proxy->name()));
4097 __ Push(cp, x0); 4097 __ Push(cp, x0);
4098 __ CallRuntime(Runtime::kLoadContextSlotNoReferenceError, 2); 4098 __ CallRuntime(Runtime::kLoadLookupSlotNoReferenceError, 2);
4099 PrepareForBailout(expr, TOS_REG); 4099 PrepareForBailout(expr, TOS_REG);
4100 __ Bind(&done); 4100 __ Bind(&done);
4101 4101
4102 context()->Plug(x0); 4102 context()->Plug(x0);
4103 } else { 4103 } else {
4104 // This expression cannot throw a reference error at the top level. 4104 // This expression cannot throw a reference error at the top level.
4105 VisitInDuplicateContext(expr); 4105 VisitInDuplicateContext(expr);
4106 } 4106 }
4107 } 4107 }
4108 4108
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
4886 return previous_; 4886 return previous_;
4887 } 4887 }
4888 4888
4889 4889
4890 #undef __ 4890 #undef __
4891 4891
4892 4892
4893 } } // namespace v8::internal 4893 } } // namespace v8::internal
4894 4894
4895 #endif // V8_TARGET_ARCH_ARM64 4895 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698