Fix %NeverOptimizeFunction() intrinsic.
Set a valid reason for disabling optimization when using %NeverOptimizeFunction. TEST=mjsunit/compiler/regress-445732 BUG=chromium:445732 LOG=y TBR=machenbach@chromium.org Review URL: https://codereview.chromium.org/832003002 Cr-Commit-Position: refs/heads/master@{#25949}
This commit is contained in:
parent
643ed5b8be
commit
a64ac4575a
@ -94,6 +94,7 @@ RUNTIME_FUNCTION(Runtime_NeverOptimizeFunction) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
CONVERT_ARG_CHECKED(JSFunction, function, 0);
|
||||
function->shared()->set_disable_optimization_reason(kOptimizationDisabled);
|
||||
function->shared()->set_optimization_disabled(true);
|
||||
return isolate->heap()->undefined_value();
|
||||
}
|
||||
|
11
test/mjsunit/compiler/regress-445732.js
Normal file
11
test/mjsunit/compiler/regress-445732.js
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright 2014 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flags: --allow-natives-syntax --turbo-asm
|
||||
|
||||
"use asm";
|
||||
|
||||
%NeverOptimizeFunction(f);
|
||||
function f() { }
|
||||
f();
|
Loading…
Reference in New Issue
Block a user