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

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

Issue 8366031: MIPS: Porting r9605 to arm (elements kind conversion in generated code). (Closed)
Patch Set: Remove unneeded moves to v0, per review comments. 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
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | no next file » | 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 1622 matching lines...) Expand 10 before | Expand all | Expand 10 after
1633 __ Addu(end_elements, end_elements, kEndElementsOffset); 1633 __ Addu(end_elements, end_elements, kEndElementsOffset);
1634 __ sw(t0, MemOperand(end_elements)); 1634 __ sw(t0, MemOperand(end_elements));
1635 1635
1636 // Check for a smi. 1636 // Check for a smi.
1637 __ Drop(argc + 1); 1637 __ Drop(argc + 1);
1638 __ Ret(); 1638 __ Ret();
1639 1639
1640 __ bind(&with_write_barrier); 1640 __ bind(&with_write_barrier);
1641 1641
1642 __ lw(t2, FieldMemOperand(receiver, HeapObject::kMapOffset)); 1642 __ lw(t2, FieldMemOperand(receiver, HeapObject::kMapOffset));
1643 __ CheckFastSmiOnlyElements(t2, t2, &call_builtin); 1643 __ CheckFastObjectElements(t2, t2, &call_builtin);
1644 1644
1645 // Save new length. 1645 // Save new length.
1646 __ sw(v0, FieldMemOperand(receiver, JSArray::kLengthOffset)); 1646 __ sw(v0, FieldMemOperand(receiver, JSArray::kLengthOffset));
1647 1647
1648 // Push the element. 1648 // Push the element.
1649 // We may need a register containing the address end_elements below, 1649 // We may need a register containing the address end_elements below,
1650 // so write back the value in end_elements. 1650 // so write back the value in end_elements.
1651 __ sll(end_elements, v0, kPointerSizeLog2 - kSmiTagSize); 1651 __ sll(end_elements, v0, kPointerSizeLog2 - kSmiTagSize);
1652 __ Addu(end_elements, elements, end_elements); 1652 __ Addu(end_elements, elements, end_elements);
1653 __ Addu(end_elements, end_elements, kEndElementsOffset); 1653 __ Addu(end_elements, end_elements, kEndElementsOffset);
(...skipping 1638 matching lines...) Expand 10 before | Expand all | Expand 10 after
3292 3292
3293 int receiver_count = receiver_maps->length(); 3293 int receiver_count = receiver_maps->length();
3294 __ lw(a3, FieldMemOperand(a2, HeapObject::kMapOffset)); 3294 __ lw(a3, FieldMemOperand(a2, HeapObject::kMapOffset));
3295 for (int i = 0; i < receiver_count; ++i) { 3295 for (int i = 0; i < receiver_count; ++i) {
3296 Handle<Map> map(receiver_maps->at(i)); 3296 Handle<Map> map(receiver_maps->at(i));
3297 Handle<Code> code(handler_stubs->at(i)); 3297 Handle<Code> code(handler_stubs->at(i));
3298 if (transitioned_maps->at(i) == NULL) { 3298 if (transitioned_maps->at(i) == NULL) {
3299 __ Jump(code, RelocInfo::CODE_TARGET, eq, a3, Operand(map)); 3299 __ Jump(code, RelocInfo::CODE_TARGET, eq, a3, Operand(map));
3300 } else { 3300 } else {
3301 Label next_map; 3301 Label next_map;
3302 __ Branch(&next_map, eq, a3, Operand(map)); 3302 __ Branch(&next_map, ne, a3, Operand(map));
3303 __ li(t0, Operand(Handle<Map>(transitioned_maps->at(i)))); 3303 __ li(a3, Operand(Handle<Map>(transitioned_maps->at(i))));
3304 __ Jump(code, RelocInfo::CODE_TARGET); 3304 __ Jump(code, RelocInfo::CODE_TARGET);
3305 __ bind(&next_map); 3305 __ bind(&next_map);
3306 } 3306 }
3307 } 3307 }
3308 3308
3309 __ bind(&miss); 3309 __ bind(&miss);
3310 Handle<Code> miss_ic = isolate()->builtins()->KeyedStoreIC_Miss(); 3310 Handle<Code> miss_ic = isolate()->builtins()->KeyedStoreIC_Miss();
3311 __ Jump(miss_ic, RelocInfo::CODE_TARGET); 3311 __ Jump(miss_ic, RelocInfo::CODE_TARGET);
3312 3312
3313 // Return the generated code. 3313 // Return the generated code.
(...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after
4530 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); 4530 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss();
4531 __ Jump(ic_miss, RelocInfo::CODE_TARGET); 4531 __ Jump(ic_miss, RelocInfo::CODE_TARGET);
4532 } 4532 }
4533 4533
4534 4534
4535 #undef __ 4535 #undef __
4536 4536
4537 } } // namespace v8::internal 4537 } } // namespace v8::internal
4538 4538
4539 #endif // V8_TARGET_ARCH_MIPS 4539 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698