| 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 3528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3539 | 3539 |
| 3540 void MacroAssembler::CheckEnumCache(Label* call_runtime) { | 3540 void MacroAssembler::CheckEnumCache(Label* call_runtime) { |
| 3541 Label next, start; | 3541 Label next, start; |
| 3542 mov(ecx, eax); | 3542 mov(ecx, eax); |
| 3543 | 3543 |
| 3544 // Check if the enum length field is properly initialized, indicating that | 3544 // Check if the enum length field is properly initialized, indicating that |
| 3545 // there is an enum cache. | 3545 // there is an enum cache. |
| 3546 mov(ebx, FieldOperand(ecx, HeapObject::kMapOffset)); | 3546 mov(ebx, FieldOperand(ecx, HeapObject::kMapOffset)); |
| 3547 | 3547 |
| 3548 EnumLength(edx, ebx); | 3548 EnumLength(edx, ebx); |
| 3549 cmp(edx, Immediate(Smi::FromInt(Map::kInvalidEnumCache))); | 3549 cmp(edx, Immediate(Smi::FromInt(kInvalidEnumCacheSentinel))); |
| 3550 j(equal, call_runtime); | 3550 j(equal, call_runtime); |
| 3551 | 3551 |
| 3552 jmp(&start); | 3552 jmp(&start); |
| 3553 | 3553 |
| 3554 bind(&next); | 3554 bind(&next); |
| 3555 mov(ebx, FieldOperand(ecx, HeapObject::kMapOffset)); | 3555 mov(ebx, FieldOperand(ecx, HeapObject::kMapOffset)); |
| 3556 | 3556 |
| 3557 // For all objects but the receiver, check that the cache is empty. | 3557 // For all objects but the receiver, check that the cache is empty. |
| 3558 EnumLength(edx, ebx); | 3558 EnumLength(edx, ebx); |
| 3559 cmp(edx, Immediate(Smi::FromInt(0))); | 3559 cmp(edx, Immediate(Smi::FromInt(0))); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3615 cmp(scratch1, Immediate(DICTIONARY_ELEMENTS)); | 3615 cmp(scratch1, Immediate(DICTIONARY_ELEMENTS)); |
| 3616 j(equal, found); | 3616 j(equal, found); |
| 3617 mov(current, FieldOperand(current, Map::kPrototypeOffset)); | 3617 mov(current, FieldOperand(current, Map::kPrototypeOffset)); |
| 3618 cmp(current, Immediate(factory->null_value())); | 3618 cmp(current, Immediate(factory->null_value())); |
| 3619 j(not_equal, &loop_again); | 3619 j(not_equal, &loop_again); |
| 3620 } | 3620 } |
| 3621 | 3621 |
| 3622 } } // namespace v8::internal | 3622 } } // namespace v8::internal |
| 3623 | 3623 |
| 3624 #endif // V8_TARGET_ARCH_IA32 | 3624 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |