2015-10-22 14:38:34 +00:00
|
|
|
// Copyright 2015 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
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
2019-06-12 14:00:50 +00:00
|
|
|
var B = class extends Int32Array {};
|
2015-10-22 14:38:34 +00:00
|
|
|
|
|
|
|
function f(b) {
|
|
|
|
if (b) {
|
|
|
|
null instanceof B;
|
|
|
|
}
|
2019-06-12 14:00:50 +00:00
|
|
|
};
|
|
|
|
%PrepareFunctionForOptimization(f);
|
2015-10-22 14:38:34 +00:00
|
|
|
f();
|
|
|
|
f();
|
|
|
|
f();
|
|
|
|
%OptimizeFunctionOnNextCall(f);
|
|
|
|
f();
|
|
|
|
|
|
|
|
function f2() {
|
|
|
|
return new B();
|
2019-06-12 14:00:50 +00:00
|
|
|
};
|
|
|
|
%PrepareFunctionForOptimization(f2);
|
2015-10-22 14:38:34 +00:00
|
|
|
%OptimizeFunctionOnNextCall(f2);
|
|
|
|
f2();
|