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

Side by Side Diff: src/arm/stub-cache-arm.cc

Issue 10170030: Implement tracking and optimizations of packed arrays (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: ia32 ready to go Created 8 years, 7 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
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 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after
1583 __ bind(&not_fast_object); 1583 __ bind(&not_fast_object);
1584 __ CheckFastSmiOnlyElements(r3, r7, &call_builtin); 1584 __ CheckFastSmiOnlyElements(r3, r7, &call_builtin);
1585 // edx: receiver 1585 // edx: receiver
1586 // r3: map 1586 // r3: map
1587 __ LoadTransitionedArrayMapConditional(FAST_SMI_ONLY_ELEMENTS, 1587 __ LoadTransitionedArrayMapConditional(FAST_SMI_ONLY_ELEMENTS,
1588 FAST_ELEMENTS, 1588 FAST_ELEMENTS,
1589 r3, 1589 r3,
1590 r7, 1590 r7,
1591 &call_builtin); 1591 &call_builtin);
1592 __ mov(r2, receiver); 1592 __ mov(r2, receiver);
1593 ElementsTransitionGenerator::GenerateSmiOnlyToObject(masm()); 1593 ElementsTransitionGenerator::GenerateMapChangeElementTransition(masm());
1594 __ bind(&fast_object); 1594 __ bind(&fast_object);
1595 } else { 1595 } else {
1596 __ CheckFastObjectElements(r3, r3, &call_builtin); 1596 __ CheckFastObjectElements(r3, r3, &call_builtin);
1597 } 1597 }
1598 1598
1599 // Save new length. 1599 // Save new length.
1600 __ str(r0, FieldMemOperand(receiver, JSArray::kLengthOffset)); 1600 __ str(r0, FieldMemOperand(receiver, JSArray::kLengthOffset));
1601 1601
1602 // Store the value. 1602 // Store the value.
1603 // We may need a register containing the address end_elements below, 1603 // We may need a register containing the address end_elements below,
(...skipping 2642 matching lines...) Expand 10 before | Expand all | Expand 10 after
4246 } 4246 }
4247 4247
4248 // Make sure elements is a fast element array, not 'cow'. 4248 // Make sure elements is a fast element array, not 'cow'.
4249 __ CheckMap(elements_reg, 4249 __ CheckMap(elements_reg,
4250 scratch, 4250 scratch,
4251 Heap::kFixedArrayMapRootIndex, 4251 Heap::kFixedArrayMapRootIndex,
4252 &miss_force_generic, 4252 &miss_force_generic,
4253 DONT_DO_SMI_CHECK); 4253 DONT_DO_SMI_CHECK);
4254 4254
4255 __ bind(&finish_store); 4255 __ bind(&finish_store);
4256 if (elements_kind == FAST_SMI_ONLY_ELEMENTS) { 4256 if (IsFastSmiElementsKind(elements_kind)) {
4257 __ add(scratch, 4257 __ add(scratch,
4258 elements_reg, 4258 elements_reg,
4259 Operand(FixedArray::kHeaderSize - kHeapObjectTag)); 4259 Operand(FixedArray::kHeaderSize - kHeapObjectTag));
4260 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize < kPointerSizeLog2); 4260 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize < kPointerSizeLog2);
4261 __ add(scratch, 4261 __ add(scratch,
4262 scratch, 4262 scratch,
4263 Operand(key_reg, LSL, kPointerSizeLog2 - kSmiTagSize)); 4263 Operand(key_reg, LSL, kPointerSizeLog2 - kSmiTagSize));
4264 __ str(value_reg, MemOperand(scratch)); 4264 __ str(value_reg, MemOperand(scratch));
4265 } else { 4265 } else {
4266 ASSERT(elements_kind == FAST_ELEMENTS); 4266 ASSERT(IsFastObjectElementsKind(elements_kind));
4267 __ add(scratch, 4267 __ add(scratch,
4268 elements_reg, 4268 elements_reg,
4269 Operand(FixedArray::kHeaderSize - kHeapObjectTag)); 4269 Operand(FixedArray::kHeaderSize - kHeapObjectTag));
4270 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize < kPointerSizeLog2); 4270 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize < kPointerSizeLog2);
4271 __ add(scratch, 4271 __ add(scratch,
4272 scratch, 4272 scratch,
4273 Operand(key_reg, LSL, kPointerSizeLog2 - kSmiTagSize)); 4273 Operand(key_reg, LSL, kPointerSizeLog2 - kSmiTagSize));
4274 __ str(value_reg, MemOperand(scratch)); 4274 __ str(value_reg, MemOperand(scratch));
4275 __ mov(receiver_reg, value_reg); 4275 __ mov(receiver_reg, value_reg);
4276 __ RecordWrite(elements_reg, // Object. 4276 __ RecordWrite(elements_reg, // Object.
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
4503 __ Jump(ic_slow, RelocInfo::CODE_TARGET); 4503 __ Jump(ic_slow, RelocInfo::CODE_TARGET);
4504 } 4504 }
4505 } 4505 }
4506 4506
4507 4507
4508 #undef __ 4508 #undef __
4509 4509
4510 } } // namespace v8::internal 4510 } } // namespace v8::internal
4511 4511
4512 #endif // V8_TARGET_ARCH_ARM 4512 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/bootstrapper.cc » ('j') | src/elements.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698