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

Side by Side Diff: src/scopes.h

Issue 7992005: Block scoped const variables. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comments, function variable mode, preparser. Created 9 years, 1 month 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/scopeinfo.cc ('k') | src/scopes.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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // Lookup a variable in this scope. Returns the variable or NULL if not found. 115 // Lookup a variable in this scope. Returns the variable or NULL if not found.
116 Variable* LocalLookup(Handle<String> name); 116 Variable* LocalLookup(Handle<String> name);
117 117
118 // Lookup a variable in this scope or outer scopes. 118 // Lookup a variable in this scope or outer scopes.
119 // Returns the variable or NULL if not found. 119 // Returns the variable or NULL if not found.
120 Variable* Lookup(Handle<String> name); 120 Variable* Lookup(Handle<String> name);
121 121
122 // Declare the function variable for a function literal. This variable 122 // Declare the function variable for a function literal. This variable
123 // is in an intermediate scope between this function scope and the the 123 // is in an intermediate scope between this function scope and the the
124 // outer scope. Only possible for function scopes; at most one variable. 124 // outer scope. Only possible for function scopes; at most one variable.
125 Variable* DeclareFunctionVar(Handle<String> name); 125 Variable* DeclareFunctionVar(Handle<String> name, VariableMode mode);
126 126
127 // Declare a parameter in this scope. When there are duplicated 127 // Declare a parameter in this scope. When there are duplicated
128 // parameters the rightmost one 'wins'. However, the implementation 128 // parameters the rightmost one 'wins'. However, the implementation
129 // expects all parameters to be declared and from left to right. 129 // expects all parameters to be declared and from left to right.
130 void DeclareParameter(Handle<String> name, VariableMode mode); 130 void DeclareParameter(Handle<String> name, VariableMode mode);
131 131
132 // Declare a local variable in this scope. If the variable has been 132 // Declare a local variable in this scope. If the variable has been
133 // declared before, the previously declared variable is returned. 133 // declared before, the previously declared variable is returned.
134 Variable* DeclareLocal(Handle<String> name, VariableMode mode); 134 Variable* DeclareLocal(Handle<String> name, VariableMode mode);
135 135
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 } 541 }
542 542
543 void SetDefaults(ScopeType type, 543 void SetDefaults(ScopeType type,
544 Scope* outer_scope, 544 Scope* outer_scope,
545 Handle<SerializedScopeInfo> scope_info); 545 Handle<SerializedScopeInfo> scope_info);
546 }; 546 };
547 547
548 } } // namespace v8::internal 548 } } // namespace v8::internal
549 549
550 #endif // V8_SCOPES_H_ 550 #endif // V8_SCOPES_H_
OLDNEW
« no previous file with comments | « src/scopeinfo.cc ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698