1 // 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 9 class B { 10 foo() { return 23 } 11 } 12 13 class C extends B { 14 bar() { return super[%DeoptimizeFunction(C.prototype.bar), "foo"]() } 15 } 16 17 assertEquals(23, new C().bar()); 18 assertEquals(23, new C().bar()); 19 %OptimizeFunctionOnNextCall(C.prototype.bar); 20 assertEquals(23, new C().bar()); 21