Commit 769442a1 authored by ishell's avatar ishell Committed by Commit bot

[interpreter][stubs] Don't modify FLAG_csa_verify flag to make TSAN happy.

BUG=

Review-Url: https://codereview.chromium.org/2568173002
Cr-Commit-Position: refs/heads/master@{#41653}
parent 257793e3
...@@ -108,14 +108,7 @@ Code* BuildWithCodeStubAssemblerCS(Isolate* isolate, ...@@ -108,14 +108,7 @@ Code* BuildWithCodeStubAssemblerCS(Isolate* isolate,
DCHECK_LE(0, descriptor.GetRegisterParameterCount()); DCHECK_LE(0, descriptor.GetRegisterParameterCount());
compiler::CodeAssemblerState state(isolate, &zone, descriptor, flags, name); compiler::CodeAssemblerState state(isolate, &zone, descriptor, flags, name);
generator(&state); generator(&state);
// TODO(ishell): remove this when code stub assembler graphs verification
// is enabled for all stubs.
bool saved_csa_verify = FLAG_csa_verify;
// Enable verification only in mksnapshot.
FLAG_csa_verify = DEBUG_BOOL && FLAG_startup_blob != nullptr;
Handle<Code> code = compiler::CodeAssembler::GenerateCode(&state); Handle<Code> code = compiler::CodeAssembler::GenerateCode(&state);
FLAG_csa_verify = saved_csa_verify;
PostBuildProfileAndTracing(isolate, *code, name); PostBuildProfileAndTracing(isolate, *code, name);
return *code; return *code;
} }
......
...@@ -437,15 +437,7 @@ Handle<Code> TurboFanCodeStub::GenerateCode() { ...@@ -437,15 +437,7 @@ Handle<Code> TurboFanCodeStub::GenerateCode() {
compiler::CodeAssemblerState state(isolate(), &zone, descriptor, compiler::CodeAssemblerState state(isolate(), &zone, descriptor,
GetCodeFlags(), name); GetCodeFlags(), name);
GenerateAssembly(&state); GenerateAssembly(&state);
return compiler::CodeAssembler::GenerateCode(&state);
// TODO(ishell): remove this when code stub assembler graphs verification
// is enabled for all stubs.
bool saved_csa_verify = FLAG_csa_verify;
// Enable verification only in mksnapshot.
FLAG_csa_verify = DEBUG_BOOL && FLAG_startup_blob != nullptr;
Handle<Code> code = compiler::CodeAssembler::GenerateCode(&state);
FLAG_csa_verify = saved_csa_verify;
return code;
} }
#define ACCESSOR_ASSEMBLER(Name) \ #define ACCESSOR_ASSEMBLER(Name) \
......
...@@ -98,12 +98,6 @@ void Interpreter::InstallBytecodeHandler(Zone* zone, Bytecode bytecode, ...@@ -98,12 +98,6 @@ void Interpreter::InstallBytecodeHandler(Zone* zone, Bytecode bytecode,
BytecodeGeneratorFunc generator) { BytecodeGeneratorFunc generator) {
if (!Bytecodes::BytecodeHasHandler(bytecode, operand_scale)) return; if (!Bytecodes::BytecodeHasHandler(bytecode, operand_scale)) return;
// TODO(ishell): remove this when code stub assembler graphs verification
// is enabled for all stubs.
bool sav_csa_verify = FLAG_csa_verify;
// Enable verification only in mksnapshot.
FLAG_csa_verify = DEBUG_BOOL && FLAG_startup_blob != nullptr;
InterpreterDispatchDescriptor descriptor(isolate_); InterpreterDispatchDescriptor descriptor(isolate_);
compiler::CodeAssemblerState state( compiler::CodeAssemblerState state(
isolate_, zone, descriptor, Code::ComputeFlags(Code::BYTECODE_HANDLER), isolate_, zone, descriptor, Code::ComputeFlags(Code::BYTECODE_HANDLER),
...@@ -118,7 +112,6 @@ void Interpreter::InstallBytecodeHandler(Zone* zone, Bytecode bytecode, ...@@ -118,7 +112,6 @@ void Interpreter::InstallBytecodeHandler(Zone* zone, Bytecode bytecode,
CodeEventListener::BYTECODE_HANDLER_TAG, CodeEventListener::BYTECODE_HANDLER_TAG,
AbstractCode::cast(*code), AbstractCode::cast(*code),
Bytecodes::ToString(bytecode, operand_scale).c_str())); Bytecodes::ToString(bytecode, operand_scale).c_str()));
FLAG_csa_verify = sav_csa_verify;
} }
Code* Interpreter::GetBytecodeHandler(Bytecode bytecode, Code* Interpreter::GetBytecodeHandler(Bytecode bytecode,
......
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