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

Unified Diff: src/hydrogen-instructions.h

Issue 1347913003: [stubs] Refactor StringCompareStub and use it for HStringCompareAndBranch. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-stubs.h ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index f81d8771a5969daf11a39555e550218d07697614..f39cbf70b0964408b5ca9499f65ee1dd0a8058fe 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -4526,34 +4526,28 @@ class HIsUndetectableAndBranch final : public HUnaryControlInstruction {
};
-class HStringCompareAndBranch : public HTemplateControlInstruction<2, 3> {
+class HStringCompareAndBranch final : public HTemplateControlInstruction<2, 3> {
public:
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HStringCompareAndBranch,
HValue*,
HValue*,
Token::Value);
- HValue* context() { return OperandAt(0); }
- HValue* left() { return OperandAt(1); }
- HValue* right() { return OperandAt(2); }
+ HValue* context() const { return OperandAt(0); }
+ HValue* left() const { return OperandAt(1); }
+ HValue* right() const { return OperandAt(2); }
Token::Value token() const { return token_; }
- std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT
-
- Representation RequiredInputRepresentation(int index) override {
- return Representation::Tagged();
- }
+ std::ostream& PrintDataTo(std::ostream& os) const final; // NOLINT
- Representation GetInputRepresentation() const {
+ Representation RequiredInputRepresentation(int index) final {
return Representation::Tagged();
}
DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch)
private:
- HStringCompareAndBranch(HValue* context,
- HValue* left,
- HValue* right,
+ HStringCompareAndBranch(HValue* context, HValue* left, HValue* right,
Token::Value token)
: token_(token) {
DCHECK(Token::IsCompareOp(token));
@@ -4562,9 +4556,11 @@ class HStringCompareAndBranch : public HTemplateControlInstruction<2, 3> {
SetOperandAt(2, right);
set_representation(Representation::Tagged());
SetChangesFlag(kNewSpacePromotion);
+ SetDependsOnFlag(kStringChars);
+ SetDependsOnFlag(kStringLengths);
}
- Token::Value token_;
+ Token::Value const token_;
};
« no previous file with comments | « src/code-stubs.h ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698