#include "src/extensions/externalize-string-extension.h"
#include "include/v8-template.h"
#include "src/api/api-inl.h"
#include "src/base/strings.h"
#include "src/execution/isolate.h"
#include "src/handles/handles.h"
#include "src/objects/heap-object-inl.h"
#include "src/objects/objects-inl.h"
namespace v8 {
namespace internal {
template <typename Char, typename Base>
class SimpleStringResource : public Base { … };
SimpleOneByteStringResource;
SimpleTwoByteStringResource;
static constexpr int kMinOneByteLength = …;
static constexpr int kMinTwoByteLength = …;
static constexpr int kMinOneByteCachedLength = …;
static constexpr int kMinTwoByteCachedLength = …;
const char* ExternalizeStringExtension::BuildSource(char* buf, size_t size) { … }
v8::Local<v8::FunctionTemplate>
ExternalizeStringExtension::GetNativeFunctionTemplate(
v8::Isolate* isolate, v8::Local<v8::String> str) { … }
namespace {
bool HasExternalForwardingIndex(DirectHandle<String> string) { … }
}
void ExternalizeStringExtension::Externalize(
const v8::FunctionCallbackInfo<v8::Value>& info) { … }
namespace {
MaybeHandle<String> CopyConsStringToOld(Isolate* isolate,
DirectHandle<ConsString> string) { … }
}
void ExternalizeStringExtension::CreateExternalizableString(
const v8::FunctionCallbackInfo<v8::Value>& info) { … }
void ExternalizeStringExtension::IsOneByte(
const v8::FunctionCallbackInfo<v8::Value>& info) { … }
}
}