Reduced code size by using shorter instruction encoding when possible.

Added a --help option to the shell sample and to the d8 shell.

Added visual studio project files for building the ARM simulator.

Fixed a number of ARM simulator issues.

Fixed bug in out-of-memory handling on ARM.

Implemented shell support for passing arguments to a script from the command line.

Fixed bug in date code that made certain date functions return -0 instead of 0 for dates before the epoch.

Restricted applications of eval so it can only be used in the context of the associated global object.

Treat byte-order marks as whitespace characters.


git-svn-id: http://v8.googlecode.com/svn/trunk@768 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/v8natives.js b/src/v8natives.js
index 094d5ea..f3c98a5 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -105,6 +105,11 @@
 function GlobalEval(x) {
   if (!IS_STRING(x)) return x;
 
+  if (this !== %GlobalReceiver(global)) {
+    throw new $EvalError('The "this" object passed to eval must ' + 
+                         'be the global object from which eval originated');
+  }
+  
   var f = %CompileString(x, 0, true);
   if (!IS_FUNCTION(f)) return f;