Commit 57da3531 authored by ager@chromium.org's avatar ager@chromium.org

Consistently use CompilationZoneScope instead of ZoneScope to ensure

that the FrameElement constants list gets cleared.
Review URL: http://codereview.chromium.org/115352

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1953 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 2a96ec59
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "v8.h" #include "v8.h"
#include "ast.h" #include "ast.h"
#include "compiler.h"
#include "execution.h" #include "execution.h"
#include "factory.h" #include "factory.h"
#include "jsregexp-inl.h" #include "jsregexp-inl.h"
...@@ -153,7 +154,7 @@ Handle<Object> RegExpImpl::Compile(Handle<JSRegExp> re, ...@@ -153,7 +154,7 @@ Handle<Object> RegExpImpl::Compile(Handle<JSRegExp> re,
return re; return re;
} }
FlattenString(pattern); FlattenString(pattern);
ZoneScope zone_scope(DELETE_ON_EXIT); CompilationZoneScope zone_scope(DELETE_ON_EXIT);
RegExpCompileData parse_result; RegExpCompileData parse_result;
FlatStringReader reader(pattern); FlatStringReader reader(pattern);
if (!ParseRegExp(&reader, flags.is_multiline(), &parse_result)) { if (!ParseRegExp(&reader, flags.is_multiline(), &parse_result)) {
...@@ -285,7 +286,7 @@ bool RegExpImpl::EnsureCompiledIrregexp(Handle<JSRegExp> re, bool is_ascii) { ...@@ -285,7 +286,7 @@ bool RegExpImpl::EnsureCompiledIrregexp(Handle<JSRegExp> re, bool is_ascii) {
} }
// Compile the RegExp. // Compile the RegExp.
ZoneScope zone_scope(DELETE_ON_EXIT); CompilationZoneScope zone_scope(DELETE_ON_EXIT);
JSRegExp::Flags flags = re->GetFlags(); JSRegExp::Flags flags = re->GetFlags();
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "api.h" #include "api.h"
#include "ast.h" #include "ast.h"
#include "bootstrapper.h" #include "bootstrapper.h"
#include "compiler.h"
#include "platform.h" #include "platform.h"
#include "runtime.h" #include "runtime.h"
#include "parser.h" #include "parser.h"
...@@ -1096,7 +1097,7 @@ bool Parser::PreParseProgram(unibrow::CharacterStream* stream) { ...@@ -1096,7 +1097,7 @@ bool Parser::PreParseProgram(unibrow::CharacterStream* stream) {
FunctionLiteral* Parser::ParseProgram(Handle<String> source, FunctionLiteral* Parser::ParseProgram(Handle<String> source,
unibrow::CharacterStream* stream, unibrow::CharacterStream* stream,
bool in_global_context) { bool in_global_context) {
ZoneScope zone_scope(DONT_DELETE_ON_EXIT); CompilationZoneScope zone_scope(DONT_DELETE_ON_EXIT);
HistogramTimerScope timer(&Counters::parse); HistogramTimerScope timer(&Counters::parse);
Counters::total_parse_size.Increment(source->length()); Counters::total_parse_size.Increment(source->length());
...@@ -1149,7 +1150,7 @@ FunctionLiteral* Parser::ParseLazy(Handle<String> source, ...@@ -1149,7 +1150,7 @@ FunctionLiteral* Parser::ParseLazy(Handle<String> source,
Handle<String> name, Handle<String> name,
int start_position, int start_position,
bool is_expression) { bool is_expression) {
ZoneScope zone_scope(DONT_DELETE_ON_EXIT); CompilationZoneScope zone_scope(DONT_DELETE_ON_EXIT);
HistogramTimerScope timer(&Counters::parse_lazy); HistogramTimerScope timer(&Counters::parse_lazy);
source->TryFlattenIfNotFlat(); source->TryFlattenIfNotFlat();
Counters::total_parse_size.Increment(source->length()); Counters::total_parse_size.Increment(source->length());
......
...@@ -1723,7 +1723,7 @@ static Object* StringReplaceRegExpWithString(String* subject, ...@@ -1723,7 +1723,7 @@ static Object* StringReplaceRegExpWithString(String* subject,
int capture_count = regexp_handle->CaptureCount(); int capture_count = regexp_handle->CaptureCount();
// CompiledReplacement uses zone allocation. // CompiledReplacement uses zone allocation.
ZoneScope zone(DELETE_ON_EXIT); CompilationZoneScope zone(DELETE_ON_EXIT);
CompiledReplacement compiled_replacement; CompiledReplacement compiled_replacement;
compiled_replacement.Compile(replacement_handle, compiled_replacement.Compile(replacement_handle,
capture_count, capture_count,
...@@ -2376,7 +2376,7 @@ static Object* Runtime_StringMatch(Arguments args) { ...@@ -2376,7 +2376,7 @@ static Object* Runtime_StringMatch(Arguments args) {
} }
int length = subject->length(); int length = subject->length();
ZoneScope zone_space(DELETE_ON_EXIT); CompilationZoneScope zone_space(DELETE_ON_EXIT);
ZoneList<int> offsets(8); ZoneList<int> offsets(8);
do { do {
int start; int start;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment