OLD | NEW |
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 Loading... |
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 |
| 294 bool HasDuplicateParameterName(); |
| 295 bool HasEvalOrArgumentsParameter(); |
| 296 |
| 297 // --------------------------------------------------------------------------- |
292 // Debugging. | 298 // Debugging. |
293 | 299 |
294 #ifdef DEBUG | 300 #ifdef DEBUG |
295 void Print(int n = 0); // n = indentation; n < 0 => don't print recursively | 301 void Print(int n = 0); // n = indentation; n < 0 => don't print recursively |
296 #endif | 302 #endif |
297 | 303 |
298 // --------------------------------------------------------------------------- | 304 // --------------------------------------------------------------------------- |
299 // Implementation. | 305 // Implementation. |
300 protected: | 306 protected: |
301 friend class ParserFactory; | 307 friend class ParserFactory; |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 int nesting_level_; | 441 int nesting_level_; |
436 // Nesting level of outermost scope that is contained in a with statement, | 442 // 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. | 443 // or kNotInsideWith if there are no with's around the current scope. |
438 int inside_with_level_; | 444 int inside_with_level_; |
439 }; | 445 }; |
440 | 446 |
441 | 447 |
442 } } // namespace v8::internal | 448 } } // namespace v8::internal |
443 | 449 |
444 #endif // V8_SCOPES_H_ | 450 #endif // V8_SCOPES_H_ |
OLD | NEW |