Fixed assertion failures in compilation of loop conditions.

Removed STL dependency from developer shell (d8).

Added infrastructure for protecting the V8 heap from corruption caused by memory modifications from the outside.


git-svn-id: http://v8.googlecode.com/svn/trunk@1603 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/heap.cc b/src/heap.cc
index 8bab00e..46ad2dd 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -2861,6 +2861,30 @@
 }
 
 
+#ifdef ENABLE_HEAP_PROTECTION
+
+void Heap::Protect() {
+  new_space_.Protect();
+  map_space_->Protect();
+  old_pointer_space_->Protect();
+  old_data_space_->Protect();
+  code_space_->Protect();
+  lo_space_->Protect();
+}
+
+
+void Heap::Unprotect() {
+  new_space_.Unprotect();
+  map_space_->Unprotect();
+  old_pointer_space_->Unprotect();
+  old_data_space_->Unprotect();
+  code_space_->Unprotect();
+  lo_space_->Unprotect();
+}
+
+#endif
+
+
 #ifdef DEBUG
 
 class PrintHandleVisitor: public ObjectVisitor {