| 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/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
| 8 #include "src/compiler/gap-resolver.h" | 8 #include "src/compiler/gap-resolver.h" |
| 9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
| 10 #include "src/compiler/node-properties-inl.h" | 10 #include "src/compiler/node-properties-inl.h" |
| (...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 } | 863 } |
| 864 } else if (source->IsConstant()) { | 864 } else if (source->IsConstant()) { |
| 865 ConstantOperand* constant_source = ConstantOperand::cast(source); | 865 ConstantOperand* constant_source = ConstantOperand::cast(source); |
| 866 Constant src = g.ToConstant(constant_source); | 866 Constant src = g.ToConstant(constant_source); |
| 867 if (destination->IsRegister() || destination->IsStackSlot()) { | 867 if (destination->IsRegister() || destination->IsStackSlot()) { |
| 868 Register dst = destination->IsRegister() ? g.ToRegister(destination) | 868 Register dst = destination->IsRegister() ? g.ToRegister(destination) |
| 869 : kScratchRegister; | 869 : kScratchRegister; |
| 870 switch (src.type()) { | 870 switch (src.type()) { |
| 871 case Constant::kInt32: | 871 case Constant::kInt32: |
| 872 // TODO(dcarney): don't need scratch in this case. | 872 // TODO(dcarney): don't need scratch in this case. |
| 873 __ movq(dst, Immediate(src.ToInt32())); | 873 __ Set(dst, src.ToInt32()); |
| 874 break; | 874 break; |
| 875 case Constant::kInt64: | 875 case Constant::kInt64: |
| 876 __ Set(dst, src.ToInt64()); | 876 __ Set(dst, src.ToInt64()); |
| 877 break; | 877 break; |
| 878 case Constant::kFloat32: | 878 case Constant::kFloat32: |
| 879 __ Move(dst, | 879 __ Move(dst, |
| 880 isolate()->factory()->NewNumber(src.ToFloat32(), TENURED)); | 880 isolate()->factory()->NewNumber(src.ToFloat32(), TENURED)); |
| 881 break; | 881 break; |
| 882 case Constant::kFloat64: | 882 case Constant::kFloat64: |
| 883 __ Move(dst, | 883 __ Move(dst, |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1002 } | 1002 } |
| 1003 } | 1003 } |
| 1004 MarkLazyDeoptSite(); | 1004 MarkLazyDeoptSite(); |
| 1005 } | 1005 } |
| 1006 | 1006 |
| 1007 #undef __ | 1007 #undef __ |
| 1008 | 1008 |
| 1009 } // namespace internal | 1009 } // namespace internal |
| 1010 } // namespace compiler | 1010 } // namespace compiler |
| 1011 } // namespace v8 | 1011 } // namespace v8 |
| OLD | NEW |