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

Unified Diff: src/deoptimizer.cc

Issue 2001133002: [deoptimizer] Fix materialization of sloppy arguments. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-613919.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index c698459fd0396c4f4a50ec008f0430b053bb7fd5..857c1208012f6697292dc0d85167e3d35db5412f 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -3685,11 +3685,15 @@ Handle<Object> TranslatedState::MaterializeAt(int frame_index,
return object;
}
case JS_OBJECT_TYPE: {
- Handle<JSObject> object =
- isolate_->factory()->NewJSObjectFromMap(map, NOT_TENURED);
+ Handle<JSObject> object = isolate_->factory()->NewJSObjectFromMap(
+ map->has_sloppy_arguments_elements()
+ ? isolate()->sloppy_arguments_map()
+ : map,
+ NOT_TENURED);
slot->value_ = object;
Handle<Object> properties = MaterializeAt(frame_index, value_index);
Handle<Object> elements = MaterializeAt(frame_index, value_index);
+ object->set_map(*map); // Correct elements kind for sloppy arguments.
object->set_properties(FixedArray::cast(*properties));
object->set_elements(FixedArrayBase::cast(*elements));
for (int i = 0; i < length - 3; ++i) {
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-613919.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698