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

Side by Side Diff: src/contexts.cc

Issue 20458: Revert eval changes since there is a crash that I don't have the time... (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;
143 case Variable::TEMPORARY: UNREACHABLE(); break; 141 case Variable::TEMPORARY: UNREACHABLE(); break;
144 } 142 }
145 return context; 143 return context;
146 } 144 }
147 145
148 // check parameter locals in context 146 // check parameter locals in context
149 int param_index = ScopeInfo<>::ParameterIndex(*code, *name); 147 int param_index = ScopeInfo<>::ParameterIndex(*code, *name);
150 if (param_index >= 0) { 148 if (param_index >= 0) {
151 // slot found 149 // slot found
152 int index = 150 int index =
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 205
208 206
209 bool Context::IsBootstrappingOrGlobalObject(Object* object) { 207 bool Context::IsBootstrappingOrGlobalObject(Object* object) {
210 // During bootstrapping we allow all objects to pass as global 208 // During bootstrapping we allow all objects to pass as global
211 // objects. This is necessary to fix circular dependencies. 209 // objects. This is necessary to fix circular dependencies.
212 return Bootstrapper::IsActive() || object->IsGlobalObject(); 210 return Bootstrapper::IsActive() || object->IsGlobalObject();
213 } 211 }
214 #endif 212 #endif
215 213
216 } } // namespace v8::internal 214 } } // 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