| 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 1596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1607 Handle<FixedArray> array = isolate_->factory()->NewFixedArray(length); | 1607 Handle<FixedArray> array = isolate_->factory()->NewFixedArray(length); |
| 1608 ASSERT(array->length() == length); | 1608 ASSERT(array->length() == length); |
| 1609 arguments->set_elements(*array); | 1609 arguments->set_elements(*array); |
| 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 // We also need to make sure that the representation of all fields |
| 1618 // in the given object are general enough to hold a tagged value. |
| 1619 Handle<Map> map = Map::GeneralizeAllFieldRepresentations( |
| 1620 Handle<Map>::cast(MaterializeNextValue()), Representation::Tagged()); |
| 1618 switch (map->instance_type()) { | 1621 switch (map->instance_type()) { |
| 1619 case HEAP_NUMBER_TYPE: { | 1622 case HEAP_NUMBER_TYPE: { |
| 1620 Handle<HeapNumber> object = isolate_->factory()->NewHeapNumber(0.0); | 1623 Handle<HeapNumber> object = isolate_->factory()->NewHeapNumber(0.0); |
| 1621 materialized_objects_->Add(object); | 1624 materialized_objects_->Add(object); |
| 1622 Handle<Object> number = MaterializeNextValue(); | 1625 Handle<Object> number = MaterializeNextValue(); |
| 1623 object->set_value(number->Number()); | 1626 object->set_value(number->Number()); |
| 1624 materialization_value_index_ += kDoubleSize / kPointerSize - 1; | 1627 materialization_value_index_ += kDoubleSize / kPointerSize - 1; |
| 1625 break; | 1628 break; |
| 1626 } | 1629 } |
| 1627 case JS_OBJECT_TYPE: { | 1630 case JS_OBJECT_TYPE: { |
| (...skipping 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2945 | 2948 |
| 2946 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { | 2949 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { |
| 2947 v->VisitPointer(BitCast<Object**>(&function_)); | 2950 v->VisitPointer(BitCast<Object**>(&function_)); |
| 2948 v->VisitPointers(parameters_, parameters_ + parameters_count_); | 2951 v->VisitPointers(parameters_, parameters_ + parameters_count_); |
| 2949 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); | 2952 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); |
| 2950 } | 2953 } |
| 2951 | 2954 |
| 2952 #endif // ENABLE_DEBUGGER_SUPPORT | 2955 #endif // ENABLE_DEBUGGER_SUPPORT |
| 2953 | 2956 |
| 2954 } } // namespace v8::internal | 2957 } } // namespace v8::internal |
| OLD | NEW |