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

Side by Side Diff: src/scopes.h

Issue 6144005: Early draft of strict mode (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: More CR feedback. Created 9 years, 11 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
« src/parser.cc ('K') | « src/parser.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 // Determine if we can use lazy compilation for this scope. 282 // Determine if we can use lazy compilation for this scope.
283 bool AllowsLazyCompilation() const; 283 bool AllowsLazyCompilation() const;
284 284
285 // True if the outer context of this scope is always the global context. 285 // True if the outer context of this scope is always the global context.
286 virtual bool HasTrivialOuterContext() const; 286 virtual bool HasTrivialOuterContext() const;
287 287
288 // The number of contexts between this and scope; zero if this == scope. 288 // The number of contexts between this and scope; zero if this == scope.
289 int ContextChainLength(Scope* scope); 289 int ContextChainLength(Scope* scope);
290 290
291 // --------------------------------------------------------------------------- 291 // ---------------------------------------------------------------------------
292 // Strict mode support.
293 bool IsParameterDeclared(Handle<String> name);
294
295 // ---------------------------------------------------------------------------
292 // Debugging. 296 // Debugging.
293 297
294 #ifdef DEBUG 298 #ifdef DEBUG
295 void Print(int n = 0); // n = indentation; n < 0 => don't print recursively 299 void Print(int n = 0); // n = indentation; n < 0 => don't print recursively
296 #endif 300 #endif
297 301
298 // --------------------------------------------------------------------------- 302 // ---------------------------------------------------------------------------
299 // Implementation. 303 // Implementation.
300 protected: 304 protected:
301 friend class ParserFactory; 305 friend class ParserFactory;
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 int nesting_level_; 439 int nesting_level_;
436 // Nesting level of outermost scope that is contained in a with statement, 440 // Nesting level of outermost scope that is contained in a with statement,
437 // or kNotInsideWith if there are no with's around the current scope. 441 // or kNotInsideWith if there are no with's around the current scope.
438 int inside_with_level_; 442 int inside_with_level_;
439 }; 443 };
440 444
441 445
442 } } // namespace v8::internal 446 } } // namespace v8::internal
443 447
444 #endif // V8_SCOPES_H_ 448 #endif // V8_SCOPES_H_
OLDNEW
« src/parser.cc ('K') | « src/parser.cc ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698