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

Side by Side Diff: src/deoptimizer.cc

Issue 2323713002: [deoptimizer] Materialize JSArray objects without context. (Closed)
Patch Set: Created 4 years, 3 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 3744 matching lines...) Expand 10 before | Expand all | Expand 10 after
3755 object->set_properties(FixedArray::cast(*properties)); 3755 object->set_properties(FixedArray::cast(*properties));
3756 object->set_elements(FixedArrayBase::cast(*elements)); 3756 object->set_elements(FixedArrayBase::cast(*elements));
3757 for (int i = 0; i < length - 3; ++i) { 3757 for (int i = 0; i < length - 3; ++i) {
3758 Handle<Object> value = MaterializeAt(frame_index, value_index); 3758 Handle<Object> value = MaterializeAt(frame_index, value_index);
3759 FieldIndex index = FieldIndex::ForPropertyIndex(object->map(), i); 3759 FieldIndex index = FieldIndex::ForPropertyIndex(object->map(), i);
3760 object->FastPropertyAtPut(index, *value); 3760 object->FastPropertyAtPut(index, *value);
3761 } 3761 }
3762 return object; 3762 return object;
3763 } 3763 }
3764 case JS_ARRAY_TYPE: { 3764 case JS_ARRAY_TYPE: {
3765 Handle<JSArray> object = 3765 Handle<JSArray> object = Handle<JSArray>::cast(
3766 isolate_->factory()->NewJSArray(0, map->elements_kind()); 3766 isolate_->factory()->NewJSObjectFromMap(map, NOT_TENURED));
3767 slot->value_ = object; 3767 slot->value_ = object;
3768 Handle<Object> properties = MaterializeAt(frame_index, value_index); 3768 Handle<Object> properties = MaterializeAt(frame_index, value_index);
3769 Handle<Object> elements = MaterializeAt(frame_index, value_index); 3769 Handle<Object> elements = MaterializeAt(frame_index, value_index);
3770 Handle<Object> length = MaterializeAt(frame_index, value_index); 3770 Handle<Object> length = MaterializeAt(frame_index, value_index);
3771 object->set_properties(FixedArray::cast(*properties)); 3771 object->set_properties(FixedArray::cast(*properties));
3772 object->set_elements(FixedArrayBase::cast(*elements)); 3772 object->set_elements(FixedArrayBase::cast(*elements));
3773 object->set_length(*length); 3773 object->set_length(*length);
3774 return object; 3774 return object;
3775 } 3775 }
3776 case JS_FUNCTION_TYPE: { 3776 case JS_FUNCTION_TYPE: {
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
4024 CHECK(value_info->IsMaterializedObject()); 4024 CHECK(value_info->IsMaterializedObject());
4025 4025
4026 value_info->value_ = 4026 value_info->value_ =
4027 Handle<Object>(previously_materialized_objects->get(i), isolate_); 4027 Handle<Object>(previously_materialized_objects->get(i), isolate_);
4028 } 4028 }
4029 } 4029 }
4030 } 4030 }
4031 4031
4032 } // namespace internal 4032 } // namespace internal
4033 } // namespace v8 4033 } // 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