OLD | NEW |
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 compiler::Node* SmiBelow(compiler::Node* a, compiler::Node* b); | 128 compiler::Node* SmiBelow(compiler::Node* a, compiler::Node* b); |
129 compiler::Node* SmiLessThan(compiler::Node* a, compiler::Node* b); | 129 compiler::Node* SmiLessThan(compiler::Node* a, compiler::Node* b); |
130 compiler::Node* SmiLessThanOrEqual(compiler::Node* a, compiler::Node* b); | 130 compiler::Node* SmiLessThanOrEqual(compiler::Node* a, compiler::Node* b); |
131 compiler::Node* SmiMax(compiler::Node* a, compiler::Node* b); | 131 compiler::Node* SmiMax(compiler::Node* a, compiler::Node* b); |
132 compiler::Node* SmiMin(compiler::Node* a, compiler::Node* b); | 132 compiler::Node* SmiMin(compiler::Node* a, compiler::Node* b); |
133 // Computes a % b for Smi inputs a and b; result is not necessarily a Smi. | 133 // Computes a % b for Smi inputs a and b; result is not necessarily a Smi. |
134 compiler::Node* SmiMod(compiler::Node* a, compiler::Node* b); | 134 compiler::Node* SmiMod(compiler::Node* a, compiler::Node* b); |
135 // Computes a * b for Smi inputs a and b; result is not necessarily a Smi. | 135 // Computes a * b for Smi inputs a and b; result is not necessarily a Smi. |
136 compiler::Node* SmiMul(compiler::Node* a, compiler::Node* b); | 136 compiler::Node* SmiMul(compiler::Node* a, compiler::Node* b); |
137 compiler::Node* SmiOr(compiler::Node* a, compiler::Node* b) { | 137 compiler::Node* SmiOr(compiler::Node* a, compiler::Node* b) { |
138 return WordOr(a, b); | 138 return BitcastWordToTaggedSigned( |
| 139 WordOr(BitcastTaggedToWord(a), BitcastTaggedToWord(b))); |
139 } | 140 } |
140 | 141 |
141 // Allocate an object of the given size. | 142 // Allocate an object of the given size. |
142 compiler::Node* Allocate(compiler::Node* size, AllocationFlags flags = kNone); | 143 compiler::Node* Allocate(compiler::Node* size, AllocationFlags flags = kNone); |
143 compiler::Node* Allocate(int size, AllocationFlags flags = kNone); | 144 compiler::Node* Allocate(int size, AllocationFlags flags = kNone); |
144 compiler::Node* InnerAllocate(compiler::Node* previous, int offset); | 145 compiler::Node* InnerAllocate(compiler::Node* previous, int offset); |
145 compiler::Node* InnerAllocate(compiler::Node* previous, | 146 compiler::Node* InnerAllocate(compiler::Node* previous, |
146 compiler::Node* offset); | 147 compiler::Node* offset); |
147 | 148 |
148 void Assert(compiler::Node* condition); | 149 void Assert(compiler::Node* condition); |
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
986 Label* bailout); | 987 Label* bailout); |
987 | 988 |
988 static const int kElementLoopUnrollThreshold = 8; | 989 static const int kElementLoopUnrollThreshold = 8; |
989 }; | 990 }; |
990 | 991 |
991 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); | 992 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
992 | 993 |
993 } // namespace internal | 994 } // namespace internal |
994 } // namespace v8 | 995 } // namespace v8 |
995 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 996 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |