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

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

Issue 999173007: Make compiler more acceptive wrt Isolate::use_crankshaft. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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/objects.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 29 matching lines...) Expand all
40 function->ReplaceCode(*code); 40 function->ReplaceCode(*code);
41 return *code; 41 return *code;
42 } 42 }
43 43
44 44
45 RUNTIME_FUNCTION(Runtime_CompileOptimized) { 45 RUNTIME_FUNCTION(Runtime_CompileOptimized) {
46 HandleScope scope(isolate); 46 HandleScope scope(isolate);
47 DCHECK(args.length() == 2); 47 DCHECK(args.length() == 2);
48 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); 48 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
49 CONVERT_BOOLEAN_ARG_CHECKED(concurrent, 1); 49 CONVERT_BOOLEAN_ARG_CHECKED(concurrent, 1);
50 DCHECK(isolate->use_crankshaft());
51 50
52 Compiler::ConcurrencyMode mode = 51 Compiler::ConcurrencyMode mode =
53 concurrent ? Compiler::CONCURRENT : Compiler::NOT_CONCURRENT; 52 concurrent ? Compiler::CONCURRENT : Compiler::NOT_CONCURRENT;
54 Handle<Code> code; 53 Handle<Code> code;
55 Handle<Code> unoptimized(function->shared()->code()); 54 Handle<Code> unoptimized(function->shared()->code());
56 if (Compiler::GetOptimizedCode(function, unoptimized, mode).ToHandle(&code)) { 55 if (Compiler::GetOptimizedCode(function, unoptimized, mode).ToHandle(&code)) {
57 // Optimization succeeded, return optimized code. 56 // Optimization succeeded, return optimized code.
58 function->ReplaceCode(*code); 57 function->ReplaceCode(*code);
59 } else { 58 } else {
60 // Optimization failed, get unoptimized code. 59 // Optimization failed, get unoptimized code.
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 DCHECK(is_valid_language_mode(args.smi_at(4))); 444 DCHECK(is_valid_language_mode(args.smi_at(4)));
446 LanguageMode language_mode = static_cast<LanguageMode>(args.smi_at(4)); 445 LanguageMode language_mode = static_cast<LanguageMode>(args.smi_at(4));
447 DCHECK(args[5]->IsSmi()); 446 DCHECK(args[5]->IsSmi());
448 Handle<SharedFunctionInfo> outer_info(args.at<JSFunction>(2)->shared(), 447 Handle<SharedFunctionInfo> outer_info(args.at<JSFunction>(2)->shared(),
449 isolate); 448 isolate);
450 return CompileGlobalEval(isolate, args.at<String>(1), outer_info, 449 return CompileGlobalEval(isolate, args.at<String>(1), outer_info,
451 args.at<Object>(3), language_mode, args.smi_at(5)); 450 args.at<Object>(3), language_mode, args.smi_at(5));
452 } 451 }
453 } 452 }
454 } // namespace v8::internal 453 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime-test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698