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

Side by Side Diff: src/arm/full-codegen-arm.cc

Issue 8177005: Active smi-only optimizations for large array literals. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review feedback Created 9 years, 2 months 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 | « no previous file | src/arm/ic-arm.cc » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after
1509 int offset = FixedArray::kHeaderSize + (i * kPointerSize); 1509 int offset = FixedArray::kHeaderSize + (i * kPointerSize);
1510 __ str(result_register(), FieldMemOperand(r1, offset)); 1510 __ str(result_register(), FieldMemOperand(r1, offset));
1511 1511
1512 Label no_map_change; 1512 Label no_map_change;
1513 __ JumpIfSmi(result_register(), &no_map_change); 1513 __ JumpIfSmi(result_register(), &no_map_change);
1514 // Update the write barrier for the array store with r0 as the scratch 1514 // Update the write barrier for the array store with r0 as the scratch
1515 // register. 1515 // register.
1516 __ RecordWriteField( 1516 __ RecordWriteField(
1517 r1, offset, result_register(), r2, kLRHasBeenSaved, kDontSaveFPRegs, 1517 r1, offset, result_register(), r2, kLRHasBeenSaved, kDontSaveFPRegs,
1518 EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); 1518 EMIT_REMEMBERED_SET, OMIT_SMI_CHECK);
1519 if (FLAG_smi_only_arrays) { 1519 __ ldr(r3, FieldMemOperand(r1, HeapObject::kMapOffset));
1520 __ ldr(r3, FieldMemOperand(r1, HeapObject::kMapOffset)); 1520 __ CheckFastSmiOnlyElements(r3, r2, &no_map_change);
1521 __ CheckFastSmiOnlyElements(r3, r2, &no_map_change); 1521 __ push(r6); // Copy of array literal.
1522 __ push(r6); // Copy of array literal. 1522 __ CallRuntime(Runtime::kNonSmiElementStored, 1);
1523 __ CallRuntime(Runtime::kNonSmiElementStored, 1);
1524 }
1525 __ bind(&no_map_change); 1523 __ bind(&no_map_change);
1526 1524
1527 PrepareForBailoutForId(expr->GetIdForElement(i), NO_REGISTERS); 1525 PrepareForBailoutForId(expr->GetIdForElement(i), NO_REGISTERS);
1528 } 1526 }
1529 1527
1530 if (result_saved) { 1528 if (result_saved) {
1531 context()->PlugTOS(); 1529 context()->PlugTOS();
1532 } else { 1530 } else {
1533 context()->Plug(r0); 1531 context()->Plug(r0);
1534 } 1532 }
(...skipping 2731 matching lines...) Expand 10 before | Expand all | Expand 10 after
4266 *context_length = 0; 4264 *context_length = 0;
4267 return previous_; 4265 return previous_;
4268 } 4266 }
4269 4267
4270 4268
4271 #undef __ 4269 #undef __
4272 4270
4273 } } // namespace v8::internal 4271 } } // namespace v8::internal
4274 4272
4275 #endif // V8_TARGET_ARCH_ARM 4273 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/ic-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698