| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 function->set_code(shared->code()); | 344 function->set_code(shared->code()); |
| 345 shared->EvictFromOptimizedCodeMap(code, "deoptimized function"); | 345 shared->EvictFromOptimizedCodeMap(code, "deoptimized function"); |
| 346 | 346 |
| 347 if (FLAG_trace_deopt) { | 347 if (FLAG_trace_deopt) { |
| 348 CodeTracer::Scope scope(code->GetHeap()->isolate()->GetCodeTracer()); | 348 CodeTracer::Scope scope(code->GetHeap()->isolate()->GetCodeTracer()); |
| 349 PrintF(scope.file(), "[deoptimizer unlinked: "); | 349 PrintF(scope.file(), "[deoptimizer unlinked: "); |
| 350 function->PrintName(scope.file()); | 350 function->PrintName(scope.file()); |
| 351 PrintF(scope.file(), | 351 PrintF(scope.file(), |
| 352 " / %" V8PRIxPTR "]\n", reinterpret_cast<intptr_t>(function)); | 352 " / %" V8PRIxPTR "]\n", reinterpret_cast<intptr_t>(function)); |
| 353 } | 353 } |
| 354 |
| 355 if (code->marked_for_reoptimization()) { |
| 356 function->Optimize("marked for reoptimization"); |
| 357 } |
| 354 } | 358 } |
| 355 }; | 359 }; |
| 356 | 360 |
| 357 // Unlink all functions that refer to marked code. | 361 // Unlink all functions that refer to marked code. |
| 358 SelectedCodeUnlinker unlinker; | 362 SelectedCodeUnlinker unlinker; |
| 359 VisitAllOptimizedFunctionsForContext(context, &unlinker); | 363 VisitAllOptimizedFunctionsForContext(context, &unlinker); |
| 360 | 364 |
| 361 // Move marked code from the optimized code list to the deoptimized | 365 // Move marked code from the optimized code list to the deoptimized |
| 362 // code list, collecting them into a ZoneList. | 366 // code list, collecting them into a ZoneList. |
| 363 Isolate* isolate = context->GetHeap()->isolate(); | 367 Isolate* isolate = context->GetHeap()->isolate(); |
| (...skipping 3093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3457 | 3461 |
| 3458 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { | 3462 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { |
| 3459 v->VisitPointer(BitCast<Object**>(&function_)); | 3463 v->VisitPointer(BitCast<Object**>(&function_)); |
| 3460 v->VisitPointers(parameters_, parameters_ + parameters_count_); | 3464 v->VisitPointers(parameters_, parameters_ + parameters_count_); |
| 3461 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); | 3465 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); |
| 3462 } | 3466 } |
| 3463 | 3467 |
| 3464 #endif // ENABLE_DEBUGGER_SUPPORT | 3468 #endif // ENABLE_DEBUGGER_SUPPORT |
| 3465 | 3469 |
| 3466 } } // namespace v8::internal | 3470 } } // namespace v8::internal |
| OLD | NEW |