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

Side by Side Diff: src/mips/ic-mips.cc

Issue 8428004: MIPS: Cleanup: use JumpIf[Not]Smi() whenever we can (Closed)
Patch Set: Fixed typo, rebased to r9884 Created 9 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 unified diff | Download patch
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 520
521 // Move result to a1 and leave the internal frame. 521 // Move result to a1 and leave the internal frame.
522 __ mov(a1, v0); 522 __ mov(a1, v0);
523 } 523 }
524 524
525 // Check if the receiver is a global object of some sort. 525 // Check if the receiver is a global object of some sort.
526 // This can happen only for regular CallIC but not KeyedCallIC. 526 // This can happen only for regular CallIC but not KeyedCallIC.
527 if (id == IC::kCallIC_Miss) { 527 if (id == IC::kCallIC_Miss) {
528 Label invoke, global; 528 Label invoke, global;
529 __ lw(a2, MemOperand(sp, argc * kPointerSize)); 529 __ lw(a2, MemOperand(sp, argc * kPointerSize));
530 __ andi(t0, a2, kSmiTagMask); 530 __ JumpIfSmi(a2, &invoke);
531 __ Branch(&invoke, eq, t0, Operand(zero_reg));
532 __ GetObjectType(a2, a3, a3); 531 __ GetObjectType(a2, a3, a3);
533 __ Branch(&global, eq, a3, Operand(JS_GLOBAL_OBJECT_TYPE)); 532 __ Branch(&global, eq, a3, Operand(JS_GLOBAL_OBJECT_TYPE));
534 __ Branch(&invoke, ne, a3, Operand(JS_BUILTINS_OBJECT_TYPE)); 533 __ Branch(&invoke, ne, a3, Operand(JS_BUILTINS_OBJECT_TYPE));
535 534
536 // Patch the receiver on the stack. 535 // Patch the receiver on the stack.
537 __ bind(&global); 536 __ bind(&global);
538 __ lw(a2, FieldMemOperand(a2, GlobalObject::kGlobalReceiverOffset)); 537 __ lw(a2, FieldMemOperand(a2, GlobalObject::kGlobalReceiverOffset));
539 __ sw(a2, MemOperand(sp, argc * kPointerSize)); 538 __ sw(a2, MemOperand(sp, argc * kPointerSize));
540 __ bind(&invoke); 539 __ bind(&invoke);
541 } 540 }
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1672 Register reg = Register::from_code(Assembler::GetRs(instr_at_patch)); 1671 Register reg = Register::from_code(Assembler::GetRs(instr_at_patch));
1673 patcher.masm()->andi(at, reg, kSmiTagMask); 1672 patcher.masm()->andi(at, reg, kSmiTagMask);
1674 patcher.ChangeBranchCondition(eq); 1673 patcher.ChangeBranchCondition(eq);
1675 } 1674 }
1676 } 1675 }
1677 1676
1678 1677
1679 } } // namespace v8::internal 1678 } } // namespace v8::internal
1680 1679
1681 #endif // V8_TARGET_ARCH_MIPS 1680 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698