| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 *attributes = READ_ONLY; | 176 *attributes = READ_ONLY; |
| 177 *binding_flags = (init_flag == kNeedsInitialization) | 177 *binding_flags = (init_flag == kNeedsInitialization) |
| 178 ? IMMUTABLE_CHECK_INITIALIZED : IMMUTABLE_IS_INITIALIZED; | 178 ? IMMUTABLE_CHECK_INITIALIZED : IMMUTABLE_IS_INITIALIZED; |
| 179 break; | 179 break; |
| 180 case CONST_HARMONY: | 180 case CONST_HARMONY: |
| 181 *attributes = READ_ONLY; | 181 *attributes = READ_ONLY; |
| 182 *binding_flags = (init_flag == kNeedsInitialization) | 182 *binding_flags = (init_flag == kNeedsInitialization) |
| 183 ? IMMUTABLE_CHECK_INITIALIZED_HARMONY : | 183 ? IMMUTABLE_CHECK_INITIALIZED_HARMONY : |
| 184 IMMUTABLE_IS_INITIALIZED_HARMONY; | 184 IMMUTABLE_IS_INITIALIZED_HARMONY; |
| 185 break; | 185 break; |
| 186 case MODULE: |
| 187 *attributes = READ_ONLY; |
| 188 *binding_flags = IMMUTABLE_IS_INITIALIZED_HARMONY; |
| 189 break; |
| 186 case DYNAMIC: | 190 case DYNAMIC: |
| 187 case DYNAMIC_GLOBAL: | 191 case DYNAMIC_GLOBAL: |
| 188 case DYNAMIC_LOCAL: | 192 case DYNAMIC_LOCAL: |
| 189 case TEMPORARY: | 193 case TEMPORARY: |
| 190 UNREACHABLE(); | 194 UNREACHABLE(); |
| 191 break; | 195 break; |
| 192 } | 196 } |
| 193 return context; | 197 return context; |
| 194 } | 198 } |
| 195 | 199 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 // During bootstrapping we allow all objects to pass as global | 338 // During bootstrapping we allow all objects to pass as global |
| 335 // objects. This is necessary to fix circular dependencies. | 339 // objects. This is necessary to fix circular dependencies. |
| 336 Isolate* isolate = Isolate::Current(); | 340 Isolate* isolate = Isolate::Current(); |
| 337 return isolate->heap()->gc_state() != Heap::NOT_IN_GC || | 341 return isolate->heap()->gc_state() != Heap::NOT_IN_GC || |
| 338 isolate->bootstrapper()->IsActive() || | 342 isolate->bootstrapper()->IsActive() || |
| 339 object->IsGlobalObject(); | 343 object->IsGlobalObject(); |
| 340 } | 344 } |
| 341 #endif | 345 #endif |
| 342 | 346 |
| 343 } } // namespace v8::internal | 347 } } // namespace v8::internal |
| OLD | NEW |