Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/arm/ic-arm.cc

Issue 71163006: Merge bleeding_edge r17376:17693. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Fix all.gyp Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm/lithium-arm.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 __ LoadFromNumberDictionary(&slow_load, r4, r2, r1, r0, r3, r5); 570 __ LoadFromNumberDictionary(&slow_load, r4, r2, r1, r0, r3, r5);
571 __ IncrementCounter(counters->keyed_call_generic_smi_dict(), 1, r0, r3); 571 __ IncrementCounter(counters->keyed_call_generic_smi_dict(), 1, r0, r3);
572 __ jmp(&do_call); 572 __ jmp(&do_call);
573 573
574 __ bind(&slow_load); 574 __ bind(&slow_load);
575 // This branch is taken when calling KeyedCallIC_Miss is neither required 575 // This branch is taken when calling KeyedCallIC_Miss is neither required
576 // nor beneficial. 576 // nor beneficial.
577 __ IncrementCounter(counters->keyed_call_generic_slow_load(), 1, r0, r3); 577 __ IncrementCounter(counters->keyed_call_generic_slow_load(), 1, r0, r3);
578 { 578 {
579 FrameScope scope(masm, StackFrame::INTERNAL); 579 FrameScope scope(masm, StackFrame::INTERNAL);
580 __ push(r2); // save the key 580 __ Push(r2, r1); // save the key and the receiver
581 __ Push(r1, r2); // pass the receiver and the key 581 __ push(r2); // pass the receiver and the key
582 __ CallRuntime(Runtime::kKeyedGetProperty, 2); 582 __ CallRuntime(Runtime::kKeyedGetProperty, 2);
583 __ pop(r2); // restore the key 583 __ pop(r2); // restore the key
584 } 584 }
585 __ mov(r1, r0); 585 __ mov(r1, r0);
586 __ jmp(&do_call); 586 __ jmp(&do_call);
587 587
588 __ bind(&check_name); 588 __ bind(&check_name);
589 GenerateKeyNameCheck(masm, r2, r0, r3, &index_name, &slow_call); 589 GenerateKeyNameCheck(masm, r2, r0, r3, &index_name, &slow_call);
590 590
591 // The key is known to be a unique name. 591 // The key is known to be a unique name.
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 // Fast case: Do the store, could be either Object or double. 1261 // Fast case: Do the store, could be either Object or double.
1262 __ bind(fast_object); 1262 __ bind(fast_object);
1263 Register scratch_value = r4; 1263 Register scratch_value = r4;
1264 Register address = r5; 1264 Register address = r5;
1265 if (check_map == kCheckMap) { 1265 if (check_map == kCheckMap) {
1266 __ ldr(elements_map, FieldMemOperand(elements, HeapObject::kMapOffset)); 1266 __ ldr(elements_map, FieldMemOperand(elements, HeapObject::kMapOffset));
1267 __ cmp(elements_map, 1267 __ cmp(elements_map,
1268 Operand(masm->isolate()->factory()->fixed_array_map())); 1268 Operand(masm->isolate()->factory()->fixed_array_map()));
1269 __ b(ne, fast_double); 1269 __ b(ne, fast_double);
1270 } 1270 }
1271
1272 // HOLECHECK: guards "A[i] = V"
1273 // We have to go to the runtime if the current value is the hole because
1274 // there may be a callback on the element
1275 Label holecheck_passed1;
1276 __ add(address, elements, Operand(FixedArray::kHeaderSize - kHeapObjectTag));
1277 __ ldr(scratch_value,
1278 MemOperand::PointerAddressFromSmiKey(address, key, PreIndex));
1279 __ cmp(scratch_value, Operand(masm->isolate()->factory()->the_hole_value()));
1280 __ b(ne, &holecheck_passed1);
1281 __ JumpIfDictionaryInPrototypeChain(receiver, elements_map, scratch_value,
1282 slow);
1283
1284 __ bind(&holecheck_passed1);
1285
1271 // Smi stores don't require further checks. 1286 // Smi stores don't require further checks.
1272 Label non_smi_value; 1287 Label non_smi_value;
1273 __ JumpIfNotSmi(value, &non_smi_value); 1288 __ JumpIfNotSmi(value, &non_smi_value);
1274 1289
1275 if (increment_length == kIncrementLength) { 1290 if (increment_length == kIncrementLength) {
1276 // Add 1 to receiver->length. 1291 // Add 1 to receiver->length.
1277 __ add(scratch_value, key, Operand(Smi::FromInt(1))); 1292 __ add(scratch_value, key, Operand(Smi::FromInt(1)));
1278 __ str(scratch_value, FieldMemOperand(receiver, JSArray::kLengthOffset)); 1293 __ str(scratch_value, FieldMemOperand(receiver, JSArray::kLengthOffset));
1279 } 1294 }
1280 // It's irrelevant whether array is smi-only or not when writing a smi. 1295 // It's irrelevant whether array is smi-only or not when writing a smi.
(...skipping 27 matching lines...) Expand all
1308 OMIT_SMI_CHECK); 1323 OMIT_SMI_CHECK);
1309 __ Ret(); 1324 __ Ret();
1310 1325
1311 __ bind(fast_double); 1326 __ bind(fast_double);
1312 if (check_map == kCheckMap) { 1327 if (check_map == kCheckMap) {
1313 // Check for fast double array case. If this fails, call through to the 1328 // Check for fast double array case. If this fails, call through to the
1314 // runtime. 1329 // runtime.
1315 __ CompareRoot(elements_map, Heap::kFixedDoubleArrayMapRootIndex); 1330 __ CompareRoot(elements_map, Heap::kFixedDoubleArrayMapRootIndex);
1316 __ b(ne, slow); 1331 __ b(ne, slow);
1317 } 1332 }
1333
1334 // HOLECHECK: guards "A[i] double hole?"
1335 // We have to see if the double version of the hole is present. If so
1336 // go to the runtime.
1337 __ add(address, elements,
1338 Operand((FixedDoubleArray::kHeaderSize + sizeof(kHoleNanLower32))
1339 - kHeapObjectTag));
1340 __ ldr(scratch_value,
1341 MemOperand(address, key, LSL, kPointerSizeLog2, PreIndex));
1342 __ cmp(scratch_value, Operand(kHoleNanUpper32));
1343 __ b(ne, &fast_double_without_map_check);
1344 __ JumpIfDictionaryInPrototypeChain(receiver, elements_map, scratch_value,
1345 slow);
1346
1318 __ bind(&fast_double_without_map_check); 1347 __ bind(&fast_double_without_map_check);
1319 __ StoreNumberToDoubleElements(value, key, elements, r3, d0, 1348 __ StoreNumberToDoubleElements(value, key, elements, r3, d0,
1320 &transition_double_elements); 1349 &transition_double_elements);
1321 if (increment_length == kIncrementLength) { 1350 if (increment_length == kIncrementLength) {
1322 // Add 1 to receiver->length. 1351 // Add 1 to receiver->length.
1323 __ add(scratch_value, key, Operand(Smi::FromInt(1))); 1352 __ add(scratch_value, key, Operand(Smi::FromInt(1)));
1324 __ str(scratch_value, FieldMemOperand(receiver, JSArray::kLengthOffset)); 1353 __ str(scratch_value, FieldMemOperand(receiver, JSArray::kLengthOffset));
1325 } 1354 }
1326 __ Ret(); 1355 __ Ret();
1327 1356
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
1653 } else { 1682 } else {
1654 ASSERT(Assembler::GetCondition(branch_instr) == ne); 1683 ASSERT(Assembler::GetCondition(branch_instr) == ne);
1655 patcher.EmitCondition(eq); 1684 patcher.EmitCondition(eq);
1656 } 1685 }
1657 } 1686 }
1658 1687
1659 1688
1660 } } // namespace v8::internal 1689 } } // namespace v8::internal
1661 1690
1662 #endif // V8_TARGET_ARCH_ARM 1691 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm/lithium-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698