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

Unified Diff: src/runtime/runtime-function.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/runtime/runtime-function.cc
diff --git a/src/runtime/runtime-function.cc b/src/runtime/runtime-function.cc
index be92d59a64ea9ae8ba62999eb8f0c1796335d452..e36a23314960d97bae56a23c616e4ed5485fc80a 100644
--- a/src/runtime/runtime-function.cc
+++ b/src/runtime/runtime-function.cc
@@ -236,10 +236,11 @@ RUNTIME_FUNCTION(Runtime_SetCode) {
// Make sure we get a fresh copy of the literal vector to avoid cross
// context contamination.
Handle<Context> context(source->context());
- int number_of_literals = source->NumberOfLiterals();
- Handle<FixedArray> literals =
- isolate->factory()->NewFixedArray(number_of_literals, TENURED);
target->set_context(*context);
+
+ int number_of_literals = source->NumberOfLiterals();
+ Handle<LiteralsArray> literals = isolate->factory()->NewLiteralsArray(
+ handle(target_shared->feedback_vector()), number_of_literals, TENURED);
target->set_literals(*literals);
if (isolate->logger()->is_logging_code_events() ||
« src/objects-inl.h ('K') | « src/runtime/runtime.h ('k') | src/runtime/runtime-literals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698