Commit 570c2a32 authored by mythria's avatar mythria Committed by Commit bot

[Interpreter] Disables OSR for interpreted functions when called with %OptimizeOSR.

When %OptimizeOSR is used with ignition flag, the runtime function tries to
compile for OSR on interpreted functions. This cl modifies
Runtime_OptimizeOsr function to return false for interpreted frames.

BUG=v8:4280,chromium:599002
LOG=N

Review URL: https://codereview.chromium.org/1880073002

Cr-Commit-Position: refs/heads/master@{#35421}
parent fdf19ffa
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment