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

Unified Diff: src/runtime/runtime-scopes.cc

Issue 2642933003: Revert of Revert [TypeFeedbackVector] Root literal arrays in function literal slots (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime-interpreter.cc ('k') | src/type-feedback-vector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-scopes.cc
diff --git a/src/runtime/runtime-scopes.cc b/src/runtime/runtime-scopes.cc
index 6dae7dd609d9b4801b163ca28daf916875bc0fc9..d28efcf74f1cf95d8230eb9108d7c733b41581fd 100644
--- a/src/runtime/runtime-scopes.cc
+++ b/src/runtime/runtime-scopes.cc
@@ -613,10 +613,15 @@
HandleScope scope(isolate);
DCHECK_EQ(3, args.length());
CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 0);
+ CONVERT_ARG_HANDLE_CHECKED(TypeFeedbackVector, vector, 1);
+ CONVERT_SMI_ARG_CHECKED(index, 2);
Handle<Context> context(isolate->context(), isolate);
+ FeedbackVectorSlot slot = TypeFeedbackVector::ToSlot(index);
+ Handle<LiteralsArray> literals(LiteralsArray::cast(vector->Get(slot)),
+ isolate);
Handle<JSFunction> function =
- isolate->factory()->NewFunctionFromSharedFunctionInfo(shared, context,
- NOT_TENURED);
+ isolate->factory()->NewFunctionFromSharedFunctionInfo(
+ shared, context, literals, NOT_TENURED);
return *function;
}
@@ -625,12 +630,17 @@
HandleScope scope(isolate);
DCHECK_EQ(3, args.length());
CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 0);
+ CONVERT_ARG_HANDLE_CHECKED(TypeFeedbackVector, vector, 1);
+ CONVERT_SMI_ARG_CHECKED(index, 2);
Handle<Context> context(isolate->context(), isolate);
+ FeedbackVectorSlot slot = TypeFeedbackVector::ToSlot(index);
+ Handle<LiteralsArray> literals(LiteralsArray::cast(vector->Get(slot)),
+ isolate);
// The caller ensures that we pretenure closures that are assigned
// directly to properties.
Handle<JSFunction> function =
isolate->factory()->NewFunctionFromSharedFunctionInfo(shared, context,
- TENURED);
+ literals, TENURED);
return *function;
}
« no previous file with comments | « src/runtime/runtime-interpreter.cc ('k') | src/type-feedback-vector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698