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

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

Issue 6611014: Add lithium support for %_GetCachedArrayIndex for IA32 and X64 (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 9 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 | « src/arm/lithium-arm.cc ('k') | src/ia32/lithium-codegen-ia32.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 1693 matching lines...) Expand 10 before | Expand all | Expand 10 after
1704 __ b(eq, false_label); 1704 __ b(eq, false_label);
1705 1705
1706 __ CompareObjectType(input, scratch, scratch, TestType(instr->hydrogen())); 1706 __ CompareObjectType(input, scratch, scratch, TestType(instr->hydrogen()));
1707 EmitBranch(true_block, false_block, BranchCondition(instr->hydrogen())); 1707 EmitBranch(true_block, false_block, BranchCondition(instr->hydrogen()));
1708 } 1708 }
1709 1709
1710 1710
1711 void LCodeGen::DoGetCachedArrayIndex(LGetCachedArrayIndex* instr) { 1711 void LCodeGen::DoGetCachedArrayIndex(LGetCachedArrayIndex* instr) {
1712 Register input = ToRegister(instr->InputAt(0)); 1712 Register input = ToRegister(instr->InputAt(0));
1713 Register result = ToRegister(instr->result()); 1713 Register result = ToRegister(instr->result());
1714 Register scratch = scratch0();
1715 1714
1716 __ ldr(scratch, FieldMemOperand(input, String::kHashFieldOffset)); 1715 if (FLAG_debug_code) {
1717 __ IndexFromHash(scratch, result); 1716 __ AbortIfNotString(input);
1717 }
1718
1719 __ ldr(result, FieldMemOperand(input, String::kHashFieldOffset));
1720 __ IndexFromHash(result, result);
1718 } 1721 }
1719 1722
1720 1723
1721 void LCodeGen::DoHasCachedArrayIndex(LHasCachedArrayIndex* instr) { 1724 void LCodeGen::DoHasCachedArrayIndex(LHasCachedArrayIndex* instr) {
1722 Register input = ToRegister(instr->InputAt(0)); 1725 Register input = ToRegister(instr->InputAt(0));
1723 Register result = ToRegister(instr->result()); 1726 Register result = ToRegister(instr->result());
1724 Register scratch = scratch0(); 1727 Register scratch = scratch0();
1725 1728
1726 ASSERT(instr->hydrogen()->value()->representation().IsTagged()); 1729 ASSERT(instr->hydrogen()->value()->representation().IsTagged());
1727 __ ldr(scratch, 1730 __ ldr(scratch,
(...skipping 2119 matching lines...) Expand 10 before | Expand all | Expand 10 after
3847 ASSERT(!environment->HasBeenRegistered()); 3850 ASSERT(!environment->HasBeenRegistered());
3848 RegisterEnvironmentForDeoptimization(environment); 3851 RegisterEnvironmentForDeoptimization(environment);
3849 ASSERT(osr_pc_offset_ == -1); 3852 ASSERT(osr_pc_offset_ == -1);
3850 osr_pc_offset_ = masm()->pc_offset(); 3853 osr_pc_offset_ = masm()->pc_offset();
3851 } 3854 }
3852 3855
3853 3856
3854 #undef __ 3857 #undef __
3855 3858
3856 } } // namespace v8::internal 3859 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698