Chromium Code Reviews| 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); |