| OLD | NEW | 
|---|
| 1 // Copyright 2012 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 | 
| (...skipping 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1993   bind(&done); | 1993   bind(&done); | 
| 1994 } | 1994 } | 
| 1995 | 1995 | 
| 1996 | 1996 | 
| 1997 void MacroAssembler::CompareMap(Register obj, | 1997 void MacroAssembler::CompareMap(Register obj, | 
| 1998                                 Register scratch, | 1998                                 Register scratch, | 
| 1999                                 Handle<Map> map, | 1999                                 Handle<Map> map, | 
| 2000                                 Label* early_success, | 2000                                 Label* early_success, | 
| 2001                                 CompareMapMode mode) { | 2001                                 CompareMapMode mode) { | 
| 2002   ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); | 2002   ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); | 
| 2003   cmp(scratch, Operand(map)); | 2003   CompareMap(scratch, map, early_success, mode); | 
|  | 2004 } | 
|  | 2005 | 
|  | 2006 | 
|  | 2007 void MacroAssembler::CompareMap(Register obj_map, | 
|  | 2008                                 Handle<Map> map, | 
|  | 2009                                 Label* early_success, | 
|  | 2010                                 CompareMapMode mode) { | 
|  | 2011   cmp(obj_map, Operand(map)); | 
| 2004   if (mode == ALLOW_ELEMENT_TRANSITION_MAPS) { | 2012   if (mode == ALLOW_ELEMENT_TRANSITION_MAPS) { | 
| 2005     ElementsKind kind = map->elements_kind(); | 2013     ElementsKind kind = map->elements_kind(); | 
| 2006     if (IsFastElementsKind(kind)) { | 2014     if (IsFastElementsKind(kind)) { | 
| 2007       bool packed = IsFastPackedElementsKind(kind); | 2015       bool packed = IsFastPackedElementsKind(kind); | 
| 2008       Map* current_map = *map; | 2016       Map* current_map = *map; | 
| 2009       while (CanTransitionToMoreGeneralFastElementsKind(kind, packed)) { | 2017       while (CanTransitionToMoreGeneralFastElementsKind(kind, packed)) { | 
| 2010         kind = GetNextMoreGeneralFastElementsKind(kind, packed); | 2018         kind = GetNextMoreGeneralFastElementsKind(kind, packed); | 
| 2011         current_map = current_map->LookupElementsTransitionMap(kind); | 2019         current_map = current_map->LookupElementsTransitionMap(kind); | 
| 2012         if (!current_map) break; | 2020         if (!current_map) break; | 
| 2013         b(eq, early_success); | 2021         b(eq, early_success); | 
| 2014         cmp(scratch, Operand(Handle<Map>(current_map))); | 2022         cmp(obj_map, Operand(Handle<Map>(current_map))); | 
| 2015       } | 2023       } | 
| 2016     } | 2024     } | 
| 2017   } | 2025   } | 
| 2018 } | 2026 } | 
| 2019 | 2027 | 
| 2020 | 2028 | 
| 2021 void MacroAssembler::CheckMap(Register obj, | 2029 void MacroAssembler::CheckMap(Register obj, | 
| 2022                               Register scratch, | 2030                               Register scratch, | 
| 2023                               Handle<Map> map, | 2031                               Handle<Map> map, | 
| 2024                               Label* fail, | 2032                               Label* fail, | 
| (...skipping 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3779 void CodePatcher::EmitCondition(Condition cond) { | 3787 void CodePatcher::EmitCondition(Condition cond) { | 
| 3780   Instr instr = Assembler::instr_at(masm_.pc_); | 3788   Instr instr = Assembler::instr_at(masm_.pc_); | 
| 3781   instr = (instr & ~kCondMask) | cond; | 3789   instr = (instr & ~kCondMask) | cond; | 
| 3782   masm_.emit(instr); | 3790   masm_.emit(instr); | 
| 3783 } | 3791 } | 
| 3784 | 3792 | 
| 3785 | 3793 | 
| 3786 } }  // namespace v8::internal | 3794 } }  // namespace v8::internal | 
| 3787 | 3795 | 
| 3788 #endif  // V8_TARGET_ARCH_ARM | 3796 #endif  // V8_TARGET_ARCH_ARM | 
| OLD | NEW | 
|---|