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

Side by Side Diff: src/mips/full-codegen-mips.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/ia32/full-codegen-ia32.cc ('k') | src/mips64/full-codegen-mips64.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_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 1546 matching lines...) Expand 10 before | Expand all | Expand 10 after
1557 1557
1558 case Variable::LOOKUP: { 1558 case Variable::LOOKUP: {
1559 Comment cmnt(masm_, "[ Lookup variable"); 1559 Comment cmnt(masm_, "[ Lookup variable");
1560 Label done, slow; 1560 Label done, slow;
1561 // Generate code for loading from variables potentially shadowed 1561 // Generate code for loading from variables potentially shadowed
1562 // by eval-introduced variables. 1562 // by eval-introduced variables.
1563 EmitDynamicLookupFastCase(var, NOT_INSIDE_TYPEOF, &slow, &done); 1563 EmitDynamicLookupFastCase(var, NOT_INSIDE_TYPEOF, &slow, &done);
1564 __ bind(&slow); 1564 __ bind(&slow);
1565 __ li(a1, Operand(var->name())); 1565 __ li(a1, Operand(var->name()));
1566 __ Push(cp, a1); // Context and name. 1566 __ Push(cp, a1); // Context and name.
1567 __ CallRuntime(Runtime::kLoadContextSlot, 2); 1567 __ CallRuntime(Runtime::kLoadLookupSlot, 2);
1568 __ bind(&done); 1568 __ bind(&done);
1569 context()->Plug(v0); 1569 context()->Plug(v0);
1570 } 1570 }
1571 } 1571 }
1572 } 1572 }
1573 1573
1574 1574
1575 void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) { 1575 void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) {
1576 Comment cmnt(masm_, "[ RegExpLiteral"); 1576 Comment cmnt(masm_, "[ RegExpLiteral");
1577 Label materialized; 1577 Label materialized;
(...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after
2758 // by eval-introduced variables. 2758 // by eval-introduced variables.
2759 EmitDynamicLookupFastCase(proxy->var(), NOT_INSIDE_TYPEOF, &slow, &done); 2759 EmitDynamicLookupFastCase(proxy->var(), NOT_INSIDE_TYPEOF, &slow, &done);
2760 } 2760 }
2761 2761
2762 __ bind(&slow); 2762 __ bind(&slow);
2763 // Call the runtime to find the function to call (returned in v0) 2763 // Call the runtime to find the function to call (returned in v0)
2764 // and the object holding it (returned in v1). 2764 // and the object holding it (returned in v1).
2765 ASSERT(!context_register().is(a2)); 2765 ASSERT(!context_register().is(a2));
2766 __ li(a2, Operand(proxy->name())); 2766 __ li(a2, Operand(proxy->name()));
2767 __ Push(context_register(), a2); 2767 __ Push(context_register(), a2);
2768 __ CallRuntime(Runtime::kLoadContextSlot, 2); 2768 __ CallRuntime(Runtime::kLoadLookupSlot, 2);
2769 __ Push(v0, v1); // Function, receiver. 2769 __ Push(v0, v1); // Function, receiver.
2770 2770
2771 // If fast case code has been generated, emit code to push the 2771 // If fast case code has been generated, emit code to push the
2772 // function and receiver and have the slow path jump around this 2772 // function and receiver and have the slow path jump around this
2773 // code. 2773 // code.
2774 if (done.is_linked()) { 2774 if (done.is_linked()) {
2775 Label call; 2775 Label call;
2776 __ Branch(&call); 2776 __ Branch(&call);
2777 __ bind(&done); 2777 __ bind(&done);
2778 // Push function. 2778 // Push function.
(...skipping 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after
4151 } else if (var->IsStackAllocated() || var->IsContextSlot()) { 4151 } else if (var->IsStackAllocated() || var->IsContextSlot()) {
4152 // Result of deleting non-global, non-dynamic variables is false. 4152 // Result of deleting non-global, non-dynamic variables is false.
4153 // The subexpression does not have side effects. 4153 // The subexpression does not have side effects.
4154 context()->Plug(var->is_this()); 4154 context()->Plug(var->is_this());
4155 } else { 4155 } else {
4156 // Non-global variable. Call the runtime to try to delete from the 4156 // Non-global variable. Call the runtime to try to delete from the
4157 // context where the variable was introduced. 4157 // context where the variable was introduced.
4158 ASSERT(!context_register().is(a2)); 4158 ASSERT(!context_register().is(a2));
4159 __ li(a2, Operand(var->name())); 4159 __ li(a2, Operand(var->name()));
4160 __ Push(context_register(), a2); 4160 __ Push(context_register(), a2);
4161 __ CallRuntime(Runtime::kDeleteContextSlot, 2); 4161 __ CallRuntime(Runtime::kDeleteLookupSlot, 2);
4162 context()->Plug(v0); 4162 context()->Plug(v0);
4163 } 4163 }
4164 } else { 4164 } else {
4165 // Result of deleting non-property, non-variable reference is true. 4165 // Result of deleting non-property, non-variable reference is true.
4166 // The subexpression may have side effects. 4166 // The subexpression may have side effects.
4167 VisitForEffect(expr->expression()); 4167 VisitForEffect(expr->expression());
4168 context()->Plug(true); 4168 context()->Plug(true);
4169 } 4169 }
4170 break; 4170 break;
4171 } 4171 }
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
4434 Comment cmnt(masm_, "[ Lookup slot"); 4434 Comment cmnt(masm_, "[ Lookup slot");
4435 Label done, slow; 4435 Label done, slow;
4436 4436
4437 // Generate code for loading from variables potentially shadowed 4437 // Generate code for loading from variables potentially shadowed
4438 // by eval-introduced variables. 4438 // by eval-introduced variables.
4439 EmitDynamicLookupFastCase(proxy->var(), INSIDE_TYPEOF, &slow, &done); 4439 EmitDynamicLookupFastCase(proxy->var(), INSIDE_TYPEOF, &slow, &done);
4440 4440
4441 __ bind(&slow); 4441 __ bind(&slow);
4442 __ li(a0, Operand(proxy->name())); 4442 __ li(a0, Operand(proxy->name()));
4443 __ Push(cp, a0); 4443 __ Push(cp, a0);
4444 __ CallRuntime(Runtime::kLoadContextSlotNoReferenceError, 2); 4444 __ CallRuntime(Runtime::kLoadLookupSlotNoReferenceError, 2);
4445 PrepareForBailout(expr, TOS_REG); 4445 PrepareForBailout(expr, TOS_REG);
4446 __ bind(&done); 4446 __ bind(&done);
4447 4447
4448 context()->Plug(v0); 4448 context()->Plug(v0);
4449 } else { 4449 } else {
4450 // This expression cannot throw a reference error at the top level. 4450 // This expression cannot throw a reference error at the top level.
4451 VisitInDuplicateContext(expr); 4451 VisitInDuplicateContext(expr);
4452 } 4452 }
4453 } 4453 }
4454 4454
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
4854 Assembler::target_address_at(pc_immediate_load_address)) == 4854 Assembler::target_address_at(pc_immediate_load_address)) ==
4855 reinterpret_cast<uint32_t>( 4855 reinterpret_cast<uint32_t>(
4856 isolate->builtins()->OsrAfterStackCheck()->entry())); 4856 isolate->builtins()->OsrAfterStackCheck()->entry()));
4857 return OSR_AFTER_STACK_CHECK; 4857 return OSR_AFTER_STACK_CHECK;
4858 } 4858 }
4859 4859
4860 4860
4861 } } // namespace v8::internal 4861 } } // namespace v8::internal
4862 4862
4863 #endif // V8_TARGET_ARCH_MIPS 4863 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698