Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
| 9 #include "src/cpu-profiler.h" | 9 #include "src/cpu-profiler.h" |
| 10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 410 SharedFunctionInfo::cast(deopt_data->SharedFunctionInfo()); | 410 SharedFunctionInfo::cast(deopt_data->SharedFunctionInfo()); |
| 411 shared->EvictFromOptimizedCodeMap(codes[i], "deoptimized code"); | 411 shared->EvictFromOptimizedCodeMap(codes[i], "deoptimized code"); |
| 412 | 412 |
| 413 // Do platform-specific patching to force any activations to lazy deopt. | 413 // Do platform-specific patching to force any activations to lazy deopt. |
| 414 PatchCodeForDeoptimization(isolate, codes[i]); | 414 PatchCodeForDeoptimization(isolate, codes[i]); |
| 415 | 415 |
| 416 // We might be in the middle of incremental marking with compaction. | 416 // We might be in the middle of incremental marking with compaction. |
| 417 // Ignore all slots that might have been recorded on the deoptimized code | 417 // Ignore all slots that might have been recorded on the deoptimized code |
| 418 // object. | 418 // object. |
| 419 isolate->heap()->mark_compact_collector()->RemoveObjectSlots(codes[i]); | 419 isolate->heap()->mark_compact_collector()->RemoveObjectSlots(codes[i]); |
| 420 | |
| 421 // After removing all recorded slots of the code object, we add the slots | |
| 422 // again that point to objects on evacuation candidates. | |
|
Michael Starzinger
2015/07/03 10:46:09
nit: Let's add to the comment that this is only ab
Hannes Payer (out of office)
2015/07/03 10:55:53
Done.
| |
| 423 isolate->heap()->mark_compact_collector()->RecordDeoptimizedCodeSlots( | |
| 424 codes[i]); | |
| 420 } | 425 } |
| 421 } | 426 } |
| 422 | 427 |
| 423 | 428 |
| 424 void Deoptimizer::DeoptimizeAll(Isolate* isolate) { | 429 void Deoptimizer::DeoptimizeAll(Isolate* isolate) { |
| 425 if (FLAG_trace_deopt) { | 430 if (FLAG_trace_deopt) { |
| 426 CodeTracer::Scope scope(isolate->GetCodeTracer()); | 431 CodeTracer::Scope scope(isolate->GetCodeTracer()); |
| 427 PrintF(scope.file(), "[deoptimize all code in all contexts]\n"); | 432 PrintF(scope.file(), "[deoptimize all code in all contexts]\n"); |
| 428 } | 433 } |
| 429 DisallowHeapAllocation no_allocation; | 434 DisallowHeapAllocation no_allocation; |
| (...skipping 2941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3371 DCHECK(value_info->IsMaterializedObject()); | 3376 DCHECK(value_info->IsMaterializedObject()); |
| 3372 | 3377 |
| 3373 value_info->value_ = | 3378 value_info->value_ = |
| 3374 Handle<Object>(previously_materialized_objects->get(i), isolate_); | 3379 Handle<Object>(previously_materialized_objects->get(i), isolate_); |
| 3375 } | 3380 } |
| 3376 } | 3381 } |
| 3377 } | 3382 } |
| 3378 | 3383 |
| 3379 } // namespace internal | 3384 } // namespace internal |
| 3380 } // namespace v8 | 3385 } // namespace v8 |
| OLD | NEW |