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

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

Issue 5961016: Optimize array-length and fast element loads.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 11 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.h ('k') | src/arm/lithium-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 1648 matching lines...) Expand 10 before | Expand all | Expand 10 after
1659 1659
1660 1660
1661 LInstruction* LChunkBuilder::DoClassOfTest(HClassOfTest* instr) { 1661 LInstruction* LChunkBuilder::DoClassOfTest(HClassOfTest* instr) {
1662 ASSERT(instr->value()->representation().IsTagged()); 1662 ASSERT(instr->value()->representation().IsTagged());
1663 LOperand* value = UseTempRegister(instr->value()); 1663 LOperand* value = UseTempRegister(instr->value());
1664 1664
1665 return DefineSameAsFirst(new LClassOfTest(value, TempRegister())); 1665 return DefineSameAsFirst(new LClassOfTest(value, TempRegister()));
1666 } 1666 }
1667 1667
1668 1668
1669 LInstruction* LChunkBuilder::DoArrayLength(HArrayLength* instr) { 1669 LInstruction* LChunkBuilder::DoJSArrayLength(HJSArrayLength* instr) {
1670 LOperand* array = NULL; 1670 LOperand* array = UseRegisterAtStart(instr->value());
1671 LOperand* temporary = NULL; 1671 return DefineAsRegister(new LJSArrayLength(array));
1672
1673 if (instr->value()->IsLoadElements()) {
1674 array = UseRegisterAtStart(instr->value());
1675 } else {
1676 array = UseRegister(instr->value());
1677 temporary = TempRegister();
1678 }
1679
1680 LInstruction* result = new LArrayLength(array, temporary);
1681 return AssignEnvironment(DefineAsRegister(result));
1682 } 1672 }
1683 1673
1684 1674
1675 LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) {
1676 LOperand* array = UseRegisterAtStart(instr->value());
1677 return DefineAsRegister(new LFixedArrayLength(array));
1678 }
1679
1680
1685 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { 1681 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) {
1686 LOperand* object = UseRegister(instr->value()); 1682 LOperand* object = UseRegister(instr->value());
1687 LInstruction* result = new LValueOf(object, TempRegister()); 1683 LInstruction* result = new LValueOf(object, TempRegister());
1688 return AssignEnvironment(DefineSameAsFirst(result)); 1684 return AssignEnvironment(DefineSameAsFirst(result));
1689 } 1685 }
1690 1686
1691 1687
1692 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { 1688 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) {
1693 return AssignEnvironment(new LBoundsCheck(UseRegisterAtStart(instr->index()), 1689 return AssignEnvironment(new LBoundsCheck(UseRegisterAtStart(instr->index()),
1694 Use(instr->length()))); 1690 Use(instr->length())));
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
2121 void LPointerMap::PrintTo(StringStream* stream) const { 2117 void LPointerMap::PrintTo(StringStream* stream) const {
2122 stream->Add("{"); 2118 stream->Add("{");
2123 for (int i = 0; i < pointer_operands_.length(); ++i) { 2119 for (int i = 0; i < pointer_operands_.length(); ++i) {
2124 if (i != 0) stream->Add(";"); 2120 if (i != 0) stream->Add(";");
2125 pointer_operands_[i]->PrintTo(stream); 2121 pointer_operands_[i]->PrintTo(stream);
2126 } 2122 }
2127 stream->Add("} @%d", position()); 2123 stream->Add("} @%d", position());
2128 } 2124 }
2129 2125
2130 } } // namespace v8::internal 2126 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698