| 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 3001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3012 value_ = Handle<Object>(isolate()->factory()->NewNumber(uint32_value())); | 3012 value_ = Handle<Object>(isolate()->factory()->NewNumber(uint32_value())); |
| 3013 return; | 3013 return; |
| 3014 | 3014 |
| 3015 case kFloat: { | 3015 case kFloat: { |
| 3016 double scalar_value = float_value().get_scalar(); | 3016 double scalar_value = float_value().get_scalar(); |
| 3017 value_ = Handle<Object>(isolate()->factory()->NewNumber(scalar_value)); | 3017 value_ = Handle<Object>(isolate()->factory()->NewNumber(scalar_value)); |
| 3018 return; | 3018 return; |
| 3019 } | 3019 } |
| 3020 | 3020 |
| 3021 case kDouble: { | 3021 case kDouble: { |
| 3022 if (double_value().is_hole_nan()) { | |
| 3023 value_ = isolate()->factory()->hole_nan_value(); | |
| 3024 return; | |
| 3025 } | |
| 3026 double scalar_value = double_value().get_scalar(); | 3022 double scalar_value = double_value().get_scalar(); |
| 3027 value_ = Handle<Object>(isolate()->factory()->NewNumber(scalar_value)); | 3023 value_ = Handle<Object>(isolate()->factory()->NewNumber(scalar_value)); |
| 3028 return; | 3024 return; |
| 3029 } | 3025 } |
| 3030 | 3026 |
| 3031 case kCapturedObject: | 3027 case kCapturedObject: |
| 3032 case kDuplicatedObject: | 3028 case kDuplicatedObject: |
| 3033 case kArgumentsObject: | 3029 case kArgumentsObject: |
| 3034 case kInvalid: | 3030 case kInvalid: |
| 3035 case kTagged: | 3031 case kTagged: |
| (...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3900 int32_t length = 0; | 3896 int32_t length = 0; |
| 3901 CHECK(lengthObject->ToInt32(&length)); | 3897 CHECK(lengthObject->ToInt32(&length)); |
| 3902 Handle<FixedArrayBase> object = | 3898 Handle<FixedArrayBase> object = |
| 3903 isolate_->factory()->NewFixedDoubleArray(length); | 3899 isolate_->factory()->NewFixedDoubleArray(length); |
| 3904 slot->value_ = object; | 3900 slot->value_ = object; |
| 3905 if (length > 0) { | 3901 if (length > 0) { |
| 3906 Handle<FixedDoubleArray> double_array = | 3902 Handle<FixedDoubleArray> double_array = |
| 3907 Handle<FixedDoubleArray>::cast(object); | 3903 Handle<FixedDoubleArray>::cast(object); |
| 3908 for (int i = 0; i < length; ++i) { | 3904 for (int i = 0; i < length; ++i) { |
| 3909 Handle<Object> value = materializer.FieldAt(value_index); | 3905 Handle<Object> value = materializer.FieldAt(value_index); |
| 3910 CHECK(value->IsNumber()); | 3906 if (value.is_identical_to(isolate_->factory()->the_hole_value())) { |
| 3911 if (value.is_identical_to(isolate_->factory()->hole_nan_value())) { | |
| 3912 double_array->set_the_hole(isolate_, i); | 3907 double_array->set_the_hole(isolate_, i); |
| 3913 } else { | 3908 } else { |
| 3909 CHECK(value->IsNumber()); |
| 3914 double_array->set(i, value->Number()); | 3910 double_array->set(i, value->Number()); |
| 3915 } | 3911 } |
| 3916 } | 3912 } |
| 3917 } | 3913 } |
| 3918 return object; | 3914 return object; |
| 3919 } | 3915 } |
| 3920 case STRING_TYPE: | 3916 case STRING_TYPE: |
| 3921 case ONE_BYTE_STRING_TYPE: | 3917 case ONE_BYTE_STRING_TYPE: |
| 3922 case CONS_ONE_BYTE_STRING_TYPE: | 3918 case CONS_ONE_BYTE_STRING_TYPE: |
| 3923 case SLICED_STRING_TYPE: | 3919 case SLICED_STRING_TYPE: |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4238 CHECK(value_info->IsMaterializedObject()); | 4234 CHECK(value_info->IsMaterializedObject()); |
| 4239 | 4235 |
| 4240 value_info->value_ = | 4236 value_info->value_ = |
| 4241 Handle<Object>(previously_materialized_objects->get(i), isolate_); | 4237 Handle<Object>(previously_materialized_objects->get(i), isolate_); |
| 4242 } | 4238 } |
| 4243 } | 4239 } |
| 4244 } | 4240 } |
| 4245 | 4241 |
| 4246 } // namespace internal | 4242 } // namespace internal |
| 4247 } // namespace v8 | 4243 } // namespace v8 |
| OLD | NEW |