blob: f9bdafcea817fc4bda42dda9ef416e7a9a90005b [file] [log] [blame]
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001// Copyright 2015 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Flags: --allow-natives-syntax
6
7"use strict";
8
9class B {
10 foo() { return 23 }
11}
12
13class C extends B {
14 bar() { return super[%DeoptimizeFunction(C.prototype.bar), "foo"]() }
15}
16
17assertEquals(23, new C().bar());
18assertEquals(23, new C().bar());
19%OptimizeFunctionOnNextCall(C.prototype.bar);
20assertEquals(23, new C().bar());