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

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

Issue 6519009: ARM: Implement DoHasCachedArrayIndex and DoHasCachedArrayIndexAndBranch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge/benchmarks
Patch Set: Created 9 years, 10 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 | 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 1879 matching lines...) Expand 10 before | Expand all | Expand 10 after
1890 1890
1891 __ tst(input, Operand(kSmiTagMask)); 1891 __ tst(input, Operand(kSmiTagMask));
1892 __ b(eq, false_label); 1892 __ b(eq, false_label);
1893 1893
1894 __ CompareObjectType(input, scratch, scratch, TestType(instr->hydrogen())); 1894 __ CompareObjectType(input, scratch, scratch, TestType(instr->hydrogen()));
1895 EmitBranch(true_block, false_block, BranchCondition(instr->hydrogen())); 1895 EmitBranch(true_block, false_block, BranchCondition(instr->hydrogen()));
1896 } 1896 }
1897 1897
1898 1898
1899 void LCodeGen::DoHasCachedArrayIndex(LHasCachedArrayIndex* instr) { 1899 void LCodeGen::DoHasCachedArrayIndex(LHasCachedArrayIndex* instr) {
1900 Abort("DoHasCachedArrayIndex unimplemented."); 1900 Register input = ToRegister(instr->InputAt(0));
1901 Register result = ToRegister(instr->result());
1902 Register scratch = scratch0();
1903
1904 ASSERT(instr->hydrogen()->value()->representation().IsTagged());
1905 __ ldr(scratch,
1906 FieldMemOperand(input, String::kContainsCachedArrayIndexMask));
1907 __ tst(scratch, Operand(String::kContainsCachedArrayIndexMask));
1908 __ LoadRoot(result, Heap::kTrueValueRootIndex, ne);
1909 __ LoadRoot(result, Heap::kFalseValueRootIndex, eq);
1901 } 1910 }
1902 1911
1903 1912
1904 void LCodeGen::DoHasCachedArrayIndexAndBranch( 1913 void LCodeGen::DoHasCachedArrayIndexAndBranch(
1905 LHasCachedArrayIndexAndBranch* instr) { 1914 LHasCachedArrayIndexAndBranch* instr) {
1906 Abort("DoHasCachedArrayIndexAndBranch unimplemented."); 1915 Register input = ToRegister(instr->InputAt(0));
1916 Register scratch = scratch0();
1917
1918 int true_block = chunk_->LookupDestination(instr->true_block_id());
1919 int false_block = chunk_->LookupDestination(instr->false_block_id());
1920
1921 ASSERT(instr->hydrogen()->value()->representation().IsTagged());
1922 __ ldr(scratch,
1923 FieldMemOperand(input, String::kContainsCachedArrayIndexMask));
1924 __ tst(scratch, Operand(String::kContainsCachedArrayIndexMask));
1925 EmitBranch(true_block, false_block, ne);
1907 } 1926 }
1908 1927
1909 1928
1910 // Branches to a label or falls through with the answer in flags. Trashes 1929 // Branches to a label or falls through with the answer in flags. Trashes
1911 // the temp registers, but not the input. Only input and temp2 may alias. 1930 // the temp registers, but not the input. Only input and temp2 may alias.
1912 void LCodeGen::EmitClassOfTest(Label* is_true, 1931 void LCodeGen::EmitClassOfTest(Label* is_true,
1913 Label* is_false, 1932 Label* is_false,
1914 Handle<String>class_name, 1933 Handle<String>class_name,
1915 Register input, 1934 Register input,
1916 Register temp, 1935 Register temp,
(...skipping 2009 matching lines...) Expand 10 before | Expand all | Expand 10 after
3926 ASSERT(!environment->HasBeenRegistered()); 3945 ASSERT(!environment->HasBeenRegistered());
3927 RegisterEnvironmentForDeoptimization(environment); 3946 RegisterEnvironmentForDeoptimization(environment);
3928 ASSERT(osr_pc_offset_ == -1); 3947 ASSERT(osr_pc_offset_ == -1);
3929 osr_pc_offset_ = masm()->pc_offset(); 3948 osr_pc_offset_ = masm()->pc_offset();
3930 } 3949 }
3931 3950
3932 3951
3933 #undef __ 3952 #undef __
3934 3953
3935 } } // namespace v8::internal 3954 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698