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/linkage.h" | 8 #include "src/compiler/linkage.h" |
9 #include "src/compiler/pipeline.h" | 9 #include "src/compiler/pipeline.h" |
10 #include "src/frames-inl.h" | 10 #include "src/frames-inl.h" |
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 } else if (op->IsImmediate()) { | 625 } else if (op->IsImmediate()) { |
626 InstructionOperandConverter converter(this, instr); | 626 InstructionOperandConverter converter(this, instr); |
627 Constant constant = converter.ToConstant(op); | 627 Constant constant = converter.ToConstant(op); |
628 Handle<Object> constant_object; | 628 Handle<Object> constant_object; |
629 switch (constant.type()) { | 629 switch (constant.type()) { |
630 case Constant::kInt32: | 630 case Constant::kInt32: |
631 DCHECK(type == kMachInt32 || type == kMachUint32 || type == kRepBit); | 631 DCHECK(type == kMachInt32 || type == kMachUint32 || type == kRepBit); |
632 constant_object = | 632 constant_object = |
633 isolate()->factory()->NewNumberFromInt(constant.ToInt32()); | 633 isolate()->factory()->NewNumberFromInt(constant.ToInt32()); |
634 break; | 634 break; |
| 635 case Constant::kFloat32: |
| 636 DCHECK((type & (kRepFloat32 | kRepTagged)) != 0); |
| 637 constant_object = isolate()->factory()->NewNumber(constant.ToFloat32()); |
| 638 break; |
635 case Constant::kFloat64: | 639 case Constant::kFloat64: |
636 DCHECK((type & (kRepFloat64 | kRepTagged)) != 0); | 640 DCHECK((type & (kRepFloat64 | kRepTagged)) != 0); |
637 constant_object = isolate()->factory()->NewNumber(constant.ToFloat64()); | 641 constant_object = isolate()->factory()->NewNumber(constant.ToFloat64()); |
638 break; | 642 break; |
639 case Constant::kHeapObject: | 643 case Constant::kHeapObject: |
640 DCHECK((type & kRepMask) == kRepTagged); | 644 DCHECK((type & kRepMask) == kRepTagged); |
641 constant_object = constant.ToHeapObject(); | 645 constant_object = constant.ToHeapObject(); |
642 break; | 646 break; |
643 default: | 647 default: |
644 CHECK(false); | 648 CHECK(false); |
(...skipping 19 matching lines...) Expand all Loading... |
664 : masm_(gen->masm()), next_(gen->ools_) { | 668 : masm_(gen->masm()), next_(gen->ools_) { |
665 gen->ools_ = this; | 669 gen->ools_ = this; |
666 } | 670 } |
667 | 671 |
668 | 672 |
669 OutOfLineCode::~OutOfLineCode() {} | 673 OutOfLineCode::~OutOfLineCode() {} |
670 | 674 |
671 } // namespace compiler | 675 } // namespace compiler |
672 } // namespace internal | 676 } // namespace internal |
673 } // namespace v8 | 677 } // namespace v8 |
OLD | NEW |