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 "src/compiler/js-builtin-reducer.h" | 5 #include "src/compiler/js-builtin-reducer.h" |
6 #include "src/compiler/js-graph.h" | 6 #include "src/compiler/js-graph.h" |
7 #include "src/compiler/node-properties.h" | 7 #include "src/compiler/node-properties.h" |
8 #include "src/compiler/typer.h" | 8 #include "src/compiler/typer.h" |
9 #include "test/unittests/compiler/graph-unittest.h" | 9 #include "test/unittests/compiler/graph-unittest.h" |
10 #include "test/unittests/compiler/node-test-utils.h" | 10 #include "test/unittests/compiler/node-test-utils.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 Node* MathFunction(const char* name) { | 35 Node* MathFunction(const char* name) { |
36 Handle<Object> m = | 36 Handle<Object> m = |
37 JSObject::GetProperty(isolate()->global_object(), | 37 JSObject::GetProperty(isolate()->global_object(), |
38 isolate()->factory()->NewStringFromAsciiChecked( | 38 isolate()->factory()->NewStringFromAsciiChecked( |
39 "Math")).ToHandleChecked(); | 39 "Math")).ToHandleChecked(); |
40 Handle<JSFunction> f = Handle<JSFunction>::cast( | 40 Handle<JSFunction> f = Handle<JSFunction>::cast( |
41 JSObject::GetProperty( | 41 JSObject::GetProperty( |
42 m, isolate()->factory()->NewStringFromAsciiChecked(name)) | 42 m, isolate()->factory()->NewStringFromAsciiChecked(name)) |
43 .ToHandleChecked()); | 43 .ToHandleChecked()); |
44 return HeapConstant(Unique<JSFunction>::CreateUninitialized(f)); | 44 return HeapConstant(f); |
45 } | 45 } |
46 | 46 |
47 JSOperatorBuilder* javascript() { return &javascript_; } | 47 JSOperatorBuilder* javascript() { return &javascript_; } |
48 | 48 |
49 private: | 49 private: |
50 JSOperatorBuilder javascript_; | 50 JSOperatorBuilder javascript_; |
51 }; | 51 }; |
52 | 52 |
53 | 53 |
54 namespace { | 54 namespace { |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 | 195 |
196 ASSERT_TRUE(r.Changed()); | 196 ASSERT_TRUE(r.Changed()); |
197 EXPECT_THAT(r.replacement(), IsTruncateFloat64ToFloat32(p0)); | 197 EXPECT_THAT(r.replacement(), IsTruncateFloat64ToFloat32(p0)); |
198 } | 198 } |
199 } | 199 } |
200 } | 200 } |
201 | 201 |
202 } // namespace compiler | 202 } // namespace compiler |
203 } // namespace internal | 203 } // namespace internal |
204 } // namespace v8 | 204 } // namespace v8 |
OLD | NEW |