Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Side by Side Diff: test/cctest/compiler/function-tester.h

Issue 1668103002: Type Feedback Vector lives in the closure (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/cctest/cctest.status ('k') | test/cctest/compiler/test-run-jscalls.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ast/ast-numbering.h" 8 #include "src/ast/ast-numbering.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 info.MarkAsFunctionContextSpecializing(); 175 info.MarkAsFunctionContextSpecializing();
176 } 176 }
177 if (flags_ & CompilationInfo::kInliningEnabled) { 177 if (flags_ & CompilationInfo::kInliningEnabled) {
178 info.MarkAsInliningEnabled(); 178 info.MarkAsInliningEnabled();
179 } 179 }
180 if (flags_ & CompilationInfo::kTypingEnabled) { 180 if (flags_ & CompilationInfo::kTypingEnabled) {
181 info.MarkAsTypingEnabled(); 181 info.MarkAsTypingEnabled();
182 } 182 }
183 CHECK(Compiler::Analyze(info.parse_info())); 183 CHECK(Compiler::Analyze(info.parse_info()));
184 CHECK(Compiler::EnsureDeoptimizationSupport(&info)); 184 CHECK(Compiler::EnsureDeoptimizationSupport(&info));
185 JSFunction::EnsureLiterals(function);
185 186
186 Pipeline pipeline(&info); 187 Pipeline pipeline(&info);
187 Handle<Code> code = pipeline.GenerateCode(); 188 Handle<Code> code = pipeline.GenerateCode();
188 CHECK(!code.is_null()); 189 CHECK(!code.is_null());
189 info.dependencies()->Commit(code); 190 info.dependencies()->Commit(code);
190 info.context()->native_context()->AddOptimizedCode(*code); 191 info.context()->native_context()->AddOptimizedCode(*code);
191 function->ReplaceCode(*code); 192 function->ReplaceCode(*code);
192 return function; 193 return function;
193 } 194 }
194 195
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 Handle<JSFunction> CompileGraph(Graph* graph) { 229 Handle<JSFunction> CompileGraph(Graph* graph) {
229 Zone zone; 230 Zone zone;
230 ParseInfo parse_info(&zone, function); 231 ParseInfo parse_info(&zone, function);
231 CompilationInfo info(&parse_info); 232 CompilationInfo info(&parse_info);
232 233
233 CHECK(Parser::ParseStatic(info.parse_info())); 234 CHECK(Parser::ParseStatic(info.parse_info()));
234 info.SetOptimizing(BailoutId::None(), 235 info.SetOptimizing(BailoutId::None(),
235 Handle<Code>(function->shared()->code())); 236 Handle<Code>(function->shared()->code()));
236 CHECK(Compiler::Analyze(info.parse_info())); 237 CHECK(Compiler::Analyze(info.parse_info()));
237 CHECK(Compiler::EnsureDeoptimizationSupport(&info)); 238 CHECK(Compiler::EnsureDeoptimizationSupport(&info));
239 JSFunction::EnsureLiterals(function);
238 240
239 Handle<Code> code = Pipeline::GenerateCodeForTesting(&info, graph); 241 Handle<Code> code = Pipeline::GenerateCodeForTesting(&info, graph);
240 CHECK(!code.is_null()); 242 CHECK(!code.is_null());
241 function->ReplaceCode(*code); 243 function->ReplaceCode(*code);
242 return function; 244 return function;
243 } 245 }
244 }; 246 };
245 } // namespace compiler 247 } // namespace compiler
246 } // namespace internal 248 } // namespace internal
247 } // namespace v8 249 } // namespace v8
248 250
249 #endif // V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ 251 #endif // V8_CCTEST_COMPILER_FUNCTION_TESTER_H_
OLDNEW
« no previous file with comments | « test/cctest/cctest.status ('k') | test/cctest/compiler/test-run-jscalls.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698