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

Side by Side Diff: src/variables.h

Issue 7885027: Merge revision 9281 to the 3.5 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.5/
Patch Set: '' Created 9 years, 3 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
« no previous file with comments | « src/scopes.cc ('k') | src/variables.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 bool IsValidLeftHandSide() { return is_valid_LHS_; } 90 bool IsValidLeftHandSide() { return is_valid_LHS_; }
91 91
92 // The source code for an eval() call may refer to a variable that is 92 // The source code for an eval() call may refer to a variable that is
93 // in an outer scope about which we don't know anything (it may not 93 // in an outer scope about which we don't know anything (it may not
94 // be the global scope). scope() is NULL in that case. Currently the 94 // be the global scope). scope() is NULL in that case. Currently the
95 // scope is only used to follow the context chain length. 95 // scope is only used to follow the context chain length.
96 Scope* scope() const { return scope_; } 96 Scope* scope() const { return scope_; }
97 97
98 Handle<String> name() const { return name_; } 98 Handle<String> name() const { return name_; }
99 Mode mode() const { return mode_; } 99 Mode mode() const { return mode_; }
100 bool is_accessed_from_inner_function_scope() const { 100 bool is_accessed_from_inner_scope() const {
101 return is_accessed_from_inner_function_scope_; 101 return is_accessed_from_inner_scope_;
102 } 102 }
103 void MarkAsAccessedFromInnerFunctionScope() { 103 void MarkAsAccessedFromInnerScope() {
104 ASSERT(mode_ != TEMPORARY); 104 ASSERT(mode_ != TEMPORARY);
105 is_accessed_from_inner_function_scope_ = true; 105 is_accessed_from_inner_scope_ = true;
106 } 106 }
107 bool is_used() { return is_used_; } 107 bool is_used() { return is_used_; }
108 void set_is_used(bool flag) { is_used_ = flag; } 108 void set_is_used(bool flag) { is_used_ = flag; }
109 109
110 bool IsVariable(Handle<String> n) const { 110 bool IsVariable(Handle<String> n) const {
111 return !is_this() && name().is_identical_to(n); 111 return !is_this() && name().is_identical_to(n);
112 } 112 }
113 113
114 bool IsStackAllocated() const; 114 bool IsStackAllocated() const;
115 bool IsParameter() const; // Includes 'this'. 115 bool IsParameter() const; // Includes 'this'.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 152
153 Variable* local_if_not_shadowed_; 153 Variable* local_if_not_shadowed_;
154 154
155 // Code generation. 155 // Code generation.
156 Slot* rewrite_; 156 Slot* rewrite_;
157 157
158 // Valid as a LHS? (const and this are not valid LHS, for example) 158 // Valid as a LHS? (const and this are not valid LHS, for example)
159 bool is_valid_LHS_; 159 bool is_valid_LHS_;
160 160
161 // Usage info. 161 // Usage info.
162 bool is_accessed_from_inner_function_scope_; // set by variable resolver 162 bool is_accessed_from_inner_scope_; // set by variable resolver
163 bool is_used_; 163 bool is_used_;
164 }; 164 };
165 165
166 166
167 } } // namespace v8::internal 167 } } // namespace v8::internal
168 168
169 #endif // V8_VARIABLES_H_ 169 #endif // V8_VARIABLES_H_
OLDNEW
« no previous file with comments | « src/scopes.cc ('k') | src/variables.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698