Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: src/deoptimizer.cc

Issue 2820603002: Revert of Merged: Squashed multiple commits. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/verifier.cc ('k') | src/objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
3022 double scalar_value = double_value().get_scalar(); 3026 double scalar_value = double_value().get_scalar();
3023 value_ = Handle<Object>(isolate()->factory()->NewNumber(scalar_value)); 3027 value_ = Handle<Object>(isolate()->factory()->NewNumber(scalar_value));
3024 return; 3028 return;
3025 } 3029 }
3026 3030
3027 case kCapturedObject: 3031 case kCapturedObject:
3028 case kDuplicatedObject: 3032 case kDuplicatedObject:
3029 case kArgumentsObject: 3033 case kArgumentsObject:
3030 case kInvalid: 3034 case kInvalid:
3031 case kTagged: 3035 case kTagged:
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
3896 int32_t length = 0; 3900 int32_t length = 0;
3897 CHECK(lengthObject->ToInt32(&length)); 3901 CHECK(lengthObject->ToInt32(&length));
3898 Handle<FixedArrayBase> object = 3902 Handle<FixedArrayBase> object =
3899 isolate_->factory()->NewFixedDoubleArray(length); 3903 isolate_->factory()->NewFixedDoubleArray(length);
3900 slot->value_ = object; 3904 slot->value_ = object;
3901 if (length > 0) { 3905 if (length > 0) {
3902 Handle<FixedDoubleArray> double_array = 3906 Handle<FixedDoubleArray> double_array =
3903 Handle<FixedDoubleArray>::cast(object); 3907 Handle<FixedDoubleArray>::cast(object);
3904 for (int i = 0; i < length; ++i) { 3908 for (int i = 0; i < length; ++i) {
3905 Handle<Object> value = materializer.FieldAt(value_index); 3909 Handle<Object> value = materializer.FieldAt(value_index);
3906 if (value.is_identical_to(isolate_->factory()->the_hole_value())) { 3910 CHECK(value->IsNumber());
3911 if (value.is_identical_to(isolate_->factory()->hole_nan_value())) {
3907 double_array->set_the_hole(isolate_, i); 3912 double_array->set_the_hole(isolate_, i);
3908 } else { 3913 } else {
3909 CHECK(value->IsNumber());
3910 double_array->set(i, value->Number()); 3914 double_array->set(i, value->Number());
3911 } 3915 }
3912 } 3916 }
3913 } 3917 }
3914 return object; 3918 return object;
3915 } 3919 }
3916 case STRING_TYPE: 3920 case STRING_TYPE:
3917 case ONE_BYTE_STRING_TYPE: 3921 case ONE_BYTE_STRING_TYPE:
3918 case CONS_ONE_BYTE_STRING_TYPE: 3922 case CONS_ONE_BYTE_STRING_TYPE:
3919 case SLICED_STRING_TYPE: 3923 case SLICED_STRING_TYPE:
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
4234 CHECK(value_info->IsMaterializedObject()); 4238 CHECK(value_info->IsMaterializedObject());
4235 4239
4236 value_info->value_ = 4240 value_info->value_ =
4237 Handle<Object>(previously_materialized_objects->get(i), isolate_); 4241 Handle<Object>(previously_materialized_objects->get(i), isolate_);
4238 } 4242 }
4239 } 4243 }
4240 } 4244 }
4241 4245
4242 } // namespace internal 4246 } // namespace internal
4243 } // namespace v8 4247 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/verifier.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698