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 <memory> | 7 #include <memory> |
8 | 8 |
9 #include "src/accessors.h" | 9 #include "src/accessors.h" |
10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
(...skipping 3744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3755 object->set_properties(FixedArray::cast(*properties)); | 3755 object->set_properties(FixedArray::cast(*properties)); |
3756 object->set_elements(FixedArrayBase::cast(*elements)); | 3756 object->set_elements(FixedArrayBase::cast(*elements)); |
3757 for (int i = 0; i < length - 3; ++i) { | 3757 for (int i = 0; i < length - 3; ++i) { |
3758 Handle<Object> value = MaterializeAt(frame_index, value_index); | 3758 Handle<Object> value = MaterializeAt(frame_index, value_index); |
3759 FieldIndex index = FieldIndex::ForPropertyIndex(object->map(), i); | 3759 FieldIndex index = FieldIndex::ForPropertyIndex(object->map(), i); |
3760 object->FastPropertyAtPut(index, *value); | 3760 object->FastPropertyAtPut(index, *value); |
3761 } | 3761 } |
3762 return object; | 3762 return object; |
3763 } | 3763 } |
3764 case JS_ARRAY_TYPE: { | 3764 case JS_ARRAY_TYPE: { |
3765 Handle<JSArray> object = | 3765 Handle<JSArray> object = Handle<JSArray>::cast( |
3766 isolate_->factory()->NewJSArray(0, map->elements_kind()); | 3766 isolate_->factory()->NewJSObjectFromMap(map, NOT_TENURED)); |
3767 slot->value_ = object; | 3767 slot->value_ = object; |
3768 Handle<Object> properties = MaterializeAt(frame_index, value_index); | 3768 Handle<Object> properties = MaterializeAt(frame_index, value_index); |
3769 Handle<Object> elements = MaterializeAt(frame_index, value_index); | 3769 Handle<Object> elements = MaterializeAt(frame_index, value_index); |
3770 Handle<Object> length = MaterializeAt(frame_index, value_index); | 3770 Handle<Object> length = MaterializeAt(frame_index, value_index); |
3771 object->set_properties(FixedArray::cast(*properties)); | 3771 object->set_properties(FixedArray::cast(*properties)); |
3772 object->set_elements(FixedArrayBase::cast(*elements)); | 3772 object->set_elements(FixedArrayBase::cast(*elements)); |
3773 object->set_length(*length); | 3773 object->set_length(*length); |
3774 return object; | 3774 return object; |
3775 } | 3775 } |
3776 case JS_FUNCTION_TYPE: { | 3776 case JS_FUNCTION_TYPE: { |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4024 CHECK(value_info->IsMaterializedObject()); | 4024 CHECK(value_info->IsMaterializedObject()); |
4025 | 4025 |
4026 value_info->value_ = | 4026 value_info->value_ = |
4027 Handle<Object>(previously_materialized_objects->get(i), isolate_); | 4027 Handle<Object>(previously_materialized_objects->get(i), isolate_); |
4028 } | 4028 } |
4029 } | 4029 } |
4030 } | 4030 } |
4031 | 4031 |
4032 } // namespace internal | 4032 } // namespace internal |
4033 } // namespace v8 | 4033 } // namespace v8 |
OLD | NEW |