chromium/v8/src/builtins/builtins-struct.cc

// Copyright 2022 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 <unordered_set>

#include "src/builtins/builtins-utils-inl.h"
#include "src/objects/js-struct-inl.h"
#include "src/objects/property-details.h"

namespace v8 {
namespace internal {

constexpr int kMaxJSStructFields =;
// Note: For Wasm structs, we currently allow 2000 fields, because there was
// specific demand for that. Ideally we'd have the same limit, but JS structs
// rely on DescriptorArrays and are hence limited to 1020 fields at most.
static_assert;

namespace {

struct NameHandleHasher {};

struct UniqueNameHandleEqual {};

using UniqueNameHandleSet =
    std::unordered_set<Handle<Name>, NameHandleHasher, UniqueNameHandleEqual>;

}  // namespace

BUILTIN(SharedSpaceJSObjectHasInstance) {}

namespace {
Maybe<bool> CollectFieldsAndElements(Isolate* isolate,
                                     Handle<JSReceiver> property_names,
                                     int num_properties,
                                     std::vector<Handle<Name>>& field_names,
                                     std::set<uint32_t>& element_names) {}
}  // namespace

BUILTIN(SharedStructTypeConstructor) {}

BUILTIN(SharedStructConstructor) {}

BUILTIN(SharedStructTypeIsSharedStruct) {}

BUILTIN(AtomicsMutexIsMutex) {}

BUILTIN(AtomicsConditionIsCondition) {}

}  // namespace internal
}  // namespace v8