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

Side by Side Diff: src/deoptimizer.cc

Issue 2644283002: [deoptimizer] Initialize array iterator index to zero to make heap-verify happy. (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 | no next file » | 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 3706 matching lines...) Expand 10 before | Expand all | Expand 10 after
3717 case JS_FAST_SMI_ARRAY_VALUE_ITERATOR_TYPE: 3717 case JS_FAST_SMI_ARRAY_VALUE_ITERATOR_TYPE:
3718 case JS_FAST_HOLEY_SMI_ARRAY_VALUE_ITERATOR_TYPE: 3718 case JS_FAST_HOLEY_SMI_ARRAY_VALUE_ITERATOR_TYPE:
3719 case JS_FAST_ARRAY_VALUE_ITERATOR_TYPE: 3719 case JS_FAST_ARRAY_VALUE_ITERATOR_TYPE:
3720 case JS_FAST_HOLEY_ARRAY_VALUE_ITERATOR_TYPE: 3720 case JS_FAST_HOLEY_ARRAY_VALUE_ITERATOR_TYPE:
3721 case JS_FAST_DOUBLE_ARRAY_VALUE_ITERATOR_TYPE: 3721 case JS_FAST_DOUBLE_ARRAY_VALUE_ITERATOR_TYPE:
3722 case JS_FAST_HOLEY_DOUBLE_ARRAY_VALUE_ITERATOR_TYPE: 3722 case JS_FAST_HOLEY_DOUBLE_ARRAY_VALUE_ITERATOR_TYPE:
3723 case JS_GENERIC_ARRAY_VALUE_ITERATOR_TYPE: { 3723 case JS_GENERIC_ARRAY_VALUE_ITERATOR_TYPE: {
3724 Handle<JSArrayIterator> object = Handle<JSArrayIterator>::cast( 3724 Handle<JSArrayIterator> object = Handle<JSArrayIterator>::cast(
3725 isolate_->factory()->NewJSObjectFromMap(map, NOT_TENURED)); 3725 isolate_->factory()->NewJSObjectFromMap(map, NOT_TENURED));
3726 slot->value_ = object; 3726 slot->value_ = object;
3727 // Initialize the index to zero to make the heap verifier happy.
3728 object->set_index(Smi::FromInt(0));
3727 Handle<Object> properties = materializer.FieldAt(value_index); 3729 Handle<Object> properties = materializer.FieldAt(value_index);
3728 Handle<Object> elements = materializer.FieldAt(value_index); 3730 Handle<Object> elements = materializer.FieldAt(value_index);
3729 Handle<Object> iterated_object = materializer.FieldAt(value_index); 3731 Handle<Object> iterated_object = materializer.FieldAt(value_index);
3730 Handle<Object> next_index = materializer.FieldAt(value_index); 3732 Handle<Object> next_index = materializer.FieldAt(value_index);
3731 Handle<Object> iterated_object_map = materializer.FieldAt(value_index); 3733 Handle<Object> iterated_object_map = materializer.FieldAt(value_index);
3732 object->set_properties(FixedArray::cast(*properties)); 3734 object->set_properties(FixedArray::cast(*properties));
3733 object->set_elements(FixedArrayBase::cast(*elements)); 3735 object->set_elements(FixedArrayBase::cast(*elements));
3734 object->set_object(*iterated_object); 3736 object->set_object(*iterated_object);
3735 object->set_index(*next_index); 3737 object->set_index(*next_index);
3736 object->set_object_map(*iterated_object_map); 3738 object->set_object_map(*iterated_object_map);
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
4166 CHECK(value_info->IsMaterializedObject()); 4168 CHECK(value_info->IsMaterializedObject());
4167 4169
4168 value_info->value_ = 4170 value_info->value_ =
4169 Handle<Object>(previously_materialized_objects->get(i), isolate_); 4171 Handle<Object>(previously_materialized_objects->get(i), isolate_);
4170 } 4172 }
4171 } 4173 }
4172 } 4174 }
4173 4175
4174 } // namespace internal 4176 } // namespace internal
4175 } // namespace v8 4177 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698