tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

RegExpStubConstants.h (1231B)


      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/. */
      6 
      7 #ifndef jit_RegExpStubConstants_h
      8 #define jit_RegExpStubConstants_h
      9 
     10 #include <stddef.h>
     11 #include <stdint.h>
     12 
     13 #include "irregexp/RegExpTypes.h"
     14 #include "vm/MatchPairs.h"
     15 #include "vm/RegExpObject.h"
     16 
     17 namespace js {
     18 namespace jit {
     19 
     20 static constexpr size_t InputOutputDataSize = sizeof(irregexp::InputOutputData);
     21 
     22 // Amount of space to reserve on the stack when executing RegExps inline.
     23 static constexpr size_t RegExpReservedStack =
     24    InputOutputDataSize + sizeof(MatchPairs) +
     25    RegExpObject::MaxPairCount * sizeof(MatchPair);
     26 
     27 // RegExpExecTest return value to indicate failure.
     28 static constexpr int32_t RegExpExecTestResultFailed = -1;
     29 
     30 // RegExpSearcher return values to indicate not-found or failure.
     31 static constexpr int32_t RegExpSearcherResultNotFound = -1;
     32 static constexpr int32_t RegExpSearcherResultFailed = -2;
     33 
     34 }  // namespace jit
     35 }  // namespace js
     36 
     37 #endif /* jit_RegExpStubConstants_h */