OLD | NEW |
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 <sstream> | 5 #include <sstream> |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #include "src/arm64/lithium-codegen-arm64.h" | 9 #include "src/arm64/lithium-codegen-arm64.h" |
10 #include "src/hydrogen-osr.h" | 10 #include "src/hydrogen-osr.h" |
(...skipping 1674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1685 | 1685 |
1686 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( | 1686 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( |
1687 HLoadFunctionPrototype* instr) { | 1687 HLoadFunctionPrototype* instr) { |
1688 LOperand* function = UseRegister(instr->function()); | 1688 LOperand* function = UseRegister(instr->function()); |
1689 LOperand* temp = TempRegister(); | 1689 LOperand* temp = TempRegister(); |
1690 return AssignEnvironment(DefineAsRegister( | 1690 return AssignEnvironment(DefineAsRegister( |
1691 new(zone()) LLoadFunctionPrototype(function, temp))); | 1691 new(zone()) LLoadFunctionPrototype(function, temp))); |
1692 } | 1692 } |
1693 | 1693 |
1694 | 1694 |
1695 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { | |
1696 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell(); | |
1697 return instr->RequiresHoleCheck() | |
1698 ? AssignEnvironment(DefineAsRegister(result)) | |
1699 : DefineAsRegister(result); | |
1700 } | |
1701 | |
1702 | |
1703 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { | 1695 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { |
1704 LOperand* context = UseFixed(instr->context(), cp); | 1696 LOperand* context = UseFixed(instr->context(), cp); |
1705 LOperand* global_object = | 1697 LOperand* global_object = |
1706 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister()); | 1698 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister()); |
1707 LOperand* vector = NULL; | 1699 LOperand* vector = NULL; |
1708 if (instr->HasVectorAndSlot()) { | 1700 if (instr->HasVectorAndSlot()) { |
1709 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); | 1701 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); |
1710 } | 1702 } |
1711 | 1703 |
1712 LLoadGlobalGeneric* result = | 1704 LLoadGlobalGeneric* result = |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2344 value = UseRegister(instr->value()); | 2336 value = UseRegister(instr->value()); |
2345 } | 2337 } |
2346 LInstruction* result = new(zone()) LStoreContextSlot(context, value, temp); | 2338 LInstruction* result = new(zone()) LStoreContextSlot(context, value, temp); |
2347 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { | 2339 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { |
2348 result = AssignEnvironment(result); | 2340 result = AssignEnvironment(result); |
2349 } | 2341 } |
2350 return result; | 2342 return result; |
2351 } | 2343 } |
2352 | 2344 |
2353 | 2345 |
2354 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { | |
2355 LOperand* value = UseRegister(instr->value()); | |
2356 if (instr->RequiresHoleCheck()) { | |
2357 return AssignEnvironment(new(zone()) LStoreGlobalCell(value, | |
2358 TempRegister(), | |
2359 TempRegister())); | |
2360 } else { | |
2361 return new(zone()) LStoreGlobalCell(value, TempRegister(), NULL); | |
2362 } | |
2363 } | |
2364 | |
2365 | |
2366 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { | 2346 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { |
2367 LOperand* key = UseRegisterOrConstant(instr->key()); | 2347 LOperand* key = UseRegisterOrConstant(instr->key()); |
2368 LOperand* temp = NULL; | 2348 LOperand* temp = NULL; |
2369 LOperand* elements = NULL; | 2349 LOperand* elements = NULL; |
2370 LOperand* val = NULL; | 2350 LOperand* val = NULL; |
2371 | 2351 |
2372 if (!instr->is_typed_elements() && | 2352 if (!instr->is_typed_elements() && |
2373 instr->value()->representation().IsTagged() && | 2353 instr->value()->representation().IsTagged() && |
2374 instr->NeedsWriteBarrier()) { | 2354 instr->NeedsWriteBarrier()) { |
2375 // RecordWrite() will clobber all registers. | 2355 // RecordWrite() will clobber all registers. |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2776 HAllocateBlockContext* instr) { | 2756 HAllocateBlockContext* instr) { |
2777 LOperand* context = UseFixed(instr->context(), cp); | 2757 LOperand* context = UseFixed(instr->context(), cp); |
2778 LOperand* function = UseRegisterAtStart(instr->function()); | 2758 LOperand* function = UseRegisterAtStart(instr->function()); |
2779 LAllocateBlockContext* result = | 2759 LAllocateBlockContext* result = |
2780 new(zone()) LAllocateBlockContext(context, function); | 2760 new(zone()) LAllocateBlockContext(context, function); |
2781 return MarkAsCall(DefineFixed(result, cp), instr); | 2761 return MarkAsCall(DefineFixed(result, cp), instr); |
2782 } | 2762 } |
2783 | 2763 |
2784 | 2764 |
2785 } } // namespace v8::internal | 2765 } } // namespace v8::internal |
OLD | NEW |