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

Side by Side Diff: src/parser.h

Issue 9703021: Fix declarations escaping global strict eval. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Andreas Rossberg. 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 | « 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 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 } 573 }
574 574
575 // Check if the given string is 'eval' or 'arguments'. 575 // Check if the given string is 'eval' or 'arguments'.
576 bool IsEvalOrArguments(Handle<String> string); 576 bool IsEvalOrArguments(Handle<String> string);
577 577
578 // All ParseXXX functions take as the last argument an *ok parameter 578 // All ParseXXX functions take as the last argument an *ok parameter
579 // which is set to false if parsing failed; it is unchanged otherwise. 579 // which is set to false if parsing failed; it is unchanged otherwise.
580 // By making the 'exception handling' explicit, we are forced to check 580 // By making the 'exception handling' explicit, we are forced to check
581 // for failure at the call sites. 581 // for failure at the call sites.
582 void* ParseSourceElements(ZoneList<Statement*>* processor, 582 void* ParseSourceElements(ZoneList<Statement*>* processor,
583 int end_token, bool* ok); 583 int end_token, bool is_eval, bool* ok);
584 Statement* ParseModuleElement(ZoneStringList* labels, bool* ok); 584 Statement* ParseModuleElement(ZoneStringList* labels, bool* ok);
585 Block* ParseModuleDeclaration(ZoneStringList* names, bool* ok); 585 Block* ParseModuleDeclaration(ZoneStringList* names, bool* ok);
586 Module* ParseModule(bool* ok); 586 Module* ParseModule(bool* ok);
587 Module* ParseModuleLiteral(bool* ok); 587 Module* ParseModuleLiteral(bool* ok);
588 Module* ParseModulePath(bool* ok); 588 Module* ParseModulePath(bool* ok);
589 Module* ParseModuleVariable(bool* ok); 589 Module* ParseModuleVariable(bool* ok);
590 Module* ParseModuleUrl(bool* ok); 590 Module* ParseModuleUrl(bool* ok);
591 Module* ParseModuleSpecifier(bool* ok); 591 Module* ParseModuleSpecifier(bool* ok);
592 Block* ParseImportDeclaration(bool* ok); 592 Block* ParseImportDeclaration(bool* ok);
593 Statement* ParseExportDeclaration(bool* ok); 593 Statement* ParseExportDeclaration(bool* ok);
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 private: 865 private:
866 static const int kTypeSlot = 0; 866 static const int kTypeSlot = 0;
867 static const int kElementsSlot = 1; 867 static const int kElementsSlot = 1;
868 868
869 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 869 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
870 }; 870 };
871 871
872 } } // namespace v8::internal 872 } } // namespace v8::internal
873 873
874 #endif // V8_PARSER_H_ 874 #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