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

Side by Side Diff: src/parser.cc

Issue 501323002: Replace our homegrown ARRAY_SIZE() with Chrome's arraysize(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
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/base/platform/platform.h" 9 #include "src/base/platform/platform.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 parser_->scanner()->CurrentSymbol(parser_->ast_value_factory_); 625 parser_->scanner()->CurrentSymbol(parser_->ast_value_factory_);
626 DCHECK(result != NULL); 626 DCHECK(result != NULL);
627 return result; 627 return result;
628 } 628 }
629 629
630 630
631 const AstRawString* ParserTraits::GetNumberAsSymbol(Scanner* scanner) { 631 const AstRawString* ParserTraits::GetNumberAsSymbol(Scanner* scanner) {
632 double double_value = parser_->scanner()->DoubleValue(); 632 double double_value = parser_->scanner()->DoubleValue();
633 char array[100]; 633 char array[100];
634 const char* string = 634 const char* string =
635 DoubleToCString(double_value, Vector<char>(array, ARRAY_SIZE(array))); 635 DoubleToCString(double_value, Vector<char>(array, arraysize(array)));
636 return ast_value_factory()->GetOneByteString(string); 636 return ast_value_factory()->GetOneByteString(string);
637 } 637 }
638 638
639 639
640 const AstRawString* ParserTraits::GetNextSymbol(Scanner* scanner) { 640 const AstRawString* ParserTraits::GetNextSymbol(Scanner* scanner) {
641 return parser_->scanner()->NextSymbol(parser_->ast_value_factory_); 641 return parser_->scanner()->NextSymbol(parser_->ast_value_factory_);
642 } 642 }
643 643
644 644
645 Expression* ParserTraits::ThisExpression( 645 Expression* ParserTraits::ThisExpression(
(...skipping 4191 matching lines...) Expand 10 before | Expand all | Expand 10 after
4837 info()->SetAstValueFactory(ast_value_factory_); 4837 info()->SetAstValueFactory(ast_value_factory_);
4838 } 4838 }
4839 ast_value_factory_ = NULL; 4839 ast_value_factory_ = NULL;
4840 4840
4841 InternalizeUseCounts(); 4841 InternalizeUseCounts();
4842 4842
4843 return (result != NULL); 4843 return (result != NULL);
4844 } 4844 }
4845 4845
4846 } } // namespace v8::internal 4846 } } // namespace v8::internal
OLDNEW
« src/base/macros.h ('K') | « src/objects.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698