| OLD | NEW | 
|---|
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1603 } | 1603 } | 
| 1604 | 1604 | 
| 1605 | 1605 | 
| 1606 void MacroAssembler::AbortIfNotSmi(Register object) { | 1606 void MacroAssembler::AbortIfNotSmi(Register object) { | 
| 1607   NearLabel ok; | 1607   NearLabel ok; | 
| 1608   Condition is_smi = CheckSmi(object); | 1608   Condition is_smi = CheckSmi(object); | 
| 1609   Assert(is_smi, "Operand is not a smi"); | 1609   Assert(is_smi, "Operand is not a smi"); | 
| 1610 } | 1610 } | 
| 1611 | 1611 | 
| 1612 | 1612 | 
|  | 1613 void MacroAssembler::AbortIfNotString(Register object) { | 
|  | 1614   testb(object, Immediate(kSmiTagMask)); | 
|  | 1615   Assert(not_equal, "Operand is not a string"); | 
|  | 1616   push(object); | 
|  | 1617   movq(object, FieldOperand(object, HeapObject::kMapOffset)); | 
|  | 1618   CmpInstanceType(object, FIRST_NONSTRING_TYPE); | 
|  | 1619   pop(object); | 
|  | 1620   Assert(below, "Operand is not a string"); | 
|  | 1621 } | 
|  | 1622 | 
|  | 1623 | 
| 1613 void MacroAssembler::AbortIfNotRootValue(Register src, | 1624 void MacroAssembler::AbortIfNotRootValue(Register src, | 
| 1614                                          Heap::RootListIndex root_value_index, | 1625                                          Heap::RootListIndex root_value_index, | 
| 1615                                          const char* message) { | 1626                                          const char* message) { | 
| 1616   ASSERT(!src.is(kScratchRegister)); | 1627   ASSERT(!src.is(kScratchRegister)); | 
| 1617   LoadRoot(kScratchRegister, root_value_index); | 1628   LoadRoot(kScratchRegister, root_value_index); | 
| 1618   cmpq(src, kScratchRegister); | 1629   cmpq(src, kScratchRegister); | 
| 1619   Check(equal, message); | 1630   Check(equal, message); | 
| 1620 } | 1631 } | 
| 1621 | 1632 | 
| 1622 | 1633 | 
| (...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2490   CPU::FlushICache(address_, size_); | 2501   CPU::FlushICache(address_, size_); | 
| 2491 | 2502 | 
| 2492   // Check that the code was patched as expected. | 2503   // Check that the code was patched as expected. | 
| 2493   ASSERT(masm_.pc_ == address_ + size_); | 2504   ASSERT(masm_.pc_ == address_ + size_); | 
| 2494   ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2505   ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 
| 2495 } | 2506 } | 
| 2496 | 2507 | 
| 2497 } }  // namespace v8::internal | 2508 } }  // namespace v8::internal | 
| 2498 | 2509 | 
| 2499 #endif  // V8_TARGET_ARCH_X64 | 2510 #endif  // V8_TARGET_ARCH_X64 | 
| OLD | NEW | 
|---|