1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * vim: set ts=8 sts=2 et sw=2 tw=80:
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef jit_RegExpStubConstants_h
8 #define jit_RegExpStubConstants_h
13 #include "irregexp/RegExpTypes.h"
14 #include "vm/MatchPairs.h"
19 static constexpr size_t InputOutputDataSize
= sizeof(irregexp::InputOutputData
);
21 // Amount of space to reserve on the stack when executing RegExps inline.
22 static constexpr size_t RegExpReservedStack
=
23 InputOutputDataSize
+ sizeof(MatchPairs
) +
24 RegExpObject::MaxPairCount
* sizeof(MatchPair
);
26 // RegExpExecTest return value to indicate failure.
27 static constexpr int32_t RegExpExecTestResultFailed
= -1;
29 // RegExpSearcher return values to indicate not-found or failure.
30 static constexpr int32_t RegExpSearcherResultNotFound
= -1;
31 static constexpr int32_t RegExpSearcherResultFailed
= -2;
36 #endif /* jit_RegExpStubConstants_h */