| OLD | NEW | 
|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 182   // may have been added optimistically, but then only the variable name | 182   // may have been added optimistically, but then only the variable name | 
| 183   // was used (typically for labels). If the variable was not declared, the | 183   // was used (typically for labels). If the variable was not declared, the | 
| 184   // addition introduced a new unresolved variable which may end up being | 184   // addition introduced a new unresolved variable which may end up being | 
| 185   // allocated globally as a "ghost" variable. RemoveUnresolved removes | 185   // allocated globally as a "ghost" variable. RemoveUnresolved removes | 
| 186   // such a variable again if it was added; otherwise this is a no-op. | 186   // such a variable again if it was added; otherwise this is a no-op. | 
| 187   void RemoveUnresolved(VariableProxy* var); | 187   void RemoveUnresolved(VariableProxy* var); | 
| 188 | 188 | 
| 189   // Creates a new temporary variable in this scope.  The name is only used | 189   // Creates a new temporary variable in this scope.  The name is only used | 
| 190   // for printing and cannot be used to find the variable.  In particular, | 190   // for printing and cannot be used to find the variable.  In particular, | 
| 191   // the only way to get hold of the temporary is by keeping the Variable* | 191   // the only way to get hold of the temporary is by keeping the Variable* | 
| 192   // around. | 192   // around.  The name should not clash with a legitimate variable names. | 
| 193   Variable* NewTemporary(Handle<String> name); | 193   Variable* NewTemporary(Handle<String> name); | 
| 194 | 194 | 
| 195   // Adds the specific declaration node to the list of declarations in | 195   // Adds the specific declaration node to the list of declarations in | 
| 196   // this scope. The declarations are processed as part of entering | 196   // this scope. The declarations are processed as part of entering | 
| 197   // the scope; see codegen.cc:ProcessDeclarations. | 197   // the scope; see codegen.cc:ProcessDeclarations. | 
| 198   void AddDeclaration(Declaration* declaration); | 198   void AddDeclaration(Declaration* declaration); | 
| 199 | 199 | 
| 200   // --------------------------------------------------------------------------- | 200   // --------------------------------------------------------------------------- | 
| 201   // Illegal redeclaration support. | 201   // Illegal redeclaration support. | 
| 202 | 202 | 
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 616   void SetDefaults(ScopeType type, | 616   void SetDefaults(ScopeType type, | 
| 617                    Scope* outer_scope, | 617                    Scope* outer_scope, | 
| 618                    Handle<ScopeInfo> scope_info); | 618                    Handle<ScopeInfo> scope_info); | 
| 619 | 619 | 
| 620   Zone* zone_; | 620   Zone* zone_; | 
| 621 }; | 621 }; | 
| 622 | 622 | 
| 623 } }  // namespace v8::internal | 623 } }  // namespace v8::internal | 
| 624 | 624 | 
| 625 #endif  // V8_SCOPES_H_ | 625 #endif  // V8_SCOPES_H_ | 
| OLD | NEW | 
|---|