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

Side by Side Diff: src/mips/macro-assembler-mips.cc

Issue 63083002: MIPS: Correct handling of arrays with callbacks in the prototype chain. (Closed) Base URL: git@github.com:paul99/v8m-rb.git@master
Patch Set: Created 7 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/macro-assembler-mips.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 5636 matching lines...) Expand 10 before | Expand all | Expand 10 after
5647 for (int i = 0; i < Register::NumAllocatableRegisters(); i++) { 5647 for (int i = 0; i < Register::NumAllocatableRegisters(); i++) {
5648 Register candidate = Register::FromAllocationIndex(i); 5648 Register candidate = Register::FromAllocationIndex(i);
5649 if (regs & candidate.bit()) continue; 5649 if (regs & candidate.bit()) continue;
5650 return candidate; 5650 return candidate;
5651 } 5651 }
5652 UNREACHABLE(); 5652 UNREACHABLE();
5653 return no_reg; 5653 return no_reg;
5654 } 5654 }
5655 5655
5656 5656
5657 void MacroAssembler::JumpIfDictionaryInPrototypeChain(
5658 Register object,
5659 Register scratch0,
5660 Register scratch1,
5661 Label* found) {
5662 ASSERT(!scratch1.is(scratch0));
5663 Factory* factory = isolate()->factory();
5664 Register current = scratch0;
5665 Label loop_again;
5666
5667 // Scratch contained elements pointer.
5668 Move(current, object);
5669
5670 // Loop based on the map going up the prototype chain.
5671 bind(&loop_again);
5672 lw(current, FieldMemOperand(current, HeapObject::kMapOffset));
5673 lb(scratch1, FieldMemOperand(current, Map::kBitField2Offset));
5674 Ext(scratch1, scratch1, Map::kElementsKindShift, Map::kElementsKindBitCount);
5675 Branch(found, eq, scratch1, Operand(DICTIONARY_ELEMENTS));
5676 lw(current, FieldMemOperand(current, Map::kPrototypeOffset));
5677 Branch(&loop_again, ne, current, Operand(factory->null_value()));
5678 }
5679
5680
5657 bool AreAliased(Register r1, Register r2, Register r3, Register r4) { 5681 bool AreAliased(Register r1, Register r2, Register r3, Register r4) {
5658 if (r1.is(r2)) return true; 5682 if (r1.is(r2)) return true;
5659 if (r1.is(r3)) return true; 5683 if (r1.is(r3)) return true;
5660 if (r1.is(r4)) return true; 5684 if (r1.is(r4)) return true;
5661 if (r2.is(r3)) return true; 5685 if (r2.is(r3)) return true;
5662 if (r2.is(r4)) return true; 5686 if (r2.is(r4)) return true;
5663 if (r3.is(r4)) return true; 5687 if (r3.is(r4)) return true;
5664 return false; 5688 return false;
5665 } 5689 }
5666 5690
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
5714 opcode == BGTZL); 5738 opcode == BGTZL);
5715 opcode = (cond == eq) ? BEQ : BNE; 5739 opcode = (cond == eq) ? BEQ : BNE;
5716 instr = (instr & ~kOpcodeMask) | opcode; 5740 instr = (instr & ~kOpcodeMask) | opcode;
5717 masm_.emit(instr); 5741 masm_.emit(instr);
5718 } 5742 }
5719 5743
5720 5744
5721 } } // namespace v8::internal 5745 } } // namespace v8::internal
5722 5746
5723 #endif // V8_TARGET_ARCH_MIPS 5747 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698