feat(benchpress): rewritten implementation

Limitations:
- cloud reporter is not yet supported any more
This commit is contained in:
Tobias Bosch
2015-02-11 10:13:49 -08:00
parent 44845839a6
commit f6284f2a55
78 changed files with 2666 additions and 1018 deletions
+1 -2
View File
@@ -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) {
+7
View File
@@ -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);
}
+3
View File
@@ -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;
+7
View File
@@ -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);
}
+2 -1
View File
@@ -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;