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/deoptimizer.h" | 5 #include "src/deoptimizer.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "src/accessors.h" | 9 #include "src/accessors.h" |
10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
(...skipping 3685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3696 // This has been previously materialized, return the previous value. | 3696 // This has been previously materialized, return the previous value. |
3697 // We still need to skip all the nested objects. | 3697 // We still need to skip all the nested objects. |
3698 for (int i = 0; i < length; i++) { | 3698 for (int i = 0; i < length; i++) { |
3699 materializer.At(value_index); | 3699 materializer.At(value_index); |
3700 } | 3700 } |
3701 | 3701 |
3702 return result; | 3702 return result; |
3703 } | 3703 } |
3704 | 3704 |
3705 Handle<Object> map_object = materializer.At(value_index); | 3705 Handle<Object> map_object = materializer.At(value_index); |
3706 Handle<Map> map = | 3706 Handle<Map> map = Map::GeneralizeAllFields(Handle<Map>::cast(map_object)); |
3707 Map::GeneralizeAllFieldRepresentations(Handle<Map>::cast(map_object)); | |
3708 switch (map->instance_type()) { | 3707 switch (map->instance_type()) { |
3709 case MUTABLE_HEAP_NUMBER_TYPE: | 3708 case MUTABLE_HEAP_NUMBER_TYPE: |
3710 case HEAP_NUMBER_TYPE: { | 3709 case HEAP_NUMBER_TYPE: { |
3711 // Reuse the HeapNumber value directly as it is already properly | 3710 // Reuse the HeapNumber value directly as it is already properly |
3712 // tagged and skip materializing the HeapNumber explicitly. | 3711 // tagged and skip materializing the HeapNumber explicitly. |
3713 Handle<Object> object = materializer.At(value_index); | 3712 Handle<Object> object = materializer.At(value_index); |
3714 slot->value_ = object; | 3713 slot->value_ = object; |
3715 // On 32-bit architectures, there is an extra slot there because | 3714 // On 32-bit architectures, there is an extra slot there because |
3716 // the escape analysis calculates the number of slots as | 3715 // the escape analysis calculates the number of slots as |
3717 // object-size/pointer-size. To account for this, we read out | 3716 // object-size/pointer-size. To account for this, we read out |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4032 CHECK(value_info->IsMaterializedObject()); | 4031 CHECK(value_info->IsMaterializedObject()); |
4033 | 4032 |
4034 value_info->value_ = | 4033 value_info->value_ = |
4035 Handle<Object>(previously_materialized_objects->get(i), isolate_); | 4034 Handle<Object>(previously_materialized_objects->get(i), isolate_); |
4036 } | 4035 } |
4037 } | 4036 } |
4038 } | 4037 } |
4039 | 4038 |
4040 } // namespace internal | 4039 } // namespace internal |
4041 } // namespace v8 | 4040 } // namespace v8 |
OLD | NEW |