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

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

Issue 12812002: HSubAllocatedObject instruction allows hydrogen code to carve up (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Updated to HInnerAllocatedObject Created 7 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 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 V(TypeofIsAndBranch) \ 177 V(TypeofIsAndBranch) \
178 V(UnaryMathOperation) \ 178 V(UnaryMathOperation) \
179 V(UnknownOSRValue) \ 179 V(UnknownOSRValue) \
180 V(ValueOf) \ 180 V(ValueOf) \
181 V(ForInPrepareMap) \ 181 V(ForInPrepareMap) \
182 V(ForInCacheArray) \ 182 V(ForInCacheArray) \
183 V(CheckMapValue) \ 183 V(CheckMapValue) \
184 V(LoadFieldByIndex) \ 184 V(LoadFieldByIndex) \
185 V(DateField) \ 185 V(DateField) \
186 V(WrapReceiver) \ 186 V(WrapReceiver) \
187 V(Drop) 187 V(Drop) \
188 V(InnerAllocatedObject)
188 189
189 190
190 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ 191 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
191 virtual Opcode opcode() const { return LInstruction::k##type; } \ 192 virtual Opcode opcode() const { return LInstruction::k##type; } \
192 virtual void CompileToNative(LCodeGen* generator); \ 193 virtual void CompileToNative(LCodeGen* generator); \
193 virtual const char* Mnemonic() const { return mnemonic; } \ 194 virtual const char* Mnemonic() const { return mnemonic; } \
194 static L##type* cast(LInstruction* instr) { \ 195 static L##type* cast(LInstruction* instr) { \
195 ASSERT(instr->Is##type()); \ 196 ASSERT(instr->Is##type()); \
196 return reinterpret_cast<L##type*>(instr); \ 197 return reinterpret_cast<L##type*>(instr); \
197 } 198 }
(...skipping 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after
1674 1675
1675 int count() const { return count_; } 1676 int count() const { return count_; }
1676 1677
1677 DECLARE_CONCRETE_INSTRUCTION(Drop, "drop") 1678 DECLARE_CONCRETE_INSTRUCTION(Drop, "drop")
1678 1679
1679 private: 1680 private:
1680 int count_; 1681 int count_;
1681 }; 1682 };
1682 1683
1683 1684
1685 class LInnerAllocatedObject: public LTemplateInstruction<1, 1, 0> {
1686 public:
1687 explicit LInnerAllocatedObject(LOperand* base_object) {
1688 inputs_[0] = base_object;
1689 }
1690
1691 LOperand* base_object() { return inputs_[0]; }
1692 int offset() { return hydrogen()->offset(); }
1693
1694 virtual void PrintDataTo(StringStream* stream);
1695
1696 DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "sub-allocated-object")
1697 DECLARE_HYDROGEN_ACCESSOR(InnerAllocatedObject)
1698 };
1699
1700
1684 class LThisFunction: public LTemplateInstruction<1, 0, 0> { 1701 class LThisFunction: public LTemplateInstruction<1, 0, 0> {
1685 public: 1702 public:
1686 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") 1703 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function")
1687 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) 1704 DECLARE_HYDROGEN_ACCESSOR(ThisFunction)
1688 }; 1705 };
1689 1706
1690 1707
1691 class LContext: public LTemplateInstruction<1, 0, 0> { 1708 class LContext: public LTemplateInstruction<1, 0, 0> {
1692 public: 1709 public:
1693 DECLARE_CONCRETE_INSTRUCTION(Context, "context") 1710 DECLARE_CONCRETE_INSTRUCTION(Context, "context")
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
2840 2857
2841 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2858 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2842 }; 2859 };
2843 2860
2844 #undef DECLARE_HYDROGEN_ACCESSOR 2861 #undef DECLARE_HYDROGEN_ACCESSOR
2845 #undef DECLARE_CONCRETE_INSTRUCTION 2862 #undef DECLARE_CONCRETE_INSTRUCTION
2846 2863
2847 } } // namespace v8::internal 2864 } } // namespace v8::internal
2848 2865
2849 #endif // V8_IA32_LITHIUM_IA32_H_ 2866 #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