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

Unified Diff: src/runtime/runtime-test.cc

Issue 1880073002: [Interpreter] Disables OSR for interpreted functions when called with %OptimizeOSR. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixes a typo. Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-test.cc
diff --git a/src/runtime/runtime-test.cc b/src/runtime/runtime-test.cc
index 5117e42679b652045a299c43af26cce562793988..3e04ac3129fc2763a36a49a9f085db4190392079 100644
--- a/src/runtime/runtime-test.cc
+++ b/src/runtime/runtime-test.cc
@@ -135,6 +135,12 @@ RUNTIME_FUNCTION(Runtime_OptimizeOsr) {
RUNTIME_ASSERT(function->shared()->allows_lazy_compilation() ||
!function->shared()->optimization_disabled());
+ // If function is interpreted, just return. OSR is not supported.
+ // TODO(4764): Remove this check when OSR is enabled in the interpreter.
+ if (function->shared()->HasBytecodeArray()) {
+ return isolate->heap()->undefined_value();
+ }
+
// If the function is already optimized, just return.
if (function->IsOptimized()) return isolate->heap()->undefined_value();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698