Fixed bug in JSObject::GetPropertyAttributePostInterceptor where map transitions would count as properties.

Allowed aliased eval invocations by treating them as evals in the global context. This may change in the future.

Added support for accessing the last entered context through the API and renamed Context::Current to Context::GetCurrent and Context::GetSecurityContext to Context::GetCurrentSecurityContext.

Fixed bug in the debugger that would cause the debugger scripts to be recursively loaded and changed all disabling of interrupts to be block-structured.

Made snapshot data read-only to allow it to be more easily shared across multiple users of V8 when linked as a shared library.


git-svn-id: http://v8.googlecode.com/svn/trunk@6 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/compiler.cc b/src/compiler.cc
index 48502ca..fb11bf8 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -112,7 +112,7 @@
 
   // Make sure we have an initial stack limit.
   StackGuard guard;
-  StackGuard::DisableInterrupts();
+  PostponeInterruptsScope postpone;
 
   // Notify debugger
   Debugger::OnBeforeCompile(script);
@@ -126,7 +126,6 @@
   // Check for parse errors.
   if (lit == NULL) {
     ASSERT(Top::has_pending_exception());
-    StackGuard::EnableInterrupts();
     return Handle<JSFunction>::null();
   }
 
@@ -144,7 +143,6 @@
   // Check for stack-overflow exceptions.
   if (code.is_null()) {
     Top::StackOverflow();
-    StackGuard::EnableInterrupts();
     return Handle<JSFunction>::null();
   }
 
@@ -172,8 +170,6 @@
   // the instances of the function.
   SetExpectedNofPropertiesFromEstimate(fun, lit->expected_property_count());
 
-  StackGuard::EnableInterrupts();
-
   // Notify debugger
   Debugger::OnAfterCompile(script, fun);
 
@@ -242,7 +238,7 @@
 
   // Make sure we have an initial stack limit.
   StackGuard guard;
-  StackGuard::DisableInterrupts();
+  PostponeInterruptsScope postpone;
 
   // Compute name, source code and script data.
   Handle<String> name(String::cast(shared->name()));
@@ -263,7 +259,6 @@
   // Check for parse errors.
   if (lit == NULL) {
     ASSERT(Top::has_pending_exception());
-    StackGuard::EnableInterrupts();
     return false;
   }
 
@@ -278,7 +273,6 @@
   // Check for stack-overflow exception.
   if (code.is_null()) {
     Top::StackOverflow();
-    StackGuard::EnableInterrupts();
     return false;
   }
 
@@ -293,7 +287,6 @@
 
   // Check the function has compiled code.
   ASSERT(shared->is_compiled());
-  StackGuard::EnableInterrupts();
   return true;
 }