Index: src/compiler/code-stub-assembler.cc |
diff --git a/src/compiler/code-stub-assembler.cc b/src/compiler/code-stub-assembler.cc |
index c09cfa61a395f09b63065d21fe5556f51e129e36..2392a2660098cc6afadde68e1dd989d27275d132 100644 |
--- a/src/compiler/code-stub-assembler.cc |
+++ b/src/compiler/code-stub-assembler.cc |
@@ -221,6 +221,12 @@ Node* CodeStubAssembler::WordIsSmi(Node* a) { |
IntPtrConstant(0)); |
} |
+Node* CodeStubAssembler::WordIsPositiveSmi(Node* a) { |
+ return WordEqual( |
+ raw_assembler_->WordAnd(a, IntPtrConstant(kSmiTagMask | kSmiSignMask)), |
+ IntPtrConstant(0)); |
+} |
+ |
Node* CodeStubAssembler::LoadBufferObject(Node* buffer, int offset, |
MachineType rep) { |
return raw_assembler_->Load(rep, buffer, IntPtrConstant(offset)); |