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

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

Issue 6062002: Merge 6006:6095 from bleeding_edge to experimental/gc branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 10 years 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/code-stubs-arm.cc ('k') | src/arm/full-codegen-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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 5584 matching lines...) Expand 10 before | Expand all | Expand 10 after
5595 // Smi-tagging is equivalent to multiplying by 2. 5595 // Smi-tagging is equivalent to multiplying by 2.
5596 STATIC_ASSERT(kSmiTag == 0); 5596 STATIC_ASSERT(kSmiTag == 0);
5597 STATIC_ASSERT(kSmiTagSize == 1); 5597 STATIC_ASSERT(kSmiTagSize == 1);
5598 5598
5599 // Check that both indices are smis. 5599 // Check that both indices are smis.
5600 __ mov(tmp2, index1); 5600 __ mov(tmp2, index1);
5601 __ orr(tmp2, tmp2, index2); 5601 __ orr(tmp2, tmp2, index2);
5602 __ tst(tmp2, Operand(kSmiTagMask)); 5602 __ tst(tmp2, Operand(kSmiTagMask));
5603 deferred->Branch(nz); 5603 deferred->Branch(nz);
5604 5604
5605 // Check that both indices are valid.
5606 __ ldr(tmp2, FieldMemOperand(object, JSArray::kLengthOffset));
5607 __ cmp(tmp2, index1);
5608 __ cmp(tmp2, index2, hi);
5609 deferred->Branch(ls);
5610
5605 // Bring the offsets into the fixed array in tmp1 into index1 and 5611 // Bring the offsets into the fixed array in tmp1 into index1 and
5606 // index2. 5612 // index2.
5607 __ mov(tmp2, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); 5613 __ mov(tmp2, Operand(FixedArray::kHeaderSize - kHeapObjectTag));
5608 __ add(index1, tmp2, Operand(index1, LSL, kPointerSizeLog2 - kSmiTagSize)); 5614 __ add(index1, tmp2, Operand(index1, LSL, kPointerSizeLog2 - kSmiTagSize));
5609 __ add(index2, tmp2, Operand(index2, LSL, kPointerSizeLog2 - kSmiTagSize)); 5615 __ add(index2, tmp2, Operand(index2, LSL, kPointerSizeLog2 - kSmiTagSize));
5610 5616
5611 // Swap elements. 5617 // Swap elements.
5612 Register tmp3 = object; 5618 Register tmp3 = object;
5613 object = no_reg; 5619 object = no_reg;
5614 __ ldr(tmp3, MemOperand(tmp1, index1)); 5620 __ ldr(tmp3, MemOperand(tmp1, index1));
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
6468 Load(left); 6474 Load(left);
6469 Load(right); 6475 Load(right);
6470 frame_->InvokeBuiltin(Builtins::IN, CALL_JS, 2); 6476 frame_->InvokeBuiltin(Builtins::IN, CALL_JS, 2);
6471 frame_->EmitPush(r0); 6477 frame_->EmitPush(r0);
6472 break; 6478 break;
6473 } 6479 }
6474 6480
6475 case Token::INSTANCEOF: { 6481 case Token::INSTANCEOF: {
6476 Load(left); 6482 Load(left);
6477 Load(right); 6483 Load(right);
6478 InstanceofStub stub; 6484 InstanceofStub stub(InstanceofStub::kNoFlags);
6479 frame_->CallStub(&stub, 2); 6485 frame_->CallStub(&stub, 2);
6480 // At this point if instanceof succeeded then r0 == 0. 6486 // At this point if instanceof succeeded then r0 == 0.
6481 __ tst(r0, Operand(r0)); 6487 __ tst(r0, Operand(r0));
6482 cc_reg_ = eq; 6488 cc_reg_ = eq;
6483 break; 6489 break;
6484 } 6490 }
6485 6491
6486 default: 6492 default:
6487 UNREACHABLE(); 6493 UNREACHABLE();
6488 } 6494 }
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
7378 BinaryOpIC::GetName(runtime_operands_type_)); 7384 BinaryOpIC::GetName(runtime_operands_type_));
7379 return name_; 7385 return name_;
7380 } 7386 }
7381 7387
7382 7388
7383 #undef __ 7389 #undef __
7384 7390
7385 } } // namespace v8::internal 7391 } } // namespace v8::internal
7386 7392
7387 #endif // V8_TARGET_ARCH_ARM 7393 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698