OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1094 gc_required, | 1094 gc_required, |
1095 TAG_OBJECT); | 1095 TAG_OBJECT); |
1096 LoadRoot(scratch1, Heap::kConsAsciiStringMapRootIndex); | 1096 LoadRoot(scratch1, Heap::kConsAsciiStringMapRootIndex); |
1097 mov(scratch2, Operand(String::kEmptyHashField)); | 1097 mov(scratch2, Operand(String::kEmptyHashField)); |
1098 str(length, FieldMemOperand(result, String::kLengthOffset)); | 1098 str(length, FieldMemOperand(result, String::kLengthOffset)); |
1099 str(scratch1, FieldMemOperand(result, HeapObject::kMapOffset)); | 1099 str(scratch1, FieldMemOperand(result, HeapObject::kMapOffset)); |
1100 str(scratch2, FieldMemOperand(result, String::kHashFieldOffset)); | 1100 str(scratch2, FieldMemOperand(result, String::kHashFieldOffset)); |
1101 } | 1101 } |
1102 | 1102 |
1103 | 1103 |
1104 void MacroAssembler::CompareObjectType(Register function, | 1104 void MacroAssembler::CompareObjectType(Register object, |
1105 Register map, | 1105 Register map, |
1106 Register type_reg, | 1106 Register type_reg, |
1107 InstanceType type) { | 1107 InstanceType type) { |
1108 ldr(map, FieldMemOperand(function, HeapObject::kMapOffset)); | 1108 ldr(map, FieldMemOperand(object, HeapObject::kMapOffset)); |
1109 CompareInstanceType(map, type_reg, type); | 1109 CompareInstanceType(map, type_reg, type); |
1110 } | 1110 } |
1111 | 1111 |
1112 | 1112 |
1113 void MacroAssembler::CompareInstanceType(Register map, | 1113 void MacroAssembler::CompareInstanceType(Register map, |
1114 Register type_reg, | 1114 Register type_reg, |
1115 InstanceType type) { | 1115 InstanceType type) { |
1116 ldrb(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset)); | 1116 ldrb(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset)); |
1117 cmp(type_reg, Operand(type)); | 1117 cmp(type_reg, Operand(type)); |
1118 } | 1118 } |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1661 } | 1661 } |
1662 | 1662 |
1663 | 1663 |
1664 void CodePatcher::Emit(Address addr) { | 1664 void CodePatcher::Emit(Address addr) { |
1665 masm()->emit(reinterpret_cast<Instr>(addr)); | 1665 masm()->emit(reinterpret_cast<Instr>(addr)); |
1666 } | 1666 } |
1667 #endif // ENABLE_DEBUGGER_SUPPORT | 1667 #endif // ENABLE_DEBUGGER_SUPPORT |
1668 | 1668 |
1669 | 1669 |
1670 } } // namespace v8::internal | 1670 } } // namespace v8::internal |
OLD | NEW |