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

Unified Diff: src/compiler/arm64/code-generator-arm64.cc

Issue 2937413002: [arm64] Share constant pool entries in snapshot. (Closed)
Patch Set: Created 3 years, 6 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/compiler/arm64/code-generator-arm64.cc
diff --git a/src/compiler/arm64/code-generator-arm64.cc b/src/compiler/arm64/code-generator-arm64.cc
index 91efff57e3184038347afb608c408481c1c5c4c3..deaa08800ccbba29cda9b618618b732e158f5e88 100644
--- a/src/compiler/arm64/code-generator-arm64.cc
+++ b/src/compiler/arm64/code-generator-arm64.cc
@@ -658,6 +658,11 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
ArchOpcode arch_opcode = ArchOpcodeField::decode(opcode);
switch (arch_opcode) {
case kArchCallCodeObject: {
+ // We must not share code targets for calls to builtins for WASM code, as
+ // they might need to be patched individually.
+ internal::Assembler::BlockCodeTargetSharingScope scope;
+ if (info()->IsWasm()) scope.Open(masm());
+
EnsureSpaceForLazyDeopt();
if (instr->InputAt(0)->IsImmediate()) {
__ Call(Handle<Code>::cast(i.InputHeapObject(0)),
@@ -685,6 +690,11 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
}
case kArchTailCallCodeObjectFromJSFunction:
case kArchTailCallCodeObject: {
+ // We must not share code targets for calls to builtins for WASM code, as
+ // they might need to be patched individually.
+ internal::Assembler::BlockCodeTargetSharingScope scope;
+ if (info()->IsWasm()) scope.Open(masm());
+
if (arch_opcode == kArchTailCallCodeObjectFromJSFunction) {
AssemblePopArgumentsAdaptorFrame(kJavaScriptCallArgCountRegister,
i.TempRegister(0), i.TempRegister(1),

Powered by Google App Engine
This is Rietveld 408576698