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

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

Issue 430503007: Rename ASSERT* to DCHECK*. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE and fixes Created 6 years, 4 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/node.cc ('k') | src/compiler/node-properties-inl.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/common-operator.h" 8 #include "src/compiler/common-operator.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 28 matching lines...) Expand all
39 struct ValueMatcher : public NodeMatcher { 39 struct ValueMatcher : public NodeMatcher {
40 explicit ValueMatcher(Node* node) 40 explicit ValueMatcher(Node* node)
41 : NodeMatcher(node), 41 : NodeMatcher(node),
42 value_(), 42 value_(),
43 has_value_(CommonOperatorTraits<T>::HasValue(node->op())) { 43 has_value_(CommonOperatorTraits<T>::HasValue(node->op())) {
44 if (has_value_) value_ = CommonOperatorTraits<T>::ValueOf(node->op()); 44 if (has_value_) value_ = CommonOperatorTraits<T>::ValueOf(node->op());
45 } 45 }
46 46
47 bool HasValue() const { return has_value_; } 47 bool HasValue() const { return has_value_; }
48 T Value() const { 48 T Value() const {
49 ASSERT(HasValue()); 49 DCHECK(HasValue());
50 return value_; 50 return value_;
51 } 51 }
52 52
53 bool Is(T value) const { 53 bool Is(T value) const {
54 return HasValue() && CommonOperatorTraits<T>::Equals(Value(), value); 54 return HasValue() && CommonOperatorTraits<T>::Equals(Value(), value);
55 } 55 }
56 56
57 bool IsInRange(T low, T high) const { 57 bool IsInRange(T low, T high) const {
58 return HasValue() && low <= value_ && value_ <= high; 58 return HasValue() && low <= value_ && value_ <= high;
59 } 59 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 typedef BinopMatcher<Int32Matcher, Int32Matcher> Int32BinopMatcher; 124 typedef BinopMatcher<Int32Matcher, Int32Matcher> Int32BinopMatcher;
125 typedef BinopMatcher<Uint32Matcher, Uint32Matcher> Uint32BinopMatcher; 125 typedef BinopMatcher<Uint32Matcher, Uint32Matcher> Uint32BinopMatcher;
126 typedef BinopMatcher<Int64Matcher, Int64Matcher> Int64BinopMatcher; 126 typedef BinopMatcher<Int64Matcher, Int64Matcher> Int64BinopMatcher;
127 typedef BinopMatcher<Uint64Matcher, Uint64Matcher> Uint64BinopMatcher; 127 typedef BinopMatcher<Uint64Matcher, Uint64Matcher> Uint64BinopMatcher;
128 typedef BinopMatcher<Float64Matcher, Float64Matcher> Float64BinopMatcher; 128 typedef BinopMatcher<Float64Matcher, Float64Matcher> Float64BinopMatcher;
129 } 129 }
130 } 130 }
131 } // namespace v8::internal::compiler 131 } // namespace v8::internal::compiler
132 132
133 #endif // V8_COMPILER_NODE_MATCHERS_H_ 133 #endif // V8_COMPILER_NODE_MATCHERS_H_
OLDNEW
« no previous file with comments | « src/compiler/node.cc ('k') | src/compiler/node-properties-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698