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

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

Issue 2505933008: [compiler] Ensure code unsupported by Crankshaft goes to Ignition. (Closed)
Patch Set: Disable two failing tests Created 4 years, 1 month 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
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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/compiler-dispatcher/optimizing-compile-dispatcher.h" 10 #include "src/compiler-dispatcher/optimizing-compile-dispatcher.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 Handle<JSFunction> function = Handle<JSFunction>::cast(function_object); 120 Handle<JSFunction> function = Handle<JSFunction>::cast(function_object);
121 121
122 // The following condition was lifted from the DCHECK inside 122 // The following condition was lifted from the DCHECK inside
123 // JSFunction::MarkForOptimization(). 123 // JSFunction::MarkForOptimization().
124 if (!(function->shared()->allows_lazy_compilation() || 124 if (!(function->shared()->allows_lazy_compilation() ||
125 (function->code()->kind() == Code::FUNCTION && 125 (function->code()->kind() == Code::FUNCTION &&
126 !function->shared()->optimization_disabled()))) { 126 !function->shared()->optimization_disabled()))) {
127 return isolate->heap()->undefined_value(); 127 return isolate->heap()->undefined_value();
128 } 128 }
129 129
130 // If function isn't compiled, compile it now.
131 if (!function->is_compiled() &&
Michael Starzinger 2016/11/22 14:53:50 Would it be possible to check whether {function->s
rmcilroy 2016/11/22 17:24:02 Done.
132 !Compiler::Compile(function, Compiler::CLEAR_EXCEPTION)) {
133 return isolate->heap()->undefined_value();
134 }
135
130 // If the function is already optimized, just return. 136 // If the function is already optimized, just return.
131 if (function->IsOptimized()) return isolate->heap()->undefined_value(); 137 if (function->IsOptimized()) return isolate->heap()->undefined_value();
132 138
133 function->MarkForOptimization(); 139 function->MarkForOptimization();
134 140
135 Code* unoptimized = function->shared()->code(); 141 Code* unoptimized = function->shared()->code();
136 if (args.length() == 2 && unoptimized->kind() == Code::FUNCTION) { 142 if (args.length() == 2 && unoptimized->kind() == Code::FUNCTION) {
137 CONVERT_ARG_HANDLE_CHECKED(String, type, 1); 143 CONVERT_ARG_HANDLE_CHECKED(String, type, 1);
138 if (type->IsOneByteEqualTo(STATIC_CHAR_VECTOR("concurrent")) && 144 if (type->IsOneByteEqualTo(STATIC_CHAR_VECTOR("concurrent")) &&
139 isolate->concurrent_recompilation_enabled()) { 145 isolate->concurrent_recompilation_enabled()) {
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 RUNTIME_FUNCTION(Runtime_ValidateWasmOrphanedInstance) { 821 RUNTIME_FUNCTION(Runtime_ValidateWasmOrphanedInstance) {
816 HandleScope shs(isolate); 822 HandleScope shs(isolate);
817 DCHECK(args.length() == 1); 823 DCHECK(args.length() == 1);
818 CONVERT_ARG_HANDLE_CHECKED_2(WasmInstanceObject, instance, 0); 824 CONVERT_ARG_HANDLE_CHECKED_2(WasmInstanceObject, instance, 0);
819 wasm::testing::ValidateOrphanedInstance(isolate, instance); 825 wasm::testing::ValidateOrphanedInstance(isolate, instance);
820 return isolate->heap()->ToBoolean(true); 826 return isolate->heap()->ToBoolean(true);
821 } 827 }
822 828
823 } // namespace internal 829 } // namespace internal
824 } // namespace v8 830 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698