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

Side by Side Diff: src/parser.h

Issue 8688007: Statically check for assignments to const in harmony mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed second round of comments. Created 9 years 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 Literal* GetLiteralNumber(double value); 644 Literal* GetLiteralNumber(double value);
645 645
646 Handle<String> ParseIdentifier(bool* ok); 646 Handle<String> ParseIdentifier(bool* ok);
647 Handle<String> ParseIdentifierOrStrictReservedWord( 647 Handle<String> ParseIdentifierOrStrictReservedWord(
648 bool* is_strict_reserved, bool* ok); 648 bool* is_strict_reserved, bool* ok);
649 Handle<String> ParseIdentifierName(bool* ok); 649 Handle<String> ParseIdentifierName(bool* ok);
650 Handle<String> ParseIdentifierNameOrGetOrSet(bool* is_get, 650 Handle<String> ParseIdentifierNameOrGetOrSet(bool* is_get,
651 bool* is_set, 651 bool* is_set,
652 bool* ok); 652 bool* ok);
653 653
654 // Determine if the expression is a variable proxy and mark it as being used
655 // in an assignment or with a increment/decrement operator. This is currently
656 // used on for the statically checking assignments to harmony const bindings.
657 void MarkAsLValue(Expression* expression);
658
654 // Strict mode validation of LValue expressions 659 // Strict mode validation of LValue expressions
655 void CheckStrictModeLValue(Expression* expression, 660 void CheckStrictModeLValue(Expression* expression,
656 const char* error, 661 const char* error,
657 bool* ok); 662 bool* ok);
658 663
659 // Strict mode octal literal validation. 664 // Strict mode octal literal validation.
660 void CheckOctalLiteral(int beg_pos, int end_pos, bool* ok); 665 void CheckOctalLiteral(int beg_pos, int end_pos, bool* ok);
661 666
662 // For harmony block scoping mode: Check if the scope has conflicting var/let 667 // For harmony block scoping mode: Check if the scope has conflicting var/let
663 // declarations from different scopes. It covers for example 668 // declarations from different scopes. It covers for example
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 private: 786 private:
782 static const int kTypeSlot = 0; 787 static const int kTypeSlot = 0;
783 static const int kElementsSlot = 1; 788 static const int kElementsSlot = 1;
784 789
785 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 790 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
786 }; 791 };
787 792
788 } } // namespace v8::internal 793 } } // namespace v8::internal
789 794
790 #endif // V8_PARSER_H_ 795 #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