| 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) { |
| 337 // ----------- S t a t e ------------- | 338 // ----------- S t a t e ------------- |
| 338 // -- r2 : name | 339 // -- r2 : name |
| 339 // -- lr : return address | 340 // -- lr : return address |
| 340 // -- r0 : receiver | 341 // -- r0 : receiver |
| 341 // ----------------------------------- | 342 // ----------------------------------- |
| 342 | 343 |
| 343 // Probe the stub cache. | 344 // Probe the stub cache. |
| 344 Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC); | 345 Code::Flags flags = Code::ComputeFlags( |
| 346 Code::HANDLER, MONOMORPHIC, extra_state, |
| 347 Code::NORMAL, Code::LOAD_IC); |
| 345 masm->isolate()->stub_cache()->GenerateProbe( | 348 masm->isolate()->stub_cache()->GenerateProbe( |
| 346 masm, flags, r0, r2, r3, r4, r5, r6); | 349 masm, flags, r0, r2, r3, r4, r5, r6); |
| 347 | 350 |
| 348 // Cache miss: Jump to runtime. | 351 // Cache miss: Jump to runtime. |
| 349 GenerateMiss(masm); | 352 GenerateMiss(masm); |
| 350 } | 353 } |
| 351 | 354 |
| 352 | 355 |
| 353 void LoadIC::GenerateNormal(MacroAssembler* masm) { | 356 void LoadIC::GenerateNormal(MacroAssembler* masm) { |
| 354 // ----------- S t a t e ------------- | 357 // ----------- S t a t e ------------- |
| (...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1152 &slow, kCheckMap, kDontIncrementLength, | 1155 &slow, kCheckMap, kDontIncrementLength, |
| 1153 value, key, receiver, receiver_map, | 1156 value, key, receiver, receiver_map, |
| 1154 elements_map, elements); | 1157 elements_map, elements); |
| 1155 KeyedStoreGenerateGenericHelper(masm, &fast_object_grow, &fast_double_grow, | 1158 KeyedStoreGenerateGenericHelper(masm, &fast_object_grow, &fast_double_grow, |
| 1156 &slow, kDontCheckMap, kIncrementLength, | 1159 &slow, kDontCheckMap, kIncrementLength, |
| 1157 value, key, receiver, receiver_map, | 1160 value, key, receiver, receiver_map, |
| 1158 elements_map, elements); | 1161 elements_map, elements); |
| 1159 } | 1162 } |
| 1160 | 1163 |
| 1161 | 1164 |
| 1162 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { | 1165 void StoreIC::GenerateMegamorphic(MacroAssembler* masm, |
| 1166 ExtraICState extra_ic_state) { |
| 1163 // ----------- S t a t e ------------- | 1167 // ----------- S t a t e ------------- |
| 1164 // -- r0 : value | 1168 // -- r0 : value |
| 1165 // -- r1 : receiver | 1169 // -- r1 : receiver |
| 1166 // -- r2 : name | 1170 // -- r2 : name |
| 1167 // -- lr : return address | 1171 // -- lr : return address |
| 1168 // ----------------------------------- | 1172 // ----------------------------------- |
| 1169 | 1173 |
| 1170 // Get the receiver from the stack and probe the stub cache. | 1174 // Get the receiver from the stack and probe the stub cache. |
| 1171 Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC); | 1175 Code::Flags flags = Code::ComputeFlags( |
| 1176 Code::HANDLER, MONOMORPHIC, extra_ic_state, |
| 1177 Code::NORMAL, Code::STORE_IC); |
| 1172 | 1178 |
| 1173 masm->isolate()->stub_cache()->GenerateProbe( | 1179 masm->isolate()->stub_cache()->GenerateProbe( |
| 1174 masm, flags, r1, r2, r3, r4, r5, r6); | 1180 masm, flags, r1, r2, r3, r4, r5, r6); |
| 1175 | 1181 |
| 1176 // Cache miss: Jump to runtime. | 1182 // Cache miss: Jump to runtime. |
| 1177 GenerateMiss(masm); | 1183 GenerateMiss(masm); |
| 1178 } | 1184 } |
| 1179 | 1185 |
| 1180 | 1186 |
| 1181 void StoreIC::GenerateMiss(MacroAssembler* masm) { | 1187 void StoreIC::GenerateMiss(MacroAssembler* masm) { |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1331 } else { | 1337 } else { |
| 1332 ASSERT(Assembler::GetCondition(branch_instr) == ne); | 1338 ASSERT(Assembler::GetCondition(branch_instr) == ne); |
| 1333 patcher.EmitCondition(eq); | 1339 patcher.EmitCondition(eq); |
| 1334 } | 1340 } |
| 1335 } | 1341 } |
| 1336 | 1342 |
| 1337 | 1343 |
| 1338 } } // namespace v8::internal | 1344 } } // namespace v8::internal |
| 1339 | 1345 |
| 1340 #endif // V8_TARGET_ARCH_ARM | 1346 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |