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

Side by Side Diff: src/parsing/parser.cc

Issue 2577063002: Reland of "Store SharedFunctionInfos of a Script in a FixedArray indexed by their ID" (Closed)
Patch Set: fix Created 4 years 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 unified diff | Download patch
« no previous file with comments | « src/parsing/parse-info.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/parsing/parser.h" 5 #include "src/parsing/parser.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/ast/ast-expression-rewriter.h" 10 #include "src/ast/ast-expression-rewriter.h"
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 802
803 if (ok) { 803 if (ok) {
804 RewriteDestructuringAssignments(); 804 RewriteDestructuringAssignments();
805 int parameter_count = parsing_module_ ? 1 : 0; 805 int parameter_count = parsing_module_ ? 1 : 0;
806 result = factory()->NewScriptOrEvalFunctionLiteral( 806 result = factory()->NewScriptOrEvalFunctionLiteral(
807 scope, body, function_state.materialized_literal_count(), 807 scope, body, function_state.materialized_literal_count(),
808 function_state.expected_property_count(), parameter_count); 808 function_state.expected_property_count(), parameter_count);
809 } 809 }
810 } 810 }
811 811
812 info->set_max_function_literal_id(GetLastFunctionLiteralId());
813
812 // Make sure the target stack is empty. 814 // Make sure the target stack is empty.
813 DCHECK(target_stack_ == NULL); 815 DCHECK(target_stack_ == NULL);
814 816
815 return result; 817 return result;
816 } 818 }
817 819
818 FunctionLiteral* Parser::ParseFunction(Isolate* isolate, ParseInfo* info) { 820 FunctionLiteral* Parser::ParseFunction(Isolate* isolate, ParseInfo* info) {
819 // It's OK to use the Isolate & counters here, since this function is only 821 // It's OK to use the Isolate & counters here, since this function is only
820 // called in the main thread. 822 // called in the main thread.
821 DCHECK(parsing_on_main_thread_); 823 DCHECK(parsing_on_main_thread_);
(...skipping 4605 matching lines...) Expand 10 before | Expand all | Expand 10 after
5427 5429
5428 return final_loop; 5430 return final_loop;
5429 } 5431 }
5430 5432
5431 #undef CHECK_OK 5433 #undef CHECK_OK
5432 #undef CHECK_OK_VOID 5434 #undef CHECK_OK_VOID
5433 #undef CHECK_FAILED 5435 #undef CHECK_FAILED
5434 5436
5435 } // namespace internal 5437 } // namespace internal
5436 } // namespace v8 5438 } // namespace v8
OLDNEW
« no previous file with comments | « src/parsing/parse-info.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698