OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 2117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2128 Register map_reg = ToRegister(instr->temp()); | 2128 Register map_reg = ToRegister(instr->temp()); |
2129 | 2129 |
2130 __ Ldr(map_reg, FieldMemOperand(object, HeapObject::kMapOffset)); | 2130 __ Ldr(map_reg, FieldMemOperand(object, HeapObject::kMapOffset)); |
2131 | 2131 |
2132 DeferredCheckMaps* deferred = NULL; | 2132 DeferredCheckMaps* deferred = NULL; |
2133 if (instr->hydrogen()->has_migration_target()) { | 2133 if (instr->hydrogen()->has_migration_target()) { |
2134 deferred = new(zone()) DeferredCheckMaps(this, instr, object); | 2134 deferred = new(zone()) DeferredCheckMaps(this, instr, object); |
2135 __ Bind(deferred->check_maps()); | 2135 __ Bind(deferred->check_maps()); |
2136 } | 2136 } |
2137 | 2137 |
2138 UniqueSet<Map> map_set = instr->hydrogen()->map_set(); | 2138 const UniqueSet<Map>* map_set = instr->hydrogen()->map_set(); |
2139 Label success; | 2139 Label success; |
2140 for (int i = 0; i < map_set.size() - 1; i++) { | 2140 for (int i = 0; i < map_set->size() - 1; i++) { |
2141 Handle<Map> map = map_set.at(i).handle(); | 2141 Handle<Map> map = map_set->at(i).handle(); |
2142 __ CompareMap(map_reg, map); | 2142 __ CompareMap(map_reg, map); |
2143 __ B(eq, &success); | 2143 __ B(eq, &success); |
2144 } | 2144 } |
2145 Handle<Map> map = map_set.at(map_set.size() - 1).handle(); | 2145 Handle<Map> map = map_set->at(map_set->size() - 1).handle(); |
2146 __ CompareMap(map_reg, map); | 2146 __ CompareMap(map_reg, map); |
2147 | 2147 |
2148 // We didn't match a map. | 2148 // We didn't match a map. |
2149 if (instr->hydrogen()->has_migration_target()) { | 2149 if (instr->hydrogen()->has_migration_target()) { |
2150 __ B(ne, deferred->entry()); | 2150 __ B(ne, deferred->entry()); |
2151 } else { | 2151 } else { |
2152 DeoptimizeIf(ne, instr->environment()); | 2152 DeoptimizeIf(ne, instr->environment()); |
2153 } | 2153 } |
2154 | 2154 |
2155 __ Bind(&success); | 2155 __ Bind(&success); |
(...skipping 3773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5929 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 5929 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
5930 // Index is equal to negated out of object property index plus 1. | 5930 // Index is equal to negated out of object property index plus 1. |
5931 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5931 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
5932 __ Ldr(result, FieldMemOperand(result, | 5932 __ Ldr(result, FieldMemOperand(result, |
5933 FixedArray::kHeaderSize - kPointerSize)); | 5933 FixedArray::kHeaderSize - kPointerSize)); |
5934 __ Bind(deferred->exit()); | 5934 __ Bind(deferred->exit()); |
5935 __ Bind(&done); | 5935 __ Bind(&done); |
5936 } | 5936 } |
5937 | 5937 |
5938 } } // namespace v8::internal | 5938 } } // namespace v8::internal |
OLD | NEW |