| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 // Strict mode support. | 292 // Strict mode support. |
| 293 bool IsDeclared(Handle<String> name) { | 293 bool IsDeclared(Handle<String> name) { |
| 294 // During formal parameter list parsing the scope only contains | 294 // During formal parameter list parsing the scope only contains |
| 295 // two variables inserted at initialization: "this" and "arguments". | 295 // two variables inserted at initialization: "this" and "arguments". |
| 296 // "this" is an invalid parameter name and "arguments" is invalid parameter | 296 // "this" is an invalid parameter name and "arguments" is invalid parameter |
| 297 // name in strict mode. Therefore looking up with the map which includes | 297 // name in strict mode. Therefore looking up with the map which includes |
| 298 // "this" and "arguments" in addition to all formal parameters is safe. | 298 // "this" and "arguments" in addition to all formal parameters is safe. |
| 299 return variables_.Lookup(name) != NULL; | 299 return variables_.Lookup(name) != NULL; |
| 300 } | 300 } |
| 301 | 301 |
| 302 void SetAttributesConst(); |
| 303 |
| 302 // --------------------------------------------------------------------------- | 304 // --------------------------------------------------------------------------- |
| 303 // Debugging. | 305 // Debugging. |
| 304 | 306 |
| 305 #ifdef DEBUG | 307 #ifdef DEBUG |
| 306 void Print(int n = 0); // n = indentation; n < 0 => don't print recursively | 308 void Print(int n = 0); // n = indentation; n < 0 => don't print recursively |
| 307 #endif | 309 #endif |
| 308 | 310 |
| 309 // --------------------------------------------------------------------------- | 311 // --------------------------------------------------------------------------- |
| 310 // Implementation. | 312 // Implementation. |
| 311 protected: | 313 protected: |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 int nesting_level_; | 487 int nesting_level_; |
| 486 // Nesting level of outermost scope that is contained in a with statement, | 488 // Nesting level of outermost scope that is contained in a with statement, |
| 487 // or kNotInsideWith if there are no with's around the current scope. | 489 // or kNotInsideWith if there are no with's around the current scope. |
| 488 int inside_with_level_; | 490 int inside_with_level_; |
| 489 }; | 491 }; |
| 490 | 492 |
| 491 | 493 |
| 492 } } // namespace v8::internal | 494 } } // namespace v8::internal |
| 493 | 495 |
| 494 #endif // V8_SCOPES_H_ | 496 #endif // V8_SCOPES_H_ |
| OLD | NEW |