| 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 1663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1674 if (smi_check_type == DO_SMI_CHECK) { | 1674 if (smi_check_type == DO_SMI_CHECK) { |
| 1675 JumpIfSmi(obj, fail); | 1675 JumpIfSmi(obj, fail); |
| 1676 } | 1676 } |
| 1677 ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); | 1677 ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); |
| 1678 LoadRoot(ip, index); | 1678 LoadRoot(ip, index); |
| 1679 cmp(scratch, ip); | 1679 cmp(scratch, ip); |
| 1680 b(ne, fail); | 1680 b(ne, fail); |
| 1681 } | 1681 } |
| 1682 | 1682 |
| 1683 | 1683 |
| 1684 void MacroAssembler::DispatchMap(Register obj, |
| 1685 Register scratch, |
| 1686 Handle<Map> map, |
| 1687 Handle<Code> success, |
| 1688 SmiCheckType smi_check_type) { |
| 1689 Label fail; |
| 1690 if (smi_check_type == DO_SMI_CHECK) { |
| 1691 JumpIfSmi(obj, &fail); |
| 1692 } |
| 1693 ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); |
| 1694 mov(ip, Operand(map)); |
| 1695 cmp(scratch, ip); |
| 1696 Jump(success, RelocInfo::CODE_TARGET, eq); |
| 1697 bind(&fail); |
| 1698 } |
| 1699 |
| 1700 |
| 1684 void MacroAssembler::TryGetFunctionPrototype(Register function, | 1701 void MacroAssembler::TryGetFunctionPrototype(Register function, |
| 1685 Register result, | 1702 Register result, |
| 1686 Register scratch, | 1703 Register scratch, |
| 1687 Label* miss) { | 1704 Label* miss) { |
| 1688 // Check that the receiver isn't a smi. | 1705 // Check that the receiver isn't a smi. |
| 1689 JumpIfSmi(function, miss); | 1706 JumpIfSmi(function, miss); |
| 1690 | 1707 |
| 1691 // Check that the function really is a function. Load map into result reg. | 1708 // Check that the function really is a function. Load map into result reg. |
| 1692 CompareObjectType(function, result, scratch, JS_FUNCTION_TYPE); | 1709 CompareObjectType(function, result, scratch, JS_FUNCTION_TYPE); |
| 1693 b(ne, miss); | 1710 b(ne, miss); |
| (...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3101 void CodePatcher::EmitCondition(Condition cond) { | 3118 void CodePatcher::EmitCondition(Condition cond) { |
| 3102 Instr instr = Assembler::instr_at(masm_.pc_); | 3119 Instr instr = Assembler::instr_at(masm_.pc_); |
| 3103 instr = (instr & ~kCondMask) | cond; | 3120 instr = (instr & ~kCondMask) | cond; |
| 3104 masm_.emit(instr); | 3121 masm_.emit(instr); |
| 3105 } | 3122 } |
| 3106 | 3123 |
| 3107 | 3124 |
| 3108 } } // namespace v8::internal | 3125 } } // namespace v8::internal |
| 3109 | 3126 |
| 3110 #endif // V8_TARGET_ARCH_ARM | 3127 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |