Author: [email protected]
Date: Thu May 14 06:17:28 2009
New Revision: 1953

Modified:
    branches/bleeding_edge/src/jsregexp.cc
    branches/bleeding_edge/src/parser.cc
    branches/bleeding_edge/src/runtime.cc

Log:
Consistently use CompilationZoneScope instead of ZoneScope to ensure
that the FrameElement constants list gets cleared.
Review URL: http://codereview.chromium.org/115352

Modified: branches/bleeding_edge/src/jsregexp.cc
==============================================================================
--- branches/bleeding_edge/src/jsregexp.cc      (original)
+++ branches/bleeding_edge/src/jsregexp.cc      Thu May 14 06:17:28 2009
@@ -28,6 +28,7 @@
  #include "v8.h"

  #include "ast.h"
+#include "compiler.h"
  #include "execution.h"
  #include "factory.h"
  #include "jsregexp-inl.h"
@@ -153,7 +154,7 @@
      return re;
    }
    FlattenString(pattern);
-  ZoneScope zone_scope(DELETE_ON_EXIT);
+  CompilationZoneScope zone_scope(DELETE_ON_EXIT);
    RegExpCompileData parse_result;
    FlatStringReader reader(pattern);
    if (!ParseRegExp(&reader, flags.is_multiline(), &parse_result)) {
@@ -285,7 +286,7 @@
    }

    // Compile the RegExp.
-  ZoneScope zone_scope(DELETE_ON_EXIT);
+  CompilationZoneScope zone_scope(DELETE_ON_EXIT);

    JSRegExp::Flags flags = re->GetFlags();


Modified: branches/bleeding_edge/src/parser.cc
==============================================================================
--- branches/bleeding_edge/src/parser.cc        (original)
+++ branches/bleeding_edge/src/parser.cc        Thu May 14 06:17:28 2009
@@ -30,6 +30,7 @@
  #include "api.h"
  #include "ast.h"
  #include "bootstrapper.h"
+#include "compiler.h"
  #include "platform.h"
  #include "runtime.h"
  #include "parser.h"
@@ -1096,7 +1097,7 @@
  FunctionLiteral* Parser::ParseProgram(Handle<String> source,
                                        unibrow::CharacterStream* stream,
                                        bool in_global_context) {
-  ZoneScope zone_scope(DONT_DELETE_ON_EXIT);
+  CompilationZoneScope zone_scope(DONT_DELETE_ON_EXIT);

    HistogramTimerScope timer(&Counters::parse);
    Counters::total_parse_size.Increment(source->length());
@@ -1149,7 +1150,7 @@
                                     Handle<String> name,
                                     int start_position,
                                     bool is_expression) {
-  ZoneScope zone_scope(DONT_DELETE_ON_EXIT);
+  CompilationZoneScope zone_scope(DONT_DELETE_ON_EXIT);
    HistogramTimerScope timer(&Counters::parse_lazy);
    source->TryFlattenIfNotFlat();
    Counters::total_parse_size.Increment(source->length());

Modified: branches/bleeding_edge/src/runtime.cc
==============================================================================
--- branches/bleeding_edge/src/runtime.cc       (original)
+++ branches/bleeding_edge/src/runtime.cc       Thu May 14 06:17:28 2009
@@ -1723,7 +1723,7 @@
    int capture_count = regexp_handle->CaptureCount();

    // CompiledReplacement uses zone allocation.
-  ZoneScope zone(DELETE_ON_EXIT);
+  CompilationZoneScope zone(DELETE_ON_EXIT);
    CompiledReplacement compiled_replacement;
    compiled_replacement.Compile(replacement_handle,
                                 capture_count,
@@ -2376,7 +2376,7 @@
    }
    int length = subject->length();

-  ZoneScope zone_space(DELETE_ON_EXIT);
+  CompilationZoneScope zone_space(DELETE_ON_EXIT);
    ZoneList<int> offsets(8);
    do {
      int start;

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

Reply via email to