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