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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 DeclarationScope* scope = this->scope()->AsDeclarationScope(); | 208 DeclarationScope* scope = this->scope()->AsDeclarationScope(); |
209 DCHECK(scope->is_function_scope()); | 209 DCHECK(scope->is_function_scope()); |
210 log_->LogFunction(body_start, body_end, | 210 log_->LogFunction(body_start, body_end, |
211 function_state_->materialized_literal_count(), | 211 function_state_->materialized_literal_count(), |
212 function_state_->expected_property_count(), language_mode(), | 212 function_state_->expected_property_count(), language_mode(), |
213 scope->uses_super_property(), scope->calls_eval()); | 213 scope->uses_super_property(), scope->calls_eval()); |
214 return kLazyParsingComplete; | 214 return kLazyParsingComplete; |
215 } | 215 } |
216 | 216 |
217 PreParserExpression PreParser::ExpressionFromIdentifier( | 217 PreParserExpression PreParser::ExpressionFromIdentifier( |
218 PreParserIdentifier name, int start_position, int end_position, | 218 PreParserIdentifier name, int start_position, InferName infer) { |
219 InferName infer) { | |
220 if (track_unresolved_variables_) { | 219 if (track_unresolved_variables_) { |
221 AstNodeFactory factory(ast_value_factory()); | 220 AstNodeFactory factory(ast_value_factory()); |
222 // Setting the Zone is necessary because zone_ might be the temp Zone, and | 221 // Setting the Zone is necessary because zone_ might be the temp Zone, and |
223 // AstValueFactory doesn't know about it. | 222 // AstValueFactory doesn't know about it. |
224 factory.set_zone(zone()); | 223 factory.set_zone(zone()); |
225 DCHECK_NOT_NULL(name.string_); | 224 DCHECK_NOT_NULL(name.string_); |
226 scope()->NewUnresolved(&factory, name.string_, start_position, end_position, | 225 scope()->NewUnresolved(&factory, name.string_, start_position, |
227 NORMAL_VARIABLE); | 226 NORMAL_VARIABLE); |
228 } | 227 } |
229 return PreParserExpression::FromIdentifier(name, zone()); | 228 return PreParserExpression::FromIdentifier(name, zone()); |
230 } | 229 } |
231 | 230 |
232 void PreParser::DeclareAndInitializeVariables( | 231 void PreParser::DeclareAndInitializeVariables( |
233 PreParserStatement block, | 232 PreParserStatement block, |
234 const DeclarationDescriptor* declaration_descriptor, | 233 const DeclarationDescriptor* declaration_descriptor, |
235 const DeclarationParsingResult::Declaration* declaration, | 234 const DeclarationParsingResult::Declaration* declaration, |
236 ZoneList<const AstRawString*>* names, bool* ok) { | 235 ZoneList<const AstRawString*>* names, bool* ok) { |
(...skipping 17 matching lines...) Expand all Loading... |
254 } | 253 } |
255 } | 254 } |
256 } | 255 } |
257 | 256 |
258 #undef CHECK_OK | 257 #undef CHECK_OK |
259 #undef CHECK_OK_CUSTOM | 258 #undef CHECK_OK_CUSTOM |
260 | 259 |
261 | 260 |
262 } // namespace internal | 261 } // namespace internal |
263 } // namespace v8 | 262 } // namespace v8 |
OLD | NEW |