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

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

Issue 1145213005: [strong] cache strong object literal maps (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix map comparison Created 5 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-inl.h ('k') | test/mjsunit/strong/literals.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-literals.cc
diff --git a/src/runtime/runtime-literals.cc b/src/runtime/runtime-literals.cc
index 122b0456915e62a52a79aa19ef86269dc565cc46..522411829abe4fc7a0d556a96360a40ef14d8a13 100644
--- a/src/runtime/runtime-literals.cc
+++ b/src/runtime/runtime-literals.cc
@@ -48,13 +48,13 @@ MUST_USE_RESULT static MaybeHandle<Object> CreateObjectLiteralBoilerplate(
// slow properties mode for now. We don't go in the map cache because
// maps with constant functions can't be shared if the functions are
// not the same (which is the common case).
- // TODO(rossberg): handle strong objects with function literals
bool is_result_from_cache = false;
Handle<Map> map = has_function_literal
- ? Handle<Map>(context->object_function()->initial_map())
- : ComputeObjectLiteralMap(context, constant_properties,
- is_strong,
- &is_result_from_cache);
+ ? Handle<Map>(is_strong
+ ? context->js_object_strong_map()
+ : context->object_function()->initial_map())
+ : ComputeObjectLiteralMap(context, constant_properties, is_strong,
+ &is_result_from_cache);
PretenureFlag pretenure_flag =
isolate->heap()->InNewSpace(*literals) ? NOT_TENURED : TENURED;
« no previous file with comments | « src/objects-inl.h ('k') | test/mjsunit/strong/literals.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698