| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 bool is_heap_object) { | 250 bool is_heap_object) { |
| 251 if (!is_heap_object) { | 251 if (!is_heap_object) { |
| 252 test(obj, Immediate(kSmiTagMask)); | 252 test(obj, Immediate(kSmiTagMask)); |
| 253 j(zero, fail); | 253 j(zero, fail); |
| 254 } | 254 } |
| 255 cmp(FieldOperand(obj, HeapObject::kMapOffset), Immediate(map)); | 255 cmp(FieldOperand(obj, HeapObject::kMapOffset), Immediate(map)); |
| 256 j(not_equal, fail); | 256 j(not_equal, fail); |
| 257 } | 257 } |
| 258 | 258 |
| 259 | 259 |
| 260 void MacroAssembler::DispatchMap(Register obj, |
| 261 Handle<Map> map, |
| 262 Handle<Code> success, |
| 263 bool is_heap_object) { |
| 264 Label fail; |
| 265 if (!is_heap_object) { |
| 266 test(obj, Immediate(kSmiTagMask)); |
| 267 j(zero, &fail); |
| 268 } |
| 269 cmp(FieldOperand(obj, HeapObject::kMapOffset), Immediate(map)); |
| 270 j(equal, success); |
| 271 |
| 272 bind(&fail); |
| 273 } |
| 274 |
| 275 |
| 260 Condition MacroAssembler::IsObjectStringType(Register heap_object, | 276 Condition MacroAssembler::IsObjectStringType(Register heap_object, |
| 261 Register map, | 277 Register map, |
| 262 Register instance_type) { | 278 Register instance_type) { |
| 263 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset)); | 279 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset)); |
| 264 movzx_b(instance_type, FieldOperand(map, Map::kInstanceTypeOffset)); | 280 movzx_b(instance_type, FieldOperand(map, Map::kInstanceTypeOffset)); |
| 265 ASSERT(kNotStringTag != 0); | 281 ASSERT(kNotStringTag != 0); |
| 266 test(instance_type, Immediate(kIsNotStringMask)); | 282 test(instance_type, Immediate(kIsNotStringMask)); |
| 267 return zero; | 283 return zero; |
| 268 } | 284 } |
| 269 | 285 |
| (...skipping 1769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2039 | 2055 |
| 2040 // Check that the code was patched as expected. | 2056 // Check that the code was patched as expected. |
| 2041 ASSERT(masm_.pc_ == address_ + size_); | 2057 ASSERT(masm_.pc_ == address_ + size_); |
| 2042 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2058 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 2043 } | 2059 } |
| 2044 | 2060 |
| 2045 | 2061 |
| 2046 } } // namespace v8::internal | 2062 } } // namespace v8::internal |
| 2047 | 2063 |
| 2048 #endif // V8_TARGET_ARCH_IA32 | 2064 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |