Index: src/v8natives.js |
diff --git a/src/v8natives.js b/src/v8natives.js |
index 91e19c13d8ed6c4f70e268961e6228e2ee7822eb..563de7327c525316f1fecdfe51a0d5cb9b563780 100644 |
--- a/src/v8natives.js |
+++ b/src/v8natives.js |
@@ -143,7 +143,7 @@ function GlobalEval(x) { |
var f = %CompileString(x); |
if (!IS_FUNCTION(f)) return f; |
- return f.call(this); |
+ return %_CallFunction(this, f); |
} |
@@ -152,7 +152,7 @@ function GlobalExecScript(expr, lang) { |
// NOTE: We don't care about the character casing. |
if (!lang || /javascript/i.test(lang)) { |
var f = %CompileString(ToString(expr)); |
- f.call(%GlobalReceiver(global)); |
+ %_CallFunction(%GlobalReceiver(global), f); |
} |
return null; |
} |
@@ -1170,7 +1170,7 @@ function FunctionBind(this_arg) { // Length is 1. |
return fn.apply(this_arg, arguments); |
}; |
} else { |
- var bound_args = new $Array(argc_bound); |
+ var bound_args = new InternalArray(argc_bound); |
for(var i = 0; i < argc_bound; i++) { |
bound_args[i] = %_Arguments(i+1); |
} |
@@ -1188,7 +1188,7 @@ function FunctionBind(this_arg) { // Length is 1. |
// Combine the args we got from the bind call with the args |
// given as argument to the invocation. |
var argc = %_ArgumentsLength(); |
- var args = new $Array(argc + argc_bound); |
+ var args = new InternalArray(argc + argc_bound); |
// Add bound arguments. |
for (var i = 0; i < argc_bound; i++) { |
args[i] = bound_args[i]; |
@@ -1220,7 +1220,7 @@ function NewFunction(arg1) { // length == 1 |
var n = %_ArgumentsLength(); |
var p = ''; |
if (n > 1) { |
- p = new $Array(n - 1); |
+ p = new InternalArray(n - 1); |
for (var i = 0; i < n - 1; i++) p[i] = %_Arguments(i); |
p = Join(p, n - 1, ',', NonStringToString); |
// If the formal parameters string include ) - an illegal |