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

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

Issue 535873002: Encapsulate megamorphic load/tail-call in hydrogen (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. Created 6 years, 3 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_X64_LITHIUM_X64_H_ 5 #ifndef V8_X64_LITHIUM_X64_H_
6 #define V8_X64_LITHIUM_X64_H_ 6 #define V8_X64_LITHIUM_X64_H_
7 7
8 #include "src/hydrogen.h" 8 #include "src/hydrogen.h"
9 #include "src/lithium.h" 9 #include "src/lithium.h"
10 #include "src/lithium-allocator.h" 10 #include "src/lithium-allocator.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 V(StoreKeyed) \ 144 V(StoreKeyed) \
145 V(StoreKeyedGeneric) \ 145 V(StoreKeyedGeneric) \
146 V(StoreNamedField) \ 146 V(StoreNamedField) \
147 V(StoreNamedGeneric) \ 147 V(StoreNamedGeneric) \
148 V(StringAdd) \ 148 V(StringAdd) \
149 V(StringCharCodeAt) \ 149 V(StringCharCodeAt) \
150 V(StringCharFromCode) \ 150 V(StringCharFromCode) \
151 V(StringCompareAndBranch) \ 151 V(StringCompareAndBranch) \
152 V(SubI) \ 152 V(SubI) \
153 V(TaggedToI) \ 153 V(TaggedToI) \
154 V(TailCallThroughMegamorphicCache) \
154 V(ThisFunction) \ 155 V(ThisFunction) \
155 V(ToFastProperties) \ 156 V(ToFastProperties) \
156 V(TransitionElementsKind) \ 157 V(TransitionElementsKind) \
157 V(TrapAllocationMemento) \ 158 V(TrapAllocationMemento) \
158 V(Typeof) \ 159 V(Typeof) \
159 V(TypeofIsAndBranch) \ 160 V(TypeofIsAndBranch) \
160 V(Uint32ToDouble) \ 161 V(Uint32ToDouble) \
161 V(UnknownOSRValue) \ 162 V(UnknownOSRValue) \
162 V(WrapReceiver) 163 V(WrapReceiver)
163 164
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 inputs_[0] = context; 483 inputs_[0] = context;
483 } 484 }
484 485
485 LOperand* context() { return inputs_[0]; } 486 LOperand* context() { return inputs_[0]; }
486 487
487 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub") 488 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub")
488 DECLARE_HYDROGEN_ACCESSOR(CallStub) 489 DECLARE_HYDROGEN_ACCESSOR(CallStub)
489 }; 490 };
490 491
491 492
493 class LTailCallThroughMegamorphicCache FINAL
494 : public LTemplateInstruction<0, 3, 0> {
495 public:
496 explicit LTailCallThroughMegamorphicCache(LOperand* context,
497 LOperand* receiver,
498 LOperand* name) {
499 inputs_[0] = context;
500 inputs_[1] = receiver;
501 inputs_[2] = name;
502 }
503
504 LOperand* context() { return inputs_[0]; }
505 LOperand* receiver() { return inputs_[1]; }
506 LOperand* name() { return inputs_[2]; }
507
508 DECLARE_CONCRETE_INSTRUCTION(TailCallThroughMegamorphicCache,
509 "tail-call-through-megamorphic-cache")
510 DECLARE_HYDROGEN_ACCESSOR(TailCallThroughMegamorphicCache)
511 };
512
513
492 class LUnknownOSRValue FINAL : public LTemplateInstruction<1, 0, 0> { 514 class LUnknownOSRValue FINAL : public LTemplateInstruction<1, 0, 0> {
493 public: 515 public:
494 virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { 516 virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
495 return false; 517 return false;
496 } 518 }
497 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value") 519 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value")
498 }; 520 };
499 521
500 522
501 template<int I, int T> 523 template<int I, int T>
(...skipping 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after
1879 public: 1901 public:
1880 LCallWithDescriptor(CallInterfaceDescriptor descriptor, 1902 LCallWithDescriptor(CallInterfaceDescriptor descriptor,
1881 const ZoneList<LOperand*>& operands, Zone* zone) 1903 const ZoneList<LOperand*>& operands, Zone* zone)
1882 : inputs_(descriptor.GetRegisterParameterCount() + 1, zone) { 1904 : inputs_(descriptor.GetRegisterParameterCount() + 1, zone) {
1883 DCHECK(descriptor.GetRegisterParameterCount() + 1 == operands.length()); 1905 DCHECK(descriptor.GetRegisterParameterCount() + 1 == operands.length());
1884 inputs_.AddAll(operands, zone); 1906 inputs_.AddAll(operands, zone);
1885 } 1907 }
1886 1908
1887 LOperand* target() const { return inputs_[0]; } 1909 LOperand* target() const { return inputs_[0]; }
1888 1910
1911 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor)
1912
1889 private: 1913 private:
1890 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") 1914 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor")
1891 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor)
1892 1915
1893 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1916 virtual void PrintDataTo(StringStream* stream) OVERRIDE;
1894 1917
1895 int arity() const { return hydrogen()->argument_count() - 1; } 1918 int arity() const { return hydrogen()->argument_count() - 1; }
1896 1919
1897 ZoneList<LOperand*> inputs_; 1920 ZoneList<LOperand*> inputs_;
1898 1921
1899 // Iterator support. 1922 // Iterator support.
1900 virtual int InputCount() FINAL OVERRIDE { return inputs_.length(); } 1923 virtual int InputCount() FINAL OVERRIDE { return inputs_.length(); }
1901 virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; } 1924 virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; }
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
2886 2909
2887 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2910 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2888 }; 2911 };
2889 2912
2890 #undef DECLARE_HYDROGEN_ACCESSOR 2913 #undef DECLARE_HYDROGEN_ACCESSOR
2891 #undef DECLARE_CONCRETE_INSTRUCTION 2914 #undef DECLARE_CONCRETE_INSTRUCTION
2892 2915
2893 } } // namespace v8::int 2916 } } // namespace v8::int
2894 2917
2895 #endif // V8_X64_LITHIUM_X64_H_ 2918 #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