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

Side by Side Diff: src/contexts.cc

Issue 7631020: Version 3.5.6. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 9 years, 4 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/compiler.cc ('k') | src/extensions/experimental/datetime-format.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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 *index_ = index; 173 *index_ = index;
174 // Note: Fixed context slots are statically allocated by the compiler. 174 // Note: Fixed context slots are statically allocated by the compiler.
175 // Statically allocated variables always have a statically known mode, 175 // Statically allocated variables always have a statically known mode,
176 // which is the mode with which they were declared when added to the 176 // which is the mode with which they were declared when added to the
177 // scope. Thus, the DYNAMIC mode (which corresponds to dynamically 177 // scope. Thus, the DYNAMIC mode (which corresponds to dynamically
178 // declared variables that were introduced through declaration nodes) 178 // declared variables that were introduced through declaration nodes)
179 // must not appear here. 179 // must not appear here.
180 switch (mode) { 180 switch (mode) {
181 case Variable::INTERNAL: // Fall through. 181 case Variable::INTERNAL: // Fall through.
182 case Variable::VAR: 182 case Variable::VAR:
183 case Variable::LET:
183 *attributes = NONE; 184 *attributes = NONE;
184 break; 185 break;
185 case Variable::CONST: 186 case Variable::CONST:
186 *attributes = READ_ONLY; 187 *attributes = READ_ONLY;
187 break; 188 break;
188 case Variable::DYNAMIC: 189 case Variable::DYNAMIC:
189 case Variable::DYNAMIC_GLOBAL: 190 case Variable::DYNAMIC_GLOBAL:
190 case Variable::DYNAMIC_LOCAL: 191 case Variable::DYNAMIC_LOCAL:
191 case Variable::TEMPORARY: 192 case Variable::TEMPORARY:
192 UNREACHABLE(); 193 UNREACHABLE();
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 // During bootstrapping we allow all objects to pass as global 364 // During bootstrapping we allow all objects to pass as global
364 // objects. This is necessary to fix circular dependencies. 365 // objects. This is necessary to fix circular dependencies.
365 Isolate* isolate = Isolate::Current(); 366 Isolate* isolate = Isolate::Current();
366 return isolate->heap()->gc_state() != Heap::NOT_IN_GC || 367 return isolate->heap()->gc_state() != Heap::NOT_IN_GC ||
367 isolate->bootstrapper()->IsActive() || 368 isolate->bootstrapper()->IsActive() ||
368 object->IsGlobalObject(); 369 object->IsGlobalObject();
369 } 370 }
370 #endif 371 #endif
371 372
372 } } // namespace v8::internal 373 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/extensions/experimental/datetime-format.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698