chromium/v8/test/unittests/deoptimizer/deoptimization-unittest.cc

// Copyright 2012 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
//     * Redistributions of source code must retain the above copyright
//       notice, this list of conditions and the following disclaimer.
//     * Redistributions in binary form must reproduce the above
//       copyright notice, this list of conditions and the following
//       disclaimer in the documentation and/or other materials provided
//       with the distribution.
//     * Neither the name of Google Inc. nor the names of its
//       contributors may be used to endorse or promote products derived
//       from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include <stdlib.h>

#include "include/v8-function.h"
#include "src/api/api-inl.h"
#include "src/base/platform/platform.h"
#include "src/base/strings.h"
#include "src/codegen/compilation-cache.h"
#include "src/debug/debug.h"
#include "src/deoptimizer/deoptimizer.h"
#include "src/execution/isolate.h"
#include "src/init/v8.h"
#include "src/objects/objects-inl.h"
#include "test/unittests/heap/heap-utils.h"
#include "test/unittests/test-utils.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace v8 {
namespace internal {

EmbeddedVector;
OS;

class DeoptimizationTest : public TestWithContext {};

// Size of temp buffer for formatting small strings.
#define SMALL_STRING_BUFFER_SIZE

// Utility class to set the following runtime flags when constructed and return
// to their default state when destroyed:
//   --minimum-invocations-before-optimization --allow-natives-syntax
//   --always-turbofan --noturbo-inlining
class AlwaysOptimizeAllowNativesSyntaxNoInlining {};

// Utility class to set the following runtime flags when constructed and return
// to their default state when destroyed:
//   --minimum-invocations-before-optimization --allow-natives-syntax
//   --noturbo-inlining
class AllowNativesSyntaxNoInlining {};

namespace {
void CheckJsInt32(int expected, const char* variable_name,
                  v8::Local<v8::Context> context) {}
}  // namespace

TEST_F(DeoptimizationTest, DeoptimizeSimple) {}

TEST_F(DeoptimizationTest, DeoptimizeSimpleWithArguments) {}

TEST_F(DeoptimizationTest, DeoptimizeSimpleNested) {}

TEST_F(DeoptimizationTest, DeoptimizeRecursive) {}

TEST_F(DeoptimizationTest, DeoptimizeMultiple) {}

TEST_F(DeoptimizationTest, DeoptimizeConstructor) {}

TEST_F(DeoptimizationTest, DeoptimizeConstructorMultiple) {}

class DeoptimizationDisableConcurrentRecompilationTest
    : public DeoptimizationTest {};

TEST_F(DeoptimizationDisableConcurrentRecompilationTest,
       DeoptimizeBinaryOperationADDString) {}

TEST_F(DeoptimizationDisableConcurrentRecompilationTest,
       DeoptimizeBinaryOperationADD) {}

TEST_F(DeoptimizationDisableConcurrentRecompilationTest,
       DeoptimizeBinaryOperationSUB) {}

TEST_F(DeoptimizationDisableConcurrentRecompilationTest,
       DeoptimizeBinaryOperationMUL) {}

TEST_F(DeoptimizationDisableConcurrentRecompilationTest,
       DeoptimizeBinaryOperationDIV) {}

TEST_F(DeoptimizationDisableConcurrentRecompilationTest,
       DeoptimizeBinaryOperationMOD) {}

TEST_F(DeoptimizationDisableConcurrentRecompilationTest, DeoptimizeCompare) {}

TEST_F(DeoptimizationDisableConcurrentRecompilationTest,
       DeoptimizeLoadICStoreIC) {}

TEST_F(DeoptimizationDisableConcurrentRecompilationTest,
       DeoptimizeLoadICStoreICNested) {}

}  // namespace internal
}  // namespace v8