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/compiler/pipeline.h" | 7 #include "src/compiler/pipeline.h" |
8 #include "src/execution.h" | 8 #include "src/execution.h" |
9 #include "src/handles.h" | 9 #include "src/handles.h" |
10 #include "src/interpreter/bytecode-array-builder.h" | 10 #include "src/interpreter/bytecode-array-builder.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 129 |
130 // TODO(mstarzinger): We should be able to prime CompilationInfo without | 130 // TODO(mstarzinger): We should be able to prime CompilationInfo without |
131 // having to instantiate a ParseInfo first. Fix this! | 131 // having to instantiate a ParseInfo first. Fix this! |
132 ParseInfo parse_info(zone_, function); | 132 ParseInfo parse_info(zone_, function); |
133 | 133 |
134 CompilationInfo compilation_info(&parse_info); | 134 CompilationInfo compilation_info(&parse_info); |
135 compilation_info.SetOptimizing(); | 135 compilation_info.SetOptimizing(); |
136 compilation_info.MarkAsDeoptimizationEnabled(); | 136 compilation_info.MarkAsDeoptimizationEnabled(); |
137 compiler::Pipeline pipeline(&compilation_info); | 137 compiler::Pipeline pipeline(&compilation_info); |
138 Handle<Code> code = pipeline.GenerateCode(); | 138 Handle<Code> code = pipeline.GenerateCode(); |
139 // We do not actually record weak dependencies between objects and | |
140 // code objects. We just clear the dependencies for now. | |
141 compilation_info.dependencies()->Commit(compilation_info.code()); | |
142 function->ReplaceCode(*code); | 139 function->ReplaceCode(*code); |
143 | 140 |
144 return function; | 141 return function; |
145 } | 142 } |
146 | 143 |
147 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphTester); | 144 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphTester); |
148 }; | 145 }; |
149 | 146 |
150 | 147 |
151 #define SPACE() | 148 #define SPACE() |
(...skipping 2826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2978 | 2975 |
2979 BytecodeGraphTester tester(isolate, zone, script.start()); | 2976 BytecodeGraphTester tester(isolate, zone, script.start()); |
2980 auto callable = tester.GetCallable<>(); | 2977 auto callable = tester.GetCallable<>(); |
2981 Handle<Object> return_value = callable().ToHandleChecked(); | 2978 Handle<Object> return_value = callable().ToHandleChecked(); |
2982 CHECK(return_value->SameValue(*snippet.return_value())); | 2979 CHECK(return_value->SameValue(*snippet.return_value())); |
2983 } | 2980 } |
2984 | 2981 |
2985 } // namespace compiler | 2982 } // namespace compiler |
2986 } // namespace internal | 2983 } // namespace internal |
2987 } // namespace v8 | 2984 } // namespace v8 |
OLD | NEW |