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 3720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3731 slot->value_ = object; | 3731 slot->value_ = object; |
3732 // On 32-bit architectures, there is an extra slot there because | 3732 // On 32-bit architectures, there is an extra slot there because |
3733 // the escape analysis calculates the number of slots as | 3733 // the escape analysis calculates the number of slots as |
3734 // object-size/pointer-size. To account for this, we read out | 3734 // object-size/pointer-size. To account for this, we read out |
3735 // any extra slots. | 3735 // any extra slots. |
3736 for (int i = 0; i < length - 2; i++) { | 3736 for (int i = 0; i < length - 2; i++) { |
3737 MaterializeAt(frame_index, value_index); | 3737 MaterializeAt(frame_index, value_index); |
3738 } | 3738 } |
3739 return object; | 3739 return object; |
3740 } | 3740 } |
3741 case JS_OBJECT_TYPE: { | 3741 case JS_OBJECT_TYPE: |
| 3742 case JS_ERROR_TYPE: |
| 3743 case JS_ARGUMENTS_TYPE: { |
3742 Handle<JSObject> object = | 3744 Handle<JSObject> object = |
3743 isolate_->factory()->NewJSObjectFromMap(map, NOT_TENURED); | 3745 isolate_->factory()->NewJSObjectFromMap(map, NOT_TENURED); |
3744 slot->value_ = object; | 3746 slot->value_ = object; |
3745 Handle<Object> properties = MaterializeAt(frame_index, value_index); | 3747 Handle<Object> properties = MaterializeAt(frame_index, value_index); |
3746 Handle<Object> elements = MaterializeAt(frame_index, value_index); | 3748 Handle<Object> elements = MaterializeAt(frame_index, value_index); |
3747 object->set_properties(FixedArray::cast(*properties)); | 3749 object->set_properties(FixedArray::cast(*properties)); |
3748 object->set_elements(FixedArrayBase::cast(*elements)); | 3750 object->set_elements(FixedArrayBase::cast(*elements)); |
3749 for (int i = 0; i < length - 3; ++i) { | 3751 for (int i = 0; i < length - 3; ++i) { |
3750 Handle<Object> value = MaterializeAt(frame_index, value_index); | 3752 Handle<Object> value = MaterializeAt(frame_index, value_index); |
3751 FieldIndex index = FieldIndex::ForPropertyIndex(object->map(), i); | 3753 FieldIndex index = FieldIndex::ForPropertyIndex(object->map(), i); |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4016 CHECK(value_info->IsMaterializedObject()); | 4018 CHECK(value_info->IsMaterializedObject()); |
4017 | 4019 |
4018 value_info->value_ = | 4020 value_info->value_ = |
4019 Handle<Object>(previously_materialized_objects->get(i), isolate_); | 4021 Handle<Object>(previously_materialized_objects->get(i), isolate_); |
4020 } | 4022 } |
4021 } | 4023 } |
4022 } | 4024 } |
4023 | 4025 |
4024 } // namespace internal | 4026 } // namespace internal |
4025 } // namespace v8 | 4027 } // namespace v8 |
OLD | NEW |