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

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

Issue 15858006: Tag length of FixedArrayBase and smi-array[x] as smi representation (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Split check-smi-and-return from check-smi Created 7 years, 7 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after
1883 return NULL; 1883 return NULL;
1884 } 1884 }
1885 1885
1886 1886
1887 LInstruction* LChunkBuilder::DoChange(HChange* instr) { 1887 LInstruction* LChunkBuilder::DoChange(HChange* instr) {
1888 Representation from = instr->from(); 1888 Representation from = instr->from();
1889 Representation to = instr->to(); 1889 Representation to = instr->to();
1890 if (from.IsSmi()) { 1890 if (from.IsSmi()) {
1891 if (to.IsTagged()) { 1891 if (to.IsTagged()) {
1892 LOperand* value = UseRegister(instr->value()); 1892 LOperand* value = UseRegister(instr->value());
1893 // For now, always deopt on hole.
1894 if (instr->value()->IsLoadKeyed() &&
1895 HLoadKeyed::cast(instr->value())->UsesMustHandleHole()) {
1896 return AssignEnvironment(
1897 DefineSameAsFirst(new(zone()) LCheckSmiAndReturn(value)));
1898 }
1893 return DefineSameAsFirst(new(zone()) LDummyUse(value)); 1899 return DefineSameAsFirst(new(zone()) LDummyUse(value));
1894 } 1900 }
1895 from = Representation::Tagged(); 1901 from = Representation::Tagged();
1896 } 1902 }
1897 if (from.IsTagged()) { 1903 if (from.IsTagged()) {
1898 if (to.IsDouble()) { 1904 if (to.IsDouble()) {
1899 info()->MarkAsDeferredCalling(); 1905 info()->MarkAsDeferredCalling();
1900 LOperand* value = UseRegister(instr->value()); 1906 LOperand* value = UseRegister(instr->value());
1901 LNumberUntagD* res = new(zone()) LNumberUntagD(value); 1907 LNumberUntagD* res = new(zone()) LNumberUntagD(value);
1902 return AssignEnvironment(DefineAsRegister(res)); 1908 return AssignEnvironment(DefineAsRegister(res));
1903 } else if (to.IsSmi()) { 1909 } else if (to.IsSmi()) {
1904 HValue* val = instr->value(); 1910 HValue* val = instr->value();
1905 LOperand* value = UseRegisterAtStart(val); 1911 LOperand* value = UseRegister(val);
1906 return AssignEnvironment( 1912 return AssignEnvironment(
1907 DefineSameAsFirst(new(zone()) LCheckSmi(value))); 1913 DefineSameAsFirst(new(zone()) LCheckSmiAndReturn(value)));
1908 } else { 1914 } else {
1909 ASSERT(to.IsInteger32()); 1915 ASSERT(to.IsInteger32());
1910 LOperand* value = NULL; 1916 LOperand* value = NULL;
1911 LInstruction* res = NULL; 1917 LInstruction* res = NULL;
1912 if (instr->value()->type().IsSmi()) { 1918 if (instr->value()->type().IsSmi()) {
1913 value = UseRegisterAtStart(instr->value()); 1919 value = UseRegisterAtStart(instr->value());
1914 res = DefineAsRegister(new(zone()) LSmiUntag(value, false)); 1920 res = DefineAsRegister(new(zone()) LSmiUntag(value, false));
1915 if (instr->value()->IsLoadKeyed()) { 1921 if (instr->value()->IsLoadKeyed()) {
1916 HLoadKeyed* load_keyed = HLoadKeyed::cast(instr->value()); 1922 HLoadKeyed* load_keyed = HLoadKeyed::cast(instr->value());
1917 if (load_keyed->UsesMustHandleHole() && 1923 if (load_keyed->UsesMustHandleHole() &&
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
2640 2646
2641 2647
2642 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2648 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2643 LOperand* object = UseRegister(instr->object()); 2649 LOperand* object = UseRegister(instr->object());
2644 LOperand* index = UseRegister(instr->index()); 2650 LOperand* index = UseRegister(instr->index());
2645 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2651 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2646 } 2652 }
2647 2653
2648 2654
2649 } } // namespace v8::internal 2655 } } // 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