| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |