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 // TODO(jochen): Remove this after the setting is turned on globally. | 5 // TODO(jochen): Remove this after the setting is turned on globally. |
6 #define V8_IMMINENT_DEPRECATION_WARNINGS | 6 #define V8_IMMINENT_DEPRECATION_WARNINGS |
7 | 7 |
8 #include "src/compiler/js-context-specialization.h" | 8 #include "src/compiler/js-context-specialization.h" |
9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
10 #include "src/compiler/js-operator.h" | 10 #include "src/compiler/js-operator.h" |
11 #include "src/compiler/node-matchers.h" | 11 #include "src/compiler/node-matchers.h" |
12 #include "src/compiler/node-properties.h" | 12 #include "src/compiler/node-properties.h" |
13 #include "src/compiler/source-position.h" | 13 #include "src/compiler/source-position.h" |
14 #include "test/cctest/cctest.h" | 14 #include "test/cctest/cctest.h" |
15 #include "test/cctest/compiler/function-tester.h" | 15 #include "test/cctest/compiler/function-tester.h" |
16 #include "test/cctest/compiler/graph-builder-tester.h" | 16 #include "test/cctest/compiler/graph-builder-tester.h" |
17 | 17 |
18 using namespace v8::internal; | 18 namespace v8 { |
19 using namespace v8::internal::compiler; | 19 namespace internal { |
| 20 namespace compiler { |
20 | 21 |
21 class ContextSpecializationTester : public HandleAndZoneScope { | 22 class ContextSpecializationTester : public HandleAndZoneScope { |
22 public: | 23 public: |
23 ContextSpecializationTester() | 24 ContextSpecializationTester() |
24 : graph_(new (main_zone()) Graph(main_zone())), | 25 : graph_(new (main_zone()) Graph(main_zone())), |
25 common_(main_zone()), | 26 common_(main_zone()), |
26 javascript_(main_zone()), | 27 javascript_(main_zone()), |
27 machine_(main_zone()), | 28 machine_(main_zone()), |
28 simplified_(main_zone()), | 29 simplified_(main_zone()), |
29 jsgraph_(main_isolate(), graph(), common(), &javascript_, &simplified_, | 30 jsgraph_(main_isolate(), graph(), common(), &javascript_, &simplified_, |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 { | 312 { |
312 FunctionTester T( | 313 FunctionTester T( |
313 "(function() { if (false) { var x = 1; } function inc(a)" | 314 "(function() { if (false) { var x = 1; } function inc(a)" |
314 " { return a + x; } return inc; })()"); // x is undefined! | 315 " { return a + x; } return inc; })()"); // x is undefined! |
315 | 316 |
316 CHECK(T.Call(T.Val(0.0), T.Val(0.0)).ToHandleChecked()->IsNaN()); | 317 CHECK(T.Call(T.Val(0.0), T.Val(0.0)).ToHandleChecked()->IsNaN()); |
317 CHECK(T.Call(T.Val(2.0), T.Val(0.0)).ToHandleChecked()->IsNaN()); | 318 CHECK(T.Call(T.Val(2.0), T.Val(0.0)).ToHandleChecked()->IsNaN()); |
318 CHECK(T.Call(T.Val(-2.1), T.Val(0.0)).ToHandleChecked()->IsNaN()); | 319 CHECK(T.Call(T.Val(-2.1), T.Val(0.0)).ToHandleChecked()->IsNaN()); |
319 } | 320 } |
320 } | 321 } |
| 322 |
| 323 } // namespace compiler |
| 324 } // namespace internal |
| 325 } // namespace v8 |
OLD | NEW |