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

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

Issue 2007943002: [runtime] Fix number of literals for builtin functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix unittest. Created 4 years, 7 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/objects-printer.cc ('k') | test/unittests/compiler/js-create-lowering-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-function.cc
diff --git a/src/runtime/runtime-function.cc b/src/runtime/runtime-function.cc
index 6e6aaf086e5468cb87d3ca004acc38c5c3589c52..5d08577f20cdb4ab4f608194de51be7472aadfe3 100644
--- a/src/runtime/runtime-function.cc
+++ b/src/runtime/runtime-function.cc
@@ -187,6 +187,7 @@ RUNTIME_FUNCTION(Runtime_SetCode) {
}
target_shared->set_scope_info(source_shared->scope_info());
target_shared->set_length(source_shared->length());
+ target_shared->set_num_literals(source_shared->num_literals());
target_shared->set_feedback_vector(source_shared->feedback_vector());
target_shared->set_internal_formal_parameter_count(
source_shared->internal_formal_parameter_count());
@@ -211,10 +212,9 @@ RUNTIME_FUNCTION(Runtime_SetCode) {
Handle<Context> context(source->context());
target->set_context(*context);
- int number_of_literals = source->NumberOfLiterals();
Handle<LiteralsArray> literals =
LiteralsArray::New(isolate, handle(target_shared->feedback_vector()),
- number_of_literals, TENURED);
+ target_shared->num_literals(), TENURED);
target->set_literals(*literals);
if (isolate->logger()->is_logging_code_events() ||
« no previous file with comments | « src/objects-printer.cc ('k') | test/unittests/compiler/js-create-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698