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

Side by Side Diff: src/parser.h

Issue 9615009: Basic interface inference for modules. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Eps. Created 8 years, 9 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
« no previous file with comments | « src/messages.js ('k') | src/parser.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 550
551 // Called by ParseProgram after setting up the scanner. 551 // Called by ParseProgram after setting up the scanner.
552 FunctionLiteral* DoParseProgram(CompilationInfo* info, 552 FunctionLiteral* DoParseProgram(CompilationInfo* info,
553 Handle<String> source, 553 Handle<String> source,
554 ZoneScope* zone_scope); 554 ZoneScope* zone_scope);
555 555
556 // Report syntax error 556 // Report syntax error
557 void ReportUnexpectedToken(Token::Value token); 557 void ReportUnexpectedToken(Token::Value token);
558 void ReportInvalidPreparseData(Handle<String> name, bool* ok); 558 void ReportInvalidPreparseData(Handle<String> name, bool* ok);
559 void ReportMessage(const char* message, Vector<const char*> args); 559 void ReportMessage(const char* message, Vector<const char*> args);
560 void ReportMessage(const char* message, Vector<Handle<String> > args);
560 561
561 bool inside_with() const { return top_scope_->inside_with(); } 562 bool inside_with() const { return top_scope_->inside_with(); }
562 Scanner& scanner() { return scanner_; } 563 Scanner& scanner() { return scanner_; }
563 Mode mode() const { return mode_; } 564 Mode mode() const { return mode_; }
564 ScriptDataImpl* pre_data() const { return pre_data_; } 565 ScriptDataImpl* pre_data() const { return pre_data_; }
565 bool is_extended_mode() { 566 bool is_extended_mode() {
566 ASSERT(top_scope_ != NULL); 567 ASSERT(top_scope_ != NULL);
567 return top_scope_->is_extended_mode(); 568 return top_scope_->is_extended_mode();
568 } 569 }
569 Scope* DeclarationScope(VariableMode mode) { 570 Scope* DeclarationScope(VariableMode mode) {
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 // 758 //
758 // function f() { { { var x; } let x; } } 759 // function f() { { { var x; } let x; } }
759 // function g() { { var x; let x; } } 760 // function g() { { var x; let x; } }
760 // 761 //
761 // The var declarations are hoisted to the function scope, but originate from 762 // The var declarations are hoisted to the function scope, but originate from
762 // a scope where the name has also been let bound or the var declaration is 763 // a scope where the name has also been let bound or the var declaration is
763 // hoisted over such a scope. 764 // hoisted over such a scope.
764 void CheckConflictingVarDeclarations(Scope* scope, bool* ok); 765 void CheckConflictingVarDeclarations(Scope* scope, bool* ok);
765 766
766 // Parser support 767 // Parser support
767 VariableProxy* NewUnresolved(Handle<String> name, VariableMode mode); 768 VariableProxy* NewUnresolved(Handle<String> name,
769 VariableMode mode,
770 Interface* interface = Interface::NewValue());
768 void Declare(Declaration* declaration, bool resolve, bool* ok); 771 void Declare(Declaration* declaration, bool resolve, bool* ok);
769 772
770 bool TargetStackContainsLabel(Handle<String> label); 773 bool TargetStackContainsLabel(Handle<String> label);
771 BreakableStatement* LookupBreakTarget(Handle<String> label, bool* ok); 774 BreakableStatement* LookupBreakTarget(Handle<String> label, bool* ok);
772 IterationStatement* LookupContinueTarget(Handle<String> label, bool* ok); 775 IterationStatement* LookupContinueTarget(Handle<String> label, bool* ok);
773 776
774 void RegisterTargetUse(Label* target, Target* stop); 777 void RegisterTargetUse(Label* target, Target* stop);
775 778
776 // Factory methods. 779 // Factory methods.
777 780
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 private: 865 private:
863 static const int kTypeSlot = 0; 866 static const int kTypeSlot = 0;
864 static const int kElementsSlot = 1; 867 static const int kElementsSlot = 1;
865 868
866 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 869 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
867 }; 870 };
868 871
869 } } // namespace v8::internal 872 } } // namespace v8::internal
870 873
871 #endif // V8_PARSER_H_ 874 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « src/messages.js ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698