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

Side by Side Diff: src/contexts.cc

Issue 20459: Not sure what happened, but my revert did not get everything out. Fixing the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 10 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/codegen-ia32.h ('k') | src/scopes.h » ('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 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 index, mode); 127 index, mode);
128 } 128 }
129 *index_ = index; 129 *index_ = index;
130 // Note: Fixed context slots are statically allocated by the compiler. 130 // Note: Fixed context slots are statically allocated by the compiler.
131 // Statically allocated variables always have a statically known mode, 131 // Statically allocated variables always have a statically known mode,
132 // which is the mode with which they were declared when added to the 132 // which is the mode with which they were declared when added to the
133 // scope. Thus, the DYNAMIC mode (which corresponds to dynamically 133 // scope. Thus, the DYNAMIC mode (which corresponds to dynamically
134 // declared variables that were introduced through declaration nodes) 134 // declared variables that were introduced through declaration nodes)
135 // must not appear here. 135 // must not appear here.
136 switch (mode) { 136 switch (mode) {
137 case Variable::INTERNAL : // fall through 137 case Variable::INTERNAL: // fall through
138 case Variable::VAR : *attributes = NONE; break; 138 case Variable::VAR: *attributes = NONE; break;
139 case Variable::CONST : *attributes = READ_ONLY; break; 139 case Variable::CONST: *attributes = READ_ONLY; break;
140 case Variable::DYNAMIC : UNREACHABLE(); break; 140 case Variable::DYNAMIC: UNREACHABLE(); break;
141 case Variable::DYNAMIC_GLOBAL: UNREACHABLE(); break;
142 case Variable::DYNAMIC_LOCAL: UNREACHABLE(); break;
141 case Variable::TEMPORARY: UNREACHABLE(); break; 143 case Variable::TEMPORARY: UNREACHABLE(); break;
142 } 144 }
143 return context; 145 return context;
144 } 146 }
145 147
146 // check parameter locals in context 148 // check parameter locals in context
147 int param_index = ScopeInfo<>::ParameterIndex(*code, *name); 149 int param_index = ScopeInfo<>::ParameterIndex(*code, *name);
148 if (param_index >= 0) { 150 if (param_index >= 0) {
149 // slot found 151 // slot found
150 int index = 152 int index =
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 207
206 208
207 bool Context::IsBootstrappingOrGlobalObject(Object* object) { 209 bool Context::IsBootstrappingOrGlobalObject(Object* object) {
208 // During bootstrapping we allow all objects to pass as global 210 // During bootstrapping we allow all objects to pass as global
209 // objects. This is necessary to fix circular dependencies. 211 // objects. This is necessary to fix circular dependencies.
210 return Bootstrapper::IsActive() || object->IsGlobalObject(); 212 return Bootstrapper::IsActive() || object->IsGlobalObject();
211 } 213 }
212 #endif 214 #endif
213 215
214 } } // namespace v8::internal 216 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/codegen-ia32.h ('k') | src/scopes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698