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

Side by Side Diff: src/deoptimizer.cc

Issue 2819653002: 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 }
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
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
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
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