OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1676 materialized_objects_->Add(arguments); | 1676 materialized_objects_->Add(arguments); |
1677 for (int i = 0; i < length; ++i) { | 1677 for (int i = 0; i < length; ++i) { |
1678 Handle<Object> value = MaterializeNextValue(); | 1678 Handle<Object> value = MaterializeNextValue(); |
1679 array->set(i, *value); | 1679 array->set(i, *value); |
1680 } | 1680 } |
1681 } else { | 1681 } else { |
1682 // Dispatch on the instance type of the object to be materialized. | 1682 // Dispatch on the instance type of the object to be materialized. |
1683 Handle<Map> map = Handle<Map>::cast(MaterializeNextValue()); | 1683 Handle<Map> map = Handle<Map>::cast(MaterializeNextValue()); |
1684 switch (map->instance_type()) { | 1684 switch (map->instance_type()) { |
1685 case HEAP_NUMBER_TYPE: { | 1685 case HEAP_NUMBER_TYPE: { |
1686 Handle<HeapNumber> number = | 1686 Handle<HeapNumber> object = isolate_->factory()->NewHeapNumber(0.0); |
1687 Handle<HeapNumber>::cast(MaterializeNextValue()); | 1687 materialized_objects_->Add(object); |
1688 materialized_objects_->Add(number); | 1688 Handle<Object> number = MaterializeNextValue(); |
| 1689 object->set_value(number->Number()); |
1689 materialization_value_index_ += kDoubleSize / kPointerSize - 1; | 1690 materialization_value_index_ += kDoubleSize / kPointerSize - 1; |
1690 break; | 1691 break; |
1691 } | 1692 } |
1692 case JS_OBJECT_TYPE: { | 1693 case JS_OBJECT_TYPE: { |
1693 Handle<JSObject> object = | 1694 Handle<JSObject> object = |
1694 isolate_->factory()->NewJSObjectFromMap(map, NOT_TENURED, false); | 1695 isolate_->factory()->NewJSObjectFromMap(map, NOT_TENURED, false); |
1695 materialized_objects_->Add(object); | 1696 materialized_objects_->Add(object); |
1696 Handle<Object> properties = MaterializeNextValue(); | 1697 Handle<Object> properties = MaterializeNextValue(); |
1697 Handle<Object> elements = MaterializeNextValue(); | 1698 Handle<Object> elements = MaterializeNextValue(); |
1698 object->set_properties(FixedArray::cast(*properties)); | 1699 object->set_properties(FixedArray::cast(*properties)); |
(...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3309 | 3310 |
3310 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { | 3311 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { |
3311 v->VisitPointer(BitCast<Object**>(&function_)); | 3312 v->VisitPointer(BitCast<Object**>(&function_)); |
3312 v->VisitPointers(parameters_, parameters_ + parameters_count_); | 3313 v->VisitPointers(parameters_, parameters_ + parameters_count_); |
3313 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); | 3314 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); |
3314 } | 3315 } |
3315 | 3316 |
3316 #endif // ENABLE_DEBUGGER_SUPPORT | 3317 #endif // ENABLE_DEBUGGER_SUPPORT |
3317 | 3318 |
3318 } } // namespace v8::internal | 3319 } } // namespace v8::internal |
OLD | NEW |