OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 |
11 // with the distribution. | 11 // with the distribution. |
(...skipping 1973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1985 CpuFeatures::Scope scope(VFP3); | 1985 CpuFeatures::Scope scope(VFP3); |
1986 vstr(d0, scratch1, 0); | 1986 vstr(d0, scratch1, 0); |
1987 } else { | 1987 } else { |
1988 str(mantissa_reg, MemOperand(scratch1, 0)); | 1988 str(mantissa_reg, MemOperand(scratch1, 0)); |
1989 str(exponent_reg, MemOperand(scratch1, Register::kSizeInBytes)); | 1989 str(exponent_reg, MemOperand(scratch1, Register::kSizeInBytes)); |
1990 } | 1990 } |
1991 bind(&done); | 1991 bind(&done); |
1992 } | 1992 } |
1993 | 1993 |
1994 | 1994 |
1995 void MacroAssembler::CompareMap(Register obj, | |
1996 Register scratch, | |
1997 Handle<Map> map, | |
1998 Label* early_success, | |
1999 CompareMapMode mode) { | |
2000 ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); | |
2001 cmp(scratch, Operand(map)); | |
2002 if (mode == ALLOW_ELEMENT_TRANSITION_MAPS) { | |
2003 bool ignore; | |
2004 Map* transitioned_fast_element_map( | |
fschneider
2012/01/04 12:17:51
Handle<Map>
danno
2012/01/05 13:41:57
Done.
| |
2005 map->LookupElementsTransitionMap(FAST_ELEMENTS, &ignore)); | |
2006 ASSERT(transitioned_fast_element_map == NULL || | |
2007 map->elements_kind() != FAST_ELEMENTS); | |
2008 if (transitioned_fast_element_map != NULL) { | |
2009 b(eq, early_success); | |
2010 cmp(scratch, Operand(Handle<Map>(transitioned_fast_element_map))); | |
2011 } | |
2012 | |
2013 Map* transitioned_double_map( | |
fschneider
2012/01/04 12:17:51
Handle<Map>
danno
2012/01/05 13:41:57
Done.
| |
2014 map->LookupElementsTransitionMap(FAST_DOUBLE_ELEMENTS, &ignore)); | |
2015 ASSERT(transitioned_double_map == NULL || | |
2016 map->elements_kind() == FAST_SMI_ONLY_ELEMENTS); | |
2017 if (transitioned_double_map != NULL) { | |
2018 b(eq, early_success); | |
2019 cmp(scratch, Operand(Handle<Map>(transitioned_double_map))); | |
2020 } | |
2021 } | |
2022 } | |
2023 | |
2024 | |
1995 void MacroAssembler::CheckMap(Register obj, | 2025 void MacroAssembler::CheckMap(Register obj, |
1996 Register scratch, | 2026 Register scratch, |
1997 Handle<Map> map, | 2027 Handle<Map> map, |
1998 Label* fail, | 2028 Label* fail, |
1999 SmiCheckType smi_check_type) { | 2029 SmiCheckType smi_check_type, |
2030 CompareMapMode mode) { | |
2000 if (smi_check_type == DO_SMI_CHECK) { | 2031 if (smi_check_type == DO_SMI_CHECK) { |
2001 JumpIfSmi(obj, fail); | 2032 JumpIfSmi(obj, fail); |
2002 } | 2033 } |
2003 ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); | 2034 |
2004 mov(ip, Operand(map)); | 2035 Label success; |
2005 cmp(scratch, ip); | 2036 CompareMap(obj, scratch, map, &success, mode); |
2006 b(ne, fail); | 2037 b(ne, fail); |
2038 bind(&success); | |
2007 } | 2039 } |
2008 | 2040 |
2009 | 2041 |
2010 void MacroAssembler::CheckMap(Register obj, | 2042 void MacroAssembler::CheckMap(Register obj, |
2011 Register scratch, | 2043 Register scratch, |
2012 Heap::RootListIndex index, | 2044 Heap::RootListIndex index, |
2013 Label* fail, | 2045 Label* fail, |
2014 SmiCheckType smi_check_type) { | 2046 SmiCheckType smi_check_type) { |
2015 if (smi_check_type == DO_SMI_CHECK) { | 2047 if (smi_check_type == DO_SMI_CHECK) { |
2016 JumpIfSmi(obj, fail); | 2048 JumpIfSmi(obj, fail); |
(...skipping 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3625 void CodePatcher::EmitCondition(Condition cond) { | 3657 void CodePatcher::EmitCondition(Condition cond) { |
3626 Instr instr = Assembler::instr_at(masm_.pc_); | 3658 Instr instr = Assembler::instr_at(masm_.pc_); |
3627 instr = (instr & ~kCondMask) | cond; | 3659 instr = (instr & ~kCondMask) | cond; |
3628 masm_.emit(instr); | 3660 masm_.emit(instr); |
3629 } | 3661 } |
3630 | 3662 |
3631 | 3663 |
3632 } } // namespace v8::internal | 3664 } } // namespace v8::internal |
3633 | 3665 |
3634 #endif // V8_TARGET_ARCH_ARM | 3666 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |