Commit 5f2ed43a authored by Clemens Backes's avatar Clemens Backes Committed by V8 LUCI CQ

[debug] Use v8_flags for accessing flag values

Avoid the deprecated FLAG_* syntax, access flag values via the
{v8_flags} struct instead.

R=szuend@chromium.org

Bug: v8:12887
Change-Id: I8123d18ae852807557bf26b1308e0061dc1ac123
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3898937Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83216}
parent bc0200cf
...@@ -478,7 +478,7 @@ void CollectBlockCoverage(CoverageFunction* function, SharedFunctionInfo info, ...@@ -478,7 +478,7 @@ void CollectBlockCoverage(CoverageFunction* function, SharedFunctionInfo info,
void PrintBlockCoverage(const CoverageFunction* function, void PrintBlockCoverage(const CoverageFunction* function,
SharedFunctionInfo info, bool has_nonempty_source_range, SharedFunctionInfo info, bool has_nonempty_source_range,
bool function_is_relevant) { bool function_is_relevant) {
DCHECK(FLAG_trace_block_coverage); DCHECK(v8_flags.trace_block_coverage);
std::unique_ptr<char[]> function_name = std::unique_ptr<char[]> function_name =
function->name->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL); function->name->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
i::PrintF( i::PrintF(
...@@ -543,10 +543,10 @@ void CollectAndMaybeResetCounts(Isolate* isolate, ...@@ -543,10 +543,10 @@ void CollectAndMaybeResetCounts(Isolate* isolate,
count = count =
static_cast<uint32_t>(func.feedback_vector().invocation_count()); static_cast<uint32_t>(func.feedback_vector().invocation_count());
} else if (func.raw_feedback_cell().interrupt_budget() < } else if (func.raw_feedback_cell().interrupt_budget() <
FLAG_interrupt_budget_for_feedback_allocation) { v8_flags.interrupt_budget_for_feedback_allocation) {
// TODO(jgruber): The condition above is no longer precise since we // TODO(jgruber): The condition above is no longer precise since we
// may use either the fixed interrupt_budget or // may use either the fixed interrupt_budget or
// FLAG_interrupt_budget_factor_for_feedback_allocation. If the // v8_flags.interrupt_budget_factor_for_feedback_allocation. If the
// latter, we may incorrectly set a count of 1. // latter, we may incorrectly set a count of 1.
// //
// We haven't allocated feedback vector, but executed the function // We haven't allocated feedback vector, but executed the function
...@@ -735,7 +735,7 @@ std::unique_ptr<Coverage> Coverage::Collect( ...@@ -735,7 +735,7 @@ std::unique_ptr<Coverage> Coverage::Collect(
functions->emplace_back(function); functions->emplace_back(function);
} }
if (FLAG_trace_block_coverage) { if (v8_flags.trace_block_coverage) {
PrintBlockCoverage(&function, *info, has_nonempty_source_range, PrintBlockCoverage(&function, *info, has_nonempty_source_range,
function_is_relevant); function_is_relevant);
} }
......
...@@ -407,7 +407,7 @@ bool DebugEvaluate::IsSideEffectFreeIntrinsic(Runtime::FunctionId id) { ...@@ -407,7 +407,7 @@ bool DebugEvaluate::IsSideEffectFreeIntrinsic(Runtime::FunctionId id) {
INLINE_INTRINSIC_ALLOWLIST(INLINE_CASE) INLINE_INTRINSIC_ALLOWLIST(INLINE_CASE)
return true; return true;
default: default:
if (FLAG_trace_side_effect_free_debug_evaluate) { if (v8_flags.trace_side_effect_free_debug_evaluate) {
PrintF("[debug-evaluate] intrinsic %s may cause side effect.\n", PrintF("[debug-evaluate] intrinsic %s may cause side effect.\n",
Runtime::FunctionForId(id)->name); Runtime::FunctionForId(id)->name);
} }
...@@ -975,7 +975,7 @@ DebugInfo::SideEffectState BuiltinGetSideEffectState(Builtin id) { ...@@ -975,7 +975,7 @@ DebugInfo::SideEffectState BuiltinGetSideEffectState(Builtin id) {
return DebugInfo::kRequiresRuntimeChecks; return DebugInfo::kRequiresRuntimeChecks;
default: default:
if (FLAG_trace_side_effect_free_debug_evaluate) { if (v8_flags.trace_side_effect_free_debug_evaluate) {
PrintF("[debug-evaluate] built-in %s may cause side effect.\n", PrintF("[debug-evaluate] built-in %s may cause side effect.\n",
Builtins::name(id)); Builtins::name(id));
} }
...@@ -1003,7 +1003,7 @@ bool BytecodeRequiresRuntimeCheck(interpreter::Bytecode bytecode) { ...@@ -1003,7 +1003,7 @@ bool BytecodeRequiresRuntimeCheck(interpreter::Bytecode bytecode) {
// static // static
DebugInfo::SideEffectState DebugEvaluate::FunctionGetSideEffectState( DebugInfo::SideEffectState DebugEvaluate::FunctionGetSideEffectState(
Isolate* isolate, Handle<SharedFunctionInfo> info) { Isolate* isolate, Handle<SharedFunctionInfo> info) {
if (FLAG_trace_side_effect_free_debug_evaluate) { if (v8_flags.trace_side_effect_free_debug_evaluate) {
PrintF("[debug-evaluate] Checking function %s for side effect.\n", PrintF("[debug-evaluate] Checking function %s for side effect.\n",
info->DebugNameCStr().get()); info->DebugNameCStr().get());
} }
...@@ -1014,7 +1014,7 @@ DebugInfo::SideEffectState DebugEvaluate::FunctionGetSideEffectState( ...@@ -1014,7 +1014,7 @@ DebugInfo::SideEffectState DebugEvaluate::FunctionGetSideEffectState(
// Check bytecodes against allowlist. // Check bytecodes against allowlist.
Handle<BytecodeArray> bytecode_array(info->GetBytecodeArray(isolate), Handle<BytecodeArray> bytecode_array(info->GetBytecodeArray(isolate),
isolate); isolate);
if (FLAG_trace_side_effect_free_debug_evaluate) { if (v8_flags.trace_side_effect_free_debug_evaluate) {
bytecode_array->Print(); bytecode_array->Print();
} }
bool requires_runtime_checks = false; bool requires_runtime_checks = false;
...@@ -1027,7 +1027,7 @@ DebugInfo::SideEffectState DebugEvaluate::FunctionGetSideEffectState( ...@@ -1027,7 +1027,7 @@ DebugInfo::SideEffectState DebugEvaluate::FunctionGetSideEffectState(
continue; continue;
} }
if (FLAG_trace_side_effect_free_debug_evaluate) { if (v8_flags.trace_side_effect_free_debug_evaluate) {
PrintF("[debug-evaluate] bytecode %s may cause side effect.\n", PrintF("[debug-evaluate] bytecode %s may cause side effect.\n",
interpreter::Bytecodes::ToString(bytecode)); interpreter::Bytecodes::ToString(bytecode));
} }
......
...@@ -948,8 +948,8 @@ MaybeLocal<UnboundScript> CompileInspectorScript(Isolate* v8_isolate, ...@@ -948,8 +948,8 @@ MaybeLocal<UnboundScript> CompileInspectorScript(Isolate* v8_isolate,
isolate, str, i::ScriptDetails(), cached_data, isolate, str, i::ScriptDetails(), cached_data,
ScriptCompiler::kNoCompileOptions, ScriptCompiler::kNoCompileOptions,
ScriptCompiler::kNoCacheBecauseInspector, ScriptCompiler::kNoCacheBecauseInspector,
i::FLAG_expose_inspector_scripts ? i::NOT_NATIVES_CODE i::v8_flags.expose_inspector_scripts ? i::NOT_NATIVES_CODE
: i::INSPECTOR_CODE); : i::INSPECTOR_CODE);
has_pending_exception = !maybe_function_info.ToHandle(&result); has_pending_exception = !maybe_function_info.ToHandle(&result);
RETURN_ON_FAILED_EXECUTION(UnboundScript); RETURN_ON_FAILED_EXECUTION(UnboundScript);
} }
...@@ -1431,7 +1431,7 @@ MaybeLocal<Message> GetMessageFromPromise(Local<Promise> p) { ...@@ -1431,7 +1431,7 @@ MaybeLocal<Message> GetMessageFromPromise(Local<Promise> p) {
} }
bool isExperimentalAsyncStackTaggingApiEnabled() { bool isExperimentalAsyncStackTaggingApiEnabled() {
return v8::internal::FLAG_experimental_async_stack_tagging_api; return i::v8_flags.experimental_async_stack_tagging_api;
} }
void RecordAsyncStackTaggingCreateTaskCall(v8::Isolate* v8_isolate) { void RecordAsyncStackTaggingCreateTaskCall(v8::Isolate* v8_isolate) {
......
...@@ -561,7 +561,7 @@ Handle<JSObject> ScopeIterator::ScopeObject(Mode mode) { ...@@ -561,7 +561,7 @@ Handle<JSObject> ScopeIterator::ScopeObject(Mode mode) {
auto visitor = [=](Handle<String> name, Handle<Object> value, auto visitor = [=](Handle<String> name, Handle<Object> value,
ScopeType scope_type) { ScopeType scope_type) {
if (value->IsOptimizedOut(isolate_)) { if (value->IsOptimizedOut(isolate_)) {
if (FLAG_experimental_value_unavailable) { if (v8_flags.experimental_value_unavailable) {
JSObject::SetAccessor(scope, name, JSObject::SetAccessor(scope, name,
isolate_->factory()->value_unavailable_accessor(), isolate_->factory()->value_unavailable_accessor(),
NONE) NONE)
...@@ -577,7 +577,7 @@ Handle<JSObject> ScopeIterator::ScopeObject(Mode mode) { ...@@ -577,7 +577,7 @@ Handle<JSObject> ScopeIterator::ScopeObject(Mode mode) {
// REPL mode in a script context. Catch this case. // REPL mode in a script context. Catch this case.
return false; return false;
} }
if (FLAG_experimental_value_unavailable) { if (v8_flags.experimental_value_unavailable) {
JSObject::SetAccessor(scope, name, JSObject::SetAccessor(scope, name,
isolate_->factory()->value_unavailable_accessor(), isolate_->factory()->value_unavailable_accessor(),
NONE) NONE)
......
...@@ -2573,7 +2573,7 @@ void Debug::HandleDebugBreak(IgnoreBreakMode ignore_break_mode, ...@@ -2573,7 +2573,7 @@ void Debug::HandleDebugBreak(IgnoreBreakMode ignore_break_mode,
#ifdef DEBUG #ifdef DEBUG
void Debug::PrintBreakLocation() { void Debug::PrintBreakLocation() {
if (!FLAG_print_break_location) return; if (!v8_flags.print_break_location) return;
RCS_SCOPE(isolate_, RuntimeCallCounterId::kDebugger); RCS_SCOPE(isolate_, RuntimeCallCounterId::kDebugger);
HandleScope scope(isolate_); HandleScope scope(isolate_);
StackTraceFrameIterator iterator(isolate_); StackTraceFrameIterator iterator(isolate_);
...@@ -2783,7 +2783,7 @@ bool Debug::PerformSideEffectCheck(Handle<JSFunction> function, ...@@ -2783,7 +2783,7 @@ bool Debug::PerformSideEffectCheck(Handle<JSFunction> function,
debug_info->GetSideEffectState(isolate_); debug_info->GetSideEffectState(isolate_);
switch (side_effect_state) { switch (side_effect_state) {
case DebugInfo::kHasSideEffects: case DebugInfo::kHasSideEffects:
if (FLAG_trace_side_effect_free_debug_evaluate) { if (v8_flags.trace_side_effect_free_debug_evaluate) {
PrintF("[debug-evaluate] Function %s failed side effect check.\n", PrintF("[debug-evaluate] Function %s failed side effect check.\n",
function->shared().DebugNameCStr().get()); function->shared().DebugNameCStr().get());
} }
...@@ -2846,7 +2846,7 @@ bool Debug::PerformSideEffectCheckForCallback( ...@@ -2846,7 +2846,7 @@ bool Debug::PerformSideEffectCheckForCallback(
case SideEffectType::kHasSideEffect: case SideEffectType::kHasSideEffect:
break; break;
} }
if (FLAG_trace_side_effect_free_debug_evaluate) { if (v8_flags.trace_side_effect_free_debug_evaluate) {
PrintF("[debug-evaluate] API Callback '"); PrintF("[debug-evaluate] API Callback '");
info.name().ShortPrint(); info.name().ShortPrint();
PrintF("' may cause side effect.\n"); PrintF("' may cause side effect.\n");
...@@ -2854,13 +2854,13 @@ bool Debug::PerformSideEffectCheckForCallback( ...@@ -2854,13 +2854,13 @@ bool Debug::PerformSideEffectCheckForCallback(
} else if (callback_info->IsInterceptorInfo()) { } else if (callback_info->IsInterceptorInfo()) {
InterceptorInfo info = InterceptorInfo::cast(*callback_info); InterceptorInfo info = InterceptorInfo::cast(*callback_info);
if (info.has_no_side_effect()) return true; if (info.has_no_side_effect()) return true;
if (FLAG_trace_side_effect_free_debug_evaluate) { if (v8_flags.trace_side_effect_free_debug_evaluate) {
PrintF("[debug-evaluate] API Interceptor may cause side effect.\n"); PrintF("[debug-evaluate] API Interceptor may cause side effect.\n");
} }
} else if (callback_info->IsCallHandlerInfo()) { } else if (callback_info->IsCallHandlerInfo()) {
CallHandlerInfo info = CallHandlerInfo::cast(*callback_info); CallHandlerInfo info = CallHandlerInfo::cast(*callback_info);
if (info.IsSideEffectFreeCallHandlerInfo()) return true; if (info.IsSideEffectFreeCallHandlerInfo()) return true;
if (FLAG_trace_side_effect_free_debug_evaluate) { if (v8_flags.trace_side_effect_free_debug_evaluate) {
PrintF("[debug-evaluate] API CallHandlerInfo may cause side effect.\n"); PrintF("[debug-evaluate] API CallHandlerInfo may cause side effect.\n");
} }
} }
...@@ -2922,7 +2922,7 @@ bool Debug::PerformSideEffectCheckForObject(Handle<Object> object) { ...@@ -2922,7 +2922,7 @@ bool Debug::PerformSideEffectCheckForObject(Handle<Object> object) {
return true; return true;
} }
if (FLAG_trace_side_effect_free_debug_evaluate) { if (v8_flags.trace_side_effect_free_debug_evaluate) {
PrintF("[debug-evaluate] failed runtime side effect check.\n"); PrintF("[debug-evaluate] failed runtime side effect check.\n");
} }
side_effect_check_failed_ = true; side_effect_check_failed_ = true;
......
...@@ -814,7 +814,7 @@ void LiveEdit::PatchScript(Isolate* isolate, Handle<Script> script, ...@@ -814,7 +814,7 @@ void LiveEdit::PatchScript(Isolate* isolate, Handle<Script> script,
function_data_map.Fill(isolate); function_data_map.Fill(isolate);
const bool allow_top_frame_live_editing = const bool allow_top_frame_live_editing =
allow_top_frame_live_editing_param && FLAG_live_edit_top_frame; allow_top_frame_live_editing_param && v8_flags.live_edit_top_frame;
if (!CanPatchScript(changed, script, new_script, function_data_map, if (!CanPatchScript(changed, script, new_script, function_data_map,
allow_top_frame_live_editing, result)) { allow_top_frame_live_editing, result)) {
return; return;
......
...@@ -15,9 +15,9 @@ namespace internal { ...@@ -15,9 +15,9 @@ namespace internal {
namespace wasm { namespace wasm {
namespace gdb_server { namespace gdb_server {
#define TRACE_GDB_REMOTE(...) \ #define TRACE_GDB_REMOTE(...) \
do { \ do { \
if (FLAG_trace_wasm_gdb_remote) PrintF("[gdb-remote] " __VA_ARGS__); \ if (v8_flags.trace_wasm_gdb_remote) PrintF("[gdb-remote] " __VA_ARGS__); \
} while (false) } while (false)
// Convert from 0-255 to a pair of ASCII chars (0-9,a-f). // Convert from 0-255 to a pair of ASCII chars (0-9,a-f).
......
...@@ -62,7 +62,8 @@ void GdbServerThread::Run() { ...@@ -62,7 +62,8 @@ void GdbServerThread::Run() {
#endif #endif
// If the default port is not available, try any port. // If the default port is not available, try any port.
SocketBinding socket_binding = SocketBinding::Bind(FLAG_wasm_gdb_remote_port); SocketBinding socket_binding =
SocketBinding::Bind(v8_flags.wasm_gdb_remote_port);
if (!socket_binding.IsValid()) { if (!socket_binding.IsValid()) {
socket_binding = SocketBinding::Bind(0); socket_binding = SocketBinding::Bind(0);
} }
......
...@@ -119,7 +119,7 @@ auto GdbServer::RunSyncTask(Functor&& callback) const { ...@@ -119,7 +119,7 @@ auto GdbServer::RunSyncTask(Functor&& callback) const {
// static // static
std::unique_ptr<GdbServer> GdbServer::Create() { std::unique_ptr<GdbServer> GdbServer::Create() {
DCHECK(FLAG_wasm_gdb_remote); DCHECK(v8_flags.wasm_gdb_remote);
std::unique_ptr<GdbServer> gdb_server(new GdbServer()); std::unique_ptr<GdbServer> gdb_server(new GdbServer());
...@@ -377,7 +377,7 @@ void GdbServer::AddWasmModule(uint32_t module_id, ...@@ -377,7 +377,7 @@ void GdbServer::AddWasmModule(uint32_t module_id,
std::make_pair(module_id, WasmModuleDebug(isolate, wasm_script))); std::make_pair(module_id, WasmModuleDebug(isolate, wasm_script)));
has_module_list_changed_ = true; has_module_list_changed_ = true;
if (FLAG_wasm_pause_waiting_for_debugger && scripts_.size() == 1) { if (v8_flags.wasm_pause_waiting_for_debugger && scripts_.size() == 1) {
TRACE_GDB_REMOTE("Paused, waiting for a debugger to attach...\n"); TRACE_GDB_REMOTE("Paused, waiting for a debugger to attach...\n");
Suspend(); Suspend();
} }
......
...@@ -803,7 +803,7 @@ TEST(BreakPointConstructorBuiltin) { ...@@ -803,7 +803,7 @@ TEST(BreakPointConstructorBuiltin) {
} }
TEST(BreakPointInlinedBuiltin) { TEST(BreakPointInlinedBuiltin) {
i::FLAG_allow_natives_syntax = true; i::v8_flags.allow_natives_syntax = true;
LocalContext env; LocalContext env;
v8::HandleScope scope(env->GetIsolate()); v8::HandleScope scope(env->GetIsolate());
...@@ -847,7 +847,7 @@ TEST(BreakPointInlinedBuiltin) { ...@@ -847,7 +847,7 @@ TEST(BreakPointInlinedBuiltin) {
} }
TEST(BreakPointInlineBoundBuiltin) { TEST(BreakPointInlineBoundBuiltin) {
i::FLAG_allow_natives_syntax = true; i::v8_flags.allow_natives_syntax = true;
LocalContext env; LocalContext env;
v8::HandleScope scope(env->GetIsolate()); v8::HandleScope scope(env->GetIsolate());
...@@ -895,7 +895,7 @@ TEST(BreakPointInlineBoundBuiltin) { ...@@ -895,7 +895,7 @@ TEST(BreakPointInlineBoundBuiltin) {
} }
TEST(BreakPointInlinedConstructorBuiltin) { TEST(BreakPointInlinedConstructorBuiltin) {
i::FLAG_allow_natives_syntax = true; i::v8_flags.allow_natives_syntax = true;
LocalContext env; LocalContext env;
v8::HandleScope scope(env->GetIsolate()); v8::HandleScope scope(env->GetIsolate());
...@@ -939,7 +939,7 @@ TEST(BreakPointInlinedConstructorBuiltin) { ...@@ -939,7 +939,7 @@ TEST(BreakPointInlinedConstructorBuiltin) {
} }
TEST(BreakPointBuiltinConcurrentOpt) { TEST(BreakPointBuiltinConcurrentOpt) {
i::FLAG_allow_natives_syntax = true; i::v8_flags.allow_natives_syntax = true;
LocalContext env; LocalContext env;
v8::HandleScope scope(env->GetIsolate()); v8::HandleScope scope(env->GetIsolate());
...@@ -980,7 +980,7 @@ TEST(BreakPointBuiltinConcurrentOpt) { ...@@ -980,7 +980,7 @@ TEST(BreakPointBuiltinConcurrentOpt) {
} }
TEST(BreakPointBuiltinTFOperator) { TEST(BreakPointBuiltinTFOperator) {
i::FLAG_allow_natives_syntax = true; i::v8_flags.allow_natives_syntax = true;
LocalContext env; LocalContext env;
v8::HandleScope scope(env->GetIsolate()); v8::HandleScope scope(env->GetIsolate());
...@@ -1401,7 +1401,7 @@ TEST(Regress1163547) { ...@@ -1401,7 +1401,7 @@ TEST(Regress1163547) {
} }
TEST(BreakPointInlineApiFunction) { TEST(BreakPointInlineApiFunction) {
i::FLAG_allow_natives_syntax = true; i::v8_flags.allow_natives_syntax = true;
LocalContext env; LocalContext env;
v8::HandleScope scope(env->GetIsolate()); v8::HandleScope scope(env->GetIsolate());
...@@ -1447,7 +1447,7 @@ TEST(BreakPointInlineApiFunction) { ...@@ -1447,7 +1447,7 @@ TEST(BreakPointInlineApiFunction) {
// Test that a break point can be set at a return store location. // Test that a break point can be set at a return store location.
TEST(BreakPointConditionBuiltin) { TEST(BreakPointConditionBuiltin) {
i::FLAG_allow_natives_syntax = true; i::v8_flags.allow_natives_syntax = true;
LocalContext env; LocalContext env;
v8::HandleScope scope(env->GetIsolate()); v8::HandleScope scope(env->GetIsolate());
...@@ -1576,7 +1576,7 @@ TEST(BreakPointConditionBuiltin) { ...@@ -1576,7 +1576,7 @@ TEST(BreakPointConditionBuiltin) {
} }
TEST(BreakPointInlining) { TEST(BreakPointInlining) {
i::FLAG_allow_natives_syntax = true; i::v8_flags.allow_natives_syntax = true;
break_point_hit_count = 0; break_point_hit_count = 0;
LocalContext env; LocalContext env;
v8::HandleScope scope(env->GetIsolate()); v8::HandleScope scope(env->GetIsolate());
...@@ -2922,9 +2922,9 @@ TEST(PauseInScript) { ...@@ -2922,9 +2922,9 @@ TEST(PauseInScript) {
int message_callback_count = 0; int message_callback_count = 0;
TEST(DebugBreak) { TEST(DebugBreak) {
i::FLAG_stress_compaction = false; i::v8_flags.stress_compaction = false;
#ifdef VERIFY_HEAP #ifdef VERIFY_HEAP
i::FLAG_verify_heap = true; i::v8_flags.verify_heap = true;
#endif #endif
LocalContext env; LocalContext env;
v8::Isolate* isolate = env->GetIsolate(); v8::Isolate* isolate = env->GetIsolate();
...@@ -3012,9 +3012,9 @@ class DebugScopingListener : public v8::debug::DebugDelegate { ...@@ -3012,9 +3012,9 @@ class DebugScopingListener : public v8::debug::DebugDelegate {
}; };
TEST(DebugBreakInWrappedScript) { TEST(DebugBreakInWrappedScript) {
i::FLAG_stress_compaction = false; i::v8_flags.stress_compaction = false;
#ifdef VERIFY_HEAP #ifdef VERIFY_HEAP
i::FLAG_verify_heap = true; i::v8_flags.verify_heap = true;
#endif #endif
LocalContext env; LocalContext env;
v8::Isolate* isolate = env->GetIsolate(); v8::Isolate* isolate = env->GetIsolate();
...@@ -3067,9 +3067,9 @@ TEST(DebugScopeIteratorWithFunctionTemplate) { ...@@ -3067,9 +3067,9 @@ TEST(DebugScopeIteratorWithFunctionTemplate) {
} }
TEST(DebugBreakWithoutJS) { TEST(DebugBreakWithoutJS) {
i::FLAG_stress_compaction = false; i::v8_flags.stress_compaction = false;
#ifdef VERIFY_HEAP #ifdef VERIFY_HEAP
i::FLAG_verify_heap = true; i::v8_flags.verify_heap = true;
#endif #endif
LocalContext env; LocalContext env;
v8::Isolate* isolate = env->GetIsolate(); v8::Isolate* isolate = env->GetIsolate();
...@@ -3543,8 +3543,8 @@ class ExceptionEventCounter : public v8::debug::DebugDelegate { ...@@ -3543,8 +3543,8 @@ class ExceptionEventCounter : public v8::debug::DebugDelegate {
}; };
UNINITIALIZED_TEST(NoBreakOnStackOverflow) { UNINITIALIZED_TEST(NoBreakOnStackOverflow) {
// We must set FLAG_stack_size before initializing the isolate. // We must set v8_flags.stack_size before initializing the isolate.
i::FLAG_stack_size = 100; i::v8_flags.stack_size = 100;
v8::Isolate::CreateParams create_params; v8::Isolate::CreateParams create_params;
create_params.array_buffer_allocator = CcTest::array_buffer_allocator(); create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
v8::Isolate* isolate = v8::Isolate::New(create_params); v8::Isolate* isolate = v8::Isolate::New(create_params);
...@@ -3840,7 +3840,7 @@ class DebugBreakInlineListener : public v8::debug::DebugDelegate { ...@@ -3840,7 +3840,7 @@ class DebugBreakInlineListener : public v8::debug::DebugDelegate {
}; };
TEST(DebugBreakInline) { TEST(DebugBreakInline) {
i::FLAG_allow_natives_syntax = true; i::v8_flags.allow_natives_syntax = true;
LocalContext env; LocalContext env;
v8::HandleScope scope(env->GetIsolate()); v8::HandleScope scope(env->GetIsolate());
v8::Local<v8::Context> context = env.local(); v8::Local<v8::Context> context = env.local();
...@@ -4289,7 +4289,7 @@ class DebugStepOverFunctionWithCaughtExceptionListener ...@@ -4289,7 +4289,7 @@ class DebugStepOverFunctionWithCaughtExceptionListener
}; };
TEST(DebugStepOverFunctionWithCaughtException) { TEST(DebugStepOverFunctionWithCaughtException) {
i::FLAG_allow_natives_syntax = true; i::v8_flags.allow_natives_syntax = true;
LocalContext env; LocalContext env;
v8::Isolate* isolate = env->GetIsolate(); v8::Isolate* isolate = env->GetIsolate();
...@@ -4317,7 +4317,7 @@ size_t NearHeapLimitCallback(void* data, size_t current_heap_limit, ...@@ -4317,7 +4317,7 @@ size_t NearHeapLimitCallback(void* data, size_t current_heap_limit,
} }
UNINITIALIZED_TEST(DebugSetOutOfMemoryListener) { UNINITIALIZED_TEST(DebugSetOutOfMemoryListener) {
i::FLAG_stress_concurrent_allocation = false; i::v8_flags.stress_concurrent_allocation = false;
v8::Isolate::CreateParams create_params; v8::Isolate::CreateParams create_params;
create_params.array_buffer_allocator = CcTest::array_buffer_allocator(); create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
create_params.constraints.set_max_old_generation_size_in_bytes(10 * i::MB); create_params.constraints.set_max_old_generation_size_in_bytes(10 * i::MB);
...@@ -4340,7 +4340,7 @@ UNINITIALIZED_TEST(DebugSetOutOfMemoryListener) { ...@@ -4340,7 +4340,7 @@ UNINITIALIZED_TEST(DebugSetOutOfMemoryListener) {
} }
TEST(DebugCoverage) { TEST(DebugCoverage) {
i::FLAG_always_turbofan = false; i::v8_flags.always_turbofan = false;
LocalContext env; LocalContext env;
v8::Isolate* isolate = env->GetIsolate(); v8::Isolate* isolate = env->GetIsolate();
v8::HandleScope scope(isolate); v8::HandleScope scope(isolate);
...@@ -4395,7 +4395,7 @@ v8::debug::Coverage::ScriptData GetScriptDataAndDeleteCoverage( ...@@ -4395,7 +4395,7 @@ v8::debug::Coverage::ScriptData GetScriptDataAndDeleteCoverage(
} // namespace } // namespace
TEST(DebugCoverageWithCoverageOutOfScope) { TEST(DebugCoverageWithCoverageOutOfScope) {
i::FLAG_always_turbofan = false; i::v8_flags.always_turbofan = false;
LocalContext env; LocalContext env;
v8::Isolate* isolate = env->GetIsolate(); v8::Isolate* isolate = env->GetIsolate();
v8::HandleScope scope(isolate); v8::HandleScope scope(isolate);
...@@ -4466,7 +4466,7 @@ v8::debug::Coverage::FunctionData GetFunctionDataAndDeleteCoverage( ...@@ -4466,7 +4466,7 @@ v8::debug::Coverage::FunctionData GetFunctionDataAndDeleteCoverage(
} // namespace } // namespace
TEST(DebugCoverageWithScriptDataOutOfScope) { TEST(DebugCoverageWithScriptDataOutOfScope) {
i::FLAG_always_turbofan = false; i::v8_flags.always_turbofan = false;
LocalContext env; LocalContext env;
v8::Isolate* isolate = env->GetIsolate(); v8::Isolate* isolate = env->GetIsolate();
v8::HandleScope scope(isolate); v8::HandleScope scope(isolate);
...@@ -4619,7 +4619,7 @@ i::MaybeHandle<i::Script> FindScript( ...@@ -4619,7 +4619,7 @@ i::MaybeHandle<i::Script> FindScript(
} // anonymous namespace } // anonymous namespace
UNINITIALIZED_TEST(LoadedAtStartupScripts) { UNINITIALIZED_TEST(LoadedAtStartupScripts) {
i::FLAG_expose_gc = true; i::v8_flags.expose_gc = true;
v8::Isolate::CreateParams create_params; v8::Isolate::CreateParams create_params;
create_params.array_buffer_allocator = CcTest::array_buffer_allocator(); create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment