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

Side by Side Diff: src/ia32/lithium-ia32.h

Issue 7132002: Remove RESTORE_CONTEXT flag from ia32 crankshaft codegen. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Completed - use HContext everywhere except for HChange to tagged allocation. Created 9 years, 5 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
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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 596
597 Token::Value op() const { return hydrogen()->token(); } 597 Token::Value op() const { return hydrogen()->token(); }
598 bool is_double() const { 598 bool is_double() const {
599 return hydrogen()->GetInputRepresentation().IsDouble(); 599 return hydrogen()->GetInputRepresentation().IsDouble();
600 } 600 }
601 601
602 virtual void PrintDataTo(StringStream* stream); 602 virtual void PrintDataTo(StringStream* stream);
603 }; 603 };
604 604
605 605
606 class LUnaryMathOperation: public LTemplateInstruction<1, 1, 0> { 606 class LUnaryMathOperation: public LTemplateInstruction<1, 2, 0> {
607 public: 607 public:
608 explicit LUnaryMathOperation(LOperand* value) { 608 LUnaryMathOperation(LOperand* context, LOperand* value) {
609 inputs_[1] = context;
609 inputs_[0] = value; 610 inputs_[0] = value;
610 } 611 }
611 612
613 LOperand* context() { return inputs_[1]; }
614 LOperand* value() { return inputs_[0]; }
615
612 DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation, "unary-math-operation") 616 DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation, "unary-math-operation")
613 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) 617 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
614 618
615 virtual void PrintDataTo(StringStream* stream); 619 virtual void PrintDataTo(StringStream* stream);
616 BuiltinFunctionId op() const { return hydrogen()->op(); } 620 BuiltinFunctionId op() const { return hydrogen()->op(); }
617 }; 621 };
618 622
619 623
620 class LCmpObjectEq: public LTemplateInstruction<1, 2, 0> { 624 class LCmpObjectEq: public LTemplateInstruction<1, 2, 0> {
621 public: 625 public:
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 } 870 }
867 871
868 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, 872 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch,
869 "class-of-test-and-branch") 873 "class-of-test-and-branch")
870 DECLARE_HYDROGEN_ACCESSOR(ClassOfTest) 874 DECLARE_HYDROGEN_ACCESSOR(ClassOfTest)
871 875
872 virtual void PrintDataTo(StringStream* stream); 876 virtual void PrintDataTo(StringStream* stream);
873 }; 877 };
874 878
875 879
876 class LCmpT: public LTemplateInstruction<1, 2, 0> { 880 class LCmpT: public LTemplateInstruction<1, 3, 0> {
877 public: 881 public:
878 LCmpT(LOperand* left, LOperand* right) { 882 LCmpT(LOperand* context, LOperand* left, LOperand* right) {
879 inputs_[0] = left; 883 inputs_[0] = context;
880 inputs_[1] = right; 884 inputs_[1] = left;
885 inputs_[2] = right;
881 } 886 }
882 887
883 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t") 888 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t")
884 DECLARE_HYDROGEN_ACCESSOR(Compare) 889 DECLARE_HYDROGEN_ACCESSOR(Compare)
885 890
886 Token::Value op() const { return hydrogen()->token(); } 891 Token::Value op() const { return hydrogen()->token(); }
887 }; 892 };
888 893
889 894
890 class LInstanceOf: public LTemplateInstruction<1, 3, 0> { 895 class LInstanceOf: public LTemplateInstruction<1, 3, 0> {
891 public: 896 public:
892 LInstanceOf(LOperand* context, LOperand* left, LOperand* right) { 897 LInstanceOf(LOperand* context, LOperand* left, LOperand* right) {
893 inputs_[0] = context; 898 inputs_[0] = context;
894 inputs_[1] = left; 899 inputs_[1] = left;
895 inputs_[2] = right; 900 inputs_[2] = right;
896 } 901 }
897 902
898 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") 903 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of")
899 904
900 LOperand* context() { return inputs_[0]; } 905 LOperand* context() { return inputs_[0]; }
901 }; 906 };
902 907
903 908
904 class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 1, 1> { 909 class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 2, 1> {
905 public: 910 public:
906 LInstanceOfKnownGlobal(LOperand* value, LOperand* temp) { 911 LInstanceOfKnownGlobal(LOperand* context, LOperand* value, LOperand* temp) {
907 inputs_[0] = value; 912 inputs_[0] = context;
913 inputs_[1] = value;
908 temps_[0] = temp; 914 temps_[0] = temp;
909 } 915 }
910 916
911 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, 917 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal,
912 "instance-of-known-global") 918 "instance-of-known-global")
913 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal) 919 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal)
914 920
915 Handle<JSFunction> function() const { return hydrogen()->function(); } 921 Handle<JSFunction> function() const { return hydrogen()->function(); }
916 }; 922 };
917 923
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 LValueOf(LOperand* value, LOperand* temp) { 1099 LValueOf(LOperand* value, LOperand* temp) {
1094 inputs_[0] = value; 1100 inputs_[0] = value;
1095 temps_[0] = temp; 1101 temps_[0] = temp;
1096 } 1102 }
1097 1103
1098 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") 1104 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of")
1099 DECLARE_HYDROGEN_ACCESSOR(ValueOf) 1105 DECLARE_HYDROGEN_ACCESSOR(ValueOf)
1100 }; 1106 };
1101 1107
1102 1108
1103 class LThrow: public LTemplateInstruction<0, 1, 0> { 1109 class LThrow: public LTemplateInstruction<0, 2, 0> {
1104 public: 1110 public:
1105 explicit LThrow(LOperand* value) { 1111 explicit LThrow(LOperand* context, LOperand* value) {
1106 inputs_[0] = value; 1112 inputs_[0] = context;
1113 inputs_[1] = value;
1107 } 1114 }
1108 1115
1116 LOperand* context() { return inputs_[0]; }
1117 LOperand* value() { return inputs_[1]; }
1118
1109 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") 1119 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw")
1110 }; 1120 };
1111 1121
1112 1122
1113 class LBitNotI: public LTemplateInstruction<1, 1, 0> { 1123 class LBitNotI: public LTemplateInstruction<1, 1, 0> {
1114 public: 1124 public:
1115 explicit LBitNotI(LOperand* value) { 1125 explicit LBitNotI(LOperand* value) {
1116 inputs_[0] = value; 1126 inputs_[0] = value;
1117 } 1127 }
1118 1128
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1156 1166
1157 virtual Opcode opcode() const { return LInstruction::kArithmeticD; } 1167 virtual Opcode opcode() const { return LInstruction::kArithmeticD; }
1158 virtual void CompileToNative(LCodeGen* generator); 1168 virtual void CompileToNative(LCodeGen* generator);
1159 virtual const char* Mnemonic() const; 1169 virtual const char* Mnemonic() const;
1160 1170
1161 private: 1171 private:
1162 Token::Value op_; 1172 Token::Value op_;
1163 }; 1173 };
1164 1174
1165 1175
1166 class LArithmeticT: public LTemplateInstruction<1, 2, 0> { 1176 class LArithmeticT: public LTemplateInstruction<1, 3, 0> {
1167 public: 1177 public:
1168 LArithmeticT(Token::Value op, LOperand* left, LOperand* right) 1178 LArithmeticT(Token::Value op,
1179 LOperand* context,
1180 LOperand* left,
1181 LOperand* right)
1169 : op_(op) { 1182 : op_(op) {
1170 inputs_[0] = left; 1183 inputs_[0] = context;
1171 inputs_[1] = right; 1184 inputs_[1] = left;
1185 inputs_[2] = right;
1172 } 1186 }
1173 1187
1174 virtual Opcode opcode() const { return LInstruction::kArithmeticT; } 1188 virtual Opcode opcode() const { return LInstruction::kArithmeticT; }
1175 virtual void CompileToNative(LCodeGen* generator); 1189 virtual void CompileToNative(LCodeGen* generator);
1176 virtual const char* Mnemonic() const; 1190 virtual const char* Mnemonic() const;
1177 1191
1178 Token::Value op() const { return op_; } 1192 Token::Value op() const { return op_; }
1193 LOperand* context() { return inputs_[0]; }
1194 LOperand* left() { return inputs_[1]; }
1195 LOperand* right() { return inputs_[2]; }
1179 1196
1180 private: 1197 private:
1181 Token::Value op_; 1198 Token::Value op_;
1182 }; 1199 };
1183 1200
1184 1201
1185 class LReturn: public LTemplateInstruction<0, 1, 0> { 1202 class LReturn: public LTemplateInstruction<0, 1, 0> {
1186 public: 1203 public:
1187 explicit LReturn(LOperand* value) { 1204 explicit LReturn(LOperand* value) {
1188 inputs_[0] = value; 1205 inputs_[0] = value;
1189 } 1206 }
1190 1207
1191 DECLARE_CONCRETE_INSTRUCTION(Return, "return") 1208 DECLARE_CONCRETE_INSTRUCTION(Return, "return")
1192 }; 1209 };
1193 1210
1194 1211
1195 class LLoadNamedField: public LTemplateInstruction<1, 1, 0> { 1212 class LLoadNamedField: public LTemplateInstruction<1, 1, 0> {
1196 public: 1213 public:
1197 explicit LLoadNamedField(LOperand* object) { 1214 explicit LLoadNamedField(LOperand* object) {
1198 inputs_[0] = object; 1215 inputs_[0] = object;
1199 } 1216 }
1200 1217
1201 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field") 1218 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field")
1202 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField) 1219 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField)
1203 1220
1204 LOperand* object() { return inputs_[0]; } 1221 LOperand* object() { return inputs_[0]; }
1205 }; 1222 };
1206 1223
1207 1224
1208 class LLoadNamedFieldPolymorphic: public LTemplateInstruction<1, 1, 0> { 1225 class LLoadNamedFieldPolymorphic: public LTemplateInstruction<1, 2, 0> {
1209 public: 1226 public:
1210 explicit LLoadNamedFieldPolymorphic(LOperand* object) { 1227 explicit LLoadNamedFieldPolymorphic(LOperand* context, LOperand* object) {
1211 inputs_[0] = object; 1228 inputs_[0] = context;
1229 inputs_[1] = object;
1212 } 1230 }
1213 1231
1214 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field-polymorphic") 1232 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field-polymorphic")
1215 DECLARE_HYDROGEN_ACCESSOR(LoadNamedFieldPolymorphic) 1233 DECLARE_HYDROGEN_ACCESSOR(LoadNamedFieldPolymorphic)
1216 1234
1217 LOperand* object() { return inputs_[0]; } 1235 LOperand* context() { return inputs_[0]; }
1236 LOperand* object() { return inputs_[1]; }
1218 }; 1237 };
1219 1238
1220 1239
1221 class LLoadNamedGeneric: public LTemplateInstruction<1, 2, 0> { 1240 class LLoadNamedGeneric: public LTemplateInstruction<1, 2, 0> {
1222 public: 1241 public:
1223 LLoadNamedGeneric(LOperand* context, LOperand* object) { 1242 LLoadNamedGeneric(LOperand* context, LOperand* object) {
1224 inputs_[0] = context; 1243 inputs_[0] = context;
1225 inputs_[1] = object; 1244 inputs_[1] = object;
1226 } 1245 }
1227 1246
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1590 DECLARE_HYDROGEN_ACCESSOR(CallNew) 1609 DECLARE_HYDROGEN_ACCESSOR(CallNew)
1591 1610
1592 virtual void PrintDataTo(StringStream* stream); 1611 virtual void PrintDataTo(StringStream* stream);
1593 1612
1594 LOperand* context() { return inputs_[0]; } 1613 LOperand* context() { return inputs_[0]; }
1595 LOperand* constructor() { return inputs_[1]; } 1614 LOperand* constructor() { return inputs_[1]; }
1596 int arity() const { return hydrogen()->argument_count() - 1; } 1615 int arity() const { return hydrogen()->argument_count() - 1; }
1597 }; 1616 };
1598 1617
1599 1618
1600 class LCallRuntime: public LTemplateInstruction<1, 0, 0> { 1619 class LCallRuntime: public LTemplateInstruction<1, 1, 0> {
1601 public: 1620 public:
1621 explicit LCallRuntime(LOperand* context) {
1622 inputs_[0] = context;
1623 }
1602 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") 1624 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime")
1603 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) 1625 DECLARE_HYDROGEN_ACCESSOR(CallRuntime)
1604 1626
1627 LOperand* context() { return inputs_[0]; }
1605 const Runtime::Function* function() const { return hydrogen()->function(); } 1628 const Runtime::Function* function() const { return hydrogen()->function(); }
1606 int arity() const { return hydrogen()->argument_count(); } 1629 int arity() const { return hydrogen()->argument_count(); }
1607 }; 1630 };
1608 1631
1609 1632
1610 class LInteger32ToDouble: public LTemplateInstruction<1, 1, 0> { 1633 class LInteger32ToDouble: public LTemplateInstruction<1, 1, 0> {
1611 public: 1634 public:
1612 explicit LInteger32ToDouble(LOperand* value) { 1635 explicit LInteger32ToDouble(LOperand* value) {
1613 inputs_[0] = value; 1636 inputs_[0] = value;
1614 } 1637 }
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1811 virtual void PrintDataTo(StringStream* stream); 1834 virtual void PrintDataTo(StringStream* stream);
1812 1835
1813 LOperand* context() { return inputs_[0]; } 1836 LOperand* context() { return inputs_[0]; }
1814 LOperand* object() { return inputs_[1]; } 1837 LOperand* object() { return inputs_[1]; }
1815 LOperand* key() { return inputs_[2]; } 1838 LOperand* key() { return inputs_[2]; }
1816 LOperand* value() { return inputs_[3]; } 1839 LOperand* value() { return inputs_[3]; }
1817 bool strict_mode() { return hydrogen()->strict_mode(); } 1840 bool strict_mode() { return hydrogen()->strict_mode(); }
1818 }; 1841 };
1819 1842
1820 1843
1821 class LStringAdd: public LTemplateInstruction<1, 2, 0> { 1844 class LStringAdd: public LTemplateInstruction<1, 3, 0> {
1822 public: 1845 public:
1823 LStringAdd(LOperand* left, LOperand* right) { 1846 LStringAdd(LOperand* context, LOperand* left, LOperand* right) {
1824 inputs_[0] = left; 1847 inputs_[0] = context;
1825 inputs_[1] = right; 1848 inputs_[1] = left;
1849 inputs_[2] = right;
1826 } 1850 }
1827 1851
1828 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") 1852 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add")
1829 DECLARE_HYDROGEN_ACCESSOR(StringAdd) 1853 DECLARE_HYDROGEN_ACCESSOR(StringAdd)
1830 1854
1831 LOperand* left() { return inputs_[0]; } 1855 LOperand* left() { return inputs_[1]; }
1832 LOperand* right() { return inputs_[1]; } 1856 LOperand* right() { return inputs_[2]; }
1833 }; 1857 };
1834 1858
1835 1859
1836 class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> { 1860 class LStringCharCodeAt: public LTemplateInstruction<1, 3, 0> {
1837 public: 1861 public:
1838 LStringCharCodeAt(LOperand* string, LOperand* index) { 1862 LStringCharCodeAt(LOperand* context, LOperand* string, LOperand* index) {
1839 inputs_[0] = string; 1863 inputs_[0] = context;
1840 inputs_[1] = index; 1864 inputs_[1] = string;
1865 inputs_[2] = index;
1841 } 1866 }
1842 1867
1843 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at") 1868 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at")
1844 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt) 1869 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt)
1845 1870
1846 LOperand* string() { return inputs_[0]; } 1871 LOperand* context() { return inputs_[0]; }
1847 LOperand* index() { return inputs_[1]; } 1872 LOperand* string() { return inputs_[1]; }
1873 LOperand* index() { return inputs_[2]; }
1848 }; 1874 };
1849 1875
1850 1876
1851 class LStringCharFromCode: public LTemplateInstruction<1, 1, 0> { 1877 class LStringCharFromCode: public LTemplateInstruction<1, 2, 0> {
1852 public: 1878 public:
1853 explicit LStringCharFromCode(LOperand* char_code) { 1879 explicit LStringCharFromCode(LOperand* context, LOperand* char_code) {
1854 inputs_[0] = char_code; 1880 inputs_[0] = context;
1881 inputs_[1] = char_code;
1855 } 1882 }
1856 1883
1857 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code") 1884 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code")
1858 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode) 1885 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode)
1859 1886
1860 LOperand* char_code() { return inputs_[0]; } 1887 LOperand* context() { return inputs_[0]; }
1888 LOperand* char_code() { return inputs_[1]; }
1861 }; 1889 };
1862 1890
1863 1891
1864 class LStringLength: public LTemplateInstruction<1, 1, 0> { 1892 class LStringLength: public LTemplateInstruction<1, 1, 0> {
1865 public: 1893 public:
1866 explicit LStringLength(LOperand* string) { 1894 explicit LStringLength(LOperand* string) {
1867 inputs_[0] = string; 1895 inputs_[0] = string;
1868 } 1896 }
1869 1897
1870 DECLARE_CONCRETE_INSTRUCTION(StringLength, "string-length") 1898 DECLARE_CONCRETE_INSTRUCTION(StringLength, "string-length")
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1972 class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> { 2000 class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> {
1973 public: 2001 public:
1974 explicit LCheckNonSmi(LOperand* value) { 2002 explicit LCheckNonSmi(LOperand* value) {
1975 inputs_[0] = value; 2003 inputs_[0] = value;
1976 } 2004 }
1977 2005
1978 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi") 2006 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi")
1979 }; 2007 };
1980 2008
1981 2009
1982 class LArrayLiteral: public LTemplateInstruction<1, 0, 0> { 2010 class LArrayLiteral: public LTemplateInstruction<1, 1, 0> {
1983 public: 2011 public:
2012 explicit LArrayLiteral(LOperand* context) {
2013 inputs_[0] = context;
2014 }
2015
2016 LOperand* context() { return inputs_[0]; }
2017
1984 DECLARE_CONCRETE_INSTRUCTION(ArrayLiteral, "array-literal") 2018 DECLARE_CONCRETE_INSTRUCTION(ArrayLiteral, "array-literal")
1985 DECLARE_HYDROGEN_ACCESSOR(ArrayLiteral) 2019 DECLARE_HYDROGEN_ACCESSOR(ArrayLiteral)
1986 }; 2020 };
1987 2021
1988 2022
1989 class LObjectLiteral: public LTemplateInstruction<1, 1, 0> { 2023 class LObjectLiteral: public LTemplateInstruction<1, 1, 0> {
1990 public: 2024 public:
1991 explicit LObjectLiteral(LOperand* context) { 2025 explicit LObjectLiteral(LOperand* context) {
1992 inputs_[0] = context; 2026 inputs_[0] = context;
1993 } 2027 }
1994 2028
2029 LOperand* context() { return inputs_[0]; }
2030
1995 DECLARE_CONCRETE_INSTRUCTION(ObjectLiteral, "object-literal") 2031 DECLARE_CONCRETE_INSTRUCTION(ObjectLiteral, "object-literal")
1996 DECLARE_HYDROGEN_ACCESSOR(ObjectLiteral) 2032 DECLARE_HYDROGEN_ACCESSOR(ObjectLiteral)
1997
1998 LOperand* context() { return inputs_[0]; }
1999 }; 2033 };
2000 2034
2001 2035
2002 class LRegExpLiteral: public LTemplateInstruction<1, 0, 0> { 2036 class LRegExpLiteral: public LTemplateInstruction<1, 1, 0> {
2003 public: 2037 public:
2038 explicit LRegExpLiteral(LOperand* context) {
2039 inputs_[0] = context;
2040 }
2041
2042 LOperand* context() { return inputs_[0]; }
2043
2004 DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal") 2044 DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal")
2005 DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral) 2045 DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral)
2006 }; 2046 };
2007 2047
2008 2048
2009 class LFunctionLiteral: public LTemplateInstruction<1, 0, 0> { 2049 class LFunctionLiteral: public LTemplateInstruction<1, 1, 0> {
2010 public: 2050 public:
2051 explicit LFunctionLiteral(LOperand* context) {
2052 inputs_[0] = context;
2053 }
2054
2055 LOperand* context() { return inputs_[0]; }
2056
2011 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal") 2057 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal")
2012 DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral) 2058 DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral)
2013 2059
2014 Handle<SharedFunctionInfo> shared_info() { return hydrogen()->shared_info(); } 2060 Handle<SharedFunctionInfo> shared_info() { return hydrogen()->shared_info(); }
2015 }; 2061 };
2016 2062
2017 2063
2018 class LToFastProperties: public LTemplateInstruction<1, 1, 0> { 2064 class LToFastProperties: public LTemplateInstruction<1, 1, 0> {
2019 public: 2065 public:
2020 explicit LToFastProperties(LOperand* value) { 2066 explicit LToFastProperties(LOperand* value) {
2021 inputs_[0] = value; 2067 inputs_[0] = value;
2022 } 2068 }
2023 2069
2024 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties") 2070 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties")
2025 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties) 2071 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties)
2026 }; 2072 };
2027 2073
2028 2074
2029 class LTypeof: public LTemplateInstruction<1, 1, 0> { 2075 class LTypeof: public LTemplateInstruction<1, 2, 0> {
2030 public: 2076 public:
2031 explicit LTypeof(LOperand* value) { 2077 explicit LTypeof(LOperand* context, LOperand* value) {
2032 inputs_[0] = value; 2078 inputs_[0] = context;
2079 inputs_[1] = value;
2033 } 2080 }
2034 2081
2035 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") 2082 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof")
2036 }; 2083 };
2037 2084
2038 2085
2039 class LTypeofIs: public LTemplateInstruction<1, 1, 0> { 2086 class LTypeofIs: public LTemplateInstruction<1, 1, 0> {
2040 public: 2087 public:
2041 explicit LTypeofIs(LOperand* value) { 2088 explicit LTypeofIs(LOperand* value) {
2042 inputs_[0] = value; 2089 inputs_[0] = value;
(...skipping 16 matching lines...) Expand all
2059 2106
2060 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch") 2107 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch")
2061 DECLARE_HYDROGEN_ACCESSOR(TypeofIs) 2108 DECLARE_HYDROGEN_ACCESSOR(TypeofIs)
2062 2109
2063 Handle<String> type_literal() { return hydrogen()->type_literal(); } 2110 Handle<String> type_literal() { return hydrogen()->type_literal(); }
2064 2111
2065 virtual void PrintDataTo(StringStream* stream); 2112 virtual void PrintDataTo(StringStream* stream);
2066 }; 2113 };
2067 2114
2068 2115
2069 class LDeleteProperty: public LTemplateInstruction<1, 2, 0> { 2116 class LDeleteProperty: public LTemplateInstruction<1, 3, 0> {
2070 public: 2117 public:
2071 LDeleteProperty(LOperand* obj, LOperand* key) { 2118 LDeleteProperty(LOperand* context, LOperand* obj, LOperand* key) {
2072 inputs_[0] = obj; 2119 inputs_[0] = context;
2073 inputs_[1] = key; 2120 inputs_[1] = obj;
2121 inputs_[2] = key;
2074 } 2122 }
2075 2123
2076 DECLARE_CONCRETE_INSTRUCTION(DeleteProperty, "delete-property") 2124 DECLARE_CONCRETE_INSTRUCTION(DeleteProperty, "delete-property")
2077 2125
2078 LOperand* object() { return inputs_[0]; } 2126 LOperand* object() { return inputs_[1]; }
2079 LOperand* key() { return inputs_[1]; } 2127 LOperand* key() { return inputs_[2]; }
2080 }; 2128 };
2081 2129
2082 2130
2083 class LOsrEntry: public LTemplateInstruction<0, 0, 0> { 2131 class LOsrEntry: public LTemplateInstruction<0, 0, 0> {
2084 public: 2132 public:
2085 LOsrEntry(); 2133 LOsrEntry();
2086 2134
2087 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") 2135 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry")
2088 2136
2089 LOperand** SpilledRegisterArray() { return register_spills_; } 2137 LOperand** SpilledRegisterArray() { return register_spills_; }
2090 LOperand** SpilledDoubleRegisterArray() { return double_register_spills_; } 2138 LOperand** SpilledDoubleRegisterArray() { return double_register_spills_; }
2091 2139
2092 void MarkSpilledRegister(int allocation_index, LOperand* spill_operand); 2140 void MarkSpilledRegister(int allocation_index, LOperand* spill_operand);
2093 void MarkSpilledDoubleRegister(int allocation_index, 2141 void MarkSpilledDoubleRegister(int allocation_index,
2094 LOperand* spill_operand); 2142 LOperand* spill_operand);
2095 2143
2096 private: 2144 private:
2097 // Arrays of spill slot operands for registers with an assigned spill 2145 // Arrays of spill slot operands for registers with an assigned spill
2098 // slot, i.e., that must also be restored to the spill slot on OSR entry. 2146 // slot, i.e., that must also be restored to the spill slot on OSR entry.
2099 // NULL if the register has no assigned spill slot. Indexed by allocation 2147 // NULL if the register has no assigned spill slot. Indexed by allocation
2100 // index. 2148 // index.
2101 LOperand* register_spills_[Register::kNumAllocatableRegisters]; 2149 LOperand* register_spills_[Register::kNumAllocatableRegisters];
2102 LOperand* double_register_spills_[DoubleRegister::kNumAllocatableRegisters]; 2150 LOperand* double_register_spills_[DoubleRegister::kNumAllocatableRegisters];
2103 }; 2151 };
2104 2152
2105 2153
2106 class LStackCheck: public LTemplateInstruction<0, 0, 0> { 2154 class LStackCheck: public LTemplateInstruction<0, 1, 0> {
2107 public: 2155 public:
2156 explicit LStackCheck(LOperand* context) {
2157 inputs_[0] = context;
2158 }
2159
2160 LOperand* context() { return inputs_[0]; }
2161
2108 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check") 2162 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check")
2109 DECLARE_HYDROGEN_ACCESSOR(StackCheck) 2163 DECLARE_HYDROGEN_ACCESSOR(StackCheck)
2110 2164
2111 Label* done_label() { return &done_label_; } 2165 Label* done_label() { return &done_label_; }
2112 2166
2113 private: 2167 private:
2114 Label done_label_; 2168 Label done_label_;
2115 }; 2169 };
2116 2170
2117 2171
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
2350 2404
2351 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2405 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2352 }; 2406 };
2353 2407
2354 #undef DECLARE_HYDROGEN_ACCESSOR 2408 #undef DECLARE_HYDROGEN_ACCESSOR
2355 #undef DECLARE_CONCRETE_INSTRUCTION 2409 #undef DECLARE_CONCRETE_INSTRUCTION
2356 2410
2357 } } // namespace v8::internal 2411 } } // namespace v8::internal
2358 2412
2359 #endif // V8_IA32_LITHIUM_IA32_H_ 2413 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698