feat(benchpress): rewritten implementation
Limitations: - cloud reporter is not yet supported any more
This commit is contained in:
@@ -98,8 +98,7 @@ class ListWrapper {
|
||||
l.add(e);
|
||||
}
|
||||
static List concat(List a, List b) {
|
||||
a.addAll(b);
|
||||
return a;
|
||||
return []..addAll(a)..addAll(b);
|
||||
}
|
||||
static bool isList(l) => l is List;
|
||||
static void insert(List l, int index, value) {
|
||||
|
||||
@@ -2,6 +2,7 @@ library angular.core.facade.lang;
|
||||
|
||||
export 'dart:core' show Type, RegExp, print;
|
||||
import 'dart:math' as math;
|
||||
import 'dart:convert' as convert;
|
||||
|
||||
class Math {
|
||||
static final _random = new math.Random();
|
||||
@@ -176,3 +177,9 @@ bool assertionsEnabled() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Can't be all uppercase as our transpiler would think it is a special directive...
|
||||
class Json {
|
||||
static parse(String s) => convert.JSON.decode(s);
|
||||
static stringify(data) => convert.JSON.encode(data);
|
||||
}
|
||||
|
||||
@@ -247,3 +247,6 @@ export function print(obj) {
|
||||
console.log(obj);
|
||||
}
|
||||
}
|
||||
|
||||
// Can't be all uppercase as our transpiler would think it is a special directive...
|
||||
export var Json = _global.JSON;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
library angular.core.facade.math;
|
||||
|
||||
import 'dart:core' show double, num;
|
||||
import 'dart:math' as math;
|
||||
|
||||
var NaN = double.NAN;
|
||||
|
||||
class Math {
|
||||
static num pow(num x, num exponent) {
|
||||
return math.pow(x, exponent);
|
||||
@@ -10,4 +13,8 @@ class Math {
|
||||
static num min(num a, num b) => math.min(a, b);
|
||||
|
||||
static num floor(num a) => a.floor();
|
||||
|
||||
static num ceil(num a) => a.ceil();
|
||||
|
||||
static num sqrt(num x) => math.sqrt(x);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import {global} from 'angular2/src/facade/lang';
|
||||
|
||||
export var Math = global.Math;
|
||||
export var Math = global.Math;
|
||||
export var NaN = global.NaN;
|
||||
|
||||
Reference in New Issue
Block a user