LGTM.

On Thu, May 14, 2009 at 3:10 PM,  <[email protected]> wrote:
> Reviewers: Kasper Lund,
>
> Description:
> Consistently use CompilationZoneScope instead of ZoneScope to ensure
> that the FrameElement constants list gets cleared.
>
> Please review this at http://codereview.chromium.org/115352
>
> SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/
>
> Affected files:
>  M     src/frame-element.h
>  M     src/jsregexp.cc
>  M     src/parser.cc
>  M     src/runtime.cc
>
>
> Index: src/runtime.cc
> ===================================================================
> --- src/runtime.cc      (revision 1950)
> +++ src/runtime.cc      (working copy)
> @@ -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;
> Index: src/frame-element.h
> ===================================================================
> --- src/frame-element.h (revision 1951)
> +++ src/frame-element.h (working copy)
> @@ -93,7 +93,7 @@
>   typedef ZoneList<Handle<Object> > ZoneObjectList;
>
>   static ZoneObjectList* ConstantList() {
> -    static ZoneObjectList list(10);
> +    static ZoneObjectList list(0);
>     return &list;
>   }
>
> Index: src/jsregexp.cc
> ===================================================================
> --- src/jsregexp.cc     (revision 1950)
> +++ src/jsregexp.cc     (working copy)
> @@ -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();
>
> Index: src/parser.cc
> ===================================================================
> --- src/parser.cc       (revision 1950)
> +++ src/parser.cc       (working copy)
> @@ -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());
>
>
>

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

Reply via email to