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

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

Issue 63423004: Introduce %_IsMinusZero. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: extended test case Created 7 years, 1 month 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 V(CheckInstanceType) \ 93 V(CheckInstanceType) \
94 V(CheckMaps) \ 94 V(CheckMaps) \
95 V(CheckMapValue) \ 95 V(CheckMapValue) \
96 V(CheckSmi) \ 96 V(CheckSmi) \
97 V(CheckValue) \ 97 V(CheckValue) \
98 V(ClampToUint8) \ 98 V(ClampToUint8) \
99 V(ClassOfTestAndBranch) \ 99 V(ClassOfTestAndBranch) \
100 V(CompareNumericAndBranch) \ 100 V(CompareNumericAndBranch) \
101 V(CompareHoleAndBranch) \ 101 V(CompareHoleAndBranch) \
102 V(CompareGeneric) \ 102 V(CompareGeneric) \
103 V(CompareMinusZeroAndBranch) \
103 V(CompareObjectEqAndBranch) \ 104 V(CompareObjectEqAndBranch) \
104 V(CompareMap) \ 105 V(CompareMap) \
105 V(Constant) \ 106 V(Constant) \
106 V(Context) \ 107 V(Context) \
107 V(DateField) \ 108 V(DateField) \
108 V(DebugBreak) \ 109 V(DebugBreak) \
109 V(DeclareGlobals) \ 110 V(DeclareGlobals) \
110 V(Deoptimize) \ 111 V(Deoptimize) \
111 V(Div) \ 112 V(Div) \
112 V(DummyUse) \ 113 V(DummyUse) \
(...skipping 4045 matching lines...) Expand 10 before | Expand all | Expand 10 after
4158 HCompareHoleAndBranch(HValue* value, 4159 HCompareHoleAndBranch(HValue* value,
4159 HBasicBlock* true_target = NULL, 4160 HBasicBlock* true_target = NULL,
4160 HBasicBlock* false_target = NULL) 4161 HBasicBlock* false_target = NULL)
4161 : HUnaryControlInstruction(value, true_target, false_target) { 4162 : HUnaryControlInstruction(value, true_target, false_target) {
4162 SetFlag(kFlexibleRepresentation); 4163 SetFlag(kFlexibleRepresentation);
4163 SetFlag(kAllowUndefinedAsNaN); 4164 SetFlag(kAllowUndefinedAsNaN);
4164 } 4165 }
4165 }; 4166 };
4166 4167
4167 4168
4169 class HCompareMinusZeroAndBranch V8_FINAL : public HUnaryControlInstruction {
4170 public:
4171 DECLARE_INSTRUCTION_FACTORY_P1(HCompareMinusZeroAndBranch, HValue*);
4172
4173 virtual void InferRepresentation(
4174 HInferRepresentationPhase* h_infer) V8_OVERRIDE;
4175
4176 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
4177 return representation();
4178 }
4179
4180 virtual bool KnownSuccessorBlock(HBasicBlock** block) V8_OVERRIDE;
4181
4182 DECLARE_CONCRETE_INSTRUCTION(CompareMinusZeroAndBranch)
4183
4184 private:
4185 explicit HCompareMinusZeroAndBranch(HValue* value)
4186 : HUnaryControlInstruction(value, NULL, NULL) {
4187 }
4188 };
4189
4190
4168 class HCompareObjectEqAndBranch : public HTemplateControlInstruction<2, 2> { 4191 class HCompareObjectEqAndBranch : public HTemplateControlInstruction<2, 2> {
4169 public: 4192 public:
4170 HCompareObjectEqAndBranch(HValue* left, 4193 HCompareObjectEqAndBranch(HValue* left,
4171 HValue* right, 4194 HValue* right,
4172 HBasicBlock* true_target = NULL, 4195 HBasicBlock* true_target = NULL,
4173 HBasicBlock* false_target = NULL) { 4196 HBasicBlock* false_target = NULL) {
4174 // TODO(danno): make this private when the IfBuilder properly constructs 4197 // TODO(danno): make this private when the IfBuilder properly constructs
4175 // control flow instructions. 4198 // control flow instructions.
4176 ASSERT(!left->IsConstant() || 4199 ASSERT(!left->IsConstant() ||
4177 (!HConstant::cast(left)->HasInteger32Value() || 4200 (!HConstant::cast(left)->HasInteger32Value() ||
(...skipping 3076 matching lines...) Expand 10 before | Expand all | Expand 10 after
7254 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 7277 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
7255 }; 7278 };
7256 7279
7257 7280
7258 #undef DECLARE_INSTRUCTION 7281 #undef DECLARE_INSTRUCTION
7259 #undef DECLARE_CONCRETE_INSTRUCTION 7282 #undef DECLARE_CONCRETE_INSTRUCTION
7260 7283
7261 } } // namespace v8::internal 7284 } } // namespace v8::internal
7262 7285
7263 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7286 #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