| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 <utility> | 5 #include <utility> |
| 6 | 6 |
| 7 #include "src/compilation-info.h" | 7 #include "src/compilation-info.h" |
| 8 #include "src/compiler/pipeline.h" | 8 #include "src/compiler/pipeline.h" |
| 9 #include "src/execution.h" | 9 #include "src/execution.h" |
| 10 #include "src/handles.h" | 10 #include "src/handles.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 class BytecodeGraphTester { | 74 class BytecodeGraphTester { |
| 75 public: | 75 public: |
| 76 BytecodeGraphTester(Isolate* isolate, Zone* zone, const char* script, | 76 BytecodeGraphTester(Isolate* isolate, Zone* zone, const char* script, |
| 77 const char* filter = kFunctionName) | 77 const char* filter = kFunctionName) |
| 78 : isolate_(isolate), zone_(zone), script_(script) { | 78 : isolate_(isolate), zone_(zone), script_(script) { |
| 79 i::FLAG_ignition = true; | 79 i::FLAG_ignition = true; |
| 80 i::FLAG_always_opt = false; | 80 i::FLAG_always_opt = false; |
| 81 i::FLAG_allow_natives_syntax = true; | 81 i::FLAG_allow_natives_syntax = true; |
| 82 i::FLAG_loop_assignment_analysis = false; | 82 i::FLAG_loop_assignment_analysis = false; |
| 83 // Ensure handler table is generated. | |
| 84 isolate->interpreter()->Initialize(); | |
| 85 } | 83 } |
| 86 virtual ~BytecodeGraphTester() {} | 84 virtual ~BytecodeGraphTester() {} |
| 87 | 85 |
| 88 template <class... A> | 86 template <class... A> |
| 89 BytecodeGraphCallable<A...> GetCallable( | 87 BytecodeGraphCallable<A...> GetCallable( |
| 90 const char* functionName = kFunctionName) { | 88 const char* functionName = kFunctionName) { |
| 91 return BytecodeGraphCallable<A...>(isolate_, GetFunction(functionName)); | 89 return BytecodeGraphCallable<A...>(isolate_, GetFunction(functionName)); |
| 92 } | 90 } |
| 93 | 91 |
| 94 Local<Message> CheckThrowsReturnMessage() { | 92 Local<Message> CheckThrowsReturnMessage() { |
| (...skipping 2961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3056 | 3054 |
| 3057 BytecodeGraphTester tester(isolate, zone, script.start()); | 3055 BytecodeGraphTester tester(isolate, zone, script.start()); |
| 3058 auto callable = tester.GetCallable<>(); | 3056 auto callable = tester.GetCallable<>(); |
| 3059 Handle<Object> return_value = callable().ToHandleChecked(); | 3057 Handle<Object> return_value = callable().ToHandleChecked(); |
| 3060 CHECK(return_value->SameValue(*snippet.return_value())); | 3058 CHECK(return_value->SameValue(*snippet.return_value())); |
| 3061 } | 3059 } |
| 3062 | 3060 |
| 3063 } // namespace compiler | 3061 } // namespace compiler |
| 3064 } // namespace internal | 3062 } // namespace internal |
| 3065 } // namespace v8 | 3063 } // namespace v8 |
| OLD | NEW |