Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Unified Diff: src/parser.cc

Issue 661181: - Pushed source code for functions into old space.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
===================================================================
--- src/parser.cc (revision 3975)
+++ src/parser.cc (working copy)
@@ -1234,7 +1234,7 @@
Counters::total_parse_size.Increment(source->length());
// Initialize parser state.
- source->TryFlattenIfNotFlat();
+ source->TryFlatten();
scanner_.Init(source, stream, 0, JAVASCRIPT);
ASSERT(target_stack_ == NULL);
@@ -1289,7 +1289,7 @@
bool is_expression) {
CompilationZoneScope zone_scope(DONT_DELETE_ON_EXIT);
HistogramTimerScope timer(&Counters::parse_lazy);
- source->TryFlattenIfNotFlat();
+ source->TryFlatten();
Counters::total_parse_size.Increment(source->length());
SafeStringInputBuffer buffer(source.location());
@@ -1338,7 +1338,7 @@
Counters::total_parse_size.Increment(source->length());
// Initialize parser state.
- source->TryFlattenIfNotFlat();
+ source->TryFlatten(TENURED);
scanner_.Init(source, stream, 0, JSON);
ASSERT(target_stack_ == NULL);
@@ -5088,11 +5088,10 @@
always_allow_natives_syntax = allow_natives_syntax_before;
// Parse the function by pulling the function source from the script source.
Handle<String> script_source(String::cast(script->source()));
+ Handle<String> function_source =
+ SubString(script_source, start_position, end_position, TENURED);
FunctionLiteral* result =
- parser.ParseLazy(SubString(script_source, start_position, end_position),
- name,
- start_position,
- is_expression);
+ parser.ParseLazy(function_source, name, start_position, is_expression);
return result;
}
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698