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

Unified Diff: src/x64/ic-x64.cc

Issue 7259015: Fix receiver check in arguments ICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments. Created 9 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
« no previous file with comments | « src/ia32/ic-ia32.cc ('k') | test/mjsunit/regress/regress-crbug-87478.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/ic-x64.cc
diff --git a/src/x64/ic-x64.cc b/src/x64/ic-x64.cc
index fe61cd9ca59e3be4894d727dba5080adca390d5c..8919765cbcdef48f2fc186c0d73192a04d96bdbe 100644
--- a/src/x64/ic-x64.cc
+++ b/src/x64/ic-x64.cc
@@ -1208,8 +1208,13 @@ static Operand GenerateMappedArgumentsLookup(MacroAssembler* masm,
Label* slow_case) {
Heap* heap = masm->isolate()->heap();
- // Check that the receiver isn't a smi.
+ // Check that the receiver is a JSObject. Because of the elements
+ // map check later, we do not need to check for interceptors or
+ // whether it requires access checks.
__ JumpIfSmi(object, slow_case);
+ // Check that the object is some kind of JSObject.
+ __ CmpObjectType(object, FIRST_JS_RECEIVER_TYPE, scratch1);
+ __ j(below, slow_case);
// Check that the key is a positive smi.
Condition check = masm->CheckNonNegativeSmi(key);
« no previous file with comments | « src/ia32/ic-ia32.cc ('k') | test/mjsunit/regress/regress-crbug-87478.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698