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

Side by Side Diff: src/parsing/parser.cc

Issue 1916393002: Refactoring to use ArrayVector where applicable (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@wasm-offset-table-2
Patch Set: also refactor src/builtins.cc Created 4 years, 7 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/crankshaft/hydrogen.cc ('k') | test/cctest/test-cpu-profiler.cc » ('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/parsing/parser.h" 5 #include "src/parsing/parser.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/ast-expression-rewriter.h" 9 #include "src/ast/ast-expression-rewriter.h"
10 #include "src/ast/ast-expression-visitor.h" 10 #include "src/ast/ast-expression-visitor.h"
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 const AstRawString* result = 595 const AstRawString* result =
596 parser_->scanner()->CurrentSymbol(parser_->ast_value_factory()); 596 parser_->scanner()->CurrentSymbol(parser_->ast_value_factory());
597 DCHECK(result != NULL); 597 DCHECK(result != NULL);
598 return result; 598 return result;
599 } 599 }
600 600
601 601
602 const AstRawString* ParserTraits::GetNumberAsSymbol(Scanner* scanner) { 602 const AstRawString* ParserTraits::GetNumberAsSymbol(Scanner* scanner) {
603 double double_value = parser_->scanner()->DoubleValue(); 603 double double_value = parser_->scanner()->DoubleValue();
604 char array[100]; 604 char array[100];
605 const char* string = 605 const char* string = DoubleToCString(double_value, ArrayVector(array));
606 DoubleToCString(double_value, Vector<char>(array, arraysize(array)));
607 return parser_->ast_value_factory()->GetOneByteString(string); 606 return parser_->ast_value_factory()->GetOneByteString(string);
608 } 607 }
609 608
610 609
611 const AstRawString* ParserTraits::GetNextSymbol(Scanner* scanner) { 610 const AstRawString* ParserTraits::GetNextSymbol(Scanner* scanner) {
612 return parser_->scanner()->NextSymbol(parser_->ast_value_factory()); 611 return parser_->scanner()->NextSymbol(parser_->ast_value_factory());
613 } 612 }
614 613
615 614
616 Expression* ParserTraits::ThisExpression(Scope* scope, AstNodeFactory* factory, 615 Expression* ParserTraits::ThisExpression(Scope* scope, AstNodeFactory* factory,
(...skipping 6179 matching lines...) Expand 10 before | Expand all | Expand 10 after
6796 try_block, target); 6795 try_block, target);
6797 final_loop = target; 6796 final_loop = target;
6798 } 6797 }
6799 6798
6800 return final_loop; 6799 return final_loop;
6801 } 6800 }
6802 6801
6803 6802
6804 } // namespace internal 6803 } // namespace internal
6805 } // namespace v8 6804 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | test/cctest/test-cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698