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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 public: | 335 public: |
336 virtual void EnterContext(Context* context) { } // Don't care. | 336 virtual void EnterContext(Context* context) { } // Don't care. |
337 virtual void LeaveContext(Context* context) { } // Don't care. | 337 virtual void LeaveContext(Context* context) { } // Don't care. |
338 virtual void VisitFunction(JSFunction* function) { | 338 virtual void VisitFunction(JSFunction* function) { |
339 Code* code = function->code(); | 339 Code* code = function->code(); |
340 if (!code->marked_for_deoptimization()) return; | 340 if (!code->marked_for_deoptimization()) return; |
341 | 341 |
342 // Unlink this function and evict from optimized code map. | 342 // Unlink this function and evict from optimized code map. |
343 SharedFunctionInfo* shared = function->shared(); | 343 SharedFunctionInfo* shared = function->shared(); |
344 function->set_code(shared->code()); | 344 function->set_code(shared->code()); |
345 shared->EvictFromOptimizedCodeMap(function->context()->native_context(), | |
346 "deoptimized function"); | |
347 | 345 |
348 if (FLAG_trace_deopt) { | 346 if (FLAG_trace_deopt) { |
349 CodeTracer::Scope scope(code->GetHeap()->isolate()->GetCodeTracer()); | 347 CodeTracer::Scope scope(code->GetHeap()->isolate()->GetCodeTracer()); |
350 PrintF(scope.file(), "[deoptimizer unlinked: "); | 348 PrintF(scope.file(), "[deoptimizer unlinked: "); |
351 function->PrintName(scope.file()); | 349 function->PrintName(scope.file()); |
352 PrintF(scope.file(), | 350 PrintF(scope.file(), |
353 " / %" V8PRIxPTR "]\n", reinterpret_cast<intptr_t>(function)); | 351 " / %" V8PRIxPTR "]\n", reinterpret_cast<intptr_t>(function)); |
354 } | 352 } |
355 } | 353 } |
356 }; | 354 }; |
(...skipping 3116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3473 | 3471 |
3474 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { | 3472 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { |
3475 v->VisitPointer(BitCast<Object**>(&function_)); | 3473 v->VisitPointer(BitCast<Object**>(&function_)); |
3476 v->VisitPointers(parameters_, parameters_ + parameters_count_); | 3474 v->VisitPointers(parameters_, parameters_ + parameters_count_); |
3477 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); | 3475 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); |
3478 } | 3476 } |
3479 | 3477 |
3480 #endif // ENABLE_DEBUGGER_SUPPORT | 3478 #endif // ENABLE_DEBUGGER_SUPPORT |
3481 | 3479 |
3482 } } // namespace v8::internal | 3480 } } // namespace v8::internal |
OLD | NEW |