#include "src/json/json-parser.h"
#include <optional>
#include "src/base/strings.h"
#include "src/builtins/builtins.h"
#include "src/common/assert-scope.h"
#include "src/common/globals.h"
#include "src/common/message-template.h"
#include "src/debug/debug.h"
#include "src/execution/frames-inl.h"
#include "src/heap/factory.h"
#include "src/numbers/conversions.h"
#include "src/numbers/hash-seed-inl.h"
#include "src/objects/elements-kind.h"
#include "src/objects/field-type.h"
#include "src/objects/hash-table-inl.h"
#include "src/objects/map-updater.h"
#include "src/objects/objects-inl.h"
#include "src/objects/property-descriptor.h"
#include "src/objects/property-details.h"
#include "src/roots/roots.h"
#include "src/strings/char-predicates-inl.h"
#include "src/strings/string-hasher.h"
#include "src/utils/boxed-float.h"
namespace v8 {
namespace internal {
namespace …
MaybeHandle<Object> JsonParseInternalizer::Internalize(
Isolate* isolate, Handle<Object> result, Handle<Object> reviver,
Handle<String> source, MaybeHandle<Object> val_node) { … }
template <JsonParseInternalizer::WithOrWithoutSource with_source>
MaybeHandle<Object> JsonParseInternalizer::InternalizeJsonProperty(
Handle<JSReceiver> holder, Handle<String> name, Handle<Object> val_node,
Handle<Object> snapshot) { … }
template <JsonParseInternalizer::WithOrWithoutSource with_source>
bool JsonParseInternalizer::RecurseAndApply(Handle<JSReceiver> holder,
Handle<String> name,
Handle<Object> val_node,
Handle<Object> snapshot) { … }
template <typename Char>
JsonParser<Char>::JsonParser(Isolate* isolate, Handle<String> source)
: … { … }
template <typename Char>
bool JsonParser<Char>::IsSpecialString() { … }
template <typename Char>
MessageTemplate JsonParser<Char>::GetErrorMessageWithEllipses(
DirectHandle<Object>& arg, DirectHandle<Object>& arg2, int pos) { … }
template <typename Char>
MessageTemplate JsonParser<Char>::LookUpErrorMessageForJsonToken(
JsonToken token, DirectHandle<Object>& arg, DirectHandle<Object>& arg2,
int pos) { … }
template <typename Char>
void JsonParser<Char>::CalculateFileLocation(DirectHandle<Object>& line,
DirectHandle<Object>& column) { … }
template <typename Char>
void JsonParser<Char>::ReportUnexpectedToken(
JsonToken token, std::optional<MessageTemplate> errorMessage) { … }
template <typename Char>
void JsonParser<Char>::ReportUnexpectedCharacter(base::uc32 c) { … }
template <typename Char>
JsonParser<Char>::~JsonParser() { … }
template <typename Char>
MaybeHandle<Object> JsonParser<Char>::ParseJson(DirectHandle<Object> reviver) { … }
MaybeHandle<Object> InternalizeJsonProperty(Handle<JSObject> holder,
Handle<String> key);
namespace {
template <typename Char>
JsonToken GetTokenForCharacter(Char c) { … }
}
template <typename Char>
void JsonParser<Char>::SkipWhitespace() { … }
template <typename Char>
base::uc32 JsonParser<Char>::ScanUnicodeCharacter() { … }
template <typename Char>
JsonString JsonParser<Char>::ScanJsonPropertyKey(JsonContinuation* cont) { … }
class FoldedMutableHeapNumberAllocation { … };
class FoldedMutableHeapNumberAllocator { … };
class JSDataObjectBuilder { … };
class NamedPropertyValueIterator { … };
template <typename Char>
class JsonParser<Char>::NamedPropertyIterator { … };
template <typename Char>
Handle<JSObject> JsonParser<Char>::BuildJsonObject(const JsonContinuation& cont,
Handle<Map> feedback) { … }
template <typename Char>
Handle<Object> JsonParser<Char>::BuildJsonArray(size_t start) { … }
template <typename Char>
bool JsonParser<Char>::ParseRawJson() { … }
template <typename Char>
V8_INLINE MaybeHandle<Object> JsonParser<Char>::ParseJsonValueRecursive(
Handle<Map> feedback) { … }
template <typename Char>
MaybeHandle<Object> JsonParser<Char>::ParseJsonObject(Handle<Map> feedback) { … }
template <typename Char>
MaybeHandle<Object> JsonParser<Char>::ParseJsonArray() { … }
template <typename Char>
template <bool should_track_json_source>
MaybeHandle<Object> JsonParser<Char>::ParseJsonValue() { … }
template <typename Char>
void JsonParser<Char>::AdvanceToNonDecimal() { … }
template <typename Char>
Handle<Object> JsonParser<Char>::ParseJsonNumber() { … }
namespace {
template <typename Char>
bool Matches(base::Vector<const Char> chars, Handle<String> string) { … }
}
template <typename Char>
template <typename SinkSeqString>
Handle<String> JsonParser<Char>::DecodeString(
const JsonString& string, Handle<SinkSeqString> intermediate,
Handle<String> hint) { … }
template <typename Char>
Handle<String> JsonParser<Char>::MakeString(const JsonString& string,
Handle<String> hint) { … }
template <typename Char>
template <typename SinkChar>
void JsonParser<Char>::DecodeString(SinkChar* sink, int start, int length) { … }
template <typename Char>
JsonString JsonParser<Char>::ScanJsonString(bool needs_internalization) { … }
template class JsonParser<uint8_t>;
template class JsonParser<uint16_t>;
}
}