OLD | NEW |
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 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 | 804 |
805 if (ok) { | 805 if (ok) { |
806 RewriteDestructuringAssignments(); | 806 RewriteDestructuringAssignments(); |
807 int parameter_count = parsing_module_ ? 1 : 0; | 807 int parameter_count = parsing_module_ ? 1 : 0; |
808 result = factory()->NewScriptOrEvalFunctionLiteral( | 808 result = factory()->NewScriptOrEvalFunctionLiteral( |
809 scope, body, function_state.materialized_literal_count(), | 809 scope, body, function_state.materialized_literal_count(), |
810 function_state.expected_property_count(), parameter_count); | 810 function_state.expected_property_count(), parameter_count); |
811 } | 811 } |
812 } | 812 } |
813 | 813 |
| 814 info->set_max_function_literal_id(GetLastFunctionLiteralId()); |
| 815 |
814 // Make sure the target stack is empty. | 816 // Make sure the target stack is empty. |
815 DCHECK(target_stack_ == NULL); | 817 DCHECK(target_stack_ == NULL); |
816 | 818 |
817 return result; | 819 return result; |
818 } | 820 } |
819 | 821 |
820 FunctionLiteral* Parser::ParseFunction(Isolate* isolate, ParseInfo* info) { | 822 FunctionLiteral* Parser::ParseFunction(Isolate* isolate, ParseInfo* info) { |
821 // It's OK to use the Isolate & counters here, since this function is only | 823 // It's OK to use the Isolate & counters here, since this function is only |
822 // called in the main thread. | 824 // called in the main thread. |
823 DCHECK(parsing_on_main_thread_); | 825 DCHECK(parsing_on_main_thread_); |
(...skipping 4622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5446 | 5448 |
5447 return final_loop; | 5449 return final_loop; |
5448 } | 5450 } |
5449 | 5451 |
5450 #undef CHECK_OK | 5452 #undef CHECK_OK |
5451 #undef CHECK_OK_VOID | 5453 #undef CHECK_OK_VOID |
5452 #undef CHECK_FAILED | 5454 #undef CHECK_FAILED |
5453 | 5455 |
5454 } // namespace internal | 5456 } // namespace internal |
5455 } // namespace v8 | 5457 } // namespace v8 |
OLD | NEW |