| 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/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
| 10 #include "src/disasm.h" | 10 #include "src/disasm.h" |
| (...skipping 1823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1834 previously_materialized_objects_->get(object_index), isolate_)); | 1834 previously_materialized_objects_->get(object_index), isolate_)); |
| 1835 } else { | 1835 } else { |
| 1836 materialized_objects_->Add(object); | 1836 materialized_objects_->Add(object); |
| 1837 } | 1837 } |
| 1838 Handle<Object> properties = MaterializeNextValue(); | 1838 Handle<Object> properties = MaterializeNextValue(); |
| 1839 Handle<Object> elements = MaterializeNextValue(); | 1839 Handle<Object> elements = MaterializeNextValue(); |
| 1840 object->set_properties(FixedArray::cast(*properties)); | 1840 object->set_properties(FixedArray::cast(*properties)); |
| 1841 object->set_elements(FixedArrayBase::cast(*elements)); | 1841 object->set_elements(FixedArrayBase::cast(*elements)); |
| 1842 for (int i = 0; i < length - 3; ++i) { | 1842 for (int i = 0; i < length - 3; ++i) { |
| 1843 Handle<Object> value = MaterializeNextValue(); | 1843 Handle<Object> value = MaterializeNextValue(); |
| 1844 FieldIndex index = FieldIndex::ForPropertyIndex(object->map(), i); | 1844 object->FastPropertyAtPut(i, *value); |
| 1845 object->FastPropertyAtPut(index, *value); | |
| 1846 } | 1845 } |
| 1847 break; | 1846 break; |
| 1848 } | 1847 } |
| 1849 case JS_ARRAY_TYPE: { | 1848 case JS_ARRAY_TYPE: { |
| 1850 Handle<JSArray> object = | 1849 Handle<JSArray> object = |
| 1851 isolate_->factory()->NewJSArray(0, map->elements_kind()); | 1850 isolate_->factory()->NewJSArray(0, map->elements_kind()); |
| 1852 if (object_index < prev_materialized_count_) { | 1851 if (object_index < prev_materialized_count_) { |
| 1853 materialized_objects_->Add(Handle<Object>( | 1852 materialized_objects_->Add(Handle<Object>( |
| 1854 previously_materialized_objects_->get(object_index), isolate_)); | 1853 previously_materialized_objects_->get(object_index), isolate_)); |
| 1855 } else { | 1854 } else { |
| (...skipping 1544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3400 case JS_OBJECT_TYPE: { | 3399 case JS_OBJECT_TYPE: { |
| 3401 Handle<JSObject> object = | 3400 Handle<JSObject> object = |
| 3402 isolate->factory()->NewJSObjectFromMap(map, NOT_TENURED, false); | 3401 isolate->factory()->NewJSObjectFromMap(map, NOT_TENURED, false); |
| 3403 materialized_objects_.Add(object); | 3402 materialized_objects_.Add(object); |
| 3404 Handle<Object> properties = GetNext(isolate, lvl + 1); | 3403 Handle<Object> properties = GetNext(isolate, lvl + 1); |
| 3405 Handle<Object> elements = GetNext(isolate, lvl + 1); | 3404 Handle<Object> elements = GetNext(isolate, lvl + 1); |
| 3406 object->set_properties(FixedArray::cast(*properties)); | 3405 object->set_properties(FixedArray::cast(*properties)); |
| 3407 object->set_elements(FixedArrayBase::cast(*elements)); | 3406 object->set_elements(FixedArrayBase::cast(*elements)); |
| 3408 for (int i = 0; i < length - 3; ++i) { | 3407 for (int i = 0; i < length - 3; ++i) { |
| 3409 Handle<Object> value = GetNext(isolate, lvl + 1); | 3408 Handle<Object> value = GetNext(isolate, lvl + 1); |
| 3410 FieldIndex index = FieldIndex::ForPropertyIndex(object->map(), i); | 3409 object->FastPropertyAtPut(i, *value); |
| 3411 object->FastPropertyAtPut(index, *value); | |
| 3412 } | 3410 } |
| 3413 return object; | 3411 return object; |
| 3414 } | 3412 } |
| 3415 case JS_ARRAY_TYPE: { | 3413 case JS_ARRAY_TYPE: { |
| 3416 Handle<JSArray> object = | 3414 Handle<JSArray> object = |
| 3417 isolate->factory()->NewJSArray(0, map->elements_kind()); | 3415 isolate->factory()->NewJSArray(0, map->elements_kind()); |
| 3418 materialized_objects_.Add(object); | 3416 materialized_objects_.Add(object); |
| 3419 Handle<Object> properties = GetNext(isolate, lvl + 1); | 3417 Handle<Object> properties = GetNext(isolate, lvl + 1); |
| 3420 Handle<Object> elements = GetNext(isolate, lvl + 1); | 3418 Handle<Object> elements = GetNext(isolate, lvl + 1); |
| 3421 Handle<Object> length = GetNext(isolate, lvl + 1); | 3419 Handle<Object> length = GetNext(isolate, lvl + 1); |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3582 } | 3580 } |
| 3583 | 3581 |
| 3584 | 3582 |
| 3585 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { | 3583 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { |
| 3586 v->VisitPointer(BitCast<Object**>(&function_)); | 3584 v->VisitPointer(BitCast<Object**>(&function_)); |
| 3587 v->VisitPointers(parameters_, parameters_ + parameters_count_); | 3585 v->VisitPointers(parameters_, parameters_ + parameters_count_); |
| 3588 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); | 3586 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); |
| 3589 } | 3587 } |
| 3590 | 3588 |
| 3591 } } // namespace v8::internal | 3589 } } // namespace v8::internal |
| OLD | NEW |