Index: src/runtime.js |
diff --git a/src/runtime.js b/src/runtime.js |
index 3c31ddb7ef3a936a714f46d8f02b84f6ce0f8ed5..231763cbcabf6c2d3e392b509d25376fcd2c62f3 100644 |
--- a/src/runtime.js |
+++ b/src/runtime.js |
@@ -395,26 +395,20 @@ function FILTER_KEY(key) { |
function CALL_NON_FUNCTION() { |
- var callee = %GetCalledFunction(); |
- var delegate = %GetFunctionDelegate(callee); |
+ var delegate = %GetFunctionDelegate(this); |
if (!IS_FUNCTION(delegate)) { |
- throw %MakeTypeError('called_non_callable', [typeof callee]); |
+ throw %MakeTypeError('called_non_callable', [typeof this]); |
} |
- |
- var parameters = %NewArguments(delegate); |
- return delegate.apply(callee, parameters); |
+ return delegate.apply(this, arguments); |
} |
function CALL_NON_FUNCTION_AS_CONSTRUCTOR() { |
- var callee = %GetCalledFunction(); |
- var delegate = %GetConstructorDelegate(callee); |
+ var delegate = %GetConstructorDelegate(this); |
if (!IS_FUNCTION(delegate)) { |
- throw %MakeTypeError('called_non_callable', [typeof callee]); |
+ throw %MakeTypeError('called_non_callable', [typeof this]); |
} |
- |
- var parameters = %NewArguments(delegate); |
- return delegate.apply(callee, parameters); |
+ return delegate.apply(this, arguments); |
} |