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/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 Loading... |
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 Loading... |
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 |
OLD | NEW |