Index: src/js/prologue.js |
diff --git a/src/js/prologue.js b/src/js/prologue.js |
index 24225a0a004640091bcde7898857b2cf5b74a681..03a842d6caa669c6b24ffa1c074fd71f879517e3 100644 |
--- a/src/js/prologue.js |
+++ b/src/js/prologue.js |
@@ -323,14 +323,14 @@ extrasUtils.createPrivateSymbol = function createPrivateSymbol(name) { |
// indirection and slowness given how un-optimized bind is. |
extrasUtils.simpleBind = function simpleBind(func, thisArg) { |
- return function() { |
- return %Apply(func, thisArg, arguments, 0, arguments.length); |
+ return function(...args) { |
+ return %reflect_apply(func, thisArg, args); |
}; |
}; |
extrasUtils.uncurryThis = function uncurryThis(func) { |
- return function(thisArg) { |
- return %Apply(func, thisArg, arguments, 1, arguments.length - 1); |
+ return function(thisArg, ...args) { |
+ return %reflect_apply(func, thisArg, args); |
}; |
}; |