Add SixSpeed benchmark to PerformanceTests
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 May 2017 13:59:25 +0000 (13:59 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 May 2017 13:59:25 +0000 (13:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=172326

Reviewed by Sam Weinig.

PerformanceTests:

This patch imports SixSpeed benchmark into WebKit tree.
It is a collection of ES6 microbenchmarks. While the scripts are very tiny,
it sometimes hits our missing care for optimization. So including it is useful.

The benchmark is released under MIT license.

* SixSpeed/LICENSE: Added.
* SixSpeed/REVISION: Added.
* SixSpeed/ReadMe.md: Added.
* SixSpeed/tests/.eslintrc: Added.
* SixSpeed/tests/arrow-args/arrow-args.es5: Added.
* SixSpeed/tests/arrow-args/arrow-args.es6: Added.
* SixSpeed/tests/arrow-declare/arrow-declare.es5: Added.
* SixSpeed/tests/arrow-declare/arrow-declare.es6: Added.
* SixSpeed/tests/arrow/arrow.es5: Added.
* SixSpeed/tests/arrow/arrow.es6: Added.
* SixSpeed/tests/bindings-compound/bindings-compound.es5: Added.
* SixSpeed/tests/bindings-compound/bindings-compound.es6: Added.
* SixSpeed/tests/bindings/bindings.es5: Added.
* SixSpeed/tests/bindings/bindings.es6: Added.
* SixSpeed/tests/classes/classes.es5: Added.
* SixSpeed/tests/classes/classes.es6: Added.
* SixSpeed/tests/defaults/defaults.es5: Added.
* SixSpeed/tests/defaults/defaults.es6: Added.
* SixSpeed/tests/destructuring-simple/destructuring-simple.es5: Added.
* SixSpeed/tests/destructuring-simple/destructuring-simple.es6: Added.
* SixSpeed/tests/destructuring/destructuring.es5: Added.
* SixSpeed/tests/destructuring/destructuring.es6: Added.
* SixSpeed/tests/for-of-array/for-of-array.es5: Added.
* SixSpeed/tests/for-of-array/for-of-array.es6: Added.
* SixSpeed/tests/for-of-object/for-of-object.es5: Added.
* SixSpeed/tests/for-of-object/for-of-object.es6: Added.
* SixSpeed/tests/generator/generator.es5: Added.
* SixSpeed/tests/generator/generator.es6: Added.
* SixSpeed/tests/map-set-lookup/map-set-lookup.es5: Added.
* SixSpeed/tests/map-set-lookup/map-set-lookup.es6: Added.
* SixSpeed/tests/map-set-object/map-set-object.es5: Added.
* SixSpeed/tests/map-set-object/map-set-object.es6: Added.
* SixSpeed/tests/map-set/map-set.es5: Added.
* SixSpeed/tests/map-set/map-set.es6: Added.
* SixSpeed/tests/map-string/map-string.es5: Added.
* SixSpeed/tests/map-string/map-string.es6: Added.
* SixSpeed/tests/new-target/defaults.es5: Added.
* SixSpeed/tests/new-target/defaults.es6: Added.
* SixSpeed/tests/object-assign/object-assign.es5: Added.
* SixSpeed/tests/object-assign/object-assign.es6: Added.
* SixSpeed/tests/object-literal-ext/object-literal-ext.es5: Added.
* SixSpeed/tests/object-literal-ext/object-literal-ext.es6: Added.
* SixSpeed/tests/regex-u/regex-u.es5: Added.
* SixSpeed/tests/regex-u/regex-u.es6: Added.
* SixSpeed/tests/rest/rest.es5: Added.
* SixSpeed/tests/rest/rest.es6: Added.
* SixSpeed/tests/spread-generator/spread-generator.es5: Added.
* SixSpeed/tests/spread-generator/spread-generator.es6: Added.
* SixSpeed/tests/spread-literal/spread-literal.es5: Added.
* SixSpeed/tests/spread-literal/spread-literal.es6: Added.
* SixSpeed/tests/spread/spread.es5: Added.
* SixSpeed/tests/spread/spread.es6: Added.
* SixSpeed/tests/super/super.es5: Added.
* SixSpeed/tests/super/super.es6: Added.
* SixSpeed/tests/template_string/template_string.es5: Added.
* SixSpeed/tests/template_string/template_string.es6: Added.
* SixSpeed/tests/template_string_tag/template_string_tag.es5: Added.
* SixSpeed/tests/template_string_tag/template_string_tag.es6: Added.
* SixSpeed/wrappers/wrapper.js:
(test):

Tools:

* Scripts/run-jsc-benchmarks:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@217124 268f45cc-cd09-0410-ab3c-d52691b4dbfc

62 files changed:
PerformanceTests/ChangeLog
PerformanceTests/SixSpeed/LICENSE [new file with mode: 0644]
PerformanceTests/SixSpeed/REVISION [new file with mode: 0644]
PerformanceTests/SixSpeed/ReadMe.md [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/.eslintrc [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/arrow-args/arrow-args.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/arrow-args/arrow-args.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/arrow-declare/arrow-declare.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/arrow-declare/arrow-declare.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/arrow/arrow.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/arrow/arrow.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/bindings-compound/bindings-compound.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/bindings-compound/bindings-compound.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/bindings/bindings.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/bindings/bindings.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/classes/classes.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/classes/classes.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/defaults/defaults.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/defaults/defaults.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/destructuring-simple/destructuring-simple.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/destructuring-simple/destructuring-simple.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/destructuring/destructuring.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/destructuring/destructuring.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/for-of-array/for-of-array.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/for-of-array/for-of-array.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/for-of-object/for-of-object.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/for-of-object/for-of-object.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/generator/generator.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/generator/generator.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/map-set-lookup/map-set-lookup.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/map-set-lookup/map-set-lookup.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/map-set-object/map-set-object.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/map-set-object/map-set-object.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/map-set/map-set.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/map-set/map-set.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/map-string/map-string.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/map-string/map-string.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/new-target/defaults.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/new-target/defaults.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/object-assign/object-assign.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/object-assign/object-assign.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/object-literal-ext/object-literal-ext.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/object-literal-ext/object-literal-ext.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/regex-u/regex-u.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/regex-u/regex-u.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/rest/rest.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/rest/rest.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/spread-generator/spread-generator.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/spread-generator/spread-generator.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/spread-literal/spread-literal.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/spread-literal/spread-literal.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/spread/spread.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/spread/spread.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/super/super.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/super/super.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/template_string/template_string.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/template_string/template_string.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/template_string_tag/template_string_tag.es5 [new file with mode: 0644]
PerformanceTests/SixSpeed/tests/template_string_tag/template_string_tag.es6 [new file with mode: 0644]
PerformanceTests/SixSpeed/wrappers/wrapper.js
Tools/ChangeLog
Tools/Scripts/run-jsc-benchmarks

index ec622f6..2a24887 100644 (file)
@@ -1,3 +1,77 @@
+2017-05-19  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        Add SixSpeed benchmark to PerformanceTests
+        https://bugs.webkit.org/show_bug.cgi?id=172326
+
+        Reviewed by Sam Weinig.
+
+        This patch imports SixSpeed benchmark into WebKit tree.
+        It is a collection of ES6 microbenchmarks. While the scripts are very tiny,
+        it sometimes hits our missing care for optimization. So including it is useful.
+
+        The benchmark is released under MIT license.
+
+        * SixSpeed/LICENSE: Added.
+        * SixSpeed/REVISION: Added.
+        * SixSpeed/ReadMe.md: Added.
+        * SixSpeed/tests/.eslintrc: Added.
+        * SixSpeed/tests/arrow-args/arrow-args.es5: Added.
+        * SixSpeed/tests/arrow-args/arrow-args.es6: Added.
+        * SixSpeed/tests/arrow-declare/arrow-declare.es5: Added.
+        * SixSpeed/tests/arrow-declare/arrow-declare.es6: Added.
+        * SixSpeed/tests/arrow/arrow.es5: Added.
+        * SixSpeed/tests/arrow/arrow.es6: Added.
+        * SixSpeed/tests/bindings-compound/bindings-compound.es5: Added.
+        * SixSpeed/tests/bindings-compound/bindings-compound.es6: Added.
+        * SixSpeed/tests/bindings/bindings.es5: Added.
+        * SixSpeed/tests/bindings/bindings.es6: Added.
+        * SixSpeed/tests/classes/classes.es5: Added.
+        * SixSpeed/tests/classes/classes.es6: Added.
+        * SixSpeed/tests/defaults/defaults.es5: Added.
+        * SixSpeed/tests/defaults/defaults.es6: Added.
+        * SixSpeed/tests/destructuring-simple/destructuring-simple.es5: Added.
+        * SixSpeed/tests/destructuring-simple/destructuring-simple.es6: Added.
+        * SixSpeed/tests/destructuring/destructuring.es5: Added.
+        * SixSpeed/tests/destructuring/destructuring.es6: Added.
+        * SixSpeed/tests/for-of-array/for-of-array.es5: Added.
+        * SixSpeed/tests/for-of-array/for-of-array.es6: Added.
+        * SixSpeed/tests/for-of-object/for-of-object.es5: Added.
+        * SixSpeed/tests/for-of-object/for-of-object.es6: Added.
+        * SixSpeed/tests/generator/generator.es5: Added.
+        * SixSpeed/tests/generator/generator.es6: Added.
+        * SixSpeed/tests/map-set-lookup/map-set-lookup.es5: Added.
+        * SixSpeed/tests/map-set-lookup/map-set-lookup.es6: Added.
+        * SixSpeed/tests/map-set-object/map-set-object.es5: Added.
+        * SixSpeed/tests/map-set-object/map-set-object.es6: Added.
+        * SixSpeed/tests/map-set/map-set.es5: Added.
+        * SixSpeed/tests/map-set/map-set.es6: Added.
+        * SixSpeed/tests/map-string/map-string.es5: Added.
+        * SixSpeed/tests/map-string/map-string.es6: Added.
+        * SixSpeed/tests/new-target/defaults.es5: Added.
+        * SixSpeed/tests/new-target/defaults.es6: Added.
+        * SixSpeed/tests/object-assign/object-assign.es5: Added.
+        * SixSpeed/tests/object-assign/object-assign.es6: Added.
+        * SixSpeed/tests/object-literal-ext/object-literal-ext.es5: Added.
+        * SixSpeed/tests/object-literal-ext/object-literal-ext.es6: Added.
+        * SixSpeed/tests/regex-u/regex-u.es5: Added.
+        * SixSpeed/tests/regex-u/regex-u.es6: Added.
+        * SixSpeed/tests/rest/rest.es5: Added.
+        * SixSpeed/tests/rest/rest.es6: Added.
+        * SixSpeed/tests/spread-generator/spread-generator.es5: Added.
+        * SixSpeed/tests/spread-generator/spread-generator.es6: Added.
+        * SixSpeed/tests/spread-literal/spread-literal.es5: Added.
+        * SixSpeed/tests/spread-literal/spread-literal.es6: Added.
+        * SixSpeed/tests/spread/spread.es5: Added.
+        * SixSpeed/tests/spread/spread.es6: Added.
+        * SixSpeed/tests/super/super.es5: Added.
+        * SixSpeed/tests/super/super.es6: Added.
+        * SixSpeed/tests/template_string/template_string.es5: Added.
+        * SixSpeed/tests/template_string/template_string.es6: Added.
+        * SixSpeed/tests/template_string_tag/template_string_tag.es5: Added.
+        * SixSpeed/tests/template_string_tag/template_string_tag.es6: Added.
+        * SixSpeed/wrappers/wrapper.js:
+        (test):
+
 2017-05-19  Ryosuke Niwa  <rniwa@webkit.org>
 
         Speedometer 2.0: Angular v1 test only deletes the second item
diff --git a/PerformanceTests/SixSpeed/LICENSE b/PerformanceTests/SixSpeed/LICENSE
new file mode 100644 (file)
index 0000000..98f4e01
--- /dev/null
@@ -0,0 +1,7 @@
+Copyright (c) 2015 Kevin Decker
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/PerformanceTests/SixSpeed/REVISION b/PerformanceTests/SixSpeed/REVISION
new file mode 100644 (file)
index 0000000..76e0a6a
--- /dev/null
@@ -0,0 +1 @@
+f25e013a28690fc3f46a632b06411da3bca9c757
diff --git a/PerformanceTests/SixSpeed/ReadMe.md b/PerformanceTests/SixSpeed/ReadMe.md
new file mode 100644 (file)
index 0000000..f115d38
--- /dev/null
@@ -0,0 +1,3 @@
+# SixSpeed benchmark
+
+SixSpeed is collection of ES6 microbenchmarks imported from https://github.com/kpdecker/six-speed.
diff --git a/PerformanceTests/SixSpeed/tests/.eslintrc b/PerformanceTests/SixSpeed/tests/.eslintrc
new file mode 100644 (file)
index 0000000..bf1bf42
--- /dev/null
@@ -0,0 +1,5 @@
+{
+  "globals": {
+    "test": false
+  }
+}
\ No newline at end of file
diff --git a/PerformanceTests/SixSpeed/tests/arrow-args/arrow-args.es5 b/PerformanceTests/SixSpeed/tests/arrow-args/arrow-args.es5
new file mode 100644 (file)
index 0000000..252c02a
--- /dev/null
@@ -0,0 +1,16 @@
+var obj = {
+  value: 42,
+  fn: function() {
+    var args = arguments;
+    return function() {
+      return args[0];
+    };
+  }
+};
+
+var fn = obj.fn(1);
+assertEqual(fn(), 1);
+
+test(function() {
+  fn();
+});
diff --git a/PerformanceTests/SixSpeed/tests/arrow-args/arrow-args.es6 b/PerformanceTests/SixSpeed/tests/arrow-args/arrow-args.es6
new file mode 100644 (file)
index 0000000..1a82d36
--- /dev/null
@@ -0,0 +1,14 @@
+
+var obj = {
+  value: 42,
+  fn: function() {
+    return () => arguments[0];
+  }
+};
+
+var fn = obj.fn(1);
+assertEqual(fn(), 1);
+
+test(function() {
+  fn();
+});
diff --git a/PerformanceTests/SixSpeed/tests/arrow-declare/arrow-declare.es5 b/PerformanceTests/SixSpeed/tests/arrow-declare/arrow-declare.es5
new file mode 100644 (file)
index 0000000..7356546
--- /dev/null
@@ -0,0 +1,14 @@
+var obj = {
+  value: 42,
+  fn: function() {
+    return function() {
+      return obj.value;
+    };
+  }
+};
+
+assertEqual(obj.fn()(), 42);
+
+test(function() {
+  obj.fn();
+});
diff --git a/PerformanceTests/SixSpeed/tests/arrow-declare/arrow-declare.es6 b/PerformanceTests/SixSpeed/tests/arrow-declare/arrow-declare.es6
new file mode 100644 (file)
index 0000000..9e37365
--- /dev/null
@@ -0,0 +1,13 @@
+
+var obj = {
+  value: 42,
+  fn: function() {
+    return () => this.value;
+  }
+};
+
+assertEqual(obj.fn()(), 42);
+
+test(function() {
+  obj.fn();
+});
diff --git a/PerformanceTests/SixSpeed/tests/arrow/arrow.es5 b/PerformanceTests/SixSpeed/tests/arrow/arrow.es5
new file mode 100644 (file)
index 0000000..f1f7ff9
--- /dev/null
@@ -0,0 +1,15 @@
+var obj = {
+  value: 42,
+  fn: function() {
+    return function() {
+      return obj.value;
+    };
+  }
+};
+
+var fn = obj.fn();
+assertEqual(fn(), 42);
+
+test(function() {
+  fn();
+});
diff --git a/PerformanceTests/SixSpeed/tests/arrow/arrow.es6 b/PerformanceTests/SixSpeed/tests/arrow/arrow.es6
new file mode 100644 (file)
index 0000000..f2c0149
--- /dev/null
@@ -0,0 +1,14 @@
+
+var obj = {
+  value: 42,
+  fn: function() {
+    return () => this.value;
+  }
+};
+
+var fn = obj.fn();
+assertEqual(fn(), 42);
+
+test(function() {
+  fn();
+});
diff --git a/PerformanceTests/SixSpeed/tests/bindings-compound/bindings-compound.es5 b/PerformanceTests/SixSpeed/tests/bindings-compound/bindings-compound.es5
new file mode 100644 (file)
index 0000000..789d586
--- /dev/null
@@ -0,0 +1,11 @@
+var b = 2;
+
+assertEqual(fn(), 3);
+
+function fn() {
+  var a = 1;
+  a += b;
+
+  return a;
+}
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/bindings-compound/bindings-compound.es6 b/PerformanceTests/SixSpeed/tests/bindings-compound/bindings-compound.es6
new file mode 100644 (file)
index 0000000..cea478f
--- /dev/null
@@ -0,0 +1,14 @@
+"use strict";
+
+const b = 2;
+
+function fn() {
+
+  let a = 1;
+  a += b;
+
+  return a;
+}
+
+assertEqual(fn(), 3);
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/bindings/bindings.es5 b/PerformanceTests/SixSpeed/tests/bindings/bindings.es5
new file mode 100644 (file)
index 0000000..4d4df83
--- /dev/null
@@ -0,0 +1,8 @@
+var a = 1,
+    b = 2;
+
+assertEqual(a+b, 3);
+
+test(function() {
+  return a + b;
+});
diff --git a/PerformanceTests/SixSpeed/tests/bindings/bindings.es6 b/PerformanceTests/SixSpeed/tests/bindings/bindings.es6
new file mode 100644 (file)
index 0000000..44e34bc
--- /dev/null
@@ -0,0 +1,10 @@
+"use strict";
+
+const a = 1;
+let b = 2;
+
+assertEqual(a+b, 3);
+
+test(function() {
+  return a + b;
+});
diff --git a/PerformanceTests/SixSpeed/tests/classes/classes.es5 b/PerformanceTests/SixSpeed/tests/classes/classes.es5
new file mode 100644 (file)
index 0000000..ae5c7c1
--- /dev/null
@@ -0,0 +1,11 @@
+function C() {
+  this.foo = 'bar';
+}
+C.prototype.bar = function() {
+};
+
+assertEqual(new C().foo, 'bar');
+
+test(function() {
+  return new C();
+});
diff --git a/PerformanceTests/SixSpeed/tests/classes/classes.es6 b/PerformanceTests/SixSpeed/tests/classes/classes.es6
new file mode 100644 (file)
index 0000000..9007b99
--- /dev/null
@@ -0,0 +1,13 @@
+class C {
+  constructor() {
+    this.foo = 'bar';
+  }
+  bar() {
+  }
+}
+
+assertEqual(new C().foo, 'bar');
+
+test(function() {
+  return new C();
+});
diff --git a/PerformanceTests/SixSpeed/tests/defaults/defaults.es5 b/PerformanceTests/SixSpeed/tests/defaults/defaults.es5
new file mode 100644 (file)
index 0000000..eec3f0d
--- /dev/null
@@ -0,0 +1,14 @@
+function fn(arg, other) {
+  arg = arg === undefined ? 1 : arg;
+  other = other === undefined ? 3 : other;
+  return other;
+}
+
+assertEqual(fn(), 3);
+assertEqual(fn(1, 2), 2);
+
+test(function() {
+  fn();
+  fn(2);
+  fn(2, 4);
+});
diff --git a/PerformanceTests/SixSpeed/tests/defaults/defaults.es6 b/PerformanceTests/SixSpeed/tests/defaults/defaults.es6
new file mode 100644 (file)
index 0000000..1df8fde
--- /dev/null
@@ -0,0 +1,13 @@
+function fn(arg = 1, other = 3) {
+  return other;
+}
+
+
+assertEqual(fn(), 3);
+assertEqual(fn(1, 2), 2);
+
+test(function() {
+  fn();
+  fn(2);
+  fn(2, 4);
+});
diff --git a/PerformanceTests/SixSpeed/tests/destructuring-simple/destructuring-simple.es5 b/PerformanceTests/SixSpeed/tests/destructuring-simple/destructuring-simple.es5
new file mode 100644 (file)
index 0000000..1bd8938
--- /dev/null
@@ -0,0 +1,14 @@
+var data = {
+  a: 'foo',
+  b: {c: 'd'},
+  arr: [1, 2, 3]
+};
+
+function fn() {
+  var a = data.a,
+      b = data.b;
+  return a;
+}
+
+assertEqual(fn(), 'foo');
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/destructuring-simple/destructuring-simple.es6 b/PerformanceTests/SixSpeed/tests/destructuring-simple/destructuring-simple.es6
new file mode 100644 (file)
index 0000000..60fd3c0
--- /dev/null
@@ -0,0 +1,14 @@
+var data = {
+  a: 'foo',
+  b: {c: 'd'},
+  arr: [1, 2, 3]
+};
+
+function fn() {
+  var {a, b} = data;
+  return a;
+}
+
+assertEqual(fn(), 'foo');
+
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/destructuring/destructuring.es5 b/PerformanceTests/SixSpeed/tests/destructuring/destructuring.es5
new file mode 100644 (file)
index 0000000..7be5e3c
--- /dev/null
@@ -0,0 +1,15 @@
+var data = {
+  a: 'foo',
+  b: {c: 'd'},
+  arr: [1, 2, 3]
+};
+
+function fn() {
+  var a = data.a,
+      b = data.b.c,
+      c = data.arr[1];
+  return c;
+}
+
+assertEqual(fn(), 2);
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/destructuring/destructuring.es6 b/PerformanceTests/SixSpeed/tests/destructuring/destructuring.es6
new file mode 100644 (file)
index 0000000..50e9b75
--- /dev/null
@@ -0,0 +1,13 @@
+var data = {
+  a: 'foo',
+  b: {c: 'd'},
+  arr: [1, 2, 3]
+};
+
+function fn() {
+  var {a, b:{c:b}, arr:[, c]} = data;
+  return c;
+}
+
+assertEqual(fn(), 2);
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/for-of-array/for-of-array.es5 b/PerformanceTests/SixSpeed/tests/for-of-array/for-of-array.es5
new file mode 100644 (file)
index 0000000..d27543f
--- /dev/null
@@ -0,0 +1,13 @@
+var data = [1,2,3];
+
+function fn() {
+  var ret = '';
+  for (var i = 0; i < data.length; i++) {
+    ret += data[i];
+  }
+  return ret;
+}
+
+assertEqual(fn(), '123');
+
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/for-of-array/for-of-array.es6 b/PerformanceTests/SixSpeed/tests/for-of-array/for-of-array.es6
new file mode 100644 (file)
index 0000000..b643789
--- /dev/null
@@ -0,0 +1,13 @@
+var data = [1,2,3];
+
+function fn() {
+  var ret = '';
+  for (var value of data) {
+    ret += value;
+  }
+  return ret;
+}
+
+assertEqual(fn(), '123');
+
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/for-of-object/for-of-object.es5 b/PerformanceTests/SixSpeed/tests/for-of-object/for-of-object.es5
new file mode 100644 (file)
index 0000000..3dc1da1
--- /dev/null
@@ -0,0 +1,13 @@
+var data = {'a': 'b', 'c': 'd'};
+function fn() {
+  var ret = '';
+  for (var name in data) {
+    if (data.hasOwnProperty(name)) {
+      ret += data[name];
+    }
+  }
+  return ret;
+}
+
+assertEqual(fn(), 'bd');
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/for-of-object/for-of-object.es6 b/PerformanceTests/SixSpeed/tests/for-of-object/for-of-object.es6
new file mode 100644 (file)
index 0000000..55b5fb6
--- /dev/null
@@ -0,0 +1,24 @@
+var data = {'a': 'b', 'c': 'd'};
+data[Symbol.iterator] = function() {
+  var array = Object.keys(data),
+      nextIndex = 0;
+
+  return {
+    next: function() {
+       return nextIndex < array.length ?
+         {value: data[array[nextIndex++]], done: false} :
+         {done: true};
+    }
+  };
+};
+
+function fn() {
+  var ret = '';
+  for (var value of data) {
+    ret += value;
+  }
+  return ret;
+}
+
+assertEqual(fn(), 'bd');
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/generator/generator.es5 b/PerformanceTests/SixSpeed/tests/generator/generator.es5
new file mode 100644 (file)
index 0000000..d1b441c
--- /dev/null
@@ -0,0 +1,26 @@
+function generator() {
+  var i = 0;
+  return {
+    next: function() {
+      i++;
+      if (i >= 3) {
+        return {done: true};
+      } else {
+        return {
+          value: i,
+          done: false
+        };
+      }
+    }
+  };
+}
+
+function fn() {
+  var iterator = generator();
+  iterator.next();
+  iterator.next();
+  return iterator.next().done;
+}
+
+assertEqual(fn(), true);
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/generator/generator.es6 b/PerformanceTests/SixSpeed/tests/generator/generator.es6
new file mode 100644 (file)
index 0000000..431fd76
--- /dev/null
@@ -0,0 +1,14 @@
+function * generator() {
+  yield 1;
+  yield 2;
+}
+
+function fn() {
+  var iterator = generator();
+  iterator.next();
+  iterator.next();
+  return iterator.next().done;
+}
+
+assertEqual(fn(), true);
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/map-set-lookup/map-set-lookup.es5 b/PerformanceTests/SixSpeed/tests/map-set-lookup/map-set-lookup.es5
new file mode 100644 (file)
index 0000000..e0fa70d
--- /dev/null
@@ -0,0 +1,21 @@
+var keys = [],
+    values = [],
+    set = [],
+    key = {};
+
+for (var i = 0; i < 500; i++) {
+  keys.push(i);
+  values.push(i);
+  set.push(i);
+}
+
+keys.push(key);
+values.push('bar');
+set.push(key);
+
+function fn() {
+  return set.indexOf(key) >= 0 && keys.indexOf(key) >= 0;
+}
+
+assertEqual(fn(), true);
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/map-set-lookup/map-set-lookup.es6 b/PerformanceTests/SixSpeed/tests/map-set-lookup/map-set-lookup.es6
new file mode 100644 (file)
index 0000000..2fc9c50
--- /dev/null
@@ -0,0 +1,18 @@
+var map = new Map(),
+    set = new Set(),
+    key = {};
+
+for (var i = 0; i < 500; i++) {
+  map.set(i, i);
+  set.add(i);
+}
+
+map.set(key, 'bar');
+set.add(key);
+
+function fn() {
+  return map.has(key) && set.has(key);
+}
+
+assertEqual(fn(), true);
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/map-set-object/map-set-object.es5 b/PerformanceTests/SixSpeed/tests/map-set-object/map-set-object.es5
new file mode 100644 (file)
index 0000000..61dfcc5
--- /dev/null
@@ -0,0 +1,21 @@
+function fn() {
+  var keys = [],
+      values = [],
+      set = [],
+      key = {};
+
+  for (var i = 0; i < 500; i++) {
+    keys.push(i);
+    values.push(i);
+    set.push(i);
+  }
+
+  keys.push(key);
+  values.push('bar');
+  set.push(key);
+
+  return set.indexOf(key) >= 0 && keys.indexOf(key) >= 0;
+}
+
+assertEqual(fn(), true);
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/map-set-object/map-set-object.es6 b/PerformanceTests/SixSpeed/tests/map-set-object/map-set-object.es6
new file mode 100644 (file)
index 0000000..8624a0b
--- /dev/null
@@ -0,0 +1,18 @@
+function fn() {
+  var map = new Map(),
+      set = new Set(),
+      key = {};
+
+  for (var i = 0; i < 500; i++) {
+    map.set(i, i);
+    set.add(i);
+  }
+
+  map.set(key, 'bar');
+  set.add(key);
+
+  return map.has(key) && set.has(key);
+}
+
+assertEqual(fn(), true);
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/map-set/map-set.es5 b/PerformanceTests/SixSpeed/tests/map-set/map-set.es5
new file mode 100644 (file)
index 0000000..b99ec7a
--- /dev/null
@@ -0,0 +1,16 @@
+function fn() {
+  var map = {},
+      set = [];
+
+  for (var i = 0; i < 250; i++) {
+    map[i] = i;
+    set.push(i);
+  }
+
+  map.foo = 'bar';
+  set.push('bar');
+  return ('foo' in map) && set.indexOf('bar') >= 0;
+}
+
+assertEqual(fn(), true);
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/map-set/map-set.es6 b/PerformanceTests/SixSpeed/tests/map-set/map-set.es6
new file mode 100644 (file)
index 0000000..583450d
--- /dev/null
@@ -0,0 +1,17 @@
+function fn() {
+  var map = new Map(),
+      set = new Set();
+
+  for (var i = 0; i < 250; i++) {
+    map.set(i, i);
+    set.add(i);
+  }
+
+  map.set('foo', 'bar');
+  set.add('bar');
+
+  return map.has('foo') && set.has('bar');
+}
+
+assertEqual(fn(), true);
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/map-string/map-string.es5 b/PerformanceTests/SixSpeed/tests/map-string/map-string.es5
new file mode 100644 (file)
index 0000000..147547e
--- /dev/null
@@ -0,0 +1,12 @@
+var map = {};
+
+for (var i = 0; i < 500; i++) {
+  map[i] = i;
+}
+
+function fn() {
+  return map['499'] === 499;
+}
+
+assertEqual(fn(), true);
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/map-string/map-string.es6 b/PerformanceTests/SixSpeed/tests/map-string/map-string.es6
new file mode 100644 (file)
index 0000000..43b7811
--- /dev/null
@@ -0,0 +1,12 @@
+var map = new Map();
+
+for (var i = 0; i < 500; i++) {
+  map.set(i + '', i);
+}
+
+function fn() {
+  return map.get('499') === 499;
+}
+
+assertEqual(fn(), true);
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/new-target/defaults.es5 b/PerformanceTests/SixSpeed/tests/new-target/defaults.es5
new file mode 100644 (file)
index 0000000..3d7cab7
--- /dev/null
@@ -0,0 +1,10 @@
+function Fn() {
+  return !!(this && this.constructor === Fn);
+}
+
+assertEqual(typeof Fn(), 'boolean');
+assertEqual(typeof (new Fn()), 'object');
+
+test(function() {
+  return (Fn() || new Fn());
+});
diff --git a/PerformanceTests/SixSpeed/tests/new-target/defaults.es6 b/PerformanceTests/SixSpeed/tests/new-target/defaults.es6
new file mode 100644 (file)
index 0000000..ddf4bcd
--- /dev/null
@@ -0,0 +1,10 @@
+function Fn() {
+  return (new.target === Fn);
+}
+
+assertEqual(typeof Fn(), 'boolean');
+assertEqual(typeof (new Fn()), 'object');
+
+test(function() {
+  return (Fn() || new Fn());
+});
diff --git a/PerformanceTests/SixSpeed/tests/object-assign/object-assign.es5 b/PerformanceTests/SixSpeed/tests/object-assign/object-assign.es5
new file mode 100644 (file)
index 0000000..33d1571
--- /dev/null
@@ -0,0 +1,28 @@
+var obj = {
+  a: 1,
+  b: true,
+  c: function () {},
+  d: null,
+  e: 'e'
+};
+
+var fn = function (src) {
+  var o = {};
+  var keys = Object.keys(src);
+  for (var i = 0; i < keys.length; ++i) {
+    var key = keys[i];
+    o[key] = src[key];
+  }
+  return o;
+};
+
+var r = fn(obj);
+assertEqual(r.a, obj.a);
+assertEqual(r.b, obj.b);
+assertEqual(r.c, obj.c);
+assertEqual(r.d, obj.d);
+assertEqual(r.e, obj.e);
+
+test(function () {
+  fn(obj);
+});
diff --git a/PerformanceTests/SixSpeed/tests/object-assign/object-assign.es6 b/PerformanceTests/SixSpeed/tests/object-assign/object-assign.es6
new file mode 100644 (file)
index 0000000..bdce0b2
--- /dev/null
@@ -0,0 +1,22 @@
+const obj = {
+  a: 1,
+  b: true,
+  c: function () {},
+  d: null,
+  e: 'e'
+};
+
+const fn = function (src) {
+  return Object.assign({}, src);
+};
+
+const r = fn(obj);
+assertEqual(r.a, obj.a);
+assertEqual(r.b, obj.b);
+assertEqual(r.c, obj.c);
+assertEqual(r.d, obj.d);
+assertEqual(r.e, obj.e);
+
+test(function () {
+  fn(obj);
+});
diff --git a/PerformanceTests/SixSpeed/tests/object-literal-ext/object-literal-ext.es5 b/PerformanceTests/SixSpeed/tests/object-literal-ext/object-literal-ext.es5
new file mode 100644 (file)
index 0000000..5ea3168
--- /dev/null
@@ -0,0 +1,15 @@
+function fn() {
+  var name = 'foo';
+  var ret = {
+    'bizz buzz': function() {
+      return 1;
+    },
+    name: name
+  };
+  ret[name] = 'bar';
+  ret[name + 'foo'] = 'foo';
+  return ret;
+}
+
+assertEqual(fn().foofoo, 'foo');
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/object-literal-ext/object-literal-ext.es6 b/PerformanceTests/SixSpeed/tests/object-literal-ext/object-literal-ext.es6
new file mode 100644 (file)
index 0000000..8b2052f
--- /dev/null
@@ -0,0 +1,14 @@
+function fn() {
+  var name = 'foo';
+  return {
+    'bizz buzz'() {
+      return 1;
+    },
+    name,
+    [name]: 'bar',
+    [name + 'foo']: 'foo'
+  };
+}
+
+assertEqual(fn().foofoo, 'foo');
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/regex-u/regex-u.es5 b/PerformanceTests/SixSpeed/tests/regex-u/regex-u.es5
new file mode 100644 (file)
index 0000000..b91eadd
--- /dev/null
@@ -0,0 +1,6 @@
+function fn() {
+  return '𠮷'.match(/^.$/);
+}
+
+// Not asserting as this isn't quite an accurate test under es5
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/regex-u/regex-u.es6 b/PerformanceTests/SixSpeed/tests/regex-u/regex-u.es6
new file mode 100644 (file)
index 0000000..828cbbc
--- /dev/null
@@ -0,0 +1,6 @@
+function fn() {
+  return '𠮷'.match(/^.$/u);
+}
+
+assertEqual(!!fn(), true);
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/rest/rest.es5 b/PerformanceTests/SixSpeed/tests/rest/rest.es5
new file mode 100644 (file)
index 0000000..6c9b56a
--- /dev/null
@@ -0,0 +1,13 @@
+function fn() {
+  return arguments[1];
+}
+
+assertEqual(fn(), undefined);
+assertEqual(fn(2), undefined);
+assertEqual(fn(2, 4), 4);
+
+test(function() {
+  fn();
+  fn(2);
+  fn(2, 4);
+});
diff --git a/PerformanceTests/SixSpeed/tests/rest/rest.es6 b/PerformanceTests/SixSpeed/tests/rest/rest.es6
new file mode 100644 (file)
index 0000000..41e4d91
--- /dev/null
@@ -0,0 +1,13 @@
+function fn(foo, ...args) {
+  return args[0];
+}
+
+assertEqual(fn(), undefined);
+assertEqual(fn(2), undefined);
+assertEqual(fn(2, 4), 4);
+
+test(function() {
+  fn();
+  fn(2);
+  fn(2, 4);
+});
diff --git a/PerformanceTests/SixSpeed/tests/spread-generator/spread-generator.es5 b/PerformanceTests/SixSpeed/tests/spread-generator/spread-generator.es5
new file mode 100644 (file)
index 0000000..2a0305b
--- /dev/null
@@ -0,0 +1,27 @@
+function generator() {
+  var i = 0;
+  return {
+    next: function() {
+      i++;
+      if (i >= 4) {
+        return {done: true};
+      } else {
+        return {
+          value: i,
+          done: false
+        };
+      }
+    }
+  };
+}
+
+function fn() {
+  var iterator = generator();
+  var args = [iterator.next().value, iterator.next().value, iterator.next().value];
+  iterator.next();
+
+  return Math.max.apply(Math, args);
+}
+
+assertEqual(fn(), 3);
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/spread-generator/spread-generator.es6 b/PerformanceTests/SixSpeed/tests/spread-generator/spread-generator.es6
new file mode 100644 (file)
index 0000000..a783129
--- /dev/null
@@ -0,0 +1,11 @@
+function *generate() {
+  yield 1;
+  yield 2;
+  yield 3;
+}
+
+function fn() {
+  return Math.max(... generate());
+}
+assertEqual(fn(), 3);
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/spread-literal/spread-literal.es5 b/PerformanceTests/SixSpeed/tests/spread-literal/spread-literal.es5
new file mode 100644 (file)
index 0000000..d76d88e
--- /dev/null
@@ -0,0 +1,8 @@
+function fn() {
+  var ret = [1];
+  ret.push(1, 2, 3);
+  return ret;
+}
+
+assertEqual(fn()[3], 3);
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/spread-literal/spread-literal.es6 b/PerformanceTests/SixSpeed/tests/spread-literal/spread-literal.es6
new file mode 100644 (file)
index 0000000..b180fb5
--- /dev/null
@@ -0,0 +1,5 @@
+function fn() {
+  return [1, ... [1, 2, 3]];
+}
+assertEqual(fn()[3], 3);
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/spread/spread.es5 b/PerformanceTests/SixSpeed/tests/spread/spread.es5
new file mode 100644 (file)
index 0000000..bd13f44
--- /dev/null
@@ -0,0 +1,6 @@
+function fn() {
+  return Math.max.apply(Math, [1,2,3]);
+}
+
+assertEqual(fn(), 3);
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/spread/spread.es6 b/PerformanceTests/SixSpeed/tests/spread/spread.es6
new file mode 100644 (file)
index 0000000..95ee937
--- /dev/null
@@ -0,0 +1,6 @@
+function fn() {
+  return Math.max(...[1,2,3]);
+}
+
+assertEqual(fn(), 3);
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/super/super.es5 b/PerformanceTests/SixSpeed/tests/super/super.es5
new file mode 100644 (file)
index 0000000..8edc527
--- /dev/null
@@ -0,0 +1,23 @@
+function C() {
+  this.foo = 'bar';
+}
+C.prototype.bar = function() {
+  return 41;
+};
+
+
+function D() {
+  C.call(this);
+  this.baz = 'bat';
+}
+D.prototype = Object.create(C.prototype);
+D.prototype.bar = function() {
+  return C.prototype.bar.call(this) + 1;
+};
+function fn() {
+  var d = new D();
+  return d.bar();
+}
+
+assertEqual(fn(), 42);
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/super/super.es6 b/PerformanceTests/SixSpeed/tests/super/super.es6
new file mode 100644 (file)
index 0000000..29386be
--- /dev/null
@@ -0,0 +1,25 @@
+
+class C {
+  constructor() {
+    this.foo = 'bar';
+  }
+  bar() {
+    return 41;
+  }
+}
+class D extends C {
+  constructor() {
+    super();
+    this.baz = 'bat';
+  }
+  bar() {
+    return super.bar() + 1;
+  }
+}
+function fn() {
+  var d = new D();
+  return d.bar();
+}
+
+assertEqual(fn(), 42);
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/template_string/template_string.es5 b/PerformanceTests/SixSpeed/tests/template_string/template_string.es5
new file mode 100644 (file)
index 0000000..6296ad3
--- /dev/null
@@ -0,0 +1,7 @@
+var data = [1,2,3];
+function fn() {
+  return data[0] + ' ' + (data[1] + data[2]);
+}
+
+assertEqual(fn(), '1 5');
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/template_string/template_string.es6 b/PerformanceTests/SixSpeed/tests/template_string/template_string.es6
new file mode 100644 (file)
index 0000000..3e89123
--- /dev/null
@@ -0,0 +1,7 @@
+var data = [1,2,3];
+function fn() {
+  return `${data[0]} ${data[1] + data[2]}`;
+}
+
+assertEqual(fn(), '1 5');
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/template_string_tag/template_string_tag.es5 b/PerformanceTests/SixSpeed/tests/template_string_tag/template_string_tag.es5
new file mode 100644 (file)
index 0000000..a0e5db0
--- /dev/null
@@ -0,0 +1,11 @@
+var data = [1, 2, 3];
+function tag(strings, value1, value2) {
+  return strings[0] + value1 + strings[1] + value2 + strings[2];
+}
+
+function fn() {
+  return tag(['', ' ', ''], data[0], data[1] + data[2]);
+}
+
+assertEqual(fn(), '1 5');
+test(fn);
diff --git a/PerformanceTests/SixSpeed/tests/template_string_tag/template_string_tag.es6 b/PerformanceTests/SixSpeed/tests/template_string_tag/template_string_tag.es6
new file mode 100644 (file)
index 0000000..dec6501
--- /dev/null
@@ -0,0 +1,11 @@
+var data = [1, 2, 3];
+function tag(strings, value1, value2) {
+  return strings[0] + value1 + strings[1] + value2 + strings[2];
+}
+
+function fn() {
+  return tag`${data[0]} ${data[1] + data[2]}`;
+}
+
+assertEqual(fn(), '1 5');
+test(fn);
index ff53d81..cf58f54 100644 (file)
@@ -6,6 +6,7 @@ var targetFunction;
 function test(fn)
 {
     targetFunction = fn;
+    noInline(targetFunction);
 }
 
 function jscRun(iterations)
index 26ee8f6..baea30c 100644 (file)
@@ -1,3 +1,12 @@
+2017-05-19  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        Add SixSpeed benchmark to PerformanceTests
+        https://bugs.webkit.org/show_bug.cgi?id=172326
+
+        Reviewed by Sam Weinig.
+
+        * Scripts/run-jsc-benchmarks:
+
 2017-05-19  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         [WK1] MiniBrowser should navigate when handling a dropped URL
index 9f48535..acfe87b 100755 (executable)
@@ -51,6 +51,7 @@ V8_PATH = PERFORMANCETESTS_PATH + "SunSpider" + "tests" + "v8-v6"
 MICROBENCHMARKS_PATH = OPENSOURCE_PATH + "JSTests" + "microbenchmarks"
 OCTANE_WRAPPER_PATH = PERFORMANCETESTS_PATH + "Octane" + "wrappers"
 JSBENCH_PATH = PERFORMANCETESTS_PATH + "JSBench"
+SIXSPEED_PATH = PERFORMANCETESTS_PATH + "SixSpeed" + "tests"
 SIXSPEED_WRAPPER_PATH = PERFORMANCETESTS_PATH + "SixSpeed" + "wrappers"
 
 TEMP_PATH = OPENSOURCE_PATH + "BenchmarkTemp"
@@ -1650,13 +1651,14 @@ end
 class SixSpeedBenchmark
   include Benchmark
 
-  def initialize(name, iterations)
+  def initialize(name, path, iterations)
     @name = name
+    @path = path
     @iterations = iterations
   end
 
   def emitRunCode(plan)
-    emitBenchRunCode(fullname, plan, MultiFileTimedBenchmarkParameters.new([ensureFile("SixSpeed-#{@name}-wrapper", "#{SIXSPEED_WRAPPER_PATH}/wrapper.js"), ensureFile("SixSpeed-#{@name}", "#{SIXSPEED_PATH}/#{@name}")], simpleCommand("jscRun(#{@iterations});")))
+    emitBenchRunCode(fullname, plan, MultiFileTimedBenchmarkParameters.new([ensureFile("SixSpeed-#{@name}-wrapper", "#{SIXSPEED_WRAPPER_PATH}/wrapper.js"), ensureFile("SixSpeed-#{@name}", "#{SIXSPEED_PATH}/#{@path}")], simpleCommand("jscRun(#{@iterations});")))
   end
 end
 
@@ -2880,7 +2882,6 @@ begin
   BROWSERMARK_DOM_PATH = pathname_if_exist(config["BrowserMarkDOMPath"])
   ASMBENCH_PATH = pathname_if_exist(config["AsmBenchPath"])
   COMPRESSIONBENCH_PATH = pathname_if_exist(config["CompressionBenchPath"])
-  SIXSPEED_PATH = pathname_if_exist(config["SixSpeedPath"])
   DSPJS_FILTRR_PATH = pathname_if_exist(config["DSPJSFiltrrPath"])
   DSPJS_ROUTE9_PATH = pathname_if_exist(config["DSPJSRoute9Path"])
   DSPJS_STARFIELD_PATH = pathname_if_exist(config["DSPJSStarfieldPath"])
@@ -3052,39 +3053,37 @@ begin
   }
 
   SIXSPEED = BenchmarkSuite.new("SixSpeed", :geometricMean, 0)
-  if SIXSPEED_PATH
-    [[ "template_string", 200000000 ],
-     [ "defaults", 100000000 ],
-     [ "map-set-lookup", 200000 ],
-     [ "spread", 1000000 ],
-     [ "object-assign", 600000 ],
-     [ "spread-literal", 1000000 ],
-     [ "map-set", 10000 ],
-     [ "destructuring-simple", 20000000 ],
-     [ "super", 3000000 ],
-     [ "for-of-object", 1000000 ],
-     [ "rest", 500000 ],
-     [ "regex-u", 1000000 ],
-     [ "arrow", 20000000 ],
-     [ "bindings-compound", 20000000 ],
-     [ "classes", 10000000 ],
-     [ "template_string_tag", 2000000 ],
-     [ "map-string", 30000000 ],
-     [ "arrow-declare", 30000000 ],
-     [ "spread-generator", 1000000 ],
-     [ "object-literal-ext", 1000000 ],
-     [ "generator", 3000000 ],
-     [ "arrow-args", 20000000 ],
-     [ "for-of-array", 5000000 ],
-     [ "bindings", 20000000 ],
-     [ "destructuring", 20000000 ],
-     [ "map-set-object", 5000 ],
-    ].each {
-      | name, iterations |
-      SIXSPEED.add SixSpeedBenchmark.new("#{name}.es5", iterations)
-      SIXSPEED.add SixSpeedBenchmark.new("#{name}.es6", iterations)
-    }
-  end
+  [[ "template_string", 200000000 ],
+   [ "defaults", 100000000 ],
+   [ "map-set-lookup", 200000 ],
+   [ "spread", 1000000 ],
+   [ "object-assign", 600000 ],
+   [ "spread-literal", 1000000 ],
+   [ "map-set", 10000 ],
+   [ "destructuring-simple", 20000000 ],
+   [ "super", 3000000 ],
+   [ "for-of-object", 1000000 ],
+   [ "rest", 500000 ],
+   [ "regex-u", 1000000 ],
+   [ "arrow", 20000000 ],
+   [ "bindings-compound", 20000000 ],
+   [ "classes", 10000000 ],
+   [ "template_string_tag", 2000000 ],
+   [ "map-string", 30000000 ],
+   [ "arrow-declare", 30000000 ],
+   [ "spread-generator", 1000000 ],
+   [ "object-literal-ext", 1000000 ],
+   [ "generator", 3000000 ],
+   [ "arrow-args", 20000000 ],
+   [ "for-of-array", 5000000 ],
+   [ "bindings", 20000000 ],
+   [ "destructuring", 20000000 ],
+   [ "map-set-object", 5000 ],
+  ].each {
+    | name, iterations |
+    SIXSPEED.add SixSpeedBenchmark.new("#{name}.es5", "#{name}/#{name}.es5", iterations)
+    SIXSPEED.add SixSpeedBenchmark.new("#{name}.es6", "#{name}/#{name}.es6", iterations)
+  }
 
   DSPJS = BenchmarkSuite.new("DSP", :geometricMean, 0)
   DSPJS.add DSPJSFiltrrBenchmark.new("filtrr-posterize-tint", "e2")