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

Unified Diff: src/compiler.cc

Issue 3538005: Cleanup of the parser. (Closed)
Patch Set: Created 10 years, 3 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 | « no previous file | src/parser.h » ('j') | src/parser.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index ba8aca0e779a67af52febe3cd9d5fb6fd75cb58b..6ef5a1c50d8ffe4fa85cecaa32158f9c2f3b8af4 100755
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -377,20 +377,12 @@ bool Compiler::CompileLazy(CompilationInfo* info) {
// Compute name, source code and script data.
Handle<SharedFunctionInfo> shared = info->shared_info();
- Handle<String> name(String::cast(shared->name()));
-
- int start_position = shared->start_position();
- int end_position = shared->end_position();
- bool is_expression = shared->is_expression();
- Counters::total_compile_size.Increment(end_position - start_position);
+ int compiled_size = shared->end_position() - shared->start_position();
+ Counters::total_compile_size.Increment(compiled_size);
// Generate the AST for the lazily compiled function. The AST may be
// NULL in case of parser stack overflow.
- FunctionLiteral* lit = MakeLazyAST(info->script(),
- name,
- start_position,
- end_position,
- is_expression);
+ FunctionLiteral* lit = MakeLazyAST(shared);
// Check for parse errors.
if (lit == NULL) {
@@ -414,9 +406,9 @@ bool Compiler::CompileLazy(CompilationInfo* info) {
}
RecordFunctionCompilation(Logger::LAZY_COMPILE_TAG,
- name,
+ Handle<String>(String::cast(shared->name())),
Lasse Reichstein 2010/09/30 09:11:41 Not your code, but how do we know that shared->nam
Kevin Millikin (Chromium) 2010/09/30 09:39:48 I actually think name should *be* a string so that
Handle<String>(shared->inferred_name()),
- start_position,
+ shared->start_position(),
info->script(),
code);
« no previous file with comments | « no previous file | src/parser.h » ('j') | src/parser.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698