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

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

Issue 2547483002: Store SharedFunctionInfos of a Script in a FixedArray indexed by their ID (Closed)
Patch Set: 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
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 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 831
832 if (ok) { 832 if (ok) {
833 RewriteDestructuringAssignments(); 833 RewriteDestructuringAssignments();
834 int parameter_count = parsing_module_ ? 1 : 0; 834 int parameter_count = parsing_module_ ? 1 : 0;
835 result = factory()->NewScriptOrEvalFunctionLiteral( 835 result = factory()->NewScriptOrEvalFunctionLiteral(
836 scope, body, function_state.materialized_literal_count(), 836 scope, body, function_state.materialized_literal_count(),
837 function_state.expected_property_count(), parameter_count); 837 function_state.expected_property_count(), parameter_count);
838 } 838 }
839 } 839 }
840 840
841 info->set_max_function_literal_id(GetLastFunctionLiteralId());
842
841 // Make sure the target stack is empty. 843 // Make sure the target stack is empty.
842 DCHECK(target_stack_ == NULL); 844 DCHECK(target_stack_ == NULL);
843 845
844 return result; 846 return result;
845 } 847 }
846 848
847 FunctionLiteral* Parser::ParseFunction(Isolate* isolate, ParseInfo* info) { 849 FunctionLiteral* Parser::ParseFunction(Isolate* isolate, ParseInfo* info) {
848 // It's OK to use the Isolate & counters here, since this function is only 850 // It's OK to use the Isolate & counters here, since this function is only
849 // called in the main thread. 851 // called in the main thread.
850 DCHECK(parsing_on_main_thread_); 852 DCHECK(parsing_on_main_thread_);
(...skipping 4614 matching lines...) Expand 10 before | Expand all | Expand 10 after
5465 5467
5466 return final_loop; 5468 return final_loop;
5467 } 5469 }
5468 5470
5469 #undef CHECK_OK 5471 #undef CHECK_OK
5470 #undef CHECK_OK_VOID 5472 #undef CHECK_OK_VOID
5471 #undef CHECK_FAILED 5473 #undef CHECK_FAILED
5472 5474
5473 } // namespace internal 5475 } // namespace internal
5474 } // namespace v8 5476 } // namespace v8
OLDNEW
« src/debug/liveedit.js ('K') | « 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