Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: test/mjsunit/simd/prototype.js

Issue 90643003: Experimental implementation: Exposing SIMD instructions into JavaScript Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/simd/osr.js ('k') | test/mjsunit/simd/representation_change.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/simd/prototype.js
diff --git a/test/mjsunit/compiler/regress-const.js b/test/mjsunit/simd/prototype.js
similarity index 67%
copy from test/mjsunit/compiler/regress-const.js
copy to test/mjsunit/simd/prototype.js
index aa55d0fd3ae17051a084a6bf28c2257f2abc8495..adc4d5058c96d0c2dd383cccf285527a5f1e5c93 100644
--- a/test/mjsunit/compiler/regress-const.js
+++ b/test/mjsunit/simd/prototype.js
@@ -25,44 +25,32 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax
-
-// Test const initialization and assignments.
-function f() {
- var x = 42;
- while (true) {
- const y = x;
- if (--x == 0) return y;
- }
-}
-
-function g() {
- const x = 42;
- x += 1;
- return x;
-}
-
-for (var i = 0; i < 5; i++) {
- f();
- g();
+// Flags: --simd_object --allow-natives-syntax
+
+function testFloat32x4Prototype() {
+ var a4 = float32x4(1.0, -2.0, 3.0, -4.0);
+ float32x4.prototype = {};
+ assertEquals(undefined, a4.x);
+ assertEquals(undefined, a4.y);
+ assertEquals(undefined, a4.z);
+ assertEquals(undefined, a4.w);
}
-%OptimizeFunctionOnNextCall(f);
-%OptimizeFunctionOnNextCall(g);
-
-assertEquals(42, f());
-assertEquals(42, g());
-
-
-function h(a, b) {
- var r = a + b;
- const X = 42;
- return r + X;
+testFloat32x4Prototype();
+testFloat32x4Prototype();
+%OptimizeFunctionOnNextCall(testFloat32x4Prototype);
+testFloat32x4Prototype();
+
+function testInt32x4Prototype() {
+ var a4 = int32x4(1.0, -2.0, 3.0, -4.0);
+ int32x4.prototype = {};
+ assertEquals(undefined, a4.x);
+ assertEquals(undefined, a4.y);
+ assertEquals(undefined, a4.z);
+ assertEquals(undefined, a4.w);
}
-for (var i = 0; i < 5; i++) h(1,2);
-
-%OptimizeFunctionOnNextCall(h);
-
-assertEquals(45, h(1,2));
-assertEquals("foo742", h("foo", 7));
+testInt32x4Prototype();
+testInt32x4Prototype();
+%OptimizeFunctionOnNextCall(testInt32x4Prototype);
+testInt32x4Prototype();
« no previous file with comments | « test/mjsunit/simd/osr.js ('k') | test/mjsunit/simd/representation_change.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698