a334354288
This adds a dedicated test to make sure we don't try constant folding on checks (in this case CheckTaggedPointer), which would generate invalid code as we removing checks that guard the constant without knowing whether it's safe to do so. R=jarin@chromium.org Review-Url: https://codereview.chromium.org/2087153002 Cr-Commit-Position: refs/heads/master@{#37168}
11 lines
353 B
JavaScript
11 lines
353 B
JavaScript
// Copyright 2016 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
|
|
|
|
function bar(a) { a[0](true); }
|
|
function foo(a) { return bar(1); }
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
assertThrows(function() {bar([foo])}, TypeError);
|