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

Side by Side Diff: src/hydrogen-instructions.h

Issue 18154004: Replace custom builtin invocation instructions by a generic version (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase Created 7 years, 5 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/hydrogen.cc ('k') | src/hydrogen-instructions.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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 V(ClassOfTestAndBranch) \ 98 V(ClassOfTestAndBranch) \
99 V(CompareNumericAndBranch) \ 99 V(CompareNumericAndBranch) \
100 V(CompareGeneric) \ 100 V(CompareGeneric) \
101 V(CompareObjectEqAndBranch) \ 101 V(CompareObjectEqAndBranch) \
102 V(CompareMap) \ 102 V(CompareMap) \
103 V(CompareConstantEqAndBranch) \ 103 V(CompareConstantEqAndBranch) \
104 V(Constant) \ 104 V(Constant) \
105 V(Context) \ 105 V(Context) \
106 V(DebugBreak) \ 106 V(DebugBreak) \
107 V(DeclareGlobals) \ 107 V(DeclareGlobals) \
108 V(DeleteProperty) \
109 V(Deoptimize) \ 108 V(Deoptimize) \
110 V(Div) \ 109 V(Div) \
111 V(DummyUse) \ 110 V(DummyUse) \
112 V(ElementsKind) \ 111 V(ElementsKind) \
113 V(EnterInlined) \ 112 V(EnterInlined) \
114 V(EnvironmentMarker) \ 113 V(EnvironmentMarker) \
115 V(ForceRepresentation) \ 114 V(ForceRepresentation) \
116 V(FunctionLiteral) \ 115 V(FunctionLiteral) \
117 V(GetCachedArrayIndex) \ 116 V(GetCachedArrayIndex) \
118 V(GlobalObject) \ 117 V(GlobalObject) \
119 V(GlobalReceiver) \ 118 V(GlobalReceiver) \
120 V(Goto) \ 119 V(Goto) \
121 V(HasCachedArrayIndexAndBranch) \ 120 V(HasCachedArrayIndexAndBranch) \
122 V(HasInstanceTypeAndBranch) \ 121 V(HasInstanceTypeAndBranch) \
123 V(InductionVariableAnnotation) \ 122 V(InductionVariableAnnotation) \
124 V(In) \
125 V(InnerAllocatedObject) \ 123 V(InnerAllocatedObject) \
126 V(InstanceOf) \ 124 V(InstanceOf) \
127 V(InstanceOfKnownGlobal) \ 125 V(InstanceOfKnownGlobal) \
128 V(InstanceSize) \ 126 V(InstanceSize) \
129 V(InvokeFunction) \ 127 V(InvokeFunction) \
130 V(IsConstructCallAndBranch) \ 128 V(IsConstructCallAndBranch) \
131 V(IsObjectAndBranch) \ 129 V(IsObjectAndBranch) \
132 V(IsNumberAndBranch) \ 130 V(IsNumberAndBranch) \
133 V(IsStringAndBranch) \ 131 V(IsStringAndBranch) \
134 V(IsSmiAndBranch) \ 132 V(IsSmiAndBranch) \
(...skipping 6390 matching lines...) Expand 10 before | Expand all | Expand 10 after
6525 : Representation::Integer32(); 6523 : Representation::Integer32();
6526 } 6524 }
6527 6525
6528 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar) 6526 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar)
6529 6527
6530 private: 6528 private:
6531 String::Encoding encoding_; 6529 String::Encoding encoding_;
6532 }; 6530 };
6533 6531
6534 6532
6535 class HDeleteProperty: public HBinaryOperation {
6536 public:
6537 HDeleteProperty(HValue* context, HValue* obj, HValue* key)
6538 : HBinaryOperation(context, obj, key) {
6539 set_representation(Representation::Tagged());
6540 SetAllSideEffects();
6541 }
6542
6543 virtual Representation RequiredInputRepresentation(int index) {
6544 return Representation::Tagged();
6545 }
6546
6547 virtual HType CalculateInferredType();
6548
6549 DECLARE_CONCRETE_INSTRUCTION(DeleteProperty)
6550
6551 HValue* object() { return left(); }
6552 HValue* key() { return right(); }
6553 };
6554
6555
6556 class HIn: public HTemplateInstruction<3> {
6557 public:
6558 HIn(HValue* context, HValue* key, HValue* object) {
6559 SetOperandAt(0, context);
6560 SetOperandAt(1, key);
6561 SetOperandAt(2, object);
6562 set_representation(Representation::Tagged());
6563 SetAllSideEffects();
6564 }
6565
6566 HValue* context() { return OperandAt(0); }
6567 HValue* key() { return OperandAt(1); }
6568 HValue* object() { return OperandAt(2); }
6569
6570 virtual Representation RequiredInputRepresentation(int index) {
6571 return Representation::Tagged();
6572 }
6573
6574 virtual HType CalculateInferredType() {
6575 return HType::Boolean();
6576 }
6577
6578 virtual void PrintDataTo(StringStream* stream);
6579
6580 DECLARE_CONCRETE_INSTRUCTION(In)
6581 };
6582
6583
6584 class HCheckMapValue: public HTemplateInstruction<2> { 6533 class HCheckMapValue: public HTemplateInstruction<2> {
6585 public: 6534 public:
6586 HCheckMapValue(HValue* value, 6535 HCheckMapValue(HValue* value,
6587 HValue* map) { 6536 HValue* map) {
6588 SetOperandAt(0, value); 6537 SetOperandAt(0, value);
6589 SetOperandAt(1, map); 6538 SetOperandAt(1, map);
6590 set_representation(Representation::Tagged()); 6539 set_representation(Representation::Tagged());
6591 SetFlag(kUseGVN); 6540 SetFlag(kUseGVN);
6592 SetGVNFlag(kDependsOnMaps); 6541 SetGVNFlag(kDependsOnMaps);
6593 SetGVNFlag(kDependsOnElementsKind); 6542 SetGVNFlag(kDependsOnElementsKind);
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
6710 virtual bool IsDeletable() const { return true; } 6659 virtual bool IsDeletable() const { return true; }
6711 }; 6660 };
6712 6661
6713 6662
6714 #undef DECLARE_INSTRUCTION 6663 #undef DECLARE_INSTRUCTION
6715 #undef DECLARE_CONCRETE_INSTRUCTION 6664 #undef DECLARE_CONCRETE_INSTRUCTION
6716 6665
6717 } } // namespace v8::internal 6666 } } // namespace v8::internal
6718 6667
6719 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 6668 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698