| 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 2499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2510 __ mov(dst, src); | 2510 __ mov(dst, src); |
| 2511 } else { | 2511 } else { |
| 2512 Operand dst = g.ToOperand(destination); | 2512 Operand dst = g.ToOperand(destination); |
| 2513 __ push(src); | 2513 __ push(src); |
| 2514 __ pop(dst); | 2514 __ pop(dst); |
| 2515 } | 2515 } |
| 2516 } else if (source->IsConstant()) { | 2516 } else if (source->IsConstant()) { |
| 2517 Constant src_constant = g.ToConstant(source); | 2517 Constant src_constant = g.ToConstant(source); |
| 2518 if (src_constant.type() == Constant::kHeapObject) { | 2518 if (src_constant.type() == Constant::kHeapObject) { |
| 2519 Handle<HeapObject> src = src_constant.ToHeapObject(); | 2519 Handle<HeapObject> src = src_constant.ToHeapObject(); |
| 2520 int slot; | 2520 if (destination->IsRegister()) { |
| 2521 if (IsMaterializableFromFrame(src, &slot)) { | |
| 2522 if (destination->IsRegister()) { | |
| 2523 Register dst = g.ToRegister(destination); | |
| 2524 __ mov(dst, g.SlotToOperand(slot)); | |
| 2525 } else { | |
| 2526 DCHECK(destination->IsStackSlot()); | |
| 2527 Operand dst = g.ToOperand(destination); | |
| 2528 __ push(g.SlotToOperand(slot)); | |
| 2529 __ pop(dst); | |
| 2530 } | |
| 2531 } else if (destination->IsRegister()) { | |
| 2532 Register dst = g.ToRegister(destination); | 2521 Register dst = g.ToRegister(destination); |
| 2533 __ LoadHeapObject(dst, src); | 2522 __ LoadHeapObject(dst, src); |
| 2534 } else { | 2523 } else { |
| 2535 DCHECK(destination->IsStackSlot()); | 2524 DCHECK(destination->IsStackSlot()); |
| 2536 Operand dst = g.ToOperand(destination); | 2525 Operand dst = g.ToOperand(destination); |
| 2537 AllowDeferredHandleDereference embedding_raw_address; | 2526 AllowDeferredHandleDereference embedding_raw_address; |
| 2538 if (isolate()->heap()->InNewSpace(*src)) { | 2527 if (isolate()->heap()->InNewSpace(*src)) { |
| 2539 __ PushHeapObject(src); | 2528 __ PushHeapObject(src); |
| 2540 __ pop(dst); | 2529 __ pop(dst); |
| 2541 } else { | 2530 } else { |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2724 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2713 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
| 2725 __ Nop(padding_size); | 2714 __ Nop(padding_size); |
| 2726 } | 2715 } |
| 2727 } | 2716 } |
| 2728 | 2717 |
| 2729 #undef __ | 2718 #undef __ |
| 2730 | 2719 |
| 2731 } // namespace compiler | 2720 } // namespace compiler |
| 2732 } // namespace internal | 2721 } // namespace internal |
| 2733 } // namespace v8 | 2722 } // namespace v8 |
| OLD | NEW |