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 "src/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 | 6 |
7 #include "src/compilation-info.h" | 7 #include "src/compilation-info.h" |
8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
(...skipping 2515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2526 case Constant::kFloat64: | 2526 case Constant::kFloat64: |
2527 __ Move(dst, | 2527 __ Move(dst, |
2528 isolate()->factory()->NewNumber(src.ToFloat64(), TENURED)); | 2528 isolate()->factory()->NewNumber(src.ToFloat64(), TENURED)); |
2529 break; | 2529 break; |
2530 case Constant::kExternalReference: | 2530 case Constant::kExternalReference: |
2531 __ Move(dst, src.ToExternalReference()); | 2531 __ Move(dst, src.ToExternalReference()); |
2532 break; | 2532 break; |
2533 case Constant::kHeapObject: { | 2533 case Constant::kHeapObject: { |
2534 Handle<HeapObject> src_object = src.ToHeapObject(); | 2534 Handle<HeapObject> src_object = src.ToHeapObject(); |
2535 Heap::RootListIndex index; | 2535 Heap::RootListIndex index; |
2536 int slot; | 2536 if (IsMaterializableFromRoot(src_object, &index)) { |
2537 if (IsMaterializableFromFrame(src_object, &slot)) { | |
2538 __ movp(dst, g.SlotToOperand(slot)); | |
2539 } else if (IsMaterializableFromRoot(src_object, &index)) { | |
2540 __ LoadRoot(dst, index); | 2537 __ LoadRoot(dst, index); |
2541 } else { | 2538 } else { |
2542 __ Move(dst, src_object); | 2539 __ Move(dst, src_object); |
2543 } | 2540 } |
2544 break; | 2541 break; |
2545 } | 2542 } |
2546 case Constant::kRpoNumber: | 2543 case Constant::kRpoNumber: |
2547 UNREACHABLE(); // TODO(dcarney): load of labels on x64. | 2544 UNREACHABLE(); // TODO(dcarney): load of labels on x64. |
2548 break; | 2545 break; |
2549 } | 2546 } |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2717 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2714 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
2718 __ Nop(padding_size); | 2715 __ Nop(padding_size); |
2719 } | 2716 } |
2720 } | 2717 } |
2721 | 2718 |
2722 #undef __ | 2719 #undef __ |
2723 | 2720 |
2724 } // namespace compiler | 2721 } // namespace compiler |
2725 } // namespace internal | 2722 } // namespace internal |
2726 } // namespace v8 | 2723 } // namespace v8 |
OLD | NEW |