| 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 } | 230 } |
| 231 } | 231 } |
| 232 } | 232 } |
| 233 | 233 |
| 234 { | 234 { |
| 235 FOR_FLOAT64_INPUTS(i) { | 235 FOR_FLOAT64_INPUTS(i) { |
| 236 double input = *i; | 236 double input = *i; |
| 237 { | 237 { |
| 238 Handle<Object> number = t.factory()->NewNumber(input); | 238 Handle<Object> number = t.factory()->NewNumber(input); |
| 239 t.Call(*number); | 239 t.Call(*number); |
| 240 CheckDoubleEq(input, result); | 240 CHECK_DOUBLE_EQ(input, result); |
| 241 } | 241 } |
| 242 | 242 |
| 243 { | 243 { |
| 244 Handle<HeapNumber> number = t.factory()->NewHeapNumber(input); | 244 Handle<HeapNumber> number = t.factory()->NewHeapNumber(input); |
| 245 t.Call(*number); | 245 t.Call(*number); |
| 246 CheckDoubleEq(input, result); | 246 CHECK_DOUBLE_EQ(input, result); |
| 247 } | 247 } |
| 248 } | 248 } |
| 249 } | 249 } |
| 250 } | 250 } |
| 251 | 251 |
| 252 | 252 |
| 253 TEST(RunChangeBoolToBit) { | 253 TEST(RunChangeBoolToBit) { |
| 254 ChangesLoweringTester<int32_t> t(MachineType::AnyTagged()); | 254 ChangesLoweringTester<int32_t> t(MachineType::AnyTagged()); |
| 255 t.BuildAndLower(t.simplified()->ChangeBoolToBit()); | 255 t.BuildAndLower(t.simplified()->ChangeBoolToBit()); |
| 256 | 256 |
| (...skipping 24 matching lines...) Expand all 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 |