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 #ifndef V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ | 5 #ifndef V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ |
6 #define V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ | 6 #define V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ |
7 | 7 |
8 #include "src/v8.h" | |
9 #include "test/cctest/cctest.h" | |
10 | |
11 #include "src/ast-numbering.h" | 8 #include "src/ast-numbering.h" |
12 #include "src/compiler.h" | 9 #include "src/compiler.h" |
13 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" |
14 #include "src/compiler/pipeline.h" | 11 #include "src/compiler/pipeline.h" |
15 #include "src/execution.h" | 12 #include "src/execution.h" |
16 #include "src/full-codegen/full-codegen.h" | 13 #include "src/full-codegen/full-codegen.h" |
17 #include "src/handles.h" | 14 #include "src/handles.h" |
18 #include "src/objects-inl.h" | 15 #include "src/objects-inl.h" |
19 #include "src/parser.h" | 16 #include "src/parser.h" |
20 #include "src/rewriter.h" | 17 #include "src/rewriter.h" |
21 #include "src/scopes.h" | 18 #include "src/scopes.h" |
| 19 #include "test/cctest/cctest.h" |
22 | 20 |
23 namespace v8 { | 21 namespace v8 { |
24 namespace internal { | 22 namespace internal { |
25 namespace compiler { | 23 namespace compiler { |
26 | 24 |
27 class FunctionTester : public InitializedHandleScope { | 25 class FunctionTester : public InitializedHandleScope { |
28 public: | 26 public: |
29 explicit FunctionTester(const char* source, uint32_t flags = 0) | 27 explicit FunctionTester(const char* source, uint32_t flags = 0) |
30 : isolate(main_isolate()), | 28 : isolate(main_isolate()), |
31 function((FLAG_allow_natives_syntax = true, NewFunction(source))), | 29 function((FLAG_allow_natives_syntax = true, NewFunction(source))), |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 CHECK(!code.is_null()); | 209 CHECK(!code.is_null()); |
212 function->ReplaceCode(*code); | 210 function->ReplaceCode(*code); |
213 return function; | 211 return function; |
214 } | 212 } |
215 }; | 213 }; |
216 } // namespace compiler | 214 } // namespace compiler |
217 } // namespace internal | 215 } // namespace internal |
218 } // namespace v8 | 216 } // namespace v8 |
219 | 217 |
220 #endif // V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ | 218 #endif // V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ |
OLD | NEW |