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

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

Issue 1455663002: PPC: [turbofan] Move JSCallFunction specialization to JSCallReducer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ppc/code-stubs-ppc.cc
diff --git a/src/ppc/code-stubs-ppc.cc b/src/ppc/code-stubs-ppc.cc
index 92501a4a23746ec3e7e3356cd6664c68c4cfdff0..81ff22805d57df60f4a246b2afb007c990d74b1e 100644
--- a/src/ppc/code-stubs-ppc.cc
+++ b/src/ppc/code-stubs-ppc.cc
@@ -2716,6 +2716,14 @@ void CallICStub::Generate(MacroAssembler* masm) {
__ cmp(r4, r7);
__ beq(&miss);
+ // Make sure the function belongs to the same native context (which implies
+ // the same global object).
+ __ LoadP(r7, FieldMemOperand(r4, JSFunction::kContextOffset));
+ __ LoadP(r7, ContextOperand(r7, Context::GLOBAL_OBJECT_INDEX));
+ __ LoadP(ip, GlobalObjectOperand());
+ __ cmp(r7, ip);
+ __ bne(&miss);
+
// Update stats.
__ LoadP(r7, FieldMemOperand(r5, with_types_offset));
__ AddSmiLiteral(r7, r7, Smi::FromInt(1), r0);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698