dart-sdk/benchmarks/BigIntParsePrint/dart/native_version_dummy.dart
Stephen Adams 27cd15585b Add BigInt/Int64 parse/toString benchmark
Change-Id: I378c92dc1b17fe023e604feb6c3a7020e1329e45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118500
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2019-10-04 00:45:03 +00:00

34 lines
1.1 KiB
Dart

// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'native_version.dart';
const NativeBigIntMethods nativeBigInt = _DummyMethods();
class _DummyMethods implements NativeBigIntMethods {
const _DummyMethods();
bool get enabled => false;
static Object bad(String message) {
throw UnimplementedError(message);
}
Object parse(String string) => bad('parse');
String toStringMethod(Object value) => bad('toStringMethod');
Object fromInt(int i) => bad('fromInt');
Object get one => bad('one');
Object get eight => bad('eight');
int bitLength(Object value) => bad('bitLength');
bool isEven(Object value) => bad('isEven');
Object add(Object left, Object right) => bad('add');
Object shiftLeft(Object value, Object count) => bad('shiftLeft');
Object shiftRight(Object value, Object count) => bad('shiftRight');
Object subtract(Object left, Object right) => bad('subtract');
}