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

Side by Side Diff: src/arm/lithium-arm.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 | « no previous file | src/arm/lithium-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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 V(TypeofIsAndBranch) \ 184 V(TypeofIsAndBranch) \
185 V(UnaryMathOperation) \ 185 V(UnaryMathOperation) \
186 V(UnknownOSRValue) \ 186 V(UnknownOSRValue) \
187 V(ValueOf) \ 187 V(ValueOf) \
188 V(ForInPrepareMap) \ 188 V(ForInPrepareMap) \
189 V(ForInCacheArray) \ 189 V(ForInCacheArray) \
190 V(CheckMapValue) \ 190 V(CheckMapValue) \
191 V(LoadFieldByIndex) \ 191 V(LoadFieldByIndex) \
192 V(DateField) \ 192 V(DateField) \
193 V(WrapReceiver) \ 193 V(WrapReceiver) \
194 V(Drop) 194 V(Drop) \
195 V(InnerAllocatedObject)
195 196
196 197
197 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ 198 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
198 virtual Opcode opcode() const { return LInstruction::k##type; } \ 199 virtual Opcode opcode() const { return LInstruction::k##type; } \
199 virtual void CompileToNative(LCodeGen* generator); \ 200 virtual void CompileToNative(LCodeGen* generator); \
200 virtual const char* Mnemonic() const { return mnemonic; } \ 201 virtual const char* Mnemonic() const { return mnemonic; } \
201 static L##type* cast(LInstruction* instr) { \ 202 static L##type* cast(LInstruction* instr) { \
202 ASSERT(instr->Is##type()); \ 203 ASSERT(instr->Is##type()); \
203 return reinterpret_cast<L##type*>(instr); \ 204 return reinterpret_cast<L##type*>(instr); \
204 } 205 }
(...skipping 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after
1648 1649
1649 int count() const { return count_; } 1650 int count() const { return count_; }
1650 1651
1651 DECLARE_CONCRETE_INSTRUCTION(Drop, "drop") 1652 DECLARE_CONCRETE_INSTRUCTION(Drop, "drop")
1652 1653
1653 private: 1654 private:
1654 int count_; 1655 int count_;
1655 }; 1656 };
1656 1657
1657 1658
1659 class LInnerAllocatedObject: public LTemplateInstruction<1, 1, 0> {
1660 public:
1661 explicit LInnerAllocatedObject(LOperand* base_object) {
1662 inputs_[0] = base_object;
1663 }
1664
1665 LOperand* base_object() { return inputs_[0]; }
1666 int offset() { return hydrogen()->offset(); }
1667
1668 virtual void PrintDataTo(StringStream* stream);
1669
1670 DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "sub-allocated-object")
1671 DECLARE_HYDROGEN_ACCESSOR(InnerAllocatedObject)
1672 };
1673
1674
1658 class LThisFunction: public LTemplateInstruction<1, 0, 0> { 1675 class LThisFunction: public LTemplateInstruction<1, 0, 0> {
1659 public: 1676 public:
1660 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") 1677 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function")
1661 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) 1678 DECLARE_HYDROGEN_ACCESSOR(ThisFunction)
1662 }; 1679 };
1663 1680
1664 1681
1665 class LContext: public LTemplateInstruction<1, 0, 0> { 1682 class LContext: public LTemplateInstruction<1, 0, 0> {
1666 public: 1683 public:
1667 DECLARE_CONCRETE_INSTRUCTION(Context, "context") 1684 DECLARE_CONCRETE_INSTRUCTION(Context, "context")
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
2732 2749
2733 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2750 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2734 }; 2751 };
2735 2752
2736 #undef DECLARE_HYDROGEN_ACCESSOR 2753 #undef DECLARE_HYDROGEN_ACCESSOR
2737 #undef DECLARE_CONCRETE_INSTRUCTION 2754 #undef DECLARE_CONCRETE_INSTRUCTION
2738 2755
2739 } } // namespace v8::internal 2756 } } // namespace v8::internal
2740 2757
2741 #endif // V8_ARM_LITHIUM_ARM_H_ 2758 #endif // V8_ARM_LITHIUM_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/lithium-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698