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

Side by Side Diff: src/runtime/runtime-compiler.cc

Issue 1063383004: Revert of Remove support for thread-based recompilation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: manual revert Created 5 years, 8 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 | « src/optimizing-compiler-thread.cc ('k') | src/runtime/runtime-test.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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/frames.h" 10 #include "src/frames.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 (function->shared()->ast_node_count() > 512) 225 (function->shared()->ast_node_count() > 512)
226 ? Compiler::CONCURRENT 226 ? Compiler::CONCURRENT
227 : Compiler::NOT_CONCURRENT; 227 : Compiler::NOT_CONCURRENT;
228 Handle<Code> result = Handle<Code>::null(); 228 Handle<Code> result = Handle<Code>::null();
229 229
230 OptimizedCompileJob* job = NULL; 230 OptimizedCompileJob* job = NULL;
231 if (mode == Compiler::CONCURRENT) { 231 if (mode == Compiler::CONCURRENT) {
232 // Gate the OSR entry with a stack check. 232 // Gate the OSR entry with a stack check.
233 BackEdgeTable::AddStackCheck(caller_code, pc_offset); 233 BackEdgeTable::AddStackCheck(caller_code, pc_offset);
234 // Poll already queued compilation jobs. 234 // Poll already queued compilation jobs.
235 OptimizingCompileDispatcher* thread = 235 OptimizingCompilerThread* thread = isolate->optimizing_compiler_thread();
236 isolate->optimizing_compile_dispatcher();
237 if (thread->IsQueuedForOSR(function, ast_id)) { 236 if (thread->IsQueuedForOSR(function, ast_id)) {
238 if (FLAG_trace_osr) { 237 if (FLAG_trace_osr) {
239 PrintF("[OSR - Still waiting for queued: "); 238 PrintF("[OSR - Still waiting for queued: ");
240 function->PrintName(); 239 function->PrintName();
241 PrintF(" at AST id %d]\n", ast_id.ToInt()); 240 PrintF(" at AST id %d]\n", ast_id.ToInt());
242 } 241 }
243 return NULL; 242 return NULL;
244 } 243 }
245 244
246 job = thread->FindReadyOSRCandidate(function, ast_id); 245 job = thread->FindReadyOSRCandidate(function, ast_id);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 DCHECK(args.length() == 1); 317 DCHECK(args.length() == 1);
319 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); 318 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
320 319
321 // First check if this is a real stack overflow. 320 // First check if this is a real stack overflow.
322 StackLimitCheck check(isolate); 321 StackLimitCheck check(isolate);
323 if (check.JsHasOverflowed()) { 322 if (check.JsHasOverflowed()) {
324 SealHandleScope shs(isolate); 323 SealHandleScope shs(isolate);
325 return isolate->StackOverflow(); 324 return isolate->StackOverflow();
326 } 325 }
327 326
328 isolate->optimizing_compile_dispatcher()->InstallOptimizedFunctions(); 327 isolate->optimizing_compiler_thread()->InstallOptimizedFunctions();
329 return (function->IsOptimized()) ? function->code() 328 return (function->IsOptimized()) ? function->code()
330 : function->shared()->code(); 329 : function->shared()->code();
331 } 330 }
332 331
333 332
334 bool CodeGenerationFromStringsAllowed(Isolate* isolate, 333 bool CodeGenerationFromStringsAllowed(Isolate* isolate,
335 Handle<Context> context) { 334 Handle<Context> context) {
336 DCHECK(context->allow_code_gen_from_strings()->IsFalse()); 335 DCHECK(context->allow_code_gen_from_strings()->IsFalse());
337 // Check with callback if set. 336 // Check with callback if set.
338 AllowCodeGenerationFromStringsCallback callback = 337 AllowCodeGenerationFromStringsCallback callback =
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 DCHECK(is_valid_language_mode(args.smi_at(4))); 435 DCHECK(is_valid_language_mode(args.smi_at(4)));
437 LanguageMode language_mode = static_cast<LanguageMode>(args.smi_at(4)); 436 LanguageMode language_mode = static_cast<LanguageMode>(args.smi_at(4));
438 DCHECK(args[5]->IsSmi()); 437 DCHECK(args[5]->IsSmi());
439 Handle<SharedFunctionInfo> outer_info(args.at<JSFunction>(2)->shared(), 438 Handle<SharedFunctionInfo> outer_info(args.at<JSFunction>(2)->shared(),
440 isolate); 439 isolate);
441 return CompileGlobalEval(isolate, args.at<String>(1), outer_info, 440 return CompileGlobalEval(isolate, args.at<String>(1), outer_info,
442 args.at<Object>(3), language_mode, args.smi_at(5)); 441 args.at<Object>(3), language_mode, args.smi_at(5));
443 } 442 }
444 } 443 }
445 } // namespace v8::internal 444 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/optimizing-compiler-thread.cc ('k') | src/runtime/runtime-test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698