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

Unified Diff: src/hydrogen-instructions.h

Issue 58923004: Make HTypeofIsAndBranch accept any representation input (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Use KnownSuccessorBlock infrastructure 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/hydrogen-instructions.cc » ('j') | src/ia32/lithium-codegen-ia32.cc » ('J')
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 80773bf14789e8524dc4c46184588641d6396495..85bb51eb6bb7975a33c0c4e8c1e63c1088051b13 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -4436,23 +4436,35 @@ class HClassOfTestAndBranch V8_FINAL : public HUnaryControlInstruction {
class HTypeofIsAndBranch V8_FINAL : public HUnaryControlInstruction {
public:
- DECLARE_INSTRUCTION_FACTORY_P2(HTypeofIsAndBranch, HValue*, Handle<String>);
+ static HTypeofIsAndBranch* New(Zone* zone, HValue* context,
Jakob Kummerow 2013/11/08 12:07:05 Please leave the DECLARE_INSTRUCTION_FACTORY_P2 ma
Weiliang 2013/11/08 13:50:26 Done.
+ HValue* value, Handle<String> type_literal) {
+ Heap* heap = zone->isolate()->heap();
+ bool is_number = false;
Jakob Kummerow 2013/11/08 12:07:05 bool is_number = type_literal->Equals(heap->number
Weiliang 2013/11/08 13:50:26 Done.
+ if (type_literal->Equals(heap->number_string())) {
+ is_number = true;
+ }
+ return new(zone) HTypeofIsAndBranch(value, type_literal, is_number);
+ }
Handle<String> type_literal() { return type_literal_; }
+ bool CheckNumberString() { return is_number_; }
Jakob Kummerow 2013/11/08 12:07:05 I'd call the field compares_number_type_ and the a
Weiliang 2013/11/08 13:50:26 Done.
virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch)
virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
- return Representation::Tagged();
+ return Representation::None();
}
+ virtual bool KnownSuccessorBlock(HBasicBlock** block) V8_OVERRIDE;
+
private:
- HTypeofIsAndBranch(HValue* value, Handle<String> type_literal)
+ HTypeofIsAndBranch(HValue* value, Handle<String> type_literal, bool is_number)
: HUnaryControlInstruction(value, NULL, NULL),
- type_literal_(type_literal) { }
+ type_literal_(type_literal), is_number_(is_number) { }
Handle<String> type_literal_;
+ bool is_number_ : 1;
};
« no previous file with comments | « no previous file | src/hydrogen-instructions.cc » ('j') | src/ia32/lithium-codegen-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698