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

Side by Side Diff: src/x64/lithium-x64.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/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.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 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after
1700 DECLARE_CONCRETE_INSTRUCTION(CheckPrototypeMaps, "check-prototype-maps") 1701 DECLARE_CONCRETE_INSTRUCTION(CheckPrototypeMaps, "check-prototype-maps")
1701 DECLARE_HYDROGEN_ACCESSOR(CheckPrototypeMaps) 1702 DECLARE_HYDROGEN_ACCESSOR(CheckPrototypeMaps)
1702 1703
1703 Handle<JSObject> prototype() const { return hydrogen()->prototype(); } 1704 Handle<JSObject> prototype() const { return hydrogen()->prototype(); }
1704 Handle<JSObject> holder() const { return hydrogen()->holder(); } 1705 Handle<JSObject> holder() const { return hydrogen()->holder(); }
1705 }; 1706 };
1706 1707
1707 1708
1708 class LCheckSmi: public LTemplateInstruction<0, 1, 0> { 1709 class LCheckSmi: public LTemplateInstruction<0, 1, 0> {
1709 public: 1710 public:
1710 LCheckSmi(LOperand* value, Condition condition) 1711 explicit LCheckSmi(LOperand* value) {
1711 : condition_(condition) {
1712 inputs_[0] = value; 1712 inputs_[0] = value;
1713 } 1713 }
1714 1714
1715 Condition condition() const { return condition_; } 1715 DECLARE_CONCRETE_INSTRUCTION(CheckSmi, "check-smi")
1716
1717 virtual void CompileToNative(LCodeGen* generator);
1718 virtual const char* Mnemonic() const {
1719 return (condition_ == zero) ? "check-non-smi" : "check-smi";
1720 }
1721
1722 private:
1723 Condition condition_;
1724 }; 1716 };
1725 1717
1726 1718
1719 class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> {
1720 public:
1721 explicit LCheckNonSmi(LOperand* value) {
1722 inputs_[0] = value;
1723 }
1724
1725 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi")
1726 };
1727
1728
1727 class LArrayLiteral: public LTemplateInstruction<1, 0, 0> { 1729 class LArrayLiteral: public LTemplateInstruction<1, 0, 0> {
1728 public: 1730 public:
1729 DECLARE_CONCRETE_INSTRUCTION(ArrayLiteral, "array-literal") 1731 DECLARE_CONCRETE_INSTRUCTION(ArrayLiteral, "array-literal")
1730 DECLARE_HYDROGEN_ACCESSOR(ArrayLiteral) 1732 DECLARE_HYDROGEN_ACCESSOR(ArrayLiteral)
1731 }; 1733 };
1732 1734
1733 1735
1734 class LObjectLiteral: public LTemplateInstruction<1, 0, 0> { 1736 class LObjectLiteral: public LTemplateInstruction<1, 0, 0> {
1735 public: 1737 public:
1736 DECLARE_CONCRETE_INSTRUCTION(ObjectLiteral, "object-literal") 1738 DECLARE_CONCRETE_INSTRUCTION(ObjectLiteral, "object-literal")
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
2077 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2079 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2078 }; 2080 };
2079 2081
2080 #undef DECLARE_HYDROGEN_ACCESSOR 2082 #undef DECLARE_HYDROGEN_ACCESSOR
2081 #undef DECLARE_INSTRUCTION 2083 #undef DECLARE_INSTRUCTION
2082 #undef DECLARE_CONCRETE_INSTRUCTION 2084 #undef DECLARE_CONCRETE_INSTRUCTION
2083 2085
2084 } } // namespace v8::int 2086 } } // namespace v8::int
2085 2087
2086 #endif // V8_X64_LITHIUM_X64_H_ 2088 #endif // V8_X64_LITHIUM_X64_H_
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698