chromium/v8/src/strings/string-builder-inl.h

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

#ifndef V8_STRINGS_STRING_BUILDER_INL_H_
#define V8_STRINGS_STRING_BUILDER_INL_H_

#include "src/execution/isolate.h"
#include "src/handles/handles-inl.h"
#include "src/objects/string-inl.h"
#include "src/strings/string-builder.h"

namespace v8 {
namespace internal {

const int kStringBuilderConcatHelperLengthBits =;
const int kStringBuilderConcatHelperPositionBits =;

using StringBuilderSubstringLength =
    base::BitField<int, 0, kStringBuilderConcatHelperLengthBits>;
using StringBuilderSubstringPosition =
    base::BitField<int, kStringBuilderConcatHelperLengthBits,
                   kStringBuilderConcatHelperPositionBits>;

template <typename sinkchar>
void StringBuilderConcatHelper(Tagged<String> special, sinkchar* sink,
                               Tagged<FixedArray> fixed_array,
                               int array_length);

// Returns the result length of the concatenation.
// On illegal argument, -1 is returned.
int StringBuilderConcatLength(int special_length,
                              Tagged<FixedArray> fixed_array, int array_length,
                              bool* one_byte);

// static
inline void ReplacementStringBuilder::AddSubjectSlice(
    FixedArrayBuilder* builder, int from, int to) {}

inline void ReplacementStringBuilder::AddSubjectSlice(int from, int to) {}

template <typename SrcChar, typename DestChar>
void IncrementalStringBuilder::Append(SrcChar c) {}

V8_INLINE void IncrementalStringBuilder::AppendCharacter(uint8_t c) {}

template <int N>
V8_INLINE void IncrementalStringBuilder::AppendCStringLiteral(
    const char (&literal)[N]) {}

template <typename SrcChar>
V8_INLINE void IncrementalStringBuilder::AppendCString(const SrcChar* s) {}

V8_INLINE void IncrementalStringBuilder::AppendInt(int i) {}

V8_INLINE int IncrementalStringBuilder::EscapedLengthIfCurrentPartFits(
    int length) {}

// Change encoding to two-byte.
void IncrementalStringBuilder::ChangeEncoding() {}

template <typename DestChar>
inline IncrementalStringBuilder::NoExtend<DestChar>::NoExtend(
    Tagged<String> string, int offset, const DisallowGarbageCollection& no_gc) {}

#ifdef DEBUG
template <typename DestChar>
inline IncrementalStringBuilder::NoExtend<DestChar>::~NoExtend() {}
#endif

template <typename DestChar>
inline IncrementalStringBuilder::NoExtendBuilder<DestChar>::NoExtendBuilder(
    IncrementalStringBuilder* builder, int required_length,
    const DisallowGarbageCollection& no_gc)
    :{}

V8_INLINE Factory* IncrementalStringBuilder::factory() {}

V8_INLINE void IncrementalStringBuilder::ShrinkCurrentPart() {}

}  // namespace internal
}  // namespace v8

#endif  // V8_STRINGS_STRING_BUILDER_INL_H_