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 3865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3876 ldr(r2, FieldMemOperand(r2, JSObject::kElementsOffset)); | 3876 ldr(r2, FieldMemOperand(r2, JSObject::kElementsOffset)); |
3877 cmp(r2, empty_fixed_array_value); | 3877 cmp(r2, empty_fixed_array_value); |
3878 b(ne, call_runtime); | 3878 b(ne, call_runtime); |
3879 | 3879 |
3880 ldr(r2, FieldMemOperand(r1, Map::kPrototypeOffset)); | 3880 ldr(r2, FieldMemOperand(r1, Map::kPrototypeOffset)); |
3881 cmp(r2, null_value); | 3881 cmp(r2, null_value); |
3882 b(ne, &next); | 3882 b(ne, &next); |
3883 } | 3883 } |
3884 | 3884 |
3885 | 3885 |
| 3886 void MacroAssembler::TestJSArrayForAllocationSiteInfo( |
| 3887 Register receiver_reg, |
| 3888 Register scratch_reg, |
| 3889 Label* allocation_info_present) { |
| 3890 Label no_info_available; |
| 3891 ExternalReference new_space_start = |
| 3892 ExternalReference::new_space_start(isolate()); |
| 3893 ExternalReference new_space_allocation_top = |
| 3894 ExternalReference::new_space_allocation_top_address(isolate()); |
| 3895 ldr(scratch_reg, FieldMemOperand(receiver_reg, |
| 3896 JSArray::kSize + AllocationSiteInfo::kSize)); |
| 3897 cmp(scratch_reg, Operand(new_space_start)); |
| 3898 b(lt, &no_info_available); |
| 3899 cmp(scratch_reg, Operand(new_space_allocation_top)); |
| 3900 b(hs, &no_info_available); |
| 3901 ldr(scratch_reg, MemOperand(scratch_reg, 0)); |
| 3902 cmp(scratch_reg, |
| 3903 Operand(Handle<Map>(isolate()->heap()->allocation_site_info_map()))); |
| 3904 b(eq, allocation_info_present); |
| 3905 bind(&no_info_available); |
| 3906 } |
| 3907 |
| 3908 |
3886 #ifdef DEBUG | 3909 #ifdef DEBUG |
3887 bool AreAliased(Register reg1, | 3910 bool AreAliased(Register reg1, |
3888 Register reg2, | 3911 Register reg2, |
3889 Register reg3, | 3912 Register reg3, |
3890 Register reg4, | 3913 Register reg4, |
3891 Register reg5, | 3914 Register reg5, |
3892 Register reg6) { | 3915 Register reg6) { |
3893 int n_of_valid_regs = reg1.is_valid() + reg2.is_valid() + | 3916 int n_of_valid_regs = reg1.is_valid() + reg2.is_valid() + |
3894 reg3.is_valid() + reg4.is_valid() + reg5.is_valid() + reg6.is_valid(); | 3917 reg3.is_valid() + reg4.is_valid() + reg5.is_valid() + reg6.is_valid(); |
3895 | 3918 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3942 void CodePatcher::EmitCondition(Condition cond) { | 3965 void CodePatcher::EmitCondition(Condition cond) { |
3943 Instr instr = Assembler::instr_at(masm_.pc_); | 3966 Instr instr = Assembler::instr_at(masm_.pc_); |
3944 instr = (instr & ~kCondMask) | cond; | 3967 instr = (instr & ~kCondMask) | cond; |
3945 masm_.emit(instr); | 3968 masm_.emit(instr); |
3946 } | 3969 } |
3947 | 3970 |
3948 | 3971 |
3949 } } // namespace v8::internal | 3972 } } // namespace v8::internal |
3950 | 3973 |
3951 #endif // V8_TARGET_ARCH_ARM | 3974 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |