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/deoptimizer.h" | 5 #include "src/deoptimizer.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/ast/prettyprinter.h" | 8 #include "src/ast/prettyprinter.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/disasm.h" | 10 #include "src/disasm.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 current_(NULL) { | 40 current_(NULL) { |
41 for (int i = 0; i <= Deoptimizer::kLastBailoutType; ++i) { | 41 for (int i = 0; i <= Deoptimizer::kLastBailoutType; ++i) { |
42 deopt_entry_code_entries_[i] = -1; | 42 deopt_entry_code_entries_[i] = -1; |
43 deopt_entry_code_[i] = AllocateCodeChunk(allocator); | 43 deopt_entry_code_[i] = AllocateCodeChunk(allocator); |
44 } | 44 } |
45 } | 45 } |
46 | 46 |
47 | 47 |
48 DeoptimizerData::~DeoptimizerData() { | 48 DeoptimizerData::~DeoptimizerData() { |
49 for (int i = 0; i <= Deoptimizer::kLastBailoutType; ++i) { | 49 for (int i = 0; i <= Deoptimizer::kLastBailoutType; ++i) { |
50 allocator_->Free(deopt_entry_code_[i]); | 50 allocator_->Free<MemoryAllocator::kFull>(deopt_entry_code_[i]); |
51 deopt_entry_code_[i] = NULL; | 51 deopt_entry_code_[i] = NULL; |
52 } | 52 } |
53 } | 53 } |
54 | 54 |
55 | 55 |
56 Code* Deoptimizer::FindDeoptimizingCode(Address addr) { | 56 Code* Deoptimizer::FindDeoptimizingCode(Address addr) { |
57 if (function_->IsHeapObject()) { | 57 if (function_->IsHeapObject()) { |
58 // Search all deoptimizing code in the native context of the function. | 58 // Search all deoptimizing code in the native context of the function. |
59 Context* native_context = function_->context()->native_context(); | 59 Context* native_context = function_->context()->native_context(); |
60 Object* element = native_context->DeoptimizedCodeListHead(); | 60 Object* element = native_context->DeoptimizedCodeListHead(); |
(...skipping 3749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3810 CHECK(value_info->IsMaterializedObject()); | 3810 CHECK(value_info->IsMaterializedObject()); |
3811 | 3811 |
3812 value_info->value_ = | 3812 value_info->value_ = |
3813 Handle<Object>(previously_materialized_objects->get(i), isolate_); | 3813 Handle<Object>(previously_materialized_objects->get(i), isolate_); |
3814 } | 3814 } |
3815 } | 3815 } |
3816 } | 3816 } |
3817 | 3817 |
3818 } // namespace internal | 3818 } // namespace internal |
3819 } // namespace v8 | 3819 } // namespace v8 |
OLD | NEW |