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

Side by Side Diff: src/x64/lithium-x64.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/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 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)
192 193
193 194
194 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ 195 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
195 virtual Opcode opcode() const { return LInstruction::k##type; } \ 196 virtual Opcode opcode() const { return LInstruction::k##type; } \
196 virtual void CompileToNative(LCodeGen* generator); \ 197 virtual void CompileToNative(LCodeGen* generator); \
197 virtual const char* Mnemonic() const { return mnemonic; } \ 198 virtual const char* Mnemonic() const { return mnemonic; } \
198 static L##type* cast(LInstruction* instr) { \ 199 static L##type* cast(LInstruction* instr) { \
199 ASSERT(instr->Is##type()); \ 200 ASSERT(instr->Is##type()); \
200 return reinterpret_cast<L##type*>(instr); \ 201 return reinterpret_cast<L##type*>(instr); \
201 } 202 }
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1587 1588
1588 int count() const { return count_; } 1589 int count() const { return count_; }
1589 1590
1590 DECLARE_CONCRETE_INSTRUCTION(Drop, "drop") 1591 DECLARE_CONCRETE_INSTRUCTION(Drop, "drop")
1591 1592
1592 private: 1593 private:
1593 int count_; 1594 int count_;
1594 }; 1595 };
1595 1596
1596 1597
1598 class LInnerAllocatedObject: public LTemplateInstruction<1, 1, 0> {
1599 public:
1600 explicit LInnerAllocatedObject(LOperand* base_object) {
1601 inputs_[0] = base_object;
1602 }
1603
1604 LOperand* base_object() { return inputs_[0]; }
1605 int offset() { return hydrogen()->offset(); }
1606
1607 virtual void PrintDataTo(StringStream* stream);
1608
1609 DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "sub-allocated-object")
1610 DECLARE_HYDROGEN_ACCESSOR(InnerAllocatedObject)
1611 };
1612
1613
1597 class LThisFunction: public LTemplateInstruction<1, 0, 0> { 1614 class LThisFunction: public LTemplateInstruction<1, 0, 0> {
1598 public: 1615 public:
1599 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") 1616 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function")
1600 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) 1617 DECLARE_HYDROGEN_ACCESSOR(ThisFunction)
1601 }; 1618 };
1602 1619
1603 1620
1604 class LContext: public LTemplateInstruction<1, 0, 0> { 1621 class LContext: public LTemplateInstruction<1, 0, 0> {
1605 public: 1622 public:
1606 DECLARE_CONCRETE_INSTRUCTION(Context, "context") 1623 DECLARE_CONCRETE_INSTRUCTION(Context, "context")
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after
2630 2647
2631 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2648 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2632 }; 2649 };
2633 2650
2634 #undef DECLARE_HYDROGEN_ACCESSOR 2651 #undef DECLARE_HYDROGEN_ACCESSOR
2635 #undef DECLARE_CONCRETE_INSTRUCTION 2652 #undef DECLARE_CONCRETE_INSTRUCTION
2636 2653
2637 } } // namespace v8::int 2654 } } // namespace v8::int
2638 2655
2639 #endif // V8_X64_LITHIUM_X64_H_ 2656 #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