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/compilation-info.h" | 9 #include "src/compilation-info.h" |
10 #include "src/compiler/code-generator-impl.h" | 10 #include "src/compiler/code-generator-impl.h" |
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
921 } | 921 } |
922 } else { | 922 } else { |
923 // TODO(jarin,bmeurer): We currently pass in raw pointers to the | 923 // TODO(jarin,bmeurer): We currently pass in raw pointers to the |
924 // JSFunction::entry here. We should really consider fixing this. | 924 // JSFunction::entry here. We should really consider fixing this. |
925 DCHECK(type == MachineType::Int32() || | 925 DCHECK(type == MachineType::Int32() || |
926 type == MachineType::Uint32() || | 926 type == MachineType::Uint32() || |
927 type.representation() == MachineRepresentation::kWord32 || | 927 type.representation() == MachineRepresentation::kWord32 || |
928 type.representation() == MachineRepresentation::kNone); | 928 type.representation() == MachineRepresentation::kNone); |
929 DCHECK(type.representation() != MachineRepresentation::kNone || | 929 DCHECK(type.representation() != MachineRepresentation::kNone || |
930 constant.ToInt32() == FrameStateDescriptor::kImpossibleValue); | 930 constant.ToInt32() == FrameStateDescriptor::kImpossibleValue); |
931 | 931 if (type == MachineType::Uint32()) { |
932 constant_object = | 932 constant_object = |
933 isolate()->factory()->NewNumberFromInt(constant.ToInt32()); | 933 isolate()->factory()->NewNumberFromUint(constant.ToInt32()); |
| 934 } else { |
| 935 constant_object = |
| 936 isolate()->factory()->NewNumberFromInt(constant.ToInt32()); |
| 937 } |
934 } | 938 } |
935 break; | 939 break; |
936 case Constant::kInt64: | 940 case Constant::kInt64: |
937 // When pointers are 8 bytes, we can use int64 constants to represent | 941 // When pointers are 8 bytes, we can use int64 constants to represent |
938 // Smis. | 942 // Smis. |
939 // TODO(jarin,bmeurer): We currently pass in raw pointers to the | 943 // TODO(jarin,bmeurer): We currently pass in raw pointers to the |
940 // JSFunction::entry here. We should really consider fixing this. | 944 // JSFunction::entry here. We should really consider fixing this. |
941 DCHECK(type.representation() == MachineRepresentation::kWord64 || | 945 DCHECK(type.representation() == MachineRepresentation::kWord64 || |
942 type.representation() == MachineRepresentation::kTagged || | 946 type.representation() == MachineRepresentation::kTagged || |
943 type.representation() == MachineRepresentation::kTaggedSigned); | 947 type.representation() == MachineRepresentation::kTaggedSigned); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1001 : frame_(gen->frame()), masm_(gen->masm()), next_(gen->ools_) { | 1005 : frame_(gen->frame()), masm_(gen->masm()), next_(gen->ools_) { |
1002 gen->ools_ = this; | 1006 gen->ools_ = this; |
1003 } | 1007 } |
1004 | 1008 |
1005 | 1009 |
1006 OutOfLineCode::~OutOfLineCode() {} | 1010 OutOfLineCode::~OutOfLineCode() {} |
1007 | 1011 |
1008 } // namespace compiler | 1012 } // namespace compiler |
1009 } // namespace internal | 1013 } // namespace internal |
1010 } // namespace v8 | 1014 } // namespace v8 |
OLD | NEW |