OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 <limits> | 5 #include <limits> |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/compiler/change-lowering.h" | 8 #include "src/compiler/change-lowering.h" |
9 #include "src/compiler/control-builders.h" | 9 #include "src/compiler/control-builders.h" |
10 #include "src/compiler/js-graph.h" | 10 #include "src/compiler/js-graph.h" |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 } | 198 } |
199 } | 199 } |
200 | 200 |
201 | 201 |
202 TEST(RunChangeTaggedToFloat64) { | 202 TEST(RunChangeTaggedToFloat64) { |
203 ChangesLoweringTester<int32_t> t(MachineType::AnyTagged()); | 203 ChangesLoweringTester<int32_t> t(MachineType::AnyTagged()); |
204 double result; | 204 double result; |
205 | 205 |
206 t.BuildStoreAndLower(t.simplified()->ChangeTaggedToFloat64(), | 206 t.BuildStoreAndLower(t.simplified()->ChangeTaggedToFloat64(), |
207 t.machine()->Store(StoreRepresentation( | 207 t.machine()->Store(StoreRepresentation( |
208 MachineType::Float64(), kNoWriteBarrier)), | 208 MachineRepresentation::kFloat64, kNoWriteBarrier)), |
209 &result); | 209 &result); |
210 | 210 |
211 { | 211 { |
212 FOR_INT32_INPUTS(i) { | 212 FOR_INT32_INPUTS(i) { |
213 int32_t input = *i; | 213 int32_t input = *i; |
214 | 214 |
215 if (Smi::IsValid(input)) { | 215 if (Smi::IsValid(input)) { |
216 t.Call(Smi::FromInt(input)); | 216 t.Call(Smi::FromInt(input)); |
217 CHECK_EQ(input, static_cast<int32_t>(result)); | 217 CHECK_EQ(input, static_cast<int32_t>(result)); |
218 } | 218 } |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 { | 281 { |
282 Object* result = t.Call(0); | 282 Object* result = t.Call(0); |
283 Object* false_obj = t.heap()->false_value(); | 283 Object* false_obj = t.heap()->false_value(); |
284 CHECK_EQ(false_obj, result); | 284 CHECK_EQ(false_obj, result); |
285 } | 285 } |
286 } | 286 } |
287 | 287 |
288 } // namespace compiler | 288 } // namespace compiler |
289 } // namespace internal | 289 } // namespace internal |
290 } // namespace v8 | 290 } // namespace v8 |
OLD | NEW |