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

Unified Diff: src/deoptimizer.cc

Issue 2320983002: [deoptimizer] Materialize JSFunction 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/compiler/escape-analysis-materialize.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 955152a2101952390456007c4cf48b0fc7157b7b..e8d780b0898a7623ac85d094af8cbb08c0181022 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -3774,14 +3774,15 @@ Handle<Object> TranslatedState::MaterializeAt(int frame_index,
return object;
}
case JS_FUNCTION_TYPE: {
+ Handle<SharedFunctionInfo> temporary_shared =
+ isolate_->factory()->NewSharedFunctionInfo(
+ isolate_->factory()->empty_string(), MaybeHandle<Code>(),
+ false);
Handle<JSFunction> object =
isolate_->factory()->NewFunctionFromSharedFunctionInfo(
- handle(isolate_->object_function()->shared()),
- handle(isolate_->context()));
+ map, temporary_shared, isolate_->factory()->undefined_value(),
+ NOT_TENURED);
slot->value_ = object;
- // We temporarily allocated a JSFunction for the {Object} function
- // within the current context, to break cycles in the object graph.
- // The correct function and context will be set below once available.
Handle<Object> properties = MaterializeAt(frame_index, value_index);
Handle<Object> elements = MaterializeAt(frame_index, value_index);
Handle<Object> prototype = MaterializeAt(frame_index, value_index);
« no previous file with comments | « no previous file | test/mjsunit/compiler/escape-analysis-materialize.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698