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 3153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3164 // the escape analysis calculates the number of slots as | 3164 // the escape analysis calculates the number of slots as |
3165 // object-size/pointer-size. To account for this, we read out | 3165 // object-size/pointer-size. To account for this, we read out |
3166 // any extra slots. | 3166 // any extra slots. |
3167 for (int i = 0; i < length - 2; i++) { | 3167 for (int i = 0; i < length - 2; i++) { |
3168 MaterializeAt(frame_index, value_index); | 3168 MaterializeAt(frame_index, value_index); |
3169 } | 3169 } |
3170 return object; | 3170 return object; |
3171 } | 3171 } |
3172 case JS_OBJECT_TYPE: { | 3172 case JS_OBJECT_TYPE: { |
3173 Handle<JSObject> object = | 3173 Handle<JSObject> object = |
3174 isolate_->factory()->NewJSObjectFromMap(map, NOT_TENURED, false); | 3174 isolate_->factory()->NewJSObjectFromMap(map, NOT_TENURED); |
3175 slot->value_ = object; | 3175 slot->value_ = object; |
3176 Handle<Object> properties = MaterializeAt(frame_index, value_index); | 3176 Handle<Object> properties = MaterializeAt(frame_index, value_index); |
3177 Handle<Object> elements = MaterializeAt(frame_index, value_index); | 3177 Handle<Object> elements = MaterializeAt(frame_index, value_index); |
3178 object->set_properties(FixedArray::cast(*properties)); | 3178 object->set_properties(FixedArray::cast(*properties)); |
3179 object->set_elements(FixedArrayBase::cast(*elements)); | 3179 object->set_elements(FixedArrayBase::cast(*elements)); |
3180 for (int i = 0; i < length - 3; ++i) { | 3180 for (int i = 0; i < length - 3; ++i) { |
3181 Handle<Object> value = MaterializeAt(frame_index, value_index); | 3181 Handle<Object> value = MaterializeAt(frame_index, value_index); |
3182 FieldIndex index = FieldIndex::ForPropertyIndex(object->map(), i); | 3182 FieldIndex index = FieldIndex::ForPropertyIndex(object->map(), i); |
3183 object->FastPropertyAtPut(index, *value); | 3183 object->FastPropertyAtPut(index, *value); |
3184 } | 3184 } |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3379 DCHECK(value_info->IsMaterializedObject()); | 3379 DCHECK(value_info->IsMaterializedObject()); |
3380 | 3380 |
3381 value_info->value_ = | 3381 value_info->value_ = |
3382 Handle<Object>(previously_materialized_objects->get(i), isolate_); | 3382 Handle<Object>(previously_materialized_objects->get(i), isolate_); |
3383 } | 3383 } |
3384 } | 3384 } |
3385 } | 3385 } |
3386 | 3386 |
3387 } // namespace internal | 3387 } // namespace internal |
3388 } // namespace v8 | 3388 } // namespace v8 |
OLD | NEW |