Renamed the top level directory 'public' to 'include'.

Added option 'env' to the SCons build scripts to support overriding the ENV part of the build environment.  This is mostly to support Windows builds in cases where SCons cannot find the correct paths to the Windows SDK, as these paths cannot be passed through shell environment variables.

Enabled "Buffer Security Check" on for the Windows SCons build and added the linker option /OPT:ICF as an optimization.

Added the V8 benchmark suite to the repository.


git-svn-id: http://v8.googlecode.com/svn/trunk@101 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/debug.cc b/src/debug.cc
index 8ba4490..7487cdc 100644
--- a/src/debug.cc
+++ b/src/debug.cc
@@ -282,7 +282,7 @@
 
 void BreakLocationIterator::SetDebugBreak() {
   // If there is already a break point here just return. This might happen if
-  // the same code is flodded with break points twice. Flodding the same
+  // the same code is flooded with break points twice. Flooding the same
   // function twice might happen when stepping in a function with an exception
   // handler as the handler and the function is the same.
   if (IsDebugBreak()) {
@@ -344,7 +344,7 @@
       rinfo()->set_target_address(stub->entry());
     }
   } else {
-    // Step in through constructs call requires no changs to the running code.
+    // Step in through constructs call requires no changes to the running code.
     ASSERT(is_js_construct_call(rmode()));
   }
 }
@@ -705,7 +705,7 @@
   int break_points_hit_count = 0;
   Handle<JSArray> break_points_hit = Factory::NewJSArray(1);
 
-  // If there are multiple break points they are in a Fixedrray.
+  // If there are multiple break points they are in a FixedArray.
   ASSERT(!break_point_objects->IsUndefined());
   if (break_point_objects->IsFixedArray()) {
     Handle<FixedArray> array(FixedArray::cast(*break_point_objects));
@@ -929,7 +929,7 @@
     if (code->is_call_stub()) is_call_target = true;
   }
 
-  // If this is the last break code target step out is the only posibility.
+  // If this is the last break code target step out is the only possibility.
   if (it.IsExit() || step_action == StepOut) {
     // Step out: If there is a JavaScript caller frame, we need to
     // flood it with breakpoints.
@@ -967,7 +967,7 @@
 // is used to have step next and step in only report break back to the debugger
 // if on a different frame or in a different statement. In some situations
 // there will be several break points in the same statement when the code is
-// flodded with one-shot break points. This function helps to perform several
+// flooded with one-shot break points. This function helps to perform several
 // steps before reporting break back to the debugger.
 bool Debug::StepNextContinue(BreakLocationIterator* break_location_iterator,
                              JavaScriptFrame* frame) {
@@ -1107,7 +1107,7 @@
 // are used to support stepping.
 void Debug::ClearOneShot() {
   // The current implementation just runs through all the breakpoints. When the
-  // last break point for a function is removed that function is automaticaly
+  // last break point for a function is removed that function is automatically
   // removed from the list.
 
   DebugInfoListNode* node = debug_info_list_;
@@ -1154,24 +1154,7 @@
   if (!EnsureCompiled(shared)) return false;
 
   // Create the debug info object.
-  Handle<DebugInfo> debug_info =
-      Handle<DebugInfo>::cast(Factory::NewStruct(DEBUG_INFO_TYPE));
-
-  // Get the function original code.
-  Handle<Code> code(shared->code());
-
-  // Debug info contains function, a copy of the original code and the executing
-  // code.
-  debug_info->set_shared(*shared);
-  debug_info->set_original_code(*Factory::CopyCode(code));
-  debug_info->set_code(*code);
-
-  // Link debug info to function.
-  shared->set_debug_info(*debug_info);
-
-  // Initially no active break points.
-  debug_info->set_break_points(
-      *Factory::NewFixedArray(Debug::kEstimatedNofBreakPointsInFunction));
+  Handle<DebugInfo> debug_info = Factory::NewDebugInfo(shared);
 
   // Add debug info to the list.
   DebugInfoListNode* node = new DebugInfoListNode(*debug_info);
@@ -1788,10 +1771,10 @@
   bool interactive = false;
   switch (event) {
     case v8::Break:
-      interactive = true;  // Break event is always interavtive
+      interactive = true;  // Break event is always interactive
       break;
     case v8::Exception:
-      interactive = true;  // Exception event is always interavtive
+      interactive = true;  // Exception event is always interactive
       break;
     case v8::BeforeCompile:
       break;
@@ -1821,7 +1804,7 @@
     return;
   }
 
-  // Notify the debugger that a debug event has occoured.
+  // Notify the debugger that a debug event has occurred.
   host_running_ = false;
   SetEventJSONFromEvent(event_data);