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

Side by Side Diff: src/parser.cc

Issue 932333004: [strong] Deprecate arguments (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comments Created 5 years, 10 months 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
« no previous file with comments | « src/parser.h ('k') | src/preparser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
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
OLDNEW
« no previous file with comments | « src/parser.h ('k') | src/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698