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

Side by Side Diff: src/code-stub-assembler.h

Issue 2655243003: [csa] Add some missing Smi* wrappers (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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_CODE_STUB_ASSEMBLER_H_ 5 #ifndef V8_CODE_STUB_ASSEMBLER_H_
6 #define V8_CODE_STUB_ASSEMBLER_H_ 6 #define V8_CODE_STUB_ASSEMBLER_H_
7 7
8 #include <functional> 8 #include <functional>
9 9
10 #include "src/compiler/code-assembler.h" 10 #include "src/compiler/code-assembler.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 #define PARAMETER_BINOP(OpName, IntPtrOpName, SmiOpName) \ 106 #define PARAMETER_BINOP(OpName, IntPtrOpName, SmiOpName) \
107 Node* OpName(Node* a, Node* b, ParameterMode mode) { \ 107 Node* OpName(Node* a, Node* b, ParameterMode mode) { \
108 if (mode == SMI_PARAMETERS) { \ 108 if (mode == SMI_PARAMETERS) { \
109 return SmiOpName(a, b); \ 109 return SmiOpName(a, b); \
110 } else { \ 110 } else { \
111 DCHECK_EQ(INTPTR_PARAMETERS, mode); \ 111 DCHECK_EQ(INTPTR_PARAMETERS, mode); \
112 return IntPtrOpName(a, b); \ 112 return IntPtrOpName(a, b); \
113 } \ 113 } \
114 } 114 }
115 PARAMETER_BINOP(IntPtrOrSmiMin, IntPtrMin, SmiMin)
115 PARAMETER_BINOP(IntPtrOrSmiAdd, IntPtrAdd, SmiAdd) 116 PARAMETER_BINOP(IntPtrOrSmiAdd, IntPtrAdd, SmiAdd)
117 PARAMETER_BINOP(IntPtrOrSmiSub, IntPtrSub, SmiSub)
116 PARAMETER_BINOP(IntPtrOrSmiLessThan, IntPtrLessThan, SmiLessThan) 118 PARAMETER_BINOP(IntPtrOrSmiLessThan, IntPtrLessThan, SmiLessThan)
119 PARAMETER_BINOP(IntPtrOrSmiLessThanOrEqual, IntPtrLessThanOrEqual,
120 SmiLessThanOrEqual)
117 PARAMETER_BINOP(IntPtrOrSmiGreaterThan, IntPtrGreaterThan, SmiGreaterThan) 121 PARAMETER_BINOP(IntPtrOrSmiGreaterThan, IntPtrGreaterThan, SmiGreaterThan)
118 PARAMETER_BINOP(IntPtrOrSmiGreaterThanOrEqual, IntPtrGreaterThanOrEqual, 122 PARAMETER_BINOP(IntPtrOrSmiGreaterThanOrEqual, IntPtrGreaterThanOrEqual,
119 SmiGreaterThanOrEqual) 123 SmiGreaterThanOrEqual)
120 PARAMETER_BINOP(UintPtrOrSmiLessThan, UintPtrLessThan, SmiBelow) 124 PARAMETER_BINOP(UintPtrOrSmiLessThan, UintPtrLessThan, SmiBelow)
121 PARAMETER_BINOP(UintPtrOrSmiGreaterThanOrEqual, UintPtrGreaterThanOrEqual, 125 PARAMETER_BINOP(UintPtrOrSmiGreaterThanOrEqual, UintPtrGreaterThanOrEqual,
122 SmiAboveOrEqual) 126 SmiAboveOrEqual)
123 #undef PARAMETER_BINOP 127 #undef PARAMETER_BINOP
124 128
125 Node* NoContextConstant(); 129 Node* NoContextConstant();
126 #define HEAP_CONSTANT_ACCESSOR(rootName, name) Node* name##Constant(); 130 #define HEAP_CONSTANT_ACCESSOR(rootName, name) Node* name##Constant();
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 DCHECK_EQ(INTPTR_PARAMETERS, mode); 204 DCHECK_EQ(INTPTR_PARAMETERS, mode);
201 return WordShr(a, shift); 205 return WordShr(a, shift);
202 } 206 }
203 } 207 }
204 208
205 #define SMI_COMPARISON_OP(SmiOpName, IntPtrOpName) \ 209 #define SMI_COMPARISON_OP(SmiOpName, IntPtrOpName) \
206 Node* SmiOpName(Node* a, Node* b) { \ 210 Node* SmiOpName(Node* a, Node* b) { \
207 return IntPtrOpName(BitcastTaggedToWord(a), BitcastTaggedToWord(b)); \ 211 return IntPtrOpName(BitcastTaggedToWord(a), BitcastTaggedToWord(b)); \
208 } 212 }
209 SMI_COMPARISON_OP(SmiEqual, WordEqual) 213 SMI_COMPARISON_OP(SmiEqual, WordEqual)
214 SMI_COMPARISON_OP(SmiNotEqual, WordNotEqual)
210 SMI_COMPARISON_OP(SmiAbove, UintPtrGreaterThan) 215 SMI_COMPARISON_OP(SmiAbove, UintPtrGreaterThan)
211 SMI_COMPARISON_OP(SmiAboveOrEqual, UintPtrGreaterThanOrEqual) 216 SMI_COMPARISON_OP(SmiAboveOrEqual, UintPtrGreaterThanOrEqual)
212 SMI_COMPARISON_OP(SmiBelow, UintPtrLessThan) 217 SMI_COMPARISON_OP(SmiBelow, UintPtrLessThan)
213 SMI_COMPARISON_OP(SmiLessThan, IntPtrLessThan) 218 SMI_COMPARISON_OP(SmiLessThan, IntPtrLessThan)
214 SMI_COMPARISON_OP(SmiLessThanOrEqual, IntPtrLessThanOrEqual) 219 SMI_COMPARISON_OP(SmiLessThanOrEqual, IntPtrLessThanOrEqual)
215 SMI_COMPARISON_OP(SmiGreaterThan, IntPtrGreaterThan) 220 SMI_COMPARISON_OP(SmiGreaterThan, IntPtrGreaterThan)
216 SMI_COMPARISON_OP(SmiGreaterThanOrEqual, IntPtrGreaterThanOrEqual) 221 SMI_COMPARISON_OP(SmiGreaterThanOrEqual, IntPtrGreaterThanOrEqual)
217 #undef SMI_COMPARISON_OP 222 #undef SMI_COMPARISON_OP
218 Node* SmiMax(Node* a, Node* b); 223 Node* SmiMax(Node* a, Node* b);
219 Node* SmiMin(Node* a, Node* b); 224 Node* SmiMin(Node* a, Node* b);
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after
1291 } 1296 }
1292 #else 1297 #else
1293 #define CSA_SLOW_ASSERT(csa, x) ((void)0) 1298 #define CSA_SLOW_ASSERT(csa, x) ((void)0)
1294 #endif 1299 #endif
1295 1300
1296 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); 1301 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags);
1297 1302
1298 } // namespace internal 1303 } // namespace internal
1299 } // namespace v8 1304 } // namespace v8
1300 #endif // V8_CODE_STUB_ASSEMBLER_H_ 1305 #endif // V8_CODE_STUB_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698