| Index: test/cctest/test-api.cc
|
| diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
|
| index 2c02ceb916bba89275a758500a853379feaaa2aa..a3fbb76461eec1ddb265e235b4c1e30166ad64a8 100644
|
| --- a/test/cctest/test-api.cc
|
| +++ b/test/cctest/test-api.cc
|
| @@ -14517,12 +14517,17 @@ static int move_events = 0;
|
| static bool FunctionNameIs(const char* expected,
|
| const v8::JitCodeEvent* event) {
|
| // Log lines for functions are of the general form:
|
| - // "LazyCompile:<type><function_name>", where the type is one of
|
| - // "*", "~" or "".
|
| - static const char kPreamble[] = "LazyCompile:";
|
| - static size_t kPreambleLen = sizeof(kPreamble) - 1;
|
| + // "LazyCompile:<type><function_name>" or Function:<type><function_name>,
|
| + // where the type is one of "*", "~" or "".
|
| + static const char* kPreamble;
|
| + if (!i::FLAG_lazy || i::FLAG_ignition) {
|
| + kPreamble = "Function:";
|
| + } else {
|
| + kPreamble = "LazyCompile:";
|
| + }
|
| + static size_t kPreambleLen = strlen(kPreamble);
|
|
|
| - if (event->name.len < sizeof(kPreamble) - 1 ||
|
| + if (event->name.len < kPreambleLen ||
|
| strncmp(kPreamble, event->name.str, kPreambleLen) != 0) {
|
| return false;
|
| }
|
| @@ -14690,7 +14695,8 @@ UNINITIALIZED_TEST(SetJitCodeEventHandler) {
|
| for (int i = 0; i < kIterations; ++i) {
|
| LocalContext env(isolate);
|
| i::AlwaysAllocateScope always_allocate(i_isolate);
|
| - SimulateFullSpace(heap->code_space());
|
| + SimulateFullSpace(i::FLAG_ignition ? heap->old_space()
|
| + : heap->code_space());
|
| CompileRun(script);
|
|
|
| // Keep a strong reference to the code object in the handle scope.
|
| @@ -15131,6 +15137,9 @@ THREADED_TEST(AccessChecksReenabledCorrectly) {
|
|
|
| // Tests that ScriptData can be serialized and deserialized.
|
| TEST(PreCompileSerialization) {
|
| + // Producing cached parser data while parsing eagerly is not supported.
|
| + if (!i::FLAG_lazy || i::FLAG_ignition) return;
|
| +
|
| v8::V8::Initialize();
|
| LocalContext env;
|
| v8::Isolate* isolate = env->GetIsolate();
|
| @@ -24062,12 +24071,18 @@ TEST(InvalidCacheData) {
|
| v8::V8::Initialize();
|
| v8::HandleScope scope(CcTest::isolate());
|
| LocalContext context;
|
| - TestInvalidCacheData(v8::ScriptCompiler::kConsumeParserCache);
|
| + if (i::FLAG_lazy && !i::FLAG_ignition) {
|
| + // Cached parser data is not consumed while parsing eagerly.
|
| + TestInvalidCacheData(v8::ScriptCompiler::kConsumeParserCache);
|
| + }
|
| TestInvalidCacheData(v8::ScriptCompiler::kConsumeCodeCache);
|
| }
|
|
|
|
|
| TEST(ParserCacheRejectedGracefully) {
|
| + // Producing cached parser data while parsing eagerly is not supported.
|
| + if (!i::FLAG_lazy || i::FLAG_ignition) return;
|
| +
|
| i::FLAG_min_preparse_length = 0;
|
| v8::V8::Initialize();
|
| v8::HandleScope scope(CcTest::isolate());
|
|
|