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

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: 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
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.
656 void MarkAsUsedAsLValue(Expression* expression);
657
654 // Strict mode validation of LValue expressions 658 // Strict mode validation of LValue expressions
655 void CheckStrictModeLValue(Expression* expression, 659 void CheckStrictModeLValue(Expression* expression,
656 const char* error, 660 const char* error,
657 bool* ok); 661 bool* ok);
658 662
659 // Strict mode octal literal validation. 663 // Strict mode octal literal validation.
660 void CheckOctalLiteral(int beg_pos, int end_pos, bool* ok); 664 void CheckOctalLiteral(int beg_pos, int end_pos, bool* ok);
661 665
662 // For harmony block scoping mode: Check if the scope has conflicting var/let 666 // For harmony block scoping mode: Check if the scope has conflicting var/let
663 // declarations from different scopes. It covers for example 667 // declarations from different scopes. It covers for example
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 private: 785 private:
782 static const int kTypeSlot = 0; 786 static const int kTypeSlot = 0;
783 static const int kElementsSlot = 1; 787 static const int kElementsSlot = 1;
784 788
785 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 789 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
786 }; 790 };
787 791
788 } } // namespace v8::internal 792 } } // namespace v8::internal
789 793
790 #endif // V8_PARSER_H_ 794 #endif // V8_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698