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

Side by Side Diff: src/parser.h

Issue 11033025: Reject local module declarations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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 | « no previous file | 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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 ? top_scope_ : top_scope_->DeclarationScope(); 583 ? top_scope_ : top_scope_->DeclarationScope();
584 } 584 }
585 585
586 // Check if the given string is 'eval' or 'arguments'. 586 // Check if the given string is 'eval' or 'arguments'.
587 bool IsEvalOrArguments(Handle<String> string); 587 bool IsEvalOrArguments(Handle<String> string);
588 588
589 // All ParseXXX functions take as the last argument an *ok parameter 589 // All ParseXXX functions take as the last argument an *ok parameter
590 // which is set to false if parsing failed; it is unchanged otherwise. 590 // which is set to false if parsing failed; it is unchanged otherwise.
591 // By making the 'exception handling' explicit, we are forced to check 591 // By making the 'exception handling' explicit, we are forced to check
592 // for failure at the call sites. 592 // for failure at the call sites.
593 void* ParseSourceElements(ZoneList<Statement*>* processor, 593 void* ParseSourceElements(ZoneList<Statement*>* processor, int end_token,
594 int end_token, bool is_eval, bool* ok); 594 bool is_eval, bool is_global, bool* ok);
595 Statement* ParseModuleElement(ZoneStringList* labels, bool* ok); 595 Statement* ParseModuleElement(ZoneStringList* labels, bool* ok);
596 Statement* ParseModuleDeclaration(ZoneStringList* names, bool* ok); 596 Statement* ParseModuleDeclaration(ZoneStringList* names, bool* ok);
597 Module* ParseModule(bool* ok); 597 Module* ParseModule(bool* ok);
598 Module* ParseModuleLiteral(bool* ok); 598 Module* ParseModuleLiteral(bool* ok);
599 Module* ParseModulePath(bool* ok); 599 Module* ParseModulePath(bool* ok);
600 Module* ParseModuleVariable(bool* ok); 600 Module* ParseModuleVariable(bool* ok);
601 Module* ParseModuleUrl(bool* ok); 601 Module* ParseModuleUrl(bool* ok);
602 Module* ParseModuleSpecifier(bool* ok); 602 Module* ParseModuleSpecifier(bool* ok);
603 Block* ParseImportDeclaration(bool* ok); 603 Block* ParseImportDeclaration(bool* ok);
604 Statement* ParseExportDeclaration(bool* ok); 604 Statement* ParseExportDeclaration(bool* ok);
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 private: 878 private:
879 static const int kTypeSlot = 0; 879 static const int kTypeSlot = 0;
880 static const int kElementsSlot = 1; 880 static const int kElementsSlot = 1;
881 881
882 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 882 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
883 }; 883 };
884 884
885 } } // namespace v8::internal 885 } } // namespace v8::internal
886 886
887 #endif // V8_PARSER_H_ 887 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698