Commit 67d83027 authored by lrn@chromium.org's avatar lrn@chromium.org

Avoid collecting symbol info for one-off preparsing.

Review URL: http://codereview.chromium.org/3356010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5431 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent e5b63e72
......@@ -277,13 +277,11 @@ Handle<SharedFunctionInfo> Compiler::Compile(Handle<String> source,
// for small sources, odds are that there aren't many functions
// that would be compiled lazily anyway, so we skip the preparse step
// in that case too.
// TODO(lrn): Maybe *only* collect function info, not symbol info, in
// this case, since it's just replacing one hash-lookup with another.
ScriptDataImpl* pre_data = input_pre_data;
if (pre_data == NULL
&& FLAG_lazy
&& source_length >= FLAG_min_preparse_length) {
pre_data = PreParse(source, NULL, extension);
pre_data = PartialPreParse(source, NULL, extension);
}
// Create a script object describing the script to be compiled.
......
This diff is collapsed.
......@@ -212,11 +212,17 @@ FunctionLiteral* MakeAST(bool compile_in_global_context,
ScriptDataImpl* pre_data,
bool is_json = false);
// Generic preparser generating full preparse data.
ScriptDataImpl* PreParse(Handle<String> source,
unibrow::CharacterStream* stream,
v8::Extension* extension);
// Preparser that only does preprocessing that makes sense if only used
// immediately after.
ScriptDataImpl* PartialPreParse(Handle<String> source,
unibrow::CharacterStream* stream,
v8::Extension* extension);
bool ParseRegExp(FlatStringReader* input,
bool multiline,
......
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