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

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

Issue 6673082: Refactor lithium CheckSmi instruction into two separate instructions CheckSmi... (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/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/lithium-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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 V(CallGlobal) \ 63 V(CallGlobal) \
64 V(CallKeyed) \ 64 V(CallKeyed) \
65 V(CallKnownGlobal) \ 65 V(CallKnownGlobal) \
66 V(CallNamed) \ 66 V(CallNamed) \
67 V(CallNew) \ 67 V(CallNew) \
68 V(CallRuntime) \ 68 V(CallRuntime) \
69 V(CallStub) \ 69 V(CallStub) \
70 V(CheckFunction) \ 70 V(CheckFunction) \
71 V(CheckInstanceType) \ 71 V(CheckInstanceType) \
72 V(CheckMap) \ 72 V(CheckMap) \
73 V(CheckNonSmi) \
73 V(CheckPrototypeMaps) \ 74 V(CheckPrototypeMaps) \
74 V(CheckSmi) \ 75 V(CheckSmi) \
75 V(ClassOfTest) \ 76 V(ClassOfTest) \
76 V(ClassOfTestAndBranch) \ 77 V(ClassOfTestAndBranch) \
77 V(CmpID) \ 78 V(CmpID) \
78 V(CmpIDAndBranch) \ 79 V(CmpIDAndBranch) \
79 V(CmpJSObjectEq) \ 80 V(CmpJSObjectEq) \
80 V(CmpJSObjectEqAndBranch) \ 81 V(CmpJSObjectEqAndBranch) \
81 V(CmpMapAndBranch) \ 82 V(CmpMapAndBranch) \
82 V(CmpT) \ 83 V(CmpT) \
(...skipping 1702 matching lines...) Expand 10 before | Expand all | Expand 10 after
1785 DECLARE_CONCRETE_INSTRUCTION(CheckPrototypeMaps, "check-prototype-maps") 1786 DECLARE_CONCRETE_INSTRUCTION(CheckPrototypeMaps, "check-prototype-maps")
1786 DECLARE_HYDROGEN_ACCESSOR(CheckPrototypeMaps) 1787 DECLARE_HYDROGEN_ACCESSOR(CheckPrototypeMaps)
1787 1788
1788 Handle<JSObject> prototype() const { return hydrogen()->prototype(); } 1789 Handle<JSObject> prototype() const { return hydrogen()->prototype(); }
1789 Handle<JSObject> holder() const { return hydrogen()->holder(); } 1790 Handle<JSObject> holder() const { return hydrogen()->holder(); }
1790 }; 1791 };
1791 1792
1792 1793
1793 class LCheckSmi: public LTemplateInstruction<0, 1, 0> { 1794 class LCheckSmi: public LTemplateInstruction<0, 1, 0> {
1794 public: 1795 public:
1795 LCheckSmi(LOperand* value, Condition condition) 1796 explicit LCheckSmi(LOperand* value) {
1796 : condition_(condition) {
1797 inputs_[0] = value; 1797 inputs_[0] = value;
1798 } 1798 }
1799 1799
1800 Condition condition() const { return condition_; } 1800 DECLARE_CONCRETE_INSTRUCTION(CheckSmi, "check-smi")
1801
1802 virtual void CompileToNative(LCodeGen* generator);
1803 virtual const char* Mnemonic() const {
1804 return (condition_ == zero) ? "check-non-smi" : "check-smi";
1805 }
1806
1807 private:
1808 Condition condition_;
1809 }; 1801 };
1810 1802
1811 1803
1804 class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> {
1805 public:
1806 explicit LCheckNonSmi(LOperand* value) {
1807 inputs_[0] = value;
1808 }
1809
1810 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi")
1811 };
1812
1813
1812 class LArrayLiteral: public LTemplateInstruction<1, 0, 0> { 1814 class LArrayLiteral: public LTemplateInstruction<1, 0, 0> {
1813 public: 1815 public:
1814 DECLARE_CONCRETE_INSTRUCTION(ArrayLiteral, "array-literal") 1816 DECLARE_CONCRETE_INSTRUCTION(ArrayLiteral, "array-literal")
1815 DECLARE_HYDROGEN_ACCESSOR(ArrayLiteral) 1817 DECLARE_HYDROGEN_ACCESSOR(ArrayLiteral)
1816 }; 1818 };
1817 1819
1818 1820
1819 class LObjectLiteral: public LTemplateInstruction<1, 1, 0> { 1821 class LObjectLiteral: public LTemplateInstruction<1, 1, 0> {
1820 public: 1822 public:
1821 explicit LObjectLiteral(LOperand* context) { 1823 explicit LObjectLiteral(LOperand* context) {
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
2150 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2152 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2151 }; 2153 };
2152 2154
2153 #undef DECLARE_HYDROGEN_ACCESSOR 2155 #undef DECLARE_HYDROGEN_ACCESSOR
2154 #undef DECLARE_INSTRUCTION 2156 #undef DECLARE_INSTRUCTION
2155 #undef DECLARE_CONCRETE_INSTRUCTION 2157 #undef DECLARE_CONCRETE_INSTRUCTION
2156 2158
2157 } } // namespace v8::internal 2159 } } // namespace v8::internal
2158 2160
2159 #endif // V8_IA32_LITHIUM_IA32_H_ 2161 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698