| 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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 DeoptimizationInputData* deopt_data = | 407 DeoptimizationInputData* deopt_data = |
| 408 DeoptimizationInputData::cast(codes[i]->deoptimization_data()); | 408 DeoptimizationInputData::cast(codes[i]->deoptimization_data()); |
| 409 SharedFunctionInfo* shared = | 409 SharedFunctionInfo* shared = |
| 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 // Tell collector to treat this code object in a special way and | 417 // Ignore all slots that might have been recorded on the deoptimized code |
| 418 // ignore all slots that might have been recorded on it. | 418 // object. |
| 419 isolate->heap()->mark_compact_collector()->InvalidateCode(codes[i]); | 419 isolate->heap()->mark_compact_collector()->RemoveObjectSlots(codes[i]); |
| 420 } | 420 } |
| 421 } | 421 } |
| 422 | 422 |
| 423 | 423 |
| 424 void Deoptimizer::DeoptimizeAll(Isolate* isolate) { | 424 void Deoptimizer::DeoptimizeAll(Isolate* isolate) { |
| 425 if (FLAG_trace_deopt) { | 425 if (FLAG_trace_deopt) { |
| 426 CodeTracer::Scope scope(isolate->GetCodeTracer()); | 426 CodeTracer::Scope scope(isolate->GetCodeTracer()); |
| 427 PrintF(scope.file(), "[deoptimize all code in all contexts]\n"); | 427 PrintF(scope.file(), "[deoptimize all code in all contexts]\n"); |
| 428 } | 428 } |
| 429 DisallowHeapAllocation no_allocation; | 429 DisallowHeapAllocation no_allocation; |
| (...skipping 2969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3399 DCHECK(value_info->IsMaterializedObject()); | 3399 DCHECK(value_info->IsMaterializedObject()); |
| 3400 | 3400 |
| 3401 value_info->value_ = | 3401 value_info->value_ = |
| 3402 Handle<Object>(previously_materialized_objects->get(i), isolate_); | 3402 Handle<Object>(previously_materialized_objects->get(i), isolate_); |
| 3403 } | 3403 } |
| 3404 } | 3404 } |
| 3405 } | 3405 } |
| 3406 | 3406 |
| 3407 } // namespace internal | 3407 } // namespace internal |
| 3408 } // namespace v8 | 3408 } // namespace v8 |
| OLD | NEW |