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/scopes.h

Issue 7992005: Block scoped const variables. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. Created 9 years, 2 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
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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // Lookup a variable in this scope. Returns the variable or NULL if not found. 124 // Lookup a variable in this scope. Returns the variable or NULL if not found.
125 Variable* LocalLookup(Handle<String> name); 125 Variable* LocalLookup(Handle<String> name);
126 126
127 // Lookup a variable in this scope or outer scopes. 127 // Lookup a variable in this scope or outer scopes.
128 // Returns the variable or NULL if not found. 128 // Returns the variable or NULL if not found.
129 Variable* Lookup(Handle<String> name); 129 Variable* Lookup(Handle<String> name);
130 130
131 // Declare the function variable for a function literal. This variable 131 // Declare the function variable for a function literal. This variable
132 // is in an intermediate scope between this function scope and the the 132 // is in an intermediate scope between this function scope and the the
133 // outer scope. Only possible for function scopes; at most one variable. 133 // outer scope. Only possible for function scopes; at most one variable.
134 Variable* DeclareFunctionVar(Handle<String> name); 134 Variable* DeclareFunctionVar(Handle<String> name, VariableMode mode);
135 135
136 // Declare a parameter in this scope. When there are duplicated 136 // Declare a parameter in this scope. When there are duplicated
137 // parameters the rightmost one 'wins'. However, the implementation 137 // parameters the rightmost one 'wins'. However, the implementation
138 // expects all parameters to be declared and from left to right. 138 // expects all parameters to be declared and from left to right.
139 void DeclareParameter(Handle<String> name, VariableMode mode); 139 void DeclareParameter(Handle<String> name, VariableMode mode);
140 140
141 // Declare a local variable in this scope. If the variable has been 141 // Declare a local variable in this scope. If the variable has been
142 // declared before, the previously declared variable is returned. 142 // declared before, the previously declared variable is returned.
143 Variable* DeclareLocal(Handle<String> name, VariableMode mode); 143 Variable* DeclareLocal(Handle<String> name, VariableMode mode);
144 144
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 } 502 }
503 503
504 void SetDefaults(Type type, 504 void SetDefaults(Type type,
505 Scope* outer_scope, 505 Scope* outer_scope,
506 Handle<SerializedScopeInfo> scope_info); 506 Handle<SerializedScopeInfo> scope_info);
507 }; 507 };
508 508
509 } } // namespace v8::internal 509 } } // namespace v8::internal
510 510
511 #endif // V8_SCOPES_H_ 511 #endif // V8_SCOPES_H_
OLDNEW
« src/parser.cc ('K') | « src/scopeinfo.cc ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698