OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #include "src/compiler/code-stub-assembler.h" | 5 #include "src/compiler/code-stub-assembler.h" |
6 | 6 |
7 #include <ostream> | 7 #include <ostream> |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 #define DEFINE_CODE_STUB_ASSEMBER_UNARY_OP(name) \ | 214 #define DEFINE_CODE_STUB_ASSEMBER_UNARY_OP(name) \ |
215 Node* CodeStubAssembler::name(Node* a) { return raw_assembler_->name(a); } | 215 Node* CodeStubAssembler::name(Node* a) { return raw_assembler_->name(a); } |
216 CODE_STUB_ASSEMBLER_UNARY_OP_LIST(DEFINE_CODE_STUB_ASSEMBER_UNARY_OP) | 216 CODE_STUB_ASSEMBLER_UNARY_OP_LIST(DEFINE_CODE_STUB_ASSEMBER_UNARY_OP) |
217 #undef DEFINE_CODE_STUB_ASSEMBER_UNARY_OP | 217 #undef DEFINE_CODE_STUB_ASSEMBER_UNARY_OP |
218 | 218 |
219 Node* CodeStubAssembler::WordIsSmi(Node* a) { | 219 Node* CodeStubAssembler::WordIsSmi(Node* a) { |
220 return WordEqual(raw_assembler_->WordAnd(a, IntPtrConstant(kSmiTagMask)), | 220 return WordEqual(raw_assembler_->WordAnd(a, IntPtrConstant(kSmiTagMask)), |
221 IntPtrConstant(0)); | 221 IntPtrConstant(0)); |
222 } | 222 } |
223 | 223 |
| 224 Node* CodeStubAssembler::WordIsPositiveSmi(Node* a) { |
| 225 return WordEqual( |
| 226 raw_assembler_->WordAnd(a, IntPtrConstant(kSmiTagMask | kSmiSignMask)), |
| 227 IntPtrConstant(0)); |
| 228 } |
| 229 |
224 Node* CodeStubAssembler::LoadBufferObject(Node* buffer, int offset, | 230 Node* CodeStubAssembler::LoadBufferObject(Node* buffer, int offset, |
225 MachineType rep) { | 231 MachineType rep) { |
226 return raw_assembler_->Load(rep, buffer, IntPtrConstant(offset)); | 232 return raw_assembler_->Load(rep, buffer, IntPtrConstant(offset)); |
227 } | 233 } |
228 | 234 |
229 Node* CodeStubAssembler::LoadObjectField(Node* object, int offset, | 235 Node* CodeStubAssembler::LoadObjectField(Node* object, int offset, |
230 MachineType rep) { | 236 MachineType rep) { |
231 return raw_assembler_->Load(rep, object, | 237 return raw_assembler_->Load(rep, object, |
232 IntPtrConstant(offset - kHeapObjectTag)); | 238 IntPtrConstant(offset - kHeapObjectTag)); |
233 } | 239 } |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 } | 881 } |
876 } | 882 } |
877 } | 883 } |
878 | 884 |
879 bound_ = true; | 885 bound_ = true; |
880 } | 886 } |
881 | 887 |
882 } // namespace compiler | 888 } // namespace compiler |
883 } // namespace internal | 889 } // namespace internal |
884 } // namespace v8 | 890 } // namespace v8 |
OLD | NEW |