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

Side by Side Diff: src/compiler/node-matchers.h

Issue 594493002: [turbofan] Add operators for float32 support. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 6 years, 2 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/compiler/machine-operator-unittest.cc ('k') | src/compiler/opcodes.h » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_NODE_MATCHERS_H_ 5 #ifndef V8_COMPILER_NODE_MATCHERS_H_
6 #define V8_COMPILER_NODE_MATCHERS_H_ 6 #define V8_COMPILER_NODE_MATCHERS_H_
7 7
8 #include "src/compiler/node.h" 8 #include "src/compiler/node.h"
9 #include "src/compiler/operator.h" 9 #include "src/compiler/operator.h"
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 84
85 // A pattern matcher for floating point constants. 85 // A pattern matcher for floating point constants.
86 template <typename T, IrOpcode::Value kOpcode> 86 template <typename T, IrOpcode::Value kOpcode>
87 struct FloatMatcher FINAL : public ValueMatcher<T, kOpcode> { 87 struct FloatMatcher FINAL : public ValueMatcher<T, kOpcode> {
88 explicit FloatMatcher(Node* node) : ValueMatcher<T, kOpcode>(node) {} 88 explicit FloatMatcher(Node* node) : ValueMatcher<T, kOpcode>(node) {}
89 89
90 bool IsNaN() const { return this->HasValue() && std::isnan(this->Value()); } 90 bool IsNaN() const { return this->HasValue() && std::isnan(this->Value()); }
91 }; 91 };
92 92
93 typedef FloatMatcher<float, IrOpcode::kFloat32Constant> Float32Matcher;
93 typedef FloatMatcher<double, IrOpcode::kFloat64Constant> Float64Matcher; 94 typedef FloatMatcher<double, IrOpcode::kFloat64Constant> Float64Matcher;
94 typedef FloatMatcher<double, IrOpcode::kNumberConstant> NumberMatcher; 95 typedef FloatMatcher<double, IrOpcode::kNumberConstant> NumberMatcher;
95 96
96 97
97 // A pattern matcher for heap object constants. 98 // A pattern matcher for heap object constants.
98 template <typename T> 99 template <typename T>
99 struct HeapObjectMatcher FINAL 100 struct HeapObjectMatcher FINAL
100 : public ValueMatcher<Unique<T>, IrOpcode::kHeapConstant> { 101 : public ValueMatcher<Unique<T>, IrOpcode::kHeapConstant> {
101 explicit HeapObjectMatcher(Node* node) 102 explicit HeapObjectMatcher(Node* node)
102 : ValueMatcher<Unique<T>, IrOpcode::kHeapConstant>(node) {} 103 : ValueMatcher<Unique<T>, IrOpcode::kHeapConstant>(node) {}
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 typedef BinopMatcher<Uint32Matcher, Uint32Matcher> Uint32BinopMatcher; 137 typedef BinopMatcher<Uint32Matcher, Uint32Matcher> Uint32BinopMatcher;
137 typedef BinopMatcher<Int64Matcher, Int64Matcher> Int64BinopMatcher; 138 typedef BinopMatcher<Int64Matcher, Int64Matcher> Int64BinopMatcher;
138 typedef BinopMatcher<Uint64Matcher, Uint64Matcher> Uint64BinopMatcher; 139 typedef BinopMatcher<Uint64Matcher, Uint64Matcher> Uint64BinopMatcher;
139 typedef BinopMatcher<Float64Matcher, Float64Matcher> Float64BinopMatcher; 140 typedef BinopMatcher<Float64Matcher, Float64Matcher> Float64BinopMatcher;
140 141
141 } // namespace compiler 142 } // namespace compiler
142 } // namespace internal 143 } // namespace internal
143 } // namespace v8 144 } // namespace v8
144 145
145 #endif // V8_COMPILER_NODE_MATCHERS_H_ 146 #endif // V8_COMPILER_NODE_MATCHERS_H_
OLDNEW
« no previous file with comments | « src/compiler/machine-operator-unittest.cc ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698