#include "src/codegen/compiler.h"
#include <stdlib.h>
#include <wchar.h>
#include <memory>
#include "include/v8-function.h"
#include "include/v8-local-handle.h"
#include "include/v8-profiler.h"
#include "include/v8-script.h"
#include "src/api/api-inl.h"
#include "src/codegen/compilation-cache.h"
#include "src/codegen/script-details.h"
#include "src/heap/factory.h"
#include "src/objects/allocation-site-inl.h"
#include "src/objects/objects-inl.h"
#include "src/objects/shared-function-info.h"
#include "test/unittests/heap/heap-utils.h"
#include "test/unittests/test-utils.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace v8 {
using CompilerTest = TestWithContext;
namespace internal {
static Handle<Object> GetGlobalProperty(const char* name) { … }
static void SetGlobalProperty(const char* name, Tagged<Object> value) { … }
static Handle<JSFunction> Compile(const char* source) { … }
static double Inc(Isolate* isolate, int x) { … }
TEST_F(CompilerTest, Inc) { … }
static double Add(Isolate* isolate, int x, int y) { … }
TEST_F(CompilerTest, Add) { … }
static double Abs(Isolate* isolate, int x) { … }
TEST_F(CompilerTest, Abs) { … }
static double Sum(Isolate* isolate, int n) { … }
TEST_F(CompilerTest, Sum) { … }
using CompilerPrintTest = WithPrintExtensionMixin<v8::TestWithIsolate>;
TEST_F(CompilerPrintTest, Print) { … }
TEST_F(CompilerTest, Stuff) { … }
TEST_F(CompilerTest, UncaughtThrow) { … }
using CompilerC2JSFramesTest = WithPrintExtensionMixin<v8::TestWithIsolate>;
TEST_F(CompilerC2JSFramesTest, C2JSFrames) { … }
TEST_F(CompilerTest, Regression236) { … }
TEST_F(CompilerTest, GetScriptLineNumber) { … }
TEST_F(CompilerTest, FeedbackVectorPreservedAcrossRecompiles) { … }
TEST_F(CompilerTest, FeedbackVectorUnaffectedByScopeChanges) { … }
TEST_F(CompilerTest, OptimizedCodeSharing1) { … }
TEST_F(CompilerTest, CompileFunction) { … }
TEST_F(CompilerTest, CompileFunctionComplex) { … }
TEST_F(CompilerTest, CompileFunctionArgs) { … }
TEST_F(CompilerTest, CompileFunctionComments) { … }
TEST_F(CompilerTest, CompileFunctionNonIdentifierArgs) { … }
TEST_F(CompilerTest, CompileFunctionRenderCallSite) { … }
TEST_F(CompilerTest, CompileFunctionQuirks) { … }
TEST_F(CompilerTest, CompileFunctionScriptOrigin) { … }
TEST_F(CompilerTest, CompileFunctionFunctionToString) { … }
TEST_F(CompilerTest, InvocationCount) { … }
TEST_F(CompilerTest, ShallowEagerCompilation) { … }
TEST_F(CompilerTest, DeepEagerCompilation) { … }
TEST_F(CompilerTest, DeepEagerCompilationPeakMemory) { … }
namespace {
class DummySourceStream : public v8::ScriptCompiler::ExternalSourceStream { … };
}
TEST_F(CompilerTest, ProfilerEnabledDuringBackgroundCompile) { … }
using BackgroundMergeTest = TestWithNativeContext;
TEST_F(BackgroundMergeTest, GCDuringMerge) { … }
}
}