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

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

Issue 12784003: MIPS: HInnerAllocatedObject instruction allows hydrogen code to carve up allocated regions into sub… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/mips/lithium-codegen-mips.cc ('k') | src/mips/lithium-mips.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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 V(TypeofIsAndBranch) \ 181 V(TypeofIsAndBranch) \
182 V(UnaryMathOperation) \ 182 V(UnaryMathOperation) \
183 V(UnknownOSRValue) \ 183 V(UnknownOSRValue) \
184 V(ValueOf) \ 184 V(ValueOf) \
185 V(ForInPrepareMap) \ 185 V(ForInPrepareMap) \
186 V(ForInCacheArray) \ 186 V(ForInCacheArray) \
187 V(CheckMapValue) \ 187 V(CheckMapValue) \
188 V(LoadFieldByIndex) \ 188 V(LoadFieldByIndex) \
189 V(DateField) \ 189 V(DateField) \
190 V(WrapReceiver) \ 190 V(WrapReceiver) \
191 V(Drop) 191 V(Drop) \
192 V(InnerAllocatedObject)
193
192 194
193 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ 195 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
194 virtual Opcode opcode() const { return LInstruction::k##type; } \ 196 virtual Opcode opcode() const { return LInstruction::k##type; } \
195 virtual void CompileToNative(LCodeGen* generator); \ 197 virtual void CompileToNative(LCodeGen* generator); \
196 virtual const char* Mnemonic() const { return mnemonic; } \ 198 virtual const char* Mnemonic() const { return mnemonic; } \
197 static L##type* cast(LInstruction* instr) { \ 199 static L##type* cast(LInstruction* instr) { \
198 ASSERT(instr->Is##type()); \ 200 ASSERT(instr->Is##type()); \
199 return reinterpret_cast<L##type*>(instr); \ 201 return reinterpret_cast<L##type*>(instr); \
200 } 202 }
201 203
(...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after
1593 1595
1594 int count() const { return count_; } 1596 int count() const { return count_; }
1595 1597
1596 DECLARE_CONCRETE_INSTRUCTION(Drop, "drop") 1598 DECLARE_CONCRETE_INSTRUCTION(Drop, "drop")
1597 1599
1598 private: 1600 private:
1599 int count_; 1601 int count_;
1600 }; 1602 };
1601 1603
1602 1604
1605 class LInnerAllocatedObject: public LTemplateInstruction<1, 1, 0> {
1606 public:
1607 explicit LInnerAllocatedObject(LOperand* base_object) {
1608 inputs_[0] = base_object;
1609 }
1610
1611 LOperand* base_object() { return inputs_[0]; }
1612 int offset() { return hydrogen()->offset(); }
1613
1614 virtual void PrintDataTo(StringStream* stream);
1615
1616 DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "sub-allocated-object")
1617 DECLARE_HYDROGEN_ACCESSOR(InnerAllocatedObject)
1618 };
1619
1620
1603 class LThisFunction: public LTemplateInstruction<1, 0, 0> { 1621 class LThisFunction: public LTemplateInstruction<1, 0, 0> {
1604 public: 1622 public:
1605 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") 1623 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function")
1606 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) 1624 DECLARE_HYDROGEN_ACCESSOR(ThisFunction)
1607 }; 1625 };
1608 1626
1609 1627
1610 class LContext: public LTemplateInstruction<1, 0, 0> { 1628 class LContext: public LTemplateInstruction<1, 0, 0> {
1611 public: 1629 public:
1612 DECLARE_CONCRETE_INSTRUCTION(Context, "context") 1630 DECLARE_CONCRETE_INSTRUCTION(Context, "context")
(...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after
2672 2690
2673 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2691 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2674 }; 2692 };
2675 2693
2676 #undef DECLARE_HYDROGEN_ACCESSOR 2694 #undef DECLARE_HYDROGEN_ACCESSOR
2677 #undef DECLARE_CONCRETE_INSTRUCTION 2695 #undef DECLARE_CONCRETE_INSTRUCTION
2678 2696
2679 } } // namespace v8::internal 2697 } } // namespace v8::internal
2680 2698
2681 #endif // V8_MIPS_LITHIUM_MIPS_H_ 2699 #endif // V8_MIPS_LITHIUM_MIPS_H_
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/mips/lithium-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698