OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 <cmath> | 5 #include <cmath> |
6 | 6 |
7 #include "src/allocation.h" | 7 #include "src/allocation.h" |
8 #include "src/base/logging.h" | 8 #include "src/base/logging.h" |
9 #include "src/conversions-inl.h" | 9 #include "src/conversions-inl.h" |
10 #include "src/conversions.h" | 10 #include "src/conversions.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 PreParserIdentifier PreParser::GetSymbol() const { | 76 PreParserIdentifier PreParser::GetSymbol() const { |
77 PreParserIdentifier symbol = GetSymbolHelper(scanner()); | 77 PreParserIdentifier symbol = GetSymbolHelper(scanner()); |
78 if (track_unresolved_variables_) { | 78 if (track_unresolved_variables_) { |
79 const AstRawString* result = scanner()->CurrentSymbol(ast_value_factory()); | 79 const AstRawString* result = scanner()->CurrentSymbol(ast_value_factory()); |
80 DCHECK_NOT_NULL(result); | 80 DCHECK_NOT_NULL(result); |
81 symbol.string_ = result; | 81 symbol.string_ = result; |
82 } | 82 } |
83 return symbol; | 83 return symbol; |
84 } | 84 } |
85 | 85 |
86 PreParser::PreParseResult PreParser::PreParseLazyFunction( | 86 PreParser::PreParseResult PreParser::PreParseFunction( |
87 DeclarationScope* function_scope, bool parsing_module, SingletonLogger* log, | 87 DeclarationScope* function_scope, bool parsing_module, SingletonLogger* log, |
88 bool is_inner_function, bool may_abort, int* use_counts) { | 88 bool is_inner_function, bool may_abort, int* use_counts) { |
89 DCHECK_EQ(FUNCTION_SCOPE, function_scope->scope_type()); | 89 DCHECK_EQ(FUNCTION_SCOPE, function_scope->scope_type()); |
90 parsing_module_ = parsing_module; | 90 parsing_module_ = parsing_module; |
91 log_ = log; | 91 log_ = log; |
92 use_counts_ = use_counts; | 92 use_counts_ = use_counts; |
93 DCHECK(!track_unresolved_variables_); | 93 DCHECK(!track_unresolved_variables_); |
94 track_unresolved_variables_ = is_inner_function; | 94 track_unresolved_variables_ = is_inner_function; |
95 | 95 |
96 // The caller passes the function_scope which is not yet inserted into the | 96 // The caller passes the function_scope which is not yet inserted into the |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 } | 246 } |
247 } | 247 } |
248 } | 248 } |
249 | 249 |
250 #undef CHECK_OK | 250 #undef CHECK_OK |
251 #undef CHECK_OK_CUSTOM | 251 #undef CHECK_OK_CUSTOM |
252 | 252 |
253 | 253 |
254 } // namespace internal | 254 } // namespace internal |
255 } // namespace v8 | 255 } // namespace v8 |
OLD | NEW |