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 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1610 materialized_objects_->Add(arguments); | 1610 materialized_objects_->Add(arguments); |
1611 for (int i = 0; i < length; ++i) { | 1611 for (int i = 0; i < length; ++i) { |
1612 Handle<Object> value = MaterializeNextValue(); | 1612 Handle<Object> value = MaterializeNextValue(); |
1613 array->set(i, *value); | 1613 array->set(i, *value); |
1614 } | 1614 } |
1615 } else { | 1615 } else { |
1616 // Dispatch on the instance type of the object to be materialized. | 1616 // Dispatch on the instance type of the object to be materialized. |
1617 Handle<Map> map = Handle<Map>::cast(MaterializeNextValue()); | 1617 Handle<Map> map = Handle<Map>::cast(MaterializeNextValue()); |
1618 switch (map->instance_type()) { | 1618 switch (map->instance_type()) { |
1619 case HEAP_NUMBER_TYPE: { | 1619 case HEAP_NUMBER_TYPE: { |
1620 Handle<HeapNumber> number = | 1620 Handle<HeapNumber> object = isolate_->factory()->NewHeapNumber(0.0); |
1621 Handle<HeapNumber>::cast(MaterializeNextValue()); | 1621 materialized_objects_->Add(object); |
1622 materialized_objects_->Add(number); | 1622 Handle<Object> number = MaterializeNextValue(); |
| 1623 object->set_value(number->Number()); |
1623 materialization_value_index_ += kDoubleSize / kPointerSize - 1; | 1624 materialization_value_index_ += kDoubleSize / kPointerSize - 1; |
1624 break; | 1625 break; |
1625 } | 1626 } |
1626 case JS_OBJECT_TYPE: { | 1627 case JS_OBJECT_TYPE: { |
1627 Handle<JSObject> object = | 1628 Handle<JSObject> object = |
1628 isolate_->factory()->NewJSObjectFromMap(map, NOT_TENURED, false); | 1629 isolate_->factory()->NewJSObjectFromMap(map, NOT_TENURED, false); |
1629 materialized_objects_->Add(object); | 1630 materialized_objects_->Add(object); |
1630 Handle<Object> properties = MaterializeNextValue(); | 1631 Handle<Object> properties = MaterializeNextValue(); |
1631 Handle<Object> elements = MaterializeNextValue(); | 1632 Handle<Object> elements = MaterializeNextValue(); |
1632 object->set_properties(FixedArray::cast(*properties)); | 1633 object->set_properties(FixedArray::cast(*properties)); |
(...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3051 | 3052 |
3052 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { | 3053 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { |
3053 v->VisitPointer(BitCast<Object**>(&function_)); | 3054 v->VisitPointer(BitCast<Object**>(&function_)); |
3054 v->VisitPointers(parameters_, parameters_ + parameters_count_); | 3055 v->VisitPointers(parameters_, parameters_ + parameters_count_); |
3055 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); | 3056 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); |
3056 } | 3057 } |
3057 | 3058 |
3058 #endif // ENABLE_DEBUGGER_SUPPORT | 3059 #endif // ENABLE_DEBUGGER_SUPPORT |
3059 | 3060 |
3060 } } // namespace v8::internal | 3061 } } // namespace v8::internal |
OLD | NEW |