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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 // map: key map | 326 // map: key map |
327 __ ldrb(hash, FieldMemOperand(map, Map::kInstanceTypeOffset)); | 327 __ ldrb(hash, FieldMemOperand(map, Map::kInstanceTypeOffset)); |
328 STATIC_ASSERT(kInternalizedTag == 0); | 328 STATIC_ASSERT(kInternalizedTag == 0); |
329 __ tst(hash, Operand(kIsNotInternalizedMask)); | 329 __ tst(hash, Operand(kIsNotInternalizedMask)); |
330 __ b(ne, not_unique); | 330 __ b(ne, not_unique); |
331 | 331 |
332 __ bind(&unique); | 332 __ bind(&unique); |
333 } | 333 } |
334 | 334 |
335 | 335 |
336 void LoadIC::GenerateMegamorphic(MacroAssembler* masm, | 336 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { |
337 ExtraICState extra_state) { | |
338 // ----------- S t a t e ------------- | 337 // ----------- S t a t e ------------- |
339 // -- r2 : name | 338 // -- r2 : name |
340 // -- lr : return address | 339 // -- lr : return address |
341 // -- r0 : receiver | 340 // -- r0 : receiver |
342 // ----------------------------------- | 341 // ----------------------------------- |
343 | 342 |
344 // Probe the stub cache. | 343 // Probe the stub cache. |
345 Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC, extra_state); | 344 Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC); |
346 masm->isolate()->stub_cache()->GenerateProbe( | 345 masm->isolate()->stub_cache()->GenerateProbe( |
347 masm, flags, r0, r2, r3, r4, r5, r6); | 346 masm, flags, r0, r2, r3, r4, r5, r6); |
348 | 347 |
349 // Cache miss: Jump to runtime. | 348 // Cache miss: Jump to runtime. |
350 GenerateMiss(masm); | 349 GenerateMiss(masm); |
351 } | 350 } |
352 | 351 |
353 | 352 |
354 void LoadIC::GenerateNormal(MacroAssembler* masm) { | 353 void LoadIC::GenerateNormal(MacroAssembler* masm) { |
355 // ----------- S t a t e ------------- | 354 // ----------- S t a t e ------------- |
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1153 &slow, kCheckMap, kDontIncrementLength, | 1152 &slow, kCheckMap, kDontIncrementLength, |
1154 value, key, receiver, receiver_map, | 1153 value, key, receiver, receiver_map, |
1155 elements_map, elements); | 1154 elements_map, elements); |
1156 KeyedStoreGenerateGenericHelper(masm, &fast_object_grow, &fast_double_grow, | 1155 KeyedStoreGenerateGenericHelper(masm, &fast_object_grow, &fast_double_grow, |
1157 &slow, kDontCheckMap, kIncrementLength, | 1156 &slow, kDontCheckMap, kIncrementLength, |
1158 value, key, receiver, receiver_map, | 1157 value, key, receiver, receiver_map, |
1159 elements_map, elements); | 1158 elements_map, elements); |
1160 } | 1159 } |
1161 | 1160 |
1162 | 1161 |
1163 void StoreIC::GenerateMegamorphic(MacroAssembler* masm, | 1162 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { |
1164 ExtraICState extra_state) { | |
1165 // ----------- S t a t e ------------- | 1163 // ----------- S t a t e ------------- |
1166 // -- r0 : value | 1164 // -- r0 : value |
1167 // -- r1 : receiver | 1165 // -- r1 : receiver |
1168 // -- r2 : name | 1166 // -- r2 : name |
1169 // -- lr : return address | 1167 // -- lr : return address |
1170 // ----------------------------------- | 1168 // ----------------------------------- |
1171 | 1169 |
1172 // Get the receiver from the stack and probe the stub cache. | 1170 // Get the receiver from the stack and probe the stub cache. |
1173 Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC, extra_state); | 1171 Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC); |
1174 | 1172 |
1175 masm->isolate()->stub_cache()->GenerateProbe( | 1173 masm->isolate()->stub_cache()->GenerateProbe( |
1176 masm, flags, r1, r2, r3, r4, r5, r6); | 1174 masm, flags, r1, r2, r3, r4, r5, r6); |
1177 | 1175 |
1178 // Cache miss: Jump to runtime. | 1176 // Cache miss: Jump to runtime. |
1179 GenerateMiss(masm); | 1177 GenerateMiss(masm); |
1180 } | 1178 } |
1181 | 1179 |
1182 | 1180 |
1183 void StoreIC::GenerateMiss(MacroAssembler* masm) { | 1181 void StoreIC::GenerateMiss(MacroAssembler* masm) { |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1333 } else { | 1331 } else { |
1334 ASSERT(Assembler::GetCondition(branch_instr) == ne); | 1332 ASSERT(Assembler::GetCondition(branch_instr) == ne); |
1335 patcher.EmitCondition(eq); | 1333 patcher.EmitCondition(eq); |
1336 } | 1334 } |
1337 } | 1335 } |
1338 | 1336 |
1339 | 1337 |
1340 } } // namespace v8::internal | 1338 } } // namespace v8::internal |
1341 | 1339 |
1342 #endif // V8_TARGET_ARCH_ARM | 1340 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |