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

Unified Diff: src/builtins/setup-builtins-internal.cc

Issue 2869683004: [arm] Share constant pool entries in snapshot. (Closed)
Patch Set: Update tools/v8heapconst.py Created 3 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/assembler.h ('k') | src/code-stubs.cc » ('j') | src/disassembler.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/setup-builtins-internal.cc
diff --git a/src/builtins/setup-builtins-internal.cc b/src/builtins/setup-builtins-internal.cc
index ca88e6332b54796917e4ae7a212a5f837dcba883..ccdb5ae22714e89b208581ccc70f51e4d1b10e94 100644
--- a/src/builtins/setup-builtins-internal.cc
+++ b/src/builtins/setup-builtins-internal.cc
@@ -41,6 +41,9 @@ Code* BuildWithMacroAssembler(Isolate* isolate,
MacroAssemblerGenerator generator,
Code::Flags flags, const char* s_name) {
HandleScope scope(isolate);
+ // Canonicalize handles, so that we can share constant pool entries pointing
+ // to code targets without dereferencing their handles.
+ CanonicalHandleScope canonical(isolate);
const size_t buffer_size = 32 * KB;
byte buffer[buffer_size]; // NOLINT(runtime/arrays)
MacroAssembler masm(isolate, buffer, buffer_size, CodeObjectRequired::kYes);
@@ -58,6 +61,9 @@ Code* BuildAdaptor(Isolate* isolate, Address builtin_address,
Builtins::ExitFrameType exit_frame_type, Code::Flags flags,
const char* name) {
HandleScope scope(isolate);
+ // Canonicalize handles, so that we can share constant pool entries pointing
+ // to code targets without dereferencing their handles.
+ CanonicalHandleScope canonical(isolate);
const size_t buffer_size = 32 * KB;
byte buffer[buffer_size]; // NOLINT(runtime/arrays)
MacroAssembler masm(isolate, buffer, buffer_size, CodeObjectRequired::kYes);
@@ -76,6 +82,9 @@ Code* BuildWithCodeStubAssemblerJS(Isolate* isolate,
CodeAssemblerGenerator generator, int argc,
Code::Flags flags, const char* name) {
HandleScope scope(isolate);
+ // Canonicalize handles, so that we can share constant pool entries pointing
+ // to code targets without dereferencing their handles.
+ CanonicalHandleScope canonical(isolate);
Zone zone(isolate->allocator(), ZONE_NAME);
const int argc_with_recv =
(argc == SharedFunctionInfo::kDontAdaptArgumentsSentinel) ? 0 : argc + 1;
@@ -94,6 +103,9 @@ Code* BuildWithCodeStubAssemblerCS(Isolate* isolate,
Code::Flags flags, const char* name,
int result_size) {
HandleScope scope(isolate);
+ // Canonicalize handles, so that we can share constant pool entries pointing
+ // to code targets without dereferencing their handles.
+ CanonicalHandleScope canonical(isolate);
Zone zone(isolate->allocator(), ZONE_NAME);
// The interface descriptor with given key must be initialized at this point
// and this construction just queries the details from the descriptors table.
« no previous file with comments | « src/assembler.h ('k') | src/code-stubs.cc » ('j') | src/disassembler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698