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
This commit is contained in:
parent
2a96ec599b
commit
57da353113
@ -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 @@ Handle<Object> RegExpImpl::Compile(Handle<JSRegExp> re,
|
||||
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 @@ bool RegExpImpl::EnsureCompiledIrregexp(Handle<JSRegExp> re, bool is_ascii) {
|
||||
}
|
||||
|
||||
// Compile the RegExp.
|
||||
ZoneScope zone_scope(DELETE_ON_EXIT);
|
||||
CompilationZoneScope zone_scope(DELETE_ON_EXIT);
|
||||
|
||||
JSRegExp::Flags flags = re->GetFlags();
|
||||
|
||||
|
@ -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 @@ bool Parser::PreParseProgram(unibrow::CharacterStream* stream) {
|
||||
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 @@ FunctionLiteral* Parser::ParseLazy(Handle<String> source,
|
||||
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());
|
||||
|
@ -1723,7 +1723,7 @@ static Object* StringReplaceRegExpWithString(String* subject,
|
||||
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 @@ static Object* Runtime_StringMatch(Arguments args) {
|
||||
}
|
||||
int length = subject->length();
|
||||
|
||||
ZoneScope zone_space(DELETE_ON_EXIT);
|
||||
CompilationZoneScope zone_space(DELETE_ON_EXIT);
|
||||
ZoneList<int> offsets(8);
|
||||
do {
|
||||
int start;
|
||||
|
Loading…
Reference in New Issue
Block a user