| 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_IA32 | 9 #if V8_TARGET_ARCH_IA32 |
| 10 | 10 |
| (...skipping 2114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2125 return DefineAsRegister(new(zone()) LConstantE); | 2125 return DefineAsRegister(new(zone()) LConstantE); |
| 2126 } else if (r.IsTagged()) { | 2126 } else if (r.IsTagged()) { |
| 2127 return DefineAsRegister(new(zone()) LConstantT); | 2127 return DefineAsRegister(new(zone()) LConstantT); |
| 2128 } else { | 2128 } else { |
| 2129 UNREACHABLE(); | 2129 UNREACHABLE(); |
| 2130 return NULL; | 2130 return NULL; |
| 2131 } | 2131 } |
| 2132 } | 2132 } |
| 2133 | 2133 |
| 2134 | 2134 |
| 2135 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { | |
| 2136 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; | |
| 2137 return instr->RequiresHoleCheck() | |
| 2138 ? AssignEnvironment(DefineAsRegister(result)) | |
| 2139 : DefineAsRegister(result); | |
| 2140 } | |
| 2141 | |
| 2142 | |
| 2143 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { | 2135 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { |
| 2144 LOperand* context = UseFixed(instr->context(), esi); | 2136 LOperand* context = UseFixed(instr->context(), esi); |
| 2145 LOperand* global_object = | 2137 LOperand* global_object = |
| 2146 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister()); | 2138 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister()); |
| 2147 LOperand* vector = NULL; | 2139 LOperand* vector = NULL; |
| 2148 if (instr->HasVectorAndSlot()) { | 2140 if (instr->HasVectorAndSlot()) { |
| 2149 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); | 2141 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); |
| 2150 } | 2142 } |
| 2151 | 2143 |
| 2152 LLoadGlobalGeneric* result = | 2144 LLoadGlobalGeneric* result = |
| 2153 new(zone()) LLoadGlobalGeneric(context, global_object, vector); | 2145 new(zone()) LLoadGlobalGeneric(context, global_object, vector); |
| 2154 return MarkAsCall(DefineFixed(result, eax), instr); | 2146 return MarkAsCall(DefineFixed(result, eax), instr); |
| 2155 } | 2147 } |
| 2156 | 2148 |
| 2157 | 2149 |
| 2158 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { | |
| 2159 LStoreGlobalCell* result = | |
| 2160 new(zone()) LStoreGlobalCell(UseRegister(instr->value())); | |
| 2161 return instr->RequiresHoleCheck() ? AssignEnvironment(result) : result; | |
| 2162 } | |
| 2163 | |
| 2164 | |
| 2165 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { | 2150 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { |
| 2166 LOperand* context = UseRegisterAtStart(instr->value()); | 2151 LOperand* context = UseRegisterAtStart(instr->value()); |
| 2167 LInstruction* result = | 2152 LInstruction* result = |
| 2168 DefineAsRegister(new(zone()) LLoadContextSlot(context)); | 2153 DefineAsRegister(new(zone()) LLoadContextSlot(context)); |
| 2169 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { | 2154 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { |
| 2170 result = AssignEnvironment(result); | 2155 result = AssignEnvironment(result); |
| 2171 } | 2156 } |
| 2172 return result; | 2157 return result; |
| 2173 } | 2158 } |
| 2174 | 2159 |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2735 LOperand* function = UseRegisterAtStart(instr->function()); | 2720 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2736 LAllocateBlockContext* result = | 2721 LAllocateBlockContext* result = |
| 2737 new(zone()) LAllocateBlockContext(context, function); | 2722 new(zone()) LAllocateBlockContext(context, function); |
| 2738 return MarkAsCall(DefineFixed(result, esi), instr); | 2723 return MarkAsCall(DefineFixed(result, esi), instr); |
| 2739 } | 2724 } |
| 2740 | 2725 |
| 2741 | 2726 |
| 2742 } } // namespace v8::internal | 2727 } } // namespace v8::internal |
| 2743 | 2728 |
| 2744 #endif // V8_TARGET_ARCH_IA32 | 2729 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |