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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 | 252 |
253 if (FLAG_trace_contexts) { | 253 if (FLAG_trace_contexts) { |
254 PrintF("=> no property/slot found\n"); | 254 PrintF("=> no property/slot found\n"); |
255 } | 255 } |
256 return Handle<Object>::null(); | 256 return Handle<Object>::null(); |
257 } | 257 } |
258 | 258 |
259 | 259 |
260 void Context::AddOptimizedFunction(JSFunction* function) { | 260 void Context::AddOptimizedFunction(JSFunction* function) { |
261 ASSERT(IsNativeContext()); | 261 ASSERT(IsNativeContext()); |
262 #ifdef DEBUG | 262 #ifdef ENABLE_SLOW_ASSERTS |
263 if (FLAG_enable_slow_asserts) { | 263 if (FLAG_enable_slow_asserts) { |
264 Object* element = get(OPTIMIZED_FUNCTIONS_LIST); | 264 Object* element = get(OPTIMIZED_FUNCTIONS_LIST); |
265 while (!element->IsUndefined()) { | 265 while (!element->IsUndefined()) { |
266 CHECK(element != function); | 266 CHECK(element != function); |
267 element = JSFunction::cast(element)->next_function_link(); | 267 element = JSFunction::cast(element)->next_function_link(); |
268 } | 268 } |
269 } | 269 } |
270 | 270 |
271 // Check that the context belongs to the weak native contexts list. | 271 // Check that the context belongs to the weak native contexts list. |
272 bool found = false; | 272 bool found = false; |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 bool Context::IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object) { | 389 bool Context::IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object) { |
390 // During bootstrapping we allow all objects to pass as global | 390 // During bootstrapping we allow all objects to pass as global |
391 // objects. This is necessary to fix circular dependencies. | 391 // objects. This is necessary to fix circular dependencies. |
392 return isolate->heap()->gc_state() != Heap::NOT_IN_GC || | 392 return isolate->heap()->gc_state() != Heap::NOT_IN_GC || |
393 isolate->bootstrapper()->IsActive() || | 393 isolate->bootstrapper()->IsActive() || |
394 object->IsGlobalObject(); | 394 object->IsGlobalObject(); |
395 } | 395 } |
396 #endif | 396 #endif |
397 | 397 |
398 } } // namespace v8::internal | 398 } } // namespace v8::internal |
OLD | NEW |