| 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/address-map.h" | 7 #include "src/address-map.h" |
| 8 #include "src/base/adapters.h" | 8 #include "src/base/adapters.h" |
| 9 #include "src/compiler/code-generator-impl.h" | 9 #include "src/compiler/code-generator-impl.h" |
| 10 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" |
| (...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 858 DCHECK_EQ(MachineRepresentation::kFloat32, type.representation()); | 858 DCHECK_EQ(MachineRepresentation::kFloat32, type.representation()); |
| 859 translation->StoreFloatRegister(converter.ToFloatRegister(op)); | 859 translation->StoreFloatRegister(converter.ToFloatRegister(op)); |
| 860 } | 860 } |
| 861 } else if (op->IsImmediate()) { | 861 } else if (op->IsImmediate()) { |
| 862 InstructionOperandConverter converter(this, instr); | 862 InstructionOperandConverter converter(this, instr); |
| 863 Constant constant = converter.ToConstant(op); | 863 Constant constant = converter.ToConstant(op); |
| 864 Handle<Object> constant_object; | 864 Handle<Object> constant_object; |
| 865 switch (constant.type()) { | 865 switch (constant.type()) { |
| 866 case Constant::kInt32: | 866 case Constant::kInt32: |
| 867 DCHECK(type == MachineType::Int32() || type == MachineType::Uint32() || | 867 DCHECK(type == MachineType::Int32() || type == MachineType::Uint32() || |
| 868 type.representation() == MachineRepresentation::kBit); | 868 type.representation() == MachineRepresentation::kBit || |
| 869 type.representation() == MachineRepresentation::kNone); |
| 870 DCHECK(type.representation() != MachineRepresentation::kNone || |
| 871 constant.ToInt32() == FrameStateDescriptor::kImpossibleValue); |
| 872 |
| 869 constant_object = | 873 constant_object = |
| 870 isolate()->factory()->NewNumberFromInt(constant.ToInt32()); | 874 isolate()->factory()->NewNumberFromInt(constant.ToInt32()); |
| 871 break; | 875 break; |
| 872 case Constant::kFloat32: | 876 case Constant::kFloat32: |
| 873 DCHECK(type.representation() == MachineRepresentation::kFloat32 || | 877 DCHECK(type.representation() == MachineRepresentation::kFloat32 || |
| 874 type.representation() == MachineRepresentation::kTagged); | 878 type.representation() == MachineRepresentation::kTagged); |
| 875 constant_object = isolate()->factory()->NewNumber(constant.ToFloat32()); | 879 constant_object = isolate()->factory()->NewNumber(constant.ToFloat32()); |
| 876 break; | 880 break; |
| 877 case Constant::kFloat64: | 881 case Constant::kFloat64: |
| 878 DCHECK(type.representation() == MachineRepresentation::kFloat64 || | 882 DCHECK(type.representation() == MachineRepresentation::kFloat64 || |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 916 : frame_(gen->frame()), masm_(gen->masm()), next_(gen->ools_) { | 920 : frame_(gen->frame()), masm_(gen->masm()), next_(gen->ools_) { |
| 917 gen->ools_ = this; | 921 gen->ools_ = this; |
| 918 } | 922 } |
| 919 | 923 |
| 920 | 924 |
| 921 OutOfLineCode::~OutOfLineCode() {} | 925 OutOfLineCode::~OutOfLineCode() {} |
| 922 | 926 |
| 923 } // namespace compiler | 927 } // namespace compiler |
| 924 } // namespace internal | 928 } // namespace internal |
| 925 } // namespace v8 | 929 } // namespace v8 |
| OLD | NEW |