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

Side by Side Diff: src/deoptimizer.cc

Issue 2651553003: [deoptimizer] Materialize string iterators. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | test/mjsunit/regress/regress-683617.js » ('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 3720 matching lines...) Expand 10 before | Expand all | Expand 10 after
3731 Handle<Object> iterated_object = materializer.FieldAt(value_index); 3731 Handle<Object> iterated_object = materializer.FieldAt(value_index);
3732 Handle<Object> next_index = materializer.FieldAt(value_index); 3732 Handle<Object> next_index = materializer.FieldAt(value_index);
3733 Handle<Object> iterated_object_map = materializer.FieldAt(value_index); 3733 Handle<Object> iterated_object_map = materializer.FieldAt(value_index);
3734 object->set_properties(FixedArray::cast(*properties)); 3734 object->set_properties(FixedArray::cast(*properties));
3735 object->set_elements(FixedArrayBase::cast(*elements)); 3735 object->set_elements(FixedArrayBase::cast(*elements));
3736 object->set_object(*iterated_object); 3736 object->set_object(*iterated_object);
3737 object->set_index(*next_index); 3737 object->set_index(*next_index);
3738 object->set_object_map(*iterated_object_map); 3738 object->set_object_map(*iterated_object_map);
3739 return object; 3739 return object;
3740 } 3740 }
3741 case JS_STRING_ITERATOR_TYPE: {
3742 Handle<JSStringIterator> object = Handle<JSStringIterator>::cast(
3743 isolate_->factory()->NewJSObjectFromMap(map, NOT_TENURED));
3744 slot->value_ = object;
3745 // Initialize the index to zero to make the heap verifier happy.
3746 object->set_index(0);
3747 Handle<Object> properties = materializer.FieldAt(value_index);
3748 Handle<Object> elements = materializer.FieldAt(value_index);
3749 Handle<Object> iterated_string = materializer.FieldAt(value_index);
3750 Handle<Object> next_index = materializer.FieldAt(value_index);
3751 object->set_properties(FixedArray::cast(*properties));
3752 object->set_elements(FixedArrayBase::cast(*elements));
3753 CHECK(iterated_string->IsString());
3754 object->set_string(String::cast(*iterated_string));
3755 CHECK(next_index->IsSmi());
3756 object->set_index(Smi::cast(*next_index)->value());
3757 return object;
3758 }
3741 case JS_ARRAY_TYPE: { 3759 case JS_ARRAY_TYPE: {
3742 Handle<JSArray> object = Handle<JSArray>::cast( 3760 Handle<JSArray> object = Handle<JSArray>::cast(
3743 isolate_->factory()->NewJSObjectFromMap(map, NOT_TENURED)); 3761 isolate_->factory()->NewJSObjectFromMap(map, NOT_TENURED));
3744 slot->value_ = object; 3762 slot->value_ = object;
3745 Handle<Object> properties = materializer.FieldAt(value_index); 3763 Handle<Object> properties = materializer.FieldAt(value_index);
3746 Handle<Object> elements = materializer.FieldAt(value_index); 3764 Handle<Object> elements = materializer.FieldAt(value_index);
3747 Handle<Object> length = materializer.FieldAt(value_index); 3765 Handle<Object> length = materializer.FieldAt(value_index);
3748 object->set_properties(FixedArray::cast(*properties)); 3766 object->set_properties(FixedArray::cast(*properties));
3749 object->set_elements(FixedArrayBase::cast(*elements)); 3767 object->set_elements(FixedArrayBase::cast(*elements));
3750 object->set_length(*length); 3768 object->set_length(*length);
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
3879 case JS_GENERATOR_OBJECT_TYPE: 3897 case JS_GENERATOR_OBJECT_TYPE:
3880 case JS_MODULE_NAMESPACE_TYPE: 3898 case JS_MODULE_NAMESPACE_TYPE:
3881 case JS_ARRAY_BUFFER_TYPE: 3899 case JS_ARRAY_BUFFER_TYPE:
3882 case JS_REGEXP_TYPE: 3900 case JS_REGEXP_TYPE:
3883 case JS_TYPED_ARRAY_TYPE: 3901 case JS_TYPED_ARRAY_TYPE:
3884 case JS_DATA_VIEW_TYPE: 3902 case JS_DATA_VIEW_TYPE:
3885 case JS_SET_TYPE: 3903 case JS_SET_TYPE:
3886 case JS_MAP_TYPE: 3904 case JS_MAP_TYPE:
3887 case JS_SET_ITERATOR_TYPE: 3905 case JS_SET_ITERATOR_TYPE:
3888 case JS_MAP_ITERATOR_TYPE: 3906 case JS_MAP_ITERATOR_TYPE:
3889 case JS_STRING_ITERATOR_TYPE:
3890 case JS_WEAK_MAP_TYPE: 3907 case JS_WEAK_MAP_TYPE:
3891 case JS_WEAK_SET_TYPE: 3908 case JS_WEAK_SET_TYPE:
3892 case JS_PROMISE_CAPABILITY_TYPE: 3909 case JS_PROMISE_CAPABILITY_TYPE:
3893 case JS_PROMISE_TYPE: 3910 case JS_PROMISE_TYPE:
3894 case JS_BOUND_FUNCTION_TYPE: 3911 case JS_BOUND_FUNCTION_TYPE:
3895 case JS_PROXY_TYPE: 3912 case JS_PROXY_TYPE:
3896 case MAP_TYPE: 3913 case MAP_TYPE:
3897 case ALLOCATION_SITE_TYPE: 3914 case ALLOCATION_SITE_TYPE:
3898 case ACCESSOR_INFO_TYPE: 3915 case ACCESSOR_INFO_TYPE:
3899 case SHARED_FUNCTION_INFO_TYPE: 3916 case SHARED_FUNCTION_INFO_TYPE:
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
4168 CHECK(value_info->IsMaterializedObject()); 4185 CHECK(value_info->IsMaterializedObject());
4169 4186
4170 value_info->value_ = 4187 value_info->value_ =
4171 Handle<Object>(previously_materialized_objects->get(i), isolate_); 4188 Handle<Object>(previously_materialized_objects->get(i), isolate_);
4172 } 4189 }
4173 } 4190 }
4174 } 4191 }
4175 4192
4176 } // namespace internal 4193 } // namespace internal
4177 } // namespace v8 4194 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-683617.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698