OLD | NEW |
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 3533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3544 JSArray::kSize + AllocationMemento::kSize - kHeapObjectTag)); | 3544 JSArray::kSize + AllocationMemento::kSize - kHeapObjectTag)); |
3545 cmp(scratch_reg, Immediate(new_space_start)); | 3545 cmp(scratch_reg, Immediate(new_space_start)); |
3546 j(less, no_memento_found); | 3546 j(less, no_memento_found); |
3547 cmp(scratch_reg, Operand::StaticVariable(new_space_allocation_top)); | 3547 cmp(scratch_reg, Operand::StaticVariable(new_space_allocation_top)); |
3548 j(greater, no_memento_found); | 3548 j(greater, no_memento_found); |
3549 cmp(MemOperand(scratch_reg, -AllocationMemento::kSize), | 3549 cmp(MemOperand(scratch_reg, -AllocationMemento::kSize), |
3550 Immediate(isolate()->factory()->allocation_memento_map())); | 3550 Immediate(isolate()->factory()->allocation_memento_map())); |
3551 } | 3551 } |
3552 | 3552 |
3553 | 3553 |
| 3554 void MacroAssembler::JumpIfDictionaryInPrototypeChain( |
| 3555 Register object, |
| 3556 Register scratch0, |
| 3557 Register scratch1, |
| 3558 Label* found) { |
| 3559 ASSERT(!scratch1.is(scratch0)); |
| 3560 Factory* factory = isolate()->factory(); |
| 3561 Register current = scratch0; |
| 3562 Label loop_again; |
| 3563 |
| 3564 // scratch contained elements pointer. |
| 3565 mov(current, object); |
| 3566 |
| 3567 // Loop based on the map going up the prototype chain. |
| 3568 bind(&loop_again); |
| 3569 mov(current, FieldOperand(current, HeapObject::kMapOffset)); |
| 3570 mov(scratch1, FieldOperand(current, Map::kBitField2Offset)); |
| 3571 and_(scratch1, Map::kElementsKindMask); |
| 3572 shr(scratch1, Map::kElementsKindShift); |
| 3573 cmp(scratch1, Immediate(DICTIONARY_ELEMENTS)); |
| 3574 j(equal, found); |
| 3575 mov(current, FieldOperand(current, Map::kPrototypeOffset)); |
| 3576 cmp(current, Immediate(factory->null_value())); |
| 3577 j(not_equal, &loop_again); |
| 3578 } |
| 3579 |
3554 } } // namespace v8::internal | 3580 } } // namespace v8::internal |
3555 | 3581 |
3556 #endif // V8_TARGET_ARCH_IA32 | 3582 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |