Author: [EMAIL PROTECTED]
Date: Thu Sep 11 05:20:24 2008
New Revision: 274

Added:
    changes/lrn/presubmit_fix/
    changes/lrn/presubmit_fix/bleeding_edge/
       - copied from r270, /branches/bleeding_edge/
    changes/lrn/presubmit_fix/bleeding_edge/src/log.cc
       - copied, changed from r271, /branches/bleeding_edge/src/log.cc
    changes/lrn/presubmit_fix/bleeding_edge/src/log.h
       - copied, changed from r273, /branches/bleeding_edge/src/log.h
    changes/lrn/presubmit_fix/bleeding_edge/src/objects.h
       - copied, changed from r271, /branches/bleeding_edge/src/objects.h
    changes/lrn/presubmit_fix/bleeding_edge/src/smart-pointer.h
       - copied, changed from r271,  
/branches/bleeding_edge/src/smart-pointer.h

Log:
Formatting fixes (e.g., whitespace at end of line)
Added in-file documentation for --log-regexp switch.



Copied: changes/lrn/presubmit_fix/bleeding_edge/src/log.cc (from r271,  
/branches/bleeding_edge/src/log.cc)
==============================================================================
--- /branches/bleeding_edge/src/log.cc  (original)
+++ changes/lrn/presubmit_fix/bleeding_edge/src/log.cc  Thu Sep 11 05:20:24  
2008
@@ -371,7 +371,7 @@
  }

  void Logger::LogRegExpSource(Handle<JSValue> regexp) {
-  // Prints "/" + re.source + "/" +
+  // Prints "/" + re.source + "/" +
    //      (re.global?"g":"") + (re.ignorecase?"i":"") +  
(re.multiline?"m":"")

    Handle<Object> source = GetProperty(regexp, "source");
@@ -427,14 +427,15 @@

  void Logger::RegExpExecEvent(Handle<JSValue> regexp,
                               int start_index,
-                             Handle<String> string) {
+                             Handle<String> input_string) {
  #ifdef ENABLE_LOGGING_AND_PROFILING
    if (logfile_ == NULL || !FLAG_log_regexp) return;
    ScopedLock sl(mutex_);

    fprintf(logfile_, "regexp-run,");
    LogRegExpSource(regexp);
-  fprintf(logfile_, ",0x%08x,%d..%d\n", string->Hash(), start_index,  
string->length());
+  fprintf(logfile_, ",0x%08x,%d..%d\n",
+      string->Hash(), start_index, input_string->length());
  #endif
  }


Copied: changes/lrn/presubmit_fix/bleeding_edge/src/log.h (from r273,  
/branches/bleeding_edge/src/log.h)
==============================================================================
--- /branches/bleeding_edge/src/log.h   (original)
+++ changes/lrn/presubmit_fix/bleeding_edge/src/log.h   Thu Sep 11 05:20:24  
2008
@@ -40,7 +40,7 @@
  //
  // --log-all
  // Log all events to the file, default is off.  This is the same as  
combining
-// --log-api, --log-code, and --log-gc.
+// --log-api, --log-code, --log-gc, and --log-regexp.
  //
  // --log-api
  // Log API events to the logfile, default is off.  --log-api implies --log.
@@ -53,6 +53,10 @@
  // Log GC heap samples after each GC that can be processed by hp2ps,  
default
  // is off.  --log-gc implies --log.
  //
+// --log-regexp
+// Log creation and use of regular expressions, Default is off.
+// --log-regexp implies --log.
+//
  // --logfile <filename>
  // Specify the name of the logfile, default is "v8.log".
  //
@@ -179,9 +183,9 @@

    static void RegExpCompileEvent(Handle<JSValue> regexp);

-  static void RegExpExecEvent(Handle<JSValue> regexp,
-                              int start_index,
-                              Handle<String> string);
+  static void RegExpExecEvent(Handle<JSValue> regexp,
+                              int start_index,
+                              Handle<String> input_string);

  #ifdef ENABLE_LOGGING_AND_PROFILING
    static StateTag state() {

Copied: changes/lrn/presubmit_fix/bleeding_edge/src/objects.h (from r271,  
/branches/bleeding_edge/src/objects.h)
==============================================================================
--- /branches/bleeding_edge/src/objects.h       (original)
+++ changes/lrn/presubmit_fix/bleeding_edge/src/objects.h       Thu Sep 11  
05:20:24 2008
@@ -2861,7 +2861,8 @@
    // ROBUST_STRING_TRAVERSAL invokes behaviour that is robust  This means  
it
    // handles unexpected data without causing assert failures and it does  
not
    // do any heap allocations.  This is useful when printing stack traces.
-  SmartPointer<uc16> ToWideCString(RobustnessFlag robustness_flag =  
FAST_STRING_TRAVERSAL);
+  SmartPointer<uc16> ToWideCString(
+      RobustnessFlag robustness_flag = FAST_STRING_TRAVERSAL);

    // Tells whether the hash code has been computed.
    inline bool HasHashCode();

Copied: changes/lrn/presubmit_fix/bleeding_edge/src/smart-pointer.h (from  
r271, /branches/bleeding_edge/src/smart-pointer.h)
==============================================================================
--- /branches/bleeding_edge/src/smart-pointer.h (original)
+++ changes/lrn/presubmit_fix/bleeding_edge/src/smart-pointer.h Thu Sep 11  
05:20:24 2008
@@ -37,7 +37,7 @@
  class SmartPointer {
   public:

-  // Default constructor. Construct an empty scoped pointer.
+  // Default constructor. Construct an empty scoped pointer.
    inline SmartPointer() : p(NULL) {}


@@ -86,8 +86,8 @@
    // the copy constructor it removes the pointer in the original to avoid
    // double freeing.
    inline SmartPointer& operator=(const SmartPointer<T>& rhs) {
-    ASSERT(p == NULL);
-    T* tmp = rhs.p; // swap to handle self-assignment
+    ASSERT(p == NULL);
+    T* tmp = rhs.p;  // swap to handle self-assignment
      const_cast<SmartPointer<T>&>(rhs).p = NULL;
      p = tmp;
      return *this;

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to