OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 | 313 |
314 void Deoptimizer::VisitAllOptimizedFunctions( | 314 void Deoptimizer::VisitAllOptimizedFunctions( |
315 OptimizedFunctionVisitor* visitor) { | 315 OptimizedFunctionVisitor* visitor) { |
316 AssertNoAllocation no_allocation; | 316 AssertNoAllocation no_allocation; |
317 | 317 |
318 // Run through the list of all native contexts and deoptimize. | 318 // Run through the list of all native contexts and deoptimize. |
319 Object* context = Isolate::Current()->heap()->native_contexts_list(); | 319 Object* context = Isolate::Current()->heap()->native_contexts_list(); |
320 while (!context->IsUndefined()) { | 320 while (!context->IsUndefined()) { |
321 // GC can happen when the context is not fully initialized, | 321 // GC can happen when the context is not fully initialized, |
322 // so the global field of the context can be undefined. | 322 // so the global field of the context can be undefined. |
323 Object* global = Context::cast(context)->get(Context::GLOBAL_INDEX); | 323 Object* global = Context::cast(context)->get(Context::GLOBAL_OBJECT_INDEX); |
324 if (!global->IsUndefined()) { | 324 if (!global->IsUndefined()) { |
325 VisitAllOptimizedFunctionsForGlobalObject(JSObject::cast(global), | 325 VisitAllOptimizedFunctionsForGlobalObject(JSObject::cast(global), |
326 visitor); | 326 visitor); |
327 } | 327 } |
328 context = Context::cast(context)->get(Context::NEXT_CONTEXT_LINK); | 328 context = Context::cast(context)->get(Context::NEXT_CONTEXT_LINK); |
329 } | 329 } |
330 } | 330 } |
331 | 331 |
332 | 332 |
333 void Deoptimizer::HandleWeakDeoptimizedCode( | 333 void Deoptimizer::HandleWeakDeoptimizedCode( |
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1697 | 1697 |
1698 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { | 1698 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { |
1699 v->VisitPointer(BitCast<Object**>(&function_)); | 1699 v->VisitPointer(BitCast<Object**>(&function_)); |
1700 v->VisitPointers(parameters_, parameters_ + parameters_count_); | 1700 v->VisitPointers(parameters_, parameters_ + parameters_count_); |
1701 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); | 1701 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); |
1702 } | 1702 } |
1703 | 1703 |
1704 #endif // ENABLE_DEBUGGER_SUPPORT | 1704 #endif // ENABLE_DEBUGGER_SUPPORT |
1705 | 1705 |
1706 } } // namespace v8::internal | 1706 } } // namespace v8::internal |
OLD | NEW |