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

Side by Side Diff: src/parser.h

Issue 152813005: Make strict more error messages about "eval" and "arguments" less specific. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Code review (ulan@) Created 6 years, 10 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 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 scanner().next_literal_utf16_string(), tenured); 680 scanner().next_literal_utf16_string(), tenured);
681 } 681 }
682 } 682 }
683 683
684 Handle<String> GetSymbol(); 684 Handle<String> GetSymbol();
685 685
686 // Get odd-ball literals. 686 // Get odd-ball literals.
687 Literal* GetLiteralUndefined(int position); 687 Literal* GetLiteralUndefined(int position);
688 Literal* GetLiteralTheHole(int position); 688 Literal* GetLiteralTheHole(int position);
689 689
690 Handle<String> ParseIdentifier(bool* ok); 690 Handle<String> ParseIdentifier(AllowEvalOrArgumentsAsIdentifier, bool* ok);
691 Handle<String> ParseIdentifierOrStrictReservedWord( 691 Handle<String> ParseIdentifierOrStrictReservedWord(
692 bool* is_strict_reserved, bool* ok); 692 bool* is_strict_reserved, bool* ok);
693 Handle<String> ParseIdentifierName(bool* ok); 693 Handle<String> ParseIdentifierName(bool* ok);
694 Handle<String> ParseIdentifierNameOrGetOrSet(bool* is_get, 694 Handle<String> ParseIdentifierNameOrGetOrSet(bool* is_get,
695 bool* is_set, 695 bool* is_set,
696 bool* ok); 696 bool* ok);
697 697
698 // Determine if the expression is a variable proxy and mark it as being used 698 // Determine if the expression is a variable proxy and mark it as being used
699 // in an assignment or with a increment/decrement operator. This is currently 699 // in an assignment or with a increment/decrement operator. This is currently
700 // used on for the statically checking assignments to harmony const bindings. 700 // used on for the statically checking assignments to harmony const bindings.
701 void MarkAsLValue(Expression* expression); 701 void MarkAsLValue(Expression* expression);
702 702
703 // Strict mode validation of LValue expressions 703 // Strict mode validation of LValue expressions
704 void CheckStrictModeLValue(Expression* expression, 704 void CheckStrictModeLValue(Expression* expression,
705 const char* error,
706 bool* ok); 705 bool* ok);
707 706
708 // For harmony block scoping mode: Check if the scope has conflicting var/let 707 // For harmony block scoping mode: Check if the scope has conflicting var/let
709 // declarations from different scopes. It covers for example 708 // declarations from different scopes. It covers for example
710 // 709 //
711 // function f() { { { var x; } let x; } } 710 // function f() { { { var x; } let x; } }
712 // function g() { { var x; let x; } } 711 // function g() { { var x; let x; } }
713 // 712 //
714 // The var declarations are hoisted to the function scope, but originate from 713 // The var declarations are hoisted to the function scope, but originate from
715 // a scope where the name has also been let bound or the var declaration is 714 // a scope where the name has also been let bound or the var declaration is
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 private: 813 private:
815 static const int kLiteralTypeSlot = 0; 814 static const int kLiteralTypeSlot = 0;
816 static const int kElementsSlot = 1; 815 static const int kElementsSlot = 1;
817 816
818 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 817 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
819 }; 818 };
820 819
821 } } // namespace v8::internal 820 } } // namespace v8::internal
822 821
823 #endif // V8_PARSER_H_ 822 #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