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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/api.h" | 7 #include "src/api.h" |
8 #include "src/ast.h" | 8 #include "src/ast.h" |
9 #include "src/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 | 375 |
376 #define CHECK_FAILED /**/); \ | 376 #define CHECK_FAILED /**/); \ |
377 if (failed_) return NULL; \ | 377 if (failed_) return NULL; \ |
378 ((void)0 | 378 ((void)0 |
379 #define DUMMY ) // to make indentation work | 379 #define DUMMY ) // to make indentation work |
380 #undef DUMMY | 380 #undef DUMMY |
381 | 381 |
382 // ---------------------------------------------------------------------------- | 382 // ---------------------------------------------------------------------------- |
383 // Implementation of Parser | 383 // Implementation of Parser |
384 | 384 |
385 bool ParserTraits::IsEvalOrArguments(const AstRawString* identifier) const { | 385 bool ParserTraits::IsEval(const AstRawString* identifier) const { |
386 return identifier == parser_->ast_value_factory()->eval_string() || | 386 return identifier == parser_->ast_value_factory()->eval_string(); |
387 identifier == parser_->ast_value_factory()->arguments_string(); | |
388 } | 387 } |
389 | 388 |
390 | 389 |
| 390 bool ParserTraits::IsArguments(const AstRawString* identifier) const { |
| 391 return identifier == parser_->ast_value_factory()->arguments_string(); |
| 392 } |
| 393 |
| 394 |
| 395 bool ParserTraits::IsEvalOrArguments(const AstRawString* identifier) const { |
| 396 return IsEval(identifier) || IsArguments(identifier); |
| 397 } |
| 398 |
| 399 |
391 bool ParserTraits::IsPrototype(const AstRawString* identifier) const { | 400 bool ParserTraits::IsPrototype(const AstRawString* identifier) const { |
392 return identifier == parser_->ast_value_factory()->prototype_string(); | 401 return identifier == parser_->ast_value_factory()->prototype_string(); |
393 } | 402 } |
394 | 403 |
395 | 404 |
396 bool ParserTraits::IsConstructor(const AstRawString* identifier) const { | 405 bool ParserTraits::IsConstructor(const AstRawString* identifier) const { |
397 return identifier == parser_->ast_value_factory()->constructor_string(); | 406 return identifier == parser_->ast_value_factory()->constructor_string(); |
398 } | 407 } |
399 | 408 |
400 | 409 |
(...skipping 5039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5440 } else { | 5449 } else { |
5441 const uc16* data = reinterpret_cast<const uc16*>(raw_string->raw_data()); | 5450 const uc16* data = reinterpret_cast<const uc16*>(raw_string->raw_data()); |
5442 running_hash = StringHasher::ComputeRunningHash(running_hash, data, | 5451 running_hash = StringHasher::ComputeRunningHash(running_hash, data, |
5443 raw_string->length()); | 5452 raw_string->length()); |
5444 } | 5453 } |
5445 } | 5454 } |
5446 | 5455 |
5447 return running_hash; | 5456 return running_hash; |
5448 } | 5457 } |
5449 } } // namespace v8::internal | 5458 } } // namespace v8::internal |
OLD | NEW |