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

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: 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
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(CompareIDAndBranch) \ 99 V(CompareIDAndBranch) \
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 6362 matching lines...) Expand 10 before | Expand all | Expand 10 after
6497 : Representation::Integer32(); 6495 : Representation::Integer32();
6498 } 6496 }
6499 6497
6500 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar) 6498 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar)
6501 6499
6502 private: 6500 private:
6503 String::Encoding encoding_; 6501 String::Encoding encoding_;
6504 }; 6502 };
6505 6503
6506 6504
6507 class HDeleteProperty: public HBinaryOperation {
6508 public:
6509 HDeleteProperty(HValue* context, HValue* obj, HValue* key)
6510 : HBinaryOperation(context, obj, key) {
6511 set_representation(Representation::Tagged());
6512 SetAllSideEffects();
6513 }
6514
6515 virtual Representation RequiredInputRepresentation(int index) {
6516 return Representation::Tagged();
6517 }
6518
6519 virtual HType CalculateInferredType();
6520
6521 DECLARE_CONCRETE_INSTRUCTION(DeleteProperty)
6522
6523 HValue* object() { return left(); }
6524 HValue* key() { return right(); }
6525 };
6526
6527
6528 class HIn: public HTemplateInstruction<3> {
6529 public:
6530 HIn(HValue* context, HValue* key, HValue* object) {
6531 SetOperandAt(0, context);
6532 SetOperandAt(1, key);
6533 SetOperandAt(2, object);
6534 set_representation(Representation::Tagged());
6535 SetAllSideEffects();
6536 }
6537
6538 HValue* context() { return OperandAt(0); }
6539 HValue* key() { return OperandAt(1); }
6540 HValue* object() { return OperandAt(2); }
6541
6542 virtual Representation RequiredInputRepresentation(int index) {
6543 return Representation::Tagged();
6544 }
6545
6546 virtual HType CalculateInferredType() {
6547 return HType::Boolean();
6548 }
6549
6550 virtual void PrintDataTo(StringStream* stream);
6551
6552 DECLARE_CONCRETE_INSTRUCTION(In)
6553 };
6554
6555
6556 class HCheckMapValue: public HTemplateInstruction<2> { 6505 class HCheckMapValue: public HTemplateInstruction<2> {
6557 public: 6506 public:
6558 HCheckMapValue(HValue* value, 6507 HCheckMapValue(HValue* value,
6559 HValue* map) { 6508 HValue* map) {
6560 SetOperandAt(0, value); 6509 SetOperandAt(0, value);
6561 SetOperandAt(1, map); 6510 SetOperandAt(1, map);
6562 set_representation(Representation::Tagged()); 6511 set_representation(Representation::Tagged());
6563 SetFlag(kUseGVN); 6512 SetFlag(kUseGVN);
6564 SetGVNFlag(kDependsOnMaps); 6513 SetGVNFlag(kDependsOnMaps);
6565 SetGVNFlag(kDependsOnElementsKind); 6514 SetGVNFlag(kDependsOnElementsKind);
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
6682 virtual bool IsDeletable() const { return true; } 6631 virtual bool IsDeletable() const { return true; }
6683 }; 6632 };
6684 6633
6685 6634
6686 #undef DECLARE_INSTRUCTION 6635 #undef DECLARE_INSTRUCTION
6687 #undef DECLARE_CONCRETE_INSTRUCTION 6636 #undef DECLARE_CONCRETE_INSTRUCTION
6688 6637
6689 } } // namespace v8::internal 6638 } } // namespace v8::internal
6690 6639
6691 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 6640 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« src/hydrogen.cc ('K') | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698