| 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 <sstream> | 5 #include <sstream> |
| 6 | 6 |
| 7 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_MIPS64 | 9 #if V8_TARGET_ARCH_MIPS64 |
| 10 | 10 |
| (...skipping 2067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2078 return DefineAsRegister(new(zone()) LConstantE); | 2078 return DefineAsRegister(new(zone()) LConstantE); |
| 2079 } else if (r.IsTagged()) { | 2079 } else if (r.IsTagged()) { |
| 2080 return DefineAsRegister(new(zone()) LConstantT); | 2080 return DefineAsRegister(new(zone()) LConstantT); |
| 2081 } else { | 2081 } else { |
| 2082 UNREACHABLE(); | 2082 UNREACHABLE(); |
| 2083 return NULL; | 2083 return NULL; |
| 2084 } | 2084 } |
| 2085 } | 2085 } |
| 2086 | 2086 |
| 2087 | 2087 |
| 2088 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { | |
| 2089 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; | |
| 2090 return instr->RequiresHoleCheck() | |
| 2091 ? AssignEnvironment(DefineAsRegister(result)) | |
| 2092 : DefineAsRegister(result); | |
| 2093 } | |
| 2094 | |
| 2095 | |
| 2096 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { | 2088 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { |
| 2097 LOperand* context = UseFixed(instr->context(), cp); | 2089 LOperand* context = UseFixed(instr->context(), cp); |
| 2098 LOperand* global_object = | 2090 LOperand* global_object = |
| 2099 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister()); | 2091 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister()); |
| 2100 LOperand* vector = NULL; | 2092 LOperand* vector = NULL; |
| 2101 if (instr->HasVectorAndSlot()) { | 2093 if (instr->HasVectorAndSlot()) { |
| 2102 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); | 2094 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); |
| 2103 } | 2095 } |
| 2104 LLoadGlobalGeneric* result = | 2096 LLoadGlobalGeneric* result = |
| 2105 new(zone()) LLoadGlobalGeneric(context, global_object, vector); | 2097 new(zone()) LLoadGlobalGeneric(context, global_object, vector); |
| 2106 return MarkAsCall(DefineFixed(result, v0), instr); | 2098 return MarkAsCall(DefineFixed(result, v0), instr); |
| 2107 } | 2099 } |
| 2108 | 2100 |
| 2109 | 2101 |
| 2110 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { | |
| 2111 LOperand* value = UseRegister(instr->value()); | |
| 2112 // Use a temp to check the value in the cell in the case where we perform | |
| 2113 // a hole check. | |
| 2114 return instr->RequiresHoleCheck() | |
| 2115 ? AssignEnvironment(new(zone()) LStoreGlobalCell(value, TempRegister())) | |
| 2116 : new(zone()) LStoreGlobalCell(value, NULL); | |
| 2117 } | |
| 2118 | |
| 2119 | |
| 2120 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { | 2102 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { |
| 2121 LOperand* context = UseRegisterAtStart(instr->value()); | 2103 LOperand* context = UseRegisterAtStart(instr->value()); |
| 2122 LInstruction* result = | 2104 LInstruction* result = |
| 2123 DefineAsRegister(new(zone()) LLoadContextSlot(context)); | 2105 DefineAsRegister(new(zone()) LLoadContextSlot(context)); |
| 2124 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { | 2106 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { |
| 2125 result = AssignEnvironment(result); | 2107 result = AssignEnvironment(result); |
| 2126 } | 2108 } |
| 2127 return result; | 2109 return result; |
| 2128 } | 2110 } |
| 2129 | 2111 |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2623 LOperand* function = UseRegisterAtStart(instr->function()); | 2605 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2624 LAllocateBlockContext* result = | 2606 LAllocateBlockContext* result = |
| 2625 new(zone()) LAllocateBlockContext(context, function); | 2607 new(zone()) LAllocateBlockContext(context, function); |
| 2626 return MarkAsCall(DefineFixed(result, cp), instr); | 2608 return MarkAsCall(DefineFixed(result, cp), instr); |
| 2627 } | 2609 } |
| 2628 | 2610 |
| 2629 | 2611 |
| 2630 } } // namespace v8::internal | 2612 } } // namespace v8::internal |
| 2631 | 2613 |
| 2632 #endif // V8_TARGET_ARCH_MIPS64 | 2614 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |