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 739 matching lines...) Loading... |
750 AstNodeFactory<AstConstructionVisitor>* factory) { | 750 AstNodeFactory<AstConstructionVisitor>* factory) { |
751 const AstRawString* symbol = GetSymbol(scanner); | 751 const AstRawString* symbol = GetSymbol(scanner); |
752 if (parser_->fni_ != NULL) parser_->fni_->PushLiteralName(symbol); | 752 if (parser_->fni_ != NULL) parser_->fni_->PushLiteralName(symbol); |
753 return factory->NewStringLiteral(symbol, pos); | 753 return factory->NewStringLiteral(symbol, pos); |
754 } | 754 } |
755 | 755 |
756 | 756 |
757 Expression* ParserTraits::GetIterator( | 757 Expression* ParserTraits::GetIterator( |
758 Expression* iterable, AstNodeFactory<AstConstructionVisitor>* factory) { | 758 Expression* iterable, AstNodeFactory<AstConstructionVisitor>* factory) { |
759 Expression* iterator_symbol_literal = | 759 Expression* iterator_symbol_literal = |
760 factory->NewSymbolLiteral("symbolIterator", RelocInfo::kNoPosition); | 760 factory->NewSymbolLiteral("iterator_symbol", RelocInfo::kNoPosition); |
761 int pos = iterable->position(); | 761 int pos = iterable->position(); |
762 Expression* prop = | 762 Expression* prop = |
763 factory->NewProperty(iterable, iterator_symbol_literal, pos); | 763 factory->NewProperty(iterable, iterator_symbol_literal, pos); |
764 Zone* zone = parser_->zone(); | 764 Zone* zone = parser_->zone(); |
765 ZoneList<Expression*>* args = new (zone) ZoneList<Expression*>(0, zone); | 765 ZoneList<Expression*>* args = new (zone) ZoneList<Expression*>(0, zone); |
766 return factory->NewCall(prop, args, pos); | 766 return factory->NewCall(prop, args, pos); |
767 } | 767 } |
768 | 768 |
769 | 769 |
770 Literal* ParserTraits::GetLiteralTheHole( | 770 Literal* ParserTraits::GetLiteralTheHole( |
(...skipping 4248 matching lines...) Loading... |
5019 | 5019 |
5020 // We cannot internalize on a background thread; a foreground task will take | 5020 // We cannot internalize on a background thread; a foreground task will take |
5021 // care of calling Parser::Internalize just before compilation. | 5021 // care of calling Parser::Internalize just before compilation. |
5022 | 5022 |
5023 if (compile_options() == ScriptCompiler::kProduceParserCache) { | 5023 if (compile_options() == ScriptCompiler::kProduceParserCache) { |
5024 if (result != NULL) *info_->cached_data() = recorder.GetScriptData(); | 5024 if (result != NULL) *info_->cached_data() = recorder.GetScriptData(); |
5025 log_ = NULL; | 5025 log_ = NULL; |
5026 } | 5026 } |
5027 } | 5027 } |
5028 } } // namespace v8::internal | 5028 } } // namespace v8::internal |
OLD | NEW |