OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 29 matching lines...) Expand all Loading... |
40 public: | 40 public: |
41 LocalsMap(); | 41 LocalsMap(); |
42 | 42 |
43 // Dummy constructor. This constructor doesn't set up the map | 43 // Dummy constructor. This constructor doesn't set up the map |
44 // properly so don't use it unless you have a good reason. | 44 // properly so don't use it unless you have a good reason. |
45 explicit LocalsMap(bool gotta_love_static_overloading); | 45 explicit LocalsMap(bool gotta_love_static_overloading); |
46 | 46 |
47 virtual ~LocalsMap(); | 47 virtual ~LocalsMap(); |
48 | 48 |
49 Variable* Declare(Scope* scope, Handle<String> name, Variable::Mode mode, | 49 Variable* Declare(Scope* scope, Handle<String> name, Variable::Mode mode, |
50 bool is_valid_LHS, bool is_this); | 50 bool is_valid_LHS, Variable::Kind kind); |
51 | 51 |
52 Variable* Lookup(Handle<String> name); | 52 Variable* Lookup(Handle<String> name); |
53 }; | 53 }; |
54 | 54 |
55 | 55 |
56 // The dynamic scope part holds hash maps for the variables that will | 56 // The dynamic scope part holds hash maps for the variables that will |
57 // be looked up dynamically from within eval and with scopes. The objects | 57 // be looked up dynamically from within eval and with scopes. The objects |
58 // are allocated on-demand from Scope::NonLocal to avoid wasting memory | 58 // are allocated on-demand from Scope::NonLocal to avoid wasting memory |
59 // and setup time for scopes that don't need them. | 59 // and setup time for scopes that don't need them. |
60 class DynamicScopePart : public ZoneObject { | 60 class DynamicScopePart : public ZoneObject { |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 virtual VariableProxy* NewUnresolved(Handle<String> name, bool inside_with) { | 374 virtual VariableProxy* NewUnresolved(Handle<String> name, bool inside_with) { |
375 return NULL; | 375 return NULL; |
376 } | 376 } |
377 virtual VariableProxy* NewTemporary(Handle<String> name) { return NULL; } | 377 virtual VariableProxy* NewTemporary(Handle<String> name) { return NULL; } |
378 }; | 378 }; |
379 | 379 |
380 | 380 |
381 } } // namespace v8::internal | 381 } } // namespace v8::internal |
382 | 382 |
383 #endif // V8_SCOPES_H_ | 383 #endif // V8_SCOPES_H_ |
OLD | NEW |