1// Copyright 2014 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'use strict'; 5 6var DefaultConstructorBenchmark = new BenchmarkSuite('DefaultConstructor', 7 [100], [ 8 new Benchmark('NoSuperClass', false, false, 0, NoSuperClass), 9 new Benchmark('WithSuperClass', false, false, 0, WithSuperClass), 10 new Benchmark('WithSuperClassArguments', false, false, 0, 11 WithSuperClassArguments), 12 ]); 13 14 15class BaseClass {} 16 17 18class DerivedClass extends BaseClass {} 19 20 21function NoSuperClass() { 22 return new BaseClass(); 23} 24 25 26function WithSuperClass() { 27 return new DerivedClass(); 28} 29 30 31function WithSuperClassArguments() { 32 return new DerivedClass(0, 1, 2, 3, 4); 33} 34