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