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

Unified Diff: src/arm64/code-stubs-arm64.cc

Issue 1451273002: [turbofan] Move JSCallFunction specialization to JSCallReducer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix arm64 failures. Created 5 years, 1 month 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/arm/code-stubs-arm.cc ('k') | src/compiler/js-call-reducer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/code-stubs-arm64.cc
diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc
index 751d8aebde99f4933624b0c0ad9cd7d2e59f8dfe..afab66c4a604b17873a03ebfdb18d86015602298 100644
--- a/src/arm64/code-stubs-arm64.cc
+++ b/src/arm64/code-stubs-arm64.cc
@@ -2945,6 +2945,14 @@ void CallICStub::Generate(MacroAssembler* masm) {
__ Cmp(function, x5);
__ B(eq, &miss);
+ // Make sure the function belongs to the same native context (which implies
+ // the same global object).
+ __ Ldr(x4, FieldMemOperand(function, JSFunction::kContextOffset));
+ __ Ldr(x4, ContextMemOperand(x4, Context::GLOBAL_OBJECT_INDEX));
+ __ Ldr(x4, GlobalObjectMemOperand());
+ __ Cmp(x4, x5);
+ __ B(ne, &miss);
+
// Update stats.
__ Ldr(x4, FieldMemOperand(feedback_vector, with_types_offset));
__ Adds(x4, x4, Operand(Smi::FromInt(1)));
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/compiler/js-call-reducer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698