68b047d094
This fixes the existing lowering of {JSGetSuperConstructor} nodes to unconditional throws. The above operator is marked as {kNoWrite} but runtime calls are not marked as such. Any deoptimizing operation after the throw would not be able to find a valid {Checkpoint}. We remove the lowering case in question. R=bmeurer@chromium.org TEST=mjsunit/regress/regress-6248 BUG=v8:6248 Change-Id: I22c922947336254502f698b02f944cf35dd8688a Reviewed-on: https://chromium-review.googlesource.com/476570 Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#44632}
25 lines
642 B
JavaScript
25 lines
642 B
JavaScript
// Copyright 2017 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
|
|
|
|
var sentinelObject = {};
|
|
var evaluatedArg = false;
|
|
class C extends Object {
|
|
constructor() {
|
|
try {
|
|
super(evaluatedArg = true);
|
|
} catch (e) {
|
|
assertInstanceof(e, TypeError);
|
|
return sentinelObject;
|
|
}
|
|
}
|
|
}
|
|
Object.setPrototypeOf(C, parseInt);
|
|
assertSame(sentinelObject, new C());
|
|
assertSame(sentinelObject, new C());
|
|
%OptimizeFunctionOnNextCall(C)
|
|
assertSame(sentinelObject, new C());
|
|
assertFalse(evaluatedArg);
|