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

Unified Diff: src/x64/code-stubs-x64.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/mips64/code-stubs-mips64.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index b7fb099512e64e0d8a3098bd058417fb2acdee83..23fb5eec631c5e4e8789f9f6478c6ced13e5e929 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -2051,6 +2051,13 @@ void CallICStub::Generate(MacroAssembler* masm) {
__ cmpp(rdi, rcx);
__ j(equal, &miss);
+ // Make sure the function belongs to the same native context (which implies
+ // the same global object).
+ __ movp(rcx, FieldOperand(rdi, JSFunction::kContextOffset));
+ __ movp(rcx, ContextOperand(rcx, Context::GLOBAL_OBJECT_INDEX));
+ __ cmpp(rcx, GlobalObjectOperand());
+ __ j(not_equal, &miss);
+
// Update stats.
__ SmiAddConstant(FieldOperand(rbx, with_types_offset), Smi::FromInt(1));
« no previous file with comments | « src/mips64/code-stubs-mips64.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698