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

Unified Diff: test/mjsunit/harmony/proxies-function.js

Issue 1325573004: [runtime] Replace many buggy uses of %_CallFunction with %_Call. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address feedback. Created 5 years, 3 months 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/debug-liveedit-check-stack.js ('k') | test/mjsunit/strong/function-arity.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/proxies-function.js
diff --git a/test/mjsunit/harmony/proxies-function.js b/test/mjsunit/harmony/proxies-function.js
index c024cef948f68a8dfc5f30ea8b0afe49aebcfd17..3c36a4f2046c4b814f6957241fa5ec04c86a9900 100644
--- a/test/mjsunit/harmony/proxies-function.js
+++ b/test/mjsunit/harmony/proxies-function.js
@@ -106,10 +106,10 @@ function TestCall(isStrict, callTrap) {
assertEquals(32, Function.prototype.apply.call(f, o, [17, 15]))
assertSame(o, receiver)
receiver = 333
- assertEquals(42, %Call(o, 11, 31, f))
+ assertEquals(42, %Call(f, o, 11, 31));
assertSame(o, receiver)
receiver = 333
- assertEquals(42, %Call(null, 11, 31, f))
+ assertEquals(42, %Call(f, null, 11, 31));
assertSame(isStrict ? null : global_object, receiver)
receiver = 333
assertEquals(42, %Apply(f, o, [11, 31], 0, 2))
@@ -136,10 +136,10 @@ function TestCall(isStrict, callTrap) {
assertEquals(32, Function.prototype.apply.call(ff, {}, [20]))
assertSame(o, receiver)
receiver = 333
- assertEquals(23, %Call({}, 11, ff))
+ assertEquals(23, %Call(ff, {}, 11));
assertSame(o, receiver)
receiver = 333
- assertEquals(23, %Call({}, 11, 3, ff))
+ assertEquals(23, %Call(ff, {}, 11, 3));
assertSame(o, receiver)
receiver = 333
assertEquals(24, %Apply(ff, {}, [12, 13], 0, 1))
@@ -166,10 +166,10 @@ function TestCall(isStrict, callTrap) {
assertEquals(42, Function.prototype.apply.call(fff, {}))
assertSame(o, receiver)
receiver = 333
- assertEquals(42, %Call({}, fff))
+ assertEquals(42, %Call(fff, {}));
assertSame(o, receiver)
receiver = 333
- assertEquals(42, %Call({}, 11, 3, fff))
+ assertEquals(42, %Call(fff, {}, 11, 3))
assertSame(o, receiver)
receiver = 333
assertEquals(42, %Apply(fff, {}, [], 0, 0))
@@ -211,7 +211,7 @@ function TestCall(isStrict, callTrap) {
assertEquals(32, Function.prototype.apply.call(f, o, [17, 15]))
assertSame(o, receiver)
receiver = 333
- assertEquals(23, %Call(o, 11, 12, f))
+ assertEquals(23, %Call(f, o, 11, 12))
assertSame(o, receiver)
receiver = 333
assertEquals(27, %Apply(f, o, [12, 13, 14], 1, 2))
@@ -280,8 +280,8 @@ function TestCallThrow(callTrap) {
assertThrows(function(){ ({x: f})["x"](11) }, "myexn")
assertThrows(function(){ Function.prototype.call.call(f, {}, 2) }, "myexn")
assertThrows(function(){ Function.prototype.apply.call(f, {}, [1]) }, "myexn")
- assertThrows(function(){ %Call({}, f) }, "myexn")
- assertThrows(function(){ %Call({}, 1, 2, f) }, "myexn")
+ assertThrows(function(){ %Call(f, {}) }, "myexn")
+ assertThrows(function(){ %Call(f, {}, 1, 2) }, "myexn")
assertThrows(function(){ %Apply({}, f, [], 3, 0) }, "myexn")
assertThrows(function(){ %Apply({}, f, [3, 4], 0, 1) }, "myexn")
assertThrows(function(){ %_CallFunction({}, f) }, "myexn")
@@ -293,8 +293,8 @@ function TestCallThrow(callTrap) {
assertThrows(function(){ ({x: f})["x"](11) }, "myexn")
assertThrows(function(){ Function.prototype.call.call(f, {}, 2) }, "myexn")
assertThrows(function(){ Function.prototype.apply.call(f, {}, [1]) }, "myexn")
- assertThrows(function(){ %Call({}, f) }, "myexn")
- assertThrows(function(){ %Call({}, 1, 2, f) }, "myexn")
+ assertThrows(function(){ %Call(f, {}) }, "myexn")
+ assertThrows(function(){ %Call(f, {}, 1, 2) }, "myexn")
assertThrows(function(){ %Apply({}, f, [], 3, 0) }, "myexn")
assertThrows(function(){ %Apply({}, f, [3, 4], 0, 1) }, "myexn")
assertThrows(function(){ %_CallFunction({}, f) }, "myexn")
@@ -698,7 +698,7 @@ function TestCalls() {
function(f, x, y, o) { return Function.prototype.call.call(f, o, x, y) },
function(f, x, y, o) { return Function.prototype.apply.call(f, o, [x, y]) },
function(f, x, y, o) { return %_CallFunction(o, x, y, f) },
- function(f, x, y, o) { return %Call(o, x, y, f) },
+ function(f, x, y, o) { return %Call(f, o, x, y) },
function(f, x, y, o) { return %Apply(f, o, [null, x, y, null], 1, 2) },
function(f, x, y, o) { return %Apply(f, o, arguments, 2, 2) },
function(f, x, y, o) { if (typeof o == "object") return o.f(x, y) },
« no previous file with comments | « test/mjsunit/debug-liveedit-check-stack.js ('k') | test/mjsunit/strong/function-arity.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698