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

Unified Diff: src/deoptimizer.cc

Issue 2931483003: [deoptimizer] Teach the Deoptimizer about bound functions. (Closed)
Patch Set: Add moar test covfefe Created 3 years, 6 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-729573-1.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 03c06b983a182abfb0f00777008e7fe8b92ed621..6339e39b8fc65523fbcd2acc1e787aebbc692ff5 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -4061,6 +4061,23 @@ Handle<Object> TranslatedState::MaterializeCapturedObjectAt(
object->set_length(*array_length);
return object;
}
+ case JS_BOUND_FUNCTION_TYPE: {
+ Handle<JSBoundFunction> object = Handle<JSBoundFunction>::cast(
+ isolate_->factory()->NewJSObjectFromMap(map, NOT_TENURED));
+ slot->value_ = object;
+ Handle<Object> properties = materializer.FieldAt(value_index);
+ Handle<Object> elements = materializer.FieldAt(value_index);
+ Handle<Object> bound_target_function = materializer.FieldAt(value_index);
+ Handle<Object> bound_this = materializer.FieldAt(value_index);
+ Handle<Object> bound_arguments = materializer.FieldAt(value_index);
+ object->set_properties(FixedArray::cast(*properties));
+ object->set_elements(FixedArrayBase::cast(*elements));
+ object->set_bound_target_function(
+ JSReceiver::cast(*bound_target_function));
+ object->set_bound_this(*bound_this);
+ object->set_bound_arguments(FixedArray::cast(*bound_arguments));
+ return object;
+ }
case CONS_STRING_TYPE: {
Handle<ConsString> object = Handle<ConsString>::cast(
isolate_->factory()
@@ -4178,7 +4195,6 @@ Handle<Object> TranslatedState::MaterializeCapturedObjectAt(
case JS_WEAK_SET_TYPE:
case JS_PROMISE_CAPABILITY_TYPE:
case JS_PROMISE_TYPE:
- case JS_BOUND_FUNCTION_TYPE:
case JS_PROXY_TYPE:
case MAP_TYPE:
case ALLOCATION_SITE_TYPE:
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-729573-1.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698