regexp.tq 1.11 KB
Newer Older
1 2 3 4 5 6 7 8
// Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include 'src/builtins/builtins-regexp-gen.h'

namespace regexp {

9
  extern macro RegExpBuiltinsAssembler::BranchIfFastRegExp_Strict(
10 11
      implicit context: Context)(HeapObject): never labels IsFast,
      IsSlow;
12 13 14
  macro IsFastRegExpStrict(implicit context: Context)(o: HeapObject): bool {
    BranchIfFastRegExp_Strict(o) otherwise return true, return false;
  }
15

16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
  extern macro RegExpBuiltinsAssembler::BranchIfFastRegExp_Permissive(
      implicit context: Context)(HeapObject): never labels IsFast,
      IsSlow;

  @export
  macro IsFastRegExpPermissive(implicit context: Context)(o: HeapObject): bool {
    BranchIfFastRegExp_Permissive(o) otherwise return true, return false;
  }

  extern macro RegExpBuiltinsAssembler::RegExpExec(Context, Object, Object):
      Object;

  extern macro
  RegExpBuiltinsAssembler::RegExpPrototypeExecBodyWithoutResultFast(
      implicit context: Context)(JSRegExp, String):
      RegExpMatchInfo labels IfDidNotMatch;
32
}