chromium/v8/test/cctest/test-inobject-slack-tracking.cc

// Copyright 2015 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 <stdlib.h>

#include <sstream>
#include <utility>

#include "src/api/api-inl.h"
#include "src/objects/heap-number-inl.h"
#include "src/objects/objects-inl.h"
#include "test/cctest/cctest.h"

namespace v8 {
namespace internal {
namespace test_inobject_slack_tracking {

static const int kMaxInobjectProperties =;

template <typename T>
static Handle<T> OpenHandle(v8::Local<v8::Value> value) {}


static inline v8::Local<v8::Value> Run(v8::Local<v8::Script> script) {}



template <typename T = Object>
Handle<T> GetLexical(const char* name) {}


template <typename T = Object>
Handle<T> GetLexical(const std::string& name) {}

template <typename T>
static inline Handle<T> RunI(v8::Local<v8::Script> script) {}

template <typename T>
static inline Handle<T> CompileRunI(const char* script) {}

static Tagged<Object> GetFieldValue(Tagged<JSObject> obj, int property_index) {}

static double GetDoubleFieldValue(Tagged<JSObject> obj,
                                  FieldIndex field_index) {}

static double GetDoubleFieldValue(Tagged<JSObject> obj, int property_index) {}

bool IsObjectShrinkable(Tagged<JSObject> obj) {}

TEST(JSObjectBasic) {}


TEST(JSObjectBasicNoInlineNew) {}


TEST(JSObjectComplex) {}


TEST(JSObjectComplexNoInlineNew) {}


TEST(JSGeneratorObjectBasic) {}


TEST(JSGeneratorObjectBasicNoInlineNew) {}


TEST(SubclassBasicNoBaseClassInstances) {}


TEST(SubclassBasicNoBaseClassInstancesNoInlineNew) {}


TEST(SubclassBasic) {}


TEST(SubclassBasicNoInlineNew) {}


// Creates class hierarchy of length matching the |hierarchy_desc| length and
// with the number of fields at i'th level equal to |hierarchy_desc[i]|.
static void CreateClassHierarchy(const std::vector<int>& hierarchy_desc) {}


static std::string GetClassName(int class_index) {}


static v8::Local<v8::Script> GetNewObjectScript(const std::string& class_name) {}


// Test that in-object slack tracking works as expected for first |n| classes
// in the hierarchy.
// This test works only for if the total property count is less than maximum
// in-object properties count.
static void TestClassHierarchy(const std::vector<int>& hierarchy_desc, int n) {}


static void TestSubclassChain(const std::vector<int>& hierarchy_desc) {}

TEST(Subclasses) {}

TEST(LongSubclassChain1) {}


TEST(LongSubclassChain2) {}


TEST(LongSubclassChain3) {}


TEST(InobjectPropetiesCountOverflowInSubclass) {}

static void CheckExpectedProperties(int expected, std::ostringstream& os) {}

TEST(ObjectLiteralPropertyBackingStoreSize) {}

TEST(SlowModeSubclass) {}


static void TestSubclassBuiltin(const char* subclass_name,
                                InstanceType instance_type,
                                const char* builtin_name,
                                const char* ctor_arguments = "",
                                int builtin_properties_count = 0) {}


TEST(SubclassObjectBuiltin) {}


TEST(SubclassObjectBuiltinNoInlineNew) {}


TEST(SubclassFunctionBuiltin) {}


TEST(SubclassFunctionBuiltinNoInlineNew) {}


TEST(SubclassBooleanBuiltin) {}


TEST(SubclassBooleanBuiltinNoInlineNew) {}


TEST(SubclassErrorBuiltin) {}


TEST(SubclassErrorBuiltinNoInlineNew) {}


TEST(SubclassNumberBuiltin) {}


TEST(SubclassNumberBuiltinNoInlineNew) {}


TEST(SubclassDateBuiltin) {}


TEST(SubclassDateBuiltinNoInlineNew) {}


TEST(SubclassStringBuiltin) {}


TEST(SubclassStringBuiltinNoInlineNew) {}


TEST(SubclassRegExpBuiltin) {}


TEST(SubclassRegExpBuiltinNoInlineNew) {}


TEST(SubclassArrayBuiltin) {}


TEST(SubclassArrayBuiltinNoInlineNew) {}


TEST(SubclassTypedArrayBuiltin) {}


TEST(SubclassTypedArrayBuiltinNoInlineNew) {}


TEST(SubclassCollectionBuiltin) {}


TEST(SubclassCollectionBuiltinNoInlineNew) {}


TEST(SubclassArrayBufferBuiltin) {}


TEST(SubclassArrayBufferBuiltinNoInlineNew) {}


TEST(SubclassPromiseBuiltin) {}


TEST(SubclassPromiseBuiltinNoInlineNew) {}

TEST(SubclassTranspiledClassHierarchy) {}

TEST(Regress8853_ClassConstructor) {}

TEST(Regress8853_ClassHierarchy) {}

TEST(Regress8853_FunctionConstructor) {}

TEST(InstanceFieldsArePropertiesDefaultConstructorLazy) {}

TEST(InstanceFieldsArePropertiesFieldsAndConstructorLazy) {}

TEST(InstanceFieldsArePropertiesDefaultConstructorEager) {}

TEST(InstanceFieldsArePropertiesFieldsAndConstructorEager) {}

}  // namespace test_inobject_slack_tracking
}  // namespace internal
}  // namespace v8