| 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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 | 367 |
| 368 void MacroAssembler::CmpInstanceType(Register map, InstanceType type) { | 368 void MacroAssembler::CmpInstanceType(Register map, InstanceType type) { |
| 369 cmpb(FieldOperand(map, Map::kInstanceTypeOffset), | 369 cmpb(FieldOperand(map, Map::kInstanceTypeOffset), |
| 370 static_cast<int8_t>(type)); | 370 static_cast<int8_t>(type)); |
| 371 } | 371 } |
| 372 | 372 |
| 373 | 373 |
| 374 void MacroAssembler::CheckFastElements(Register map, | 374 void MacroAssembler::CheckFastElements(Register map, |
| 375 Label* fail, | 375 Label* fail, |
| 376 Label::Distance distance) { | 376 Label::Distance distance) { |
| 377 STATIC_ASSERT(FAST_ELEMENTS == 0); | 377 STATIC_ASSERT(FAST_SMI_ONLY_ELEMENTS == 0); |
| 378 STATIC_ASSERT(FAST_ELEMENTS == 1); |
| 378 cmpb(FieldOperand(map, Map::kBitField2Offset), | 379 cmpb(FieldOperand(map, Map::kBitField2Offset), |
| 379 Map::kMaximumBitField2FastElementValue); | 380 Map::kMaximumBitField2FastElementValue); |
| 380 j(above, fail, distance); | 381 j(above, fail, distance); |
| 381 } | 382 } |
| 382 | 383 |
| 383 | 384 |
| 385 void MacroAssembler::CheckFastObjectElements(Register map, |
| 386 Label* fail, |
| 387 Label::Distance distance) { |
| 388 STATIC_ASSERT(FAST_SMI_ONLY_ELEMENTS == 0); |
| 389 STATIC_ASSERT(FAST_ELEMENTS == 1); |
| 390 cmpb(FieldOperand(map, Map::kBitField2Offset), |
| 391 Map::kMaximumBitField2FastSmiOnlyElementValue); |
| 392 j(below_equal, fail, distance); |
| 393 cmpb(FieldOperand(map, Map::kBitField2Offset), |
| 394 Map::kMaximumBitField2FastElementValue); |
| 395 j(above, fail, distance); |
| 396 } |
| 397 |
| 398 |
| 399 void MacroAssembler::CheckFastSmiOnlyElements(Register map, |
| 400 Label* fail, |
| 401 Label::Distance distance) { |
| 402 STATIC_ASSERT(FAST_SMI_ONLY_ELEMENTS == 0); |
| 403 cmpb(FieldOperand(map, Map::kBitField2Offset), |
| 404 Map::kMaximumBitField2FastSmiOnlyElementValue); |
| 405 j(above, fail, distance); |
| 406 } |
| 407 |
| 408 |
| 384 void MacroAssembler::CheckMap(Register obj, | 409 void MacroAssembler::CheckMap(Register obj, |
| 385 Handle<Map> map, | 410 Handle<Map> map, |
| 386 Label* fail, | 411 Label* fail, |
| 387 SmiCheckType smi_check_type) { | 412 SmiCheckType smi_check_type) { |
| 388 if (smi_check_type == DO_SMI_CHECK) { | 413 if (smi_check_type == DO_SMI_CHECK) { |
| 389 JumpIfSmi(obj, fail); | 414 JumpIfSmi(obj, fail); |
| 390 } | 415 } |
| 391 cmp(FieldOperand(obj, HeapObject::kMapOffset), Immediate(map)); | 416 cmp(FieldOperand(obj, HeapObject::kMapOffset), Immediate(map)); |
| 392 j(not_equal, fail); | 417 j(not_equal, fail); |
| 393 } | 418 } |
| (...skipping 2221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2615 cmp(length, Operand(bitmap_scratch, MemoryChunk::kSizeOffset)); | 2640 cmp(length, Operand(bitmap_scratch, MemoryChunk::kSizeOffset)); |
| 2616 Check(less_equal, "Live Bytes Count overflow chunk size"); | 2641 Check(less_equal, "Live Bytes Count overflow chunk size"); |
| 2617 } | 2642 } |
| 2618 | 2643 |
| 2619 bind(&done); | 2644 bind(&done); |
| 2620 } | 2645 } |
| 2621 | 2646 |
| 2622 } } // namespace v8::internal | 2647 } } // namespace v8::internal |
| 2623 | 2648 |
| 2624 #endif // V8_TARGET_ARCH_IA32 | 2649 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |