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

Unified Diff: src/factory.cc

Issue 1374723002: Introduce LiteralsArray to hide it's implementation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: More comments. Created 5 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
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index c3a3b1570ffac982490b184681f153691e8e021b..56683b4d9ffbc37635ff8f886810ef9852f72c65 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1324,7 +1324,8 @@ Handle<JSFunction> Factory::NewFunctionFromSharedFunctionInfo(
} else if (!info->bound()) {
int number_of_literals = info->num_literals();
- Handle<FixedArray> literals = NewFixedArray(number_of_literals, pretenure);
+ Handle<LiteralsArray> literals = NewLiteralsArray(
+ handle(info->feedback_vector()), number_of_literals, pretenure);
result->set_literals(*literals);
// Cache context-specific literals.
if (FLAG_cache_optimized_code) {
@@ -2086,6 +2087,14 @@ Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo(
}
+Handle<LiteralsArray> Factory::NewLiteralsArray(
Igor Sheludko 2015/09/29 08:40:41 I think we don't need this method, just call Liter
+ Handle<TypeFeedbackVector> vector, int number_of_literals,
+ PretenureFlag pretenure) {
+ return LiteralsArray::Allocate(isolate(), vector, number_of_literals,
+ pretenure);
+}
+
+
Handle<JSMessageObject> Factory::NewJSMessageObject(
MessageTemplate::Template message, Handle<Object> argument,
int start_position, int end_position, Handle<Object> script,
« no previous file with comments | « src/factory.h ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698