diff --git a/executable_semantics/interpreter/exec_program.cpp b/executable_semantics/interpreter/exec_program.cpp index 41e23eb1180e..34c0f9b3de21 100644 --- a/executable_semantics/interpreter/exec_program.cpp +++ b/executable_semantics/interpreter/exec_program.cpp @@ -17,11 +17,13 @@ namespace Carbon { -auto ExecProgram(Nonnull arena, AST ast, bool trace) -> ErrorOr { - if (trace) { - llvm::outs() << "********** source program **********\n"; +auto ExecProgram(Nonnull arena, AST ast, + std::optional> trace_stream) + -> ErrorOr { + if (trace_stream) { + **trace_stream << "********** source program **********\n"; for (const auto decl : ast.declarations) { - llvm::outs() << *decl; + **trace_stream << *decl; } } SourceLocation source_loc("", 0); @@ -30,29 +32,27 @@ auto ExecProgram(Nonnull arena, AST ast, bool trace) -> ErrorOr { arena->New(source_loc)); // Although name resolution is currently done once, generic programming // (particularly templates) may require more passes. - if (trace) { - llvm::outs() << "********** resolving names **********\n"; + if (trace_stream) { + **trace_stream << "********** resolving names **********\n"; } RETURN_IF_ERROR(ResolveNames(ast)); - if (trace) { - llvm::outs() << "********** resolving control flow **********\n"; + if (trace_stream) { + **trace_stream << "********** resolving control flow **********\n"; } RETURN_IF_ERROR(ResolveControlFlow(ast)); - if (trace) { - llvm::outs() << "********** type checking **********\n"; + if (trace_stream) { + **trace_stream << "********** type checking **********\n"; } - RETURN_IF_ERROR(TypeChecker(arena, trace).TypeCheck(ast)); - if (trace) { - llvm::outs() << "\n"; - llvm::outs() << "********** type checking complete **********\n"; + RETURN_IF_ERROR(TypeChecker(arena, trace_stream).TypeCheck(ast)); + if (trace_stream) { + **trace_stream << "\n"; + **trace_stream << "********** type checking complete **********\n"; for (const auto decl : ast.declarations) { - llvm::outs() << *decl; + **trace_stream << *decl; } - llvm::outs() << "********** starting execution **********\n"; + **trace_stream << "********** starting execution **********\n"; } - ASSIGN_OR_RETURN(const int result, InterpProgram(ast, arena, trace)); - llvm::outs() << "result: " << result << "\n"; - return result; + return InterpProgram(ast, arena, trace_stream); } } // namespace Carbon diff --git a/executable_semantics/interpreter/exec_program.h b/executable_semantics/interpreter/exec_program.h index 31d0869e7e32..d7b4be576837 100644 --- a/executable_semantics/interpreter/exec_program.h +++ b/executable_semantics/interpreter/exec_program.h @@ -10,11 +10,14 @@ #define EXECUTABLE_SEMANTICS_INTERPRETER_EXEC_PROGRAM_H_ #include "executable_semantics/ast/ast.h" +#include "llvm/Support/raw_ostream.h" namespace Carbon { // Runs the top-level declaration list. -auto ExecProgram(Nonnull arena, AST ast, bool trace) -> ErrorOr; +auto ExecProgram(Nonnull arena, AST ast, + std::optional> trace_stream) + -> ErrorOr; } // namespace Carbon diff --git a/executable_semantics/interpreter/interpreter.cpp b/executable_semantics/interpreter/interpreter.cpp index face14463c22..3cd2268e480b 100644 --- a/executable_semantics/interpreter/interpreter.cpp +++ b/executable_semantics/interpreter/interpreter.cpp @@ -47,11 +47,12 @@ class Interpreter { // Constructs an Interpreter which allocates values on `arena`, and prints // traces if `trace` is true. `phase` indicates whether it executes at // compile time or run time. - Interpreter(Phase phase, Nonnull arena, bool trace) + Interpreter(Phase phase, Nonnull arena, + std::optional> trace_stream) : arena_(arena), heap_(arena), todo_(MakeTodo(phase, &heap_)), - trace_(trace), + trace_stream_(trace_stream), phase_(phase) {} ~Interpreter(); @@ -117,7 +118,7 @@ class Interpreter { // contents of any non-completed continuations at the end of execution. std::vector> stack_fragments_; - bool trace_; + std::optional> trace_stream_; Phase phase_; }; @@ -283,9 +284,9 @@ auto PatternMatch(Nonnull p, Nonnull v, auto Interpreter::StepLvalue() -> ErrorOr { Action& act = todo_.CurrentAction(); const Expression& exp = cast(act).expression(); - if (trace_) { - llvm::outs() << "--- step lvalue " << exp << " (" << exp.source_loc() - << ") --->\n"; + if (trace_stream_) { + **trace_stream_ << "--- step lvalue " << exp << " (" << exp.source_loc() + << ") --->\n"; } switch (exp.kind()) { case ExpressionKind::IdentifierExpression: { @@ -373,13 +374,13 @@ auto Interpreter::StepLvalue() -> ErrorOr { auto Interpreter::InstantiateType(Nonnull type, SourceLocation source_loc) const -> ErrorOr> { - if (trace_) { - llvm::outs() << "instantiating: " << *type << "\n"; + if (trace_stream_) { + **trace_stream_ << "instantiating: " << *type << "\n"; } switch (type->kind()) { case Value::Kind::VariableType: { - if (trace_) { - llvm::outs() << "case VariableType\n"; + if (trace_stream_) { + **trace_stream_ << "case VariableType\n"; } ASSIGN_OR_RETURN( Nonnull value, @@ -390,8 +391,8 @@ auto Interpreter::InstantiateType(Nonnull type, return value; } case Value::Kind::NominalClassType: { - if (trace_) { - llvm::outs() << "case NominalClassType\n"; + if (trace_stream_) { + **trace_stream_ << "case NominalClassType\n"; } const auto& class_type = cast(*type); BindingMap inst_type_args; @@ -399,15 +400,15 @@ auto Interpreter::InstantiateType(Nonnull type, ASSIGN_OR_RETURN(inst_type_args[ty_var], InstantiateType(ty_arg, source_loc)); } - if (trace_) { - llvm::outs() << "finished instantiating ty_arg\n"; + if (trace_stream_) { + **trace_stream_ << "finished instantiating ty_arg\n"; } std::map, Nonnull> witnesses; for (const auto& [bind, impl] : class_type.impls()) { ASSIGN_OR_RETURN(Nonnull witness_addr, todo_.ValueOfNode(impl, source_loc)); - if (trace_) { - llvm::outs() << "witness_addr: " << *witness_addr << "\n"; + if (trace_stream_) { + **trace_stream_ << "witness_addr: " << *witness_addr << "\n"; } // If the witness came directly from an `impl` declaration (via // `constant_value`), then it is a `Witness`. If the witness @@ -428,8 +429,8 @@ auto Interpreter::InstantiateType(Nonnull type, } witnesses[bind] = witness; } - if (trace_) { - llvm::outs() << "finished finding witnesses\n"; + if (trace_stream_) { + **trace_stream_ << "finished finding witnesses\n"; } return arena_->New(&class_type.declaration(), inst_type_args, witnesses); @@ -540,9 +541,9 @@ auto Interpreter::Convert(Nonnull value, auto Interpreter::StepExp() -> ErrorOr { Action& act = todo_.CurrentAction(); const Expression& exp = cast(act).expression(); - if (trace_) { - llvm::outs() << "--- step exp " << exp << " (" << exp.source_loc() - << ") --->\n"; + if (trace_stream_) { + **trace_stream_ << "--- step exp " << exp << " (" << exp.source_loc() + << ") --->\n"; } switch (exp.kind()) { case ExpressionKind::IndexExpression: { @@ -697,8 +698,9 @@ auto Interpreter::StepExp() -> ErrorOr { const FunctionValue& fun_val = cast(*act.results()[0]); const FunctionDeclaration& function = fun_val.declaration(); - if (trace_) { - llvm::outs() << "*** call function " << function.name() << "\n"; + if (trace_stream_) { + **trace_stream_ << "*** call function " << function.name() + << "\n"; } ASSIGN_OR_RETURN(Nonnull converted_args, Convert(act.results()[1], @@ -920,9 +922,9 @@ auto Interpreter::StepExp() -> ErrorOr { auto Interpreter::StepPattern() -> ErrorOr { Action& act = todo_.CurrentAction(); const Pattern& pattern = cast(act).pattern(); - if (trace_) { - llvm::outs() << "--- step pattern " << pattern << " (" - << pattern.source_loc() << ") --->\n"; + if (trace_stream_) { + **trace_stream_ << "--- step pattern " << pattern << " (" + << pattern.source_loc() << ") --->\n"; } switch (pattern.kind()) { case PatternKind::AutoPattern: { @@ -991,10 +993,10 @@ auto Interpreter::StepPattern() -> ErrorOr { auto Interpreter::StepStmt() -> ErrorOr { Action& act = todo_.CurrentAction(); const Statement& stmt = cast(act).statement(); - if (trace_) { - llvm::outs() << "--- step stmt "; - stmt.PrintDepth(1, llvm::outs()); - llvm::outs() << " (" << stmt.source_loc() << ") --->\n"; + if (trace_stream_) { + **trace_stream_ << "--- step stmt "; + stmt.PrintDepth(1, **trace_stream_); + **trace_stream_ << " (" << stmt.source_loc() << ") --->\n"; } switch (stmt.kind()) { case StatementKind::Match: { @@ -1211,8 +1213,9 @@ auto Interpreter::StepStmt() -> ErrorOr { auto Interpreter::StepDeclaration() -> ErrorOr { Action& act = todo_.CurrentAction(); const Declaration& decl = cast(act).declaration(); - if (trace_) { - llvm::outs() << "--- step declaration (" << decl.source_loc() << ") --->\n"; + if (trace_stream_) { + **trace_stream_ << "--- step declaration (" << decl.source_loc() + << ") --->\n"; } switch (decl.kind()) { case DeclarationKind::VariableDeclaration: { @@ -1266,24 +1269,25 @@ auto Interpreter::Step() -> ErrorOr { auto Interpreter::RunAllSteps(std::unique_ptr action) -> ErrorOr { - if (trace_) { - PrintState(llvm::outs()); + if (trace_stream_) { + PrintState(**trace_stream_); } todo_.Start(std::move(action)); while (!todo_.IsEmpty()) { RETURN_IF_ERROR(Step()); - if (trace_) { - PrintState(llvm::outs()); + if (trace_stream_) { + PrintState(**trace_stream_); } } return Success(); } -auto InterpProgram(const AST& ast, Nonnull arena, bool trace) +auto InterpProgram(const AST& ast, Nonnull arena, + std::optional> trace_stream) -> ErrorOr { - Interpreter interpreter(Phase::RunTime, arena, trace); - if (trace) { - llvm::outs() << "********** initializing globals **********\n"; + Interpreter interpreter(Phase::RunTime, arena, trace_stream); + if (trace_stream) { + **trace_stream << "********** initializing globals **********\n"; } for (Nonnull declaration : ast.declarations) { @@ -1291,8 +1295,8 @@ auto InterpProgram(const AST& ast, Nonnull arena, bool trace) std::make_unique(declaration))); } - if (trace) { - llvm::outs() << "********** calling main function **********\n"; + if (trace_stream) { + **trace_stream << "********** calling main function **********\n"; } RETURN_IF_ERROR(interpreter.RunAllSteps( @@ -1301,17 +1305,19 @@ auto InterpProgram(const AST& ast, Nonnull arena, bool trace) return cast(*interpreter.result()).value(); } -auto InterpExp(Nonnull e, Nonnull arena, bool trace) +auto InterpExp(Nonnull e, Nonnull arena, + std::optional> trace_stream) -> ErrorOr> { - Interpreter interpreter(Phase::CompileTime, arena, trace); + Interpreter interpreter(Phase::CompileTime, arena, trace_stream); RETURN_IF_ERROR( interpreter.RunAllSteps(std::make_unique(e))); return interpreter.result(); } -auto InterpPattern(Nonnull p, Nonnull arena, bool trace) +auto InterpPattern(Nonnull p, Nonnull arena, + std::optional> trace_stream) -> ErrorOr> { - Interpreter interpreter(Phase::CompileTime, arena, trace); + Interpreter interpreter(Phase::CompileTime, arena, trace_stream); RETURN_IF_ERROR(interpreter.RunAllSteps(std::make_unique(p))); return interpreter.result(); } diff --git a/executable_semantics/interpreter/interpreter.h b/executable_semantics/interpreter/interpreter.h index 91dc8673ab97..3519e74579fb 100644 --- a/executable_semantics/interpreter/interpreter.h +++ b/executable_semantics/interpreter/interpreter.h @@ -23,19 +23,22 @@ namespace Carbon { // Interprets the program defined by `ast`, allocating values on `arena` and // printing traces if `trace` is true. -auto InterpProgram(const AST& ast, Nonnull arena, bool trace) +auto InterpProgram(const AST& ast, Nonnull arena, + std::optional> trace_stream) -> ErrorOr; // Interprets `e` at compile-time, allocating values on `arena` and // printing traces if `trace` is true. The caller must ensure that all the // code this evaluates has been typechecked. -auto InterpExp(Nonnull e, Nonnull arena, bool trace) +auto InterpExp(Nonnull e, Nonnull arena, + std::optional> trace_stream) -> ErrorOr>; // Interprets `p` at compile-time, allocating values on `arena` and // printing traces if `trace` is true. The caller must ensure that all the // code this evaluates has been typechecked. -auto InterpPattern(Nonnull p, Nonnull arena, bool trace) +auto InterpPattern(Nonnull p, Nonnull arena, + std::optional> trace_stream) -> ErrorOr>; // Attempts to match `v` against the pattern `p`, returning whether matching diff --git a/executable_semantics/interpreter/type_checker.cpp b/executable_semantics/interpreter/type_checker.cpp index 4044001268d6..f94ac3f0fd44 100644 --- a/executable_semantics/interpreter/type_checker.cpp +++ b/executable_semantics/interpreter/type_checker.cpp @@ -432,9 +432,9 @@ auto TypeChecker::Substitute( } Nonnull new_class_type = arena_->New(&class_type.declaration(), type_args); - if (trace_) { - llvm::outs() << "substitution: " << class_type << " => " - << *new_class_type << "\n"; + if (trace_stream_) { + **trace_stream_ << "substitution: " << class_type << " => " + << *new_class_type << "\n"; } return new_class_type; } @@ -473,11 +473,11 @@ auto TypeChecker::Substitute( auto TypeChecker::TypeCheckExp(Nonnull e, const ImplScope& impl_scope) -> ErrorOr { - if (trace_) { - llvm::outs() << "checking expression " << *e; - llvm::outs() << "\nconstants: "; - PrintConstants(llvm::outs()); - llvm::outs() << "\n"; + if (trace_stream_) { + **trace_stream_ << "checking expression " << *e; + **trace_stream_ << "\nconstants: "; + PrintConstants(**trace_stream_); + **trace_stream_ << "\n"; } switch (e->kind()) { case ExpressionKind::IndexExpression: { @@ -492,7 +492,7 @@ auto TypeChecker::TypeCheckExp(Nonnull e, "tuple index", arena_->New(), &index.offset().static_type())); ASSIGN_OR_RETURN(auto offset_value, - InterpExp(&index.offset(), arena_, trace_)); + InterpExp(&index.offset(), arena_, trace_stream_)); int i = cast(*offset_value).value(); if (i < 0 || i >= static_cast(tuple_type.elements().size())) { return CompilationError(e->source_loc()) @@ -541,7 +541,7 @@ auto TypeChecker::TypeCheckExp(Nonnull e, for (auto& arg : struct_type.fields()) { RETURN_IF_ERROR(TypeCheckExp(&arg.expression(), impl_scope)); ASSIGN_OR_RETURN(auto value, - InterpExp(&arg.expression(), arena_, trace_)); + InterpExp(&arg.expression(), arena_, trace_stream_)); RETURN_IF_ERROR( ExpectIsConcreteType(arg.expression().source_loc(), value)); } @@ -690,8 +690,9 @@ auto TypeChecker::TypeCheckExp(Nonnull e, // If `T` is a type variable and `foo` is a class function in an // interface implemented by `T`, then `T.foo` accesses the `foo` class // function of `T`. - ASSIGN_OR_RETURN(Nonnull var_addr, - InterpExp(&access.aggregate(), arena_, trace_)); + ASSIGN_OR_RETURN( + Nonnull var_addr, + InterpExp(&access.aggregate(), arena_, trace_stream_)); const VariableType& var_type = cast(*var_addr); const InterfaceType& iface_type = cast(aggregate_type); const InterfaceDeclaration& iface_decl = iface_type.declaration(); @@ -903,11 +904,12 @@ auto TypeChecker::TypeCheckExp(Nonnull e, .declaration(); BindingMap generic_args; if (class_decl.type_params().has_value()) { - if (trace_) { - llvm::outs() << "pattern matching type params and args "; + if (trace_stream_) { + **trace_stream_ << "pattern matching type params and args "; } - ASSIGN_OR_RETURN(Nonnull arg, - InterpExp(&call.argument(), arena_, trace_)); + ASSIGN_OR_RETURN( + Nonnull arg, + InterpExp(&call.argument(), arena_, trace_stream_)); CHECK(PatternMatch(&(*class_decl.type_params())->value(), arg, call.source_loc(), std::nullopt, generic_args)); } else { @@ -957,11 +959,11 @@ auto TypeChecker::TypeCheckExp(Nonnull e, case ExpressionKind::FunctionTypeLiteral: { auto& fn = cast(*e); ASSIGN_OR_RETURN(Nonnull param_type, - InterpExp(&fn.parameter(), arena_, trace_)); + InterpExp(&fn.parameter(), arena_, trace_stream_)); RETURN_IF_ERROR( ExpectIsConcreteType(fn.parameter().source_loc(), param_type)); ASSIGN_OR_RETURN(Nonnull ret_type, - InterpExp(&fn.return_type(), arena_, trace_)); + InterpExp(&fn.return_type(), arena_, trace_stream_)); RETURN_IF_ERROR( ExpectIsConcreteType(fn.return_type().source_loc(), ret_type)); fn.set_static_type(arena_->New()); @@ -1022,9 +1024,9 @@ auto TypeChecker::TypeCheckExp(Nonnull e, auto& array_literal = cast(*e); RETURN_IF_ERROR( TypeCheckExp(&array_literal.element_type_expression(), impl_scope)); - ASSIGN_OR_RETURN( - Nonnull element_type, - InterpExp(&array_literal.element_type_expression(), arena_, trace_)); + ASSIGN_OR_RETURN(Nonnull element_type, + InterpExp(&array_literal.element_type_expression(), + arena_, trace_stream_)); RETURN_IF_ERROR(ExpectIsConcreteType( array_literal.element_type_expression().source_loc(), element_type)); @@ -1036,7 +1038,7 @@ auto TypeChecker::TypeCheckExp(Nonnull e, &array_literal.size_expression().static_type())); ASSIGN_OR_RETURN( Nonnull size_value, - InterpExp(&array_literal.size_expression(), arena_, trace_)); + InterpExp(&array_literal.size_expression(), arena_, trace_stream_)); if (cast(size_value)->value() < 0) { return CompilationError(array_literal.size_expression().source_loc()) << "Array size cannot be negative"; @@ -1087,14 +1089,14 @@ auto TypeChecker::TypeCheckPattern( Nonnull p, std::optional> expected, const ImplScope& impl_scope, ValueCategory enclosing_value_category) -> ErrorOr { - if (trace_) { - llvm::outs() << "checking pattern " << *p; + if (trace_stream_) { + **trace_stream_ << "checking pattern " << *p; if (expected) { - llvm::outs() << ", expecting " << **expected; + **trace_stream_ << ", expecting " << **expected; } - llvm::outs() << "\nconstants: "; - PrintConstants(llvm::outs()); - llvm::outs() << "\n"; + **trace_stream_ << "\nconstants: "; + PrintConstants(**trace_stream_); + **trace_stream_ << "\n"; } switch (p->kind()) { case PatternKind::AutoPattern: { @@ -1110,7 +1112,7 @@ auto TypeChecker::TypeCheckPattern( RETURN_IF_ERROR(TypeCheckPattern(&binding.type(), std::nullopt, impl_scope, enclosing_value_category)); ASSIGN_OR_RETURN(Nonnull type, - InterpPattern(&binding.type(), arena_, trace_)); + InterpPattern(&binding.type(), arena_, trace_stream_)); if (expected) { if (IsConcreteType(type)) { RETURN_IF_ERROR( @@ -1129,7 +1131,7 @@ auto TypeChecker::TypeCheckPattern( RETURN_IF_ERROR(ExpectIsConcreteType(binding.source_loc(), type)); binding.set_static_type(type); ASSIGN_OR_RETURN(Nonnull binding_value, - InterpPattern(&binding, arena_, trace_)); + InterpPattern(&binding, arena_, trace_stream_)); SetValue(&binding, binding_value); if (!binding.has_value_category()) { @@ -1141,7 +1143,7 @@ auto TypeChecker::TypeCheckPattern( auto& binding = cast(*p); RETURN_IF_ERROR(TypeCheckExp(&binding.type(), impl_scope)); ASSIGN_OR_RETURN(Nonnull type, - InterpExp(&binding.type(), arena_, trace_)); + InterpExp(&binding.type(), arena_, trace_stream_)); if (expected) { return CompilationError(binding.type().source_loc()) << "Generic binding may not occur in pattern with expected " @@ -1150,7 +1152,7 @@ auto TypeChecker::TypeCheckPattern( } binding.set_static_type(type); ASSIGN_OR_RETURN(Nonnull val, - InterpPattern(&binding, arena_, trace_)); + InterpPattern(&binding, arena_, trace_stream_)); binding.set_symbolic_identity(val); Nonnull impl_binding = arena_->New( binding.source_loc(), &binding, &binding.static_type()); @@ -1177,14 +1179,14 @@ auto TypeChecker::TypeCheckPattern( } RETURN_IF_ERROR(TypeCheckPattern(field, expected_field_type, impl_scope, enclosing_value_category)); - if (trace_) - llvm::outs() << "finished checking tuple pattern field " << *field - << "\n"; + if (trace_stream_) + **trace_stream_ << "finished checking tuple pattern field " << *field + << "\n"; field_types.push_back(&field->static_type()); } tuple.set_static_type(arena_->New(std::move(field_types))); ASSIGN_OR_RETURN(Nonnull tuple_value, - InterpPattern(&tuple, arena_, trace_)); + InterpPattern(&tuple, arena_, trace_stream_)); SetValue(&tuple, tuple_value); return Success(); } @@ -1217,7 +1219,7 @@ auto TypeChecker::TypeCheckPattern( enclosing_value_category)); alternative.set_static_type(&choice_type); ASSIGN_OR_RETURN(Nonnull alternative_value, - InterpPattern(&alternative, arena_, trace_)); + InterpPattern(&alternative, arena_, trace_stream_)); SetValue(&alternative, alternative_value); return Success(); } @@ -1226,7 +1228,7 @@ auto TypeChecker::TypeCheckPattern( RETURN_IF_ERROR(TypeCheckExp(&expression, impl_scope)); p->set_static_type(&expression.static_type()); ASSIGN_OR_RETURN(Nonnull expr_value, - InterpPattern(p, arena_, trace_)); + InterpPattern(p, arena_, trace_stream_)); SetValue(p, expr_value); return Success(); } @@ -1238,7 +1240,7 @@ auto TypeChecker::TypeCheckPattern( let_var_pattern.value_category())); let_var_pattern.set_static_type(&let_var_pattern.pattern().static_type()); ASSIGN_OR_RETURN(Nonnull pattern_value, - InterpPattern(&let_var_pattern, arena_, trace_)); + InterpPattern(&let_var_pattern, arena_, trace_stream_)); SetValue(&let_var_pattern, pattern_value); return Success(); } @@ -1247,8 +1249,8 @@ auto TypeChecker::TypeCheckPattern( auto TypeChecker::TypeCheckStmt(Nonnull s, const ImplScope& impl_scope) -> ErrorOr { - if (trace_) { - llvm::outs() << "checking statement " << *s << "\n"; + if (trace_stream_) { + **trace_stream_ << "checking statement " << *s << "\n"; } switch (s->kind()) { case StatementKind::Match: { @@ -1438,15 +1440,15 @@ auto TypeChecker::ExpectReturnOnAllPaths( auto TypeChecker::DeclareFunctionDeclaration(Nonnull f, const ImplScope& enclosing_scope) -> ErrorOr { - if (trace_) { - llvm::outs() << "** declaring function " << f->name() << "\n"; + if (trace_stream_) { + **trace_stream_ << "** declaring function " << f->name() << "\n"; } // Bring the deduced parameters into scope for (Nonnull deduced : f->deduced_parameters()) { RETURN_IF_ERROR(TypeCheckExp(&deduced->type(), enclosing_scope)); deduced->set_symbolic_identity(arena_->New(deduced)); ASSIGN_OR_RETURN(Nonnull type_of_type, - InterpExp(&deduced->type(), arena_, trace_)); + InterpExp(&deduced->type(), arena_, trace_stream_)); deduced->set_static_type(type_of_type); } // Create the impl_bindings @@ -1486,7 +1488,7 @@ auto TypeChecker::DeclareFunctionDeclaration(Nonnull f, // Should we be doing SetConstantValue instead? -Jeremy // And shouldn't the type of this be Type? ASSIGN_OR_RETURN(Nonnull ret_type, - InterpExp(*return_expression, arena_, trace_)); + InterpExp(*return_expression, arena_, trace_stream_)); f->return_term().set_static_type(ret_type); } else if (f->return_term().is_omitted()) { f->return_term().set_static_type(TupleValue::Empty()); @@ -1520,9 +1522,9 @@ auto TypeChecker::DeclareFunctionDeclaration(Nonnull f, // TODO: Check that main doesn't have any parameters. } - if (trace_) { - llvm::outs() << "** finished declaring function " << f->name() - << " of type " << f->static_type() << "\n"; + if (trace_stream_) { + **trace_stream_ << "** finished declaring function " << f->name() + << " of type " << f->static_type() << "\n"; } return Success(); } @@ -1530,8 +1532,8 @@ auto TypeChecker::DeclareFunctionDeclaration(Nonnull f, auto TypeChecker::TypeCheckFunctionDeclaration(Nonnull f, const ImplScope& impl_scope) -> ErrorOr { - if (trace_) { - llvm::outs() << "** checking function " << f->name() << "\n"; + if (trace_stream_) { + **trace_stream_ << "** checking function " << f->name() << "\n"; } // if f->return_term().is_auto(), the function body was already // type checked in DeclareFunctionDeclaration @@ -1546,15 +1548,15 @@ auto TypeChecker::TypeCheckFunctionDeclaration(Nonnull f, *impl_binding->type_var()->symbolic_identity(), impl_binding); } - if (trace_) - llvm::outs() << function_scope; + if (trace_stream_) + **trace_stream_ << function_scope; RETURN_IF_ERROR(TypeCheckStmt(*f->body(), function_scope)); if (!f->return_term().is_omitted()) { RETURN_IF_ERROR(ExpectReturnOnAllPaths(f->body(), f->source_loc())); } } - if (trace_) { - llvm::outs() << "** finished checking function " << f->name() << "\n"; + if (trace_stream_) { + **trace_stream_ << "** finished checking function " << f->name() << "\n"; } return Success(); } @@ -1562,8 +1564,8 @@ auto TypeChecker::TypeCheckFunctionDeclaration(Nonnull f, auto TypeChecker::DeclareClassDeclaration(Nonnull class_decl, ImplScope& enclosing_scope) -> ErrorOr { - if (trace_) { - llvm::outs() << "** declaring class " << class_decl->name() << "\n"; + if (trace_stream_) { + **trace_stream_ << "** declaring class " << class_decl->name() << "\n"; } if (class_decl->type_params().has_value()) { ImplScope class_scope; @@ -1571,8 +1573,8 @@ auto TypeChecker::DeclareClassDeclaration(Nonnull class_decl, RETURN_IF_ERROR(TypeCheckPattern(*class_decl->type_params(), std::nullopt, class_scope, ValueCategory::Let)); AddPatternImpls(*class_decl->type_params(), class_scope); - if (trace_) { - llvm::outs() << class_scope; + if (trace_stream_) { + **trace_stream_ << class_scope; } Nonnull class_type = @@ -1598,9 +1600,9 @@ auto TypeChecker::DeclareClassDeclaration(Nonnull class_decl, RETURN_IF_ERROR(DeclareDeclaration(m, enclosing_scope)); } } - if (trace_) { - llvm::outs() << "** finished declaring class " << class_decl->name() - << "\n"; + if (trace_stream_) { + **trace_stream_ << "** finished declaring class " << class_decl->name() + << "\n"; } return Success(); } @@ -1608,22 +1610,23 @@ auto TypeChecker::DeclareClassDeclaration(Nonnull class_decl, auto TypeChecker::TypeCheckClassDeclaration( Nonnull class_decl, const ImplScope& impl_scope) -> ErrorOr { - if (trace_) { - llvm::outs() << "** checking class " << class_decl->name() << "\n"; + if (trace_stream_) { + **trace_stream_ << "** checking class " << class_decl->name() << "\n"; } ImplScope class_scope; class_scope.AddParent(&impl_scope); if (class_decl->type_params().has_value()) { AddPatternImpls(*class_decl->type_params(), class_scope); } - if (trace_) { - llvm::outs() << class_scope; + if (trace_stream_) { + **trace_stream_ << class_scope; } for (Nonnull m : class_decl->members()) { RETURN_IF_ERROR(TypeCheckDeclaration(m, class_scope)); } - if (trace_) { - llvm::outs() << "** finished checking class " << class_decl->name() << "\n"; + if (trace_stream_) { + **trace_stream_ << "** finished checking class " << class_decl->name() + << "\n"; } return Success(); } @@ -1659,18 +1662,18 @@ auto TypeChecker::TypeCheckInterfaceDeclaration( auto TypeChecker::DeclareImplDeclaration(Nonnull impl_decl, ImplScope& enclosing_scope) -> ErrorOr { - if (trace_) { - llvm::outs() << "declaring " << *impl_decl << "\n"; + if (trace_stream_) { + **trace_stream_ << "declaring " << *impl_decl << "\n"; } RETURN_IF_ERROR(TypeCheckExp(&impl_decl->interface(), enclosing_scope)); ASSIGN_OR_RETURN(Nonnull iface_type, - InterpExp(&impl_decl->interface(), arena_, trace_)); + InterpExp(&impl_decl->interface(), arena_, trace_stream_)); const auto& iface_decl = cast(*iface_type).declaration(); impl_decl->set_interface_type(iface_type); RETURN_IF_ERROR(TypeCheckExp(impl_decl->impl_type(), enclosing_scope)); ASSIGN_OR_RETURN(Nonnull impl_type_value, - InterpExp(impl_decl->impl_type(), arena_, trace_)); + InterpExp(impl_decl->impl_type(), arena_, trace_stream_)); enclosing_scope.Add(iface_type, impl_type_value, impl_decl); for (Nonnull m : impl_decl->members()) { @@ -1704,14 +1707,14 @@ auto TypeChecker::DeclareImplDeclaration(Nonnull impl_decl, auto TypeChecker::TypeCheckImplDeclaration(Nonnull impl_decl, const ImplScope& impl_scope) -> ErrorOr { - if (trace_) { - llvm::outs() << "checking " << *impl_decl << "\n"; + if (trace_stream_) { + **trace_stream_ << "checking " << *impl_decl << "\n"; } for (Nonnull m : impl_decl->members()) { RETURN_IF_ERROR(TypeCheckDeclaration(m, impl_scope)); } - if (trace_) { - llvm::outs() << "finished checking impl\n"; + if (trace_stream_) { + **trace_stream_ << "finished checking impl\n"; } return Success(); } @@ -1722,8 +1725,8 @@ auto TypeChecker::DeclareChoiceDeclaration(Nonnull choice, std::vector alternatives; for (Nonnull alternative : choice->alternatives()) { RETURN_IF_ERROR(TypeCheckExp(&alternative->signature(), enclosing_scope)); - ASSIGN_OR_RETURN(auto signature, - InterpExp(&alternative->signature(), arena_, trace_)); + ASSIGN_OR_RETURN(auto signature, InterpExp(&alternative->signature(), + arena_, trace_stream_)); alternatives.push_back({.name = alternative->name(), .value = signature}); } auto ct = arena_->New(choice->name(), std::move(alternatives)); @@ -1849,7 +1852,7 @@ auto TypeChecker::DeclareDeclaration(Nonnull d, RETURN_IF_ERROR(TypeCheckPattern(&var.binding(), std::nullopt, enclosing_scope, var.value_category())); ASSIGN_OR_RETURN(Nonnull declared_type, - InterpExp(&type, arena_, trace_)); + InterpExp(&type, arena_, trace_stream_)); var.set_static_type(declared_type); break; } diff --git a/executable_semantics/interpreter/type_checker.h b/executable_semantics/interpreter/type_checker.h index 8e0e973243e0..7f571e617ea9 100644 --- a/executable_semantics/interpreter/type_checker.h +++ b/executable_semantics/interpreter/type_checker.h @@ -20,8 +20,9 @@ namespace Carbon { class TypeChecker { public: - explicit TypeChecker(Nonnull arena, bool trace) - : arena_(arena), trace_(trace) {} + explicit TypeChecker(Nonnull arena, + std::optional> trace_stream) + : arena_(arena), trace_stream_(trace_stream) {} // Type-checks `ast` and sets properties such as `static_type`, as documented // on the individual nodes. @@ -176,7 +177,7 @@ class TypeChecker { Nonnull arena_; std::set constants_; - bool trace_; + std::optional> trace_stream_; }; } // namespace Carbon diff --git a/executable_semantics/main.cpp b/executable_semantics/main.cpp index 7a8cecc8e7ad..c6c724a02ac6 100644 --- a/executable_semantics/main.cpp +++ b/executable_semantics/main.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -20,6 +21,7 @@ #include "executable_semantics/syntax/prelude.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/InitLLVM.h" +#include "llvm/Support/raw_ostream.h" namespace Carbon { @@ -37,23 +39,45 @@ static auto Main(llvm::StringRef default_prelude_file, int argc, char* argv[]) // is piped to stdout. llvm::errs().tie(&llvm::outs()); - cl::opt trace_option("trace", cl::desc("Enable tracing")); cl::opt input_file_name(cl::Positional, cl::desc(""), cl::Required); + cl::opt parser_debug("parser_debug", + cl::desc("Enable debug output from the parser")); + cl::opt trace_file_name( + "trace_file", + cl::desc("Output file for tracing; set to `-` to output to stdout.")); // Find the path of the executable if possible and use that as a relative root cl::opt prelude_file_name("prelude", cl::desc(""), cl::init(default_prelude_file.str())); cl::ParseCommandLineOptions(argc, argv); + // Set up a stream for trace output. + std::unique_ptr scoped_trace_stream; + std::optional> trace_stream; + if (!trace_file_name.empty()) { + if (trace_file_name == "-") { + trace_stream = &llvm::outs(); + } else { + std::error_code err; + scoped_trace_stream = + std::make_unique(trace_file_name, err); + if (err) { + return Error(err.message()); + } + trace_stream = scoped_trace_stream.get(); + } + } + Arena arena; - ASSIGN_OR_RETURN(AST ast, Parse(&arena, input_file_name, trace_option)); + ASSIGN_OR_RETURN(AST ast, Parse(&arena, input_file_name, parser_debug)); AddPrelude(prelude_file_name, &arena, &ast.declarations); // Typecheck and run the parsed program. - ASSIGN_OR_RETURN(int unused_return_code, - ExecProgram(&arena, ast, trace_option)); - (void)unused_return_code; + ASSIGN_OR_RETURN(int return_code, ExecProgram(&arena, ast, trace_stream)); + // Print the return code to stdout even when we aren't tracing. + (trace_stream ? **trace_stream : llvm::outs()) + << "result: " << return_code << "\n"; return Success(); } diff --git a/executable_semantics/syntax/parse.cpp b/executable_semantics/syntax/parse.cpp index 1c4c8eec3d29..585795dc2ce2 100644 --- a/executable_semantics/syntax/parse.cpp +++ b/executable_semantics/syntax/parse.cpp @@ -14,15 +14,17 @@ namespace Carbon { -auto ParseImpl(yyscan_t scanner, Nonnull arena, - std::string_view input_file_name, bool trace) -> ErrorOr { +static auto ParseImpl(yyscan_t scanner, Nonnull arena, + std::string_view input_file_name, bool parser_debug) + -> ErrorOr { // Prepare other parser arguments. std::optional ast = std::nullopt; - ParseAndLexContext context(arena->New(input_file_name), trace); + ParseAndLexContext context(arena->New(input_file_name), + parser_debug); // Do the parse. auto parser = Parser(arena, scanner, context, &ast); - if (trace) { + if (parser_debug) { parser.set_debug_level(1); } @@ -39,8 +41,8 @@ auto ParseImpl(yyscan_t scanner, Nonnull arena, return *ast; } -auto Parse(Nonnull arena, std::string_view input_file_name, bool trace) - -> ErrorOr { +auto Parse(Nonnull arena, std::string_view input_file_name, + bool parser_debug) -> ErrorOr { std::string name_str(input_file_name); FILE* input_file = fopen(name_str.c_str(), "r"); if (input_file == nullptr) { @@ -54,7 +56,8 @@ auto Parse(Nonnull arena, std::string_view input_file_name, bool trace) auto buffer = yy_create_buffer(input_file, YY_BUF_SIZE, scanner); yy_switch_to_buffer(buffer, scanner); - ErrorOr result = ParseImpl(scanner, arena, input_file_name, trace); + ErrorOr result = + ParseImpl(scanner, arena, input_file_name, parser_debug); // Clean up the lexer. yy_delete_buffer(buffer, scanner); @@ -65,7 +68,7 @@ auto Parse(Nonnull arena, std::string_view input_file_name, bool trace) } auto ParseFromString(Nonnull arena, std::string_view input_file_name, - std::string_view file_contents, bool trace) + std::string_view file_contents, bool parser_debug) -> ErrorOr { // Prepare the lexer. yyscan_t scanner; @@ -74,7 +77,8 @@ auto ParseFromString(Nonnull arena, std::string_view input_file_name, yy_scan_bytes(file_contents.data(), file_contents.size(), scanner); yy_switch_to_buffer(buffer, scanner); - ErrorOr result = ParseImpl(scanner, arena, input_file_name, trace); + ErrorOr result = + ParseImpl(scanner, arena, input_file_name, parser_debug); // Clean up the lexer. yy_delete_buffer(buffer, scanner); diff --git a/executable_semantics/syntax/parse.h b/executable_semantics/syntax/parse.h index cf3f0e7d96d7..8f88fb9ec99e 100644 --- a/executable_semantics/syntax/parse.h +++ b/executable_semantics/syntax/parse.h @@ -15,14 +15,14 @@ namespace Carbon { // Returns the AST representing the contents of the named file, or an error code // if parsing fails. Allocations go into the provided arena. -auto Parse(Nonnull arena, std::string_view input_file_name, bool trace) - -> ErrorOr; +auto Parse(Nonnull arena, std::string_view input_file_name, + bool parser_debug) -> ErrorOr; // Equivalent to `Parse`, but parses the contents of `file_contents`. // `input_file_name` is used only for reporting source locations, and does // not need to name a real file. auto ParseFromString(Nonnull arena, std::string_view input_file_name, - std::string_view file_contents, bool trace) + std::string_view file_contents, bool parser_debug) -> ErrorOr; } // namespace Carbon diff --git a/executable_semantics/syntax/parse_and_lex_context.cpp b/executable_semantics/syntax/parse_and_lex_context.cpp index 868bbe62fd5a..50ed8dada19b 100644 --- a/executable_semantics/syntax/parse_and_lex_context.cpp +++ b/executable_semantics/syntax/parse_and_lex_context.cpp @@ -15,7 +15,7 @@ auto ParseAndLexContext::RecordSyntaxError(const std::string& message, // TODO: support formatting of `SourceLocation` instances with formatv(). std::string full_message; llvm::raw_string_ostream(full_message) - << (prefix_with_newline && trace() ? "\n" : "") + << (prefix_with_newline && parser_debug() ? "\n" : "") << "COMPILATION ERROR: " << source_loc() << ": " << message; error_messages_.push_back(full_message); diff --git a/executable_semantics/syntax/parse_and_lex_context.h b/executable_semantics/syntax/parse_and_lex_context.h index 87bb5807b786..351b2f292f95 100644 --- a/executable_semantics/syntax/parse_and_lex_context.h +++ b/executable_semantics/syntax/parse_and_lex_context.h @@ -17,8 +17,9 @@ namespace Carbon { class ParseAndLexContext { public: // Creates an instance analyzing the given input file. - ParseAndLexContext(Nonnull input_file_name, bool trace) - : input_file_name_(input_file_name), trace_(trace) {} + ParseAndLexContext(Nonnull input_file_name, + bool parser_debug) + : input_file_name_(input_file_name), parser_debug_(parser_debug) {} // Formats ands records a lexer error. Returns an error token as a // convenience. @@ -31,7 +32,7 @@ class ParseAndLexContext { static_cast(current_token_position.begin.line)); } - auto trace() const -> bool { return trace_; } + auto parser_debug() const -> bool { return parser_debug_; } // The source range of the token being (or just) lex'd. location current_token_position; @@ -45,7 +46,7 @@ class ParseAndLexContext { // when *this is called. Nonnull input_file_name_; - bool trace_; + bool parser_debug_; std::vector error_messages_; }; diff --git a/executable_semantics/testdata/array/fail_index.carbon b/executable_semantics/testdata/array/fail_index.carbon index 622612203bf7..a3630e144159 100644 --- a/executable_semantics/testdata/array/fail_index.carbon +++ b/executable_semantics/testdata/array/fail_index.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: RUNTIME ERROR: {{.*}}/executable_semantics/testdata/array/fail_index.carbon:16: index 2 out of range in (0, 1) diff --git a/executable_semantics/testdata/array/fail_negative_size.carbon b/executable_semantics/testdata/array/fail_negative_size.carbon index a73335f4b0c6..73a0118deda1 100644 --- a/executable_semantics/testdata/array/fail_negative_size.carbon +++ b/executable_semantics/testdata/array/fail_negative_size.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/array/fail_negative_size.carbon:15: Array size cannot be negative diff --git a/executable_semantics/testdata/array/fail_size_mismatch.carbon b/executable_semantics/testdata/array/fail_size_mismatch.carbon index 8d54b9732766..cf7b18d1fba0 100644 --- a/executable_semantics/testdata/array/fail_size_mismatch.carbon +++ b/executable_semantics/testdata/array/fail_size_mismatch.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/array/fail_size_mismatch.carbon:15: type error in name binding: '(i32, i32, i32)' is not implicitly convertible to '[i32; 2]' diff --git a/executable_semantics/testdata/array/index.carbon b/executable_semantics/testdata/array/index.carbon index 753809a3db02..6f4625e424db 100644 --- a/executable_semantics/testdata/array/index.carbon +++ b/executable_semantics/testdata/array/index.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/array/nested.carbon b/executable_semantics/testdata/array/nested.carbon index 339426a8da42..94ef3e54f8e6 100644 --- a/executable_semantics/testdata/array/nested.carbon +++ b/executable_semantics/testdata/array/nested.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/assignment_copy/destruct_original.carbon b/executable_semantics/testdata/assignment_copy/destruct_original.carbon index ffc6e9f56844..623d8def8fb1 100644 --- a/executable_semantics/testdata/assignment_copy/destruct_original.carbon +++ b/executable_semantics/testdata/assignment_copy/destruct_original.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/assignment_copy/reassign_original.carbon b/executable_semantics/testdata/assignment_copy/reassign_original.carbon index 1e4052150f5b..fce5e77564fc 100644 --- a/executable_semantics/testdata/assignment_copy/reassign_original.carbon +++ b/executable_semantics/testdata/assignment_copy/reassign_original.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/basic_syntax/choice.carbon b/executable_semantics/testdata/basic_syntax/choice.carbon index 947eb9456843..a2e8eec7117a 100644 --- a/executable_semantics/testdata/basic_syntax/choice.carbon +++ b/executable_semantics/testdata/basic_syntax/choice.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/basic_syntax/fail_assign_to_function.carbon b/executable_semantics/testdata/basic_syntax/fail_assign_to_function.carbon index ea864fc82636..6970cb36ff85 100644 --- a/executable_semantics/testdata/basic_syntax/fail_assign_to_function.carbon +++ b/executable_semantics/testdata/basic_syntax/fail_assign_to_function.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/basic_syntax/fail_assign_to_function.carbon:18: Cannot assign to rvalue 'F' diff --git a/executable_semantics/testdata/basic_syntax/fail_assign_to_rval.carbon b/executable_semantics/testdata/basic_syntax/fail_assign_to_rval.carbon index 7c5ff87ddbf1..2d43c8248f6f 100644 --- a/executable_semantics/testdata/basic_syntax/fail_assign_to_rval.carbon +++ b/executable_semantics/testdata/basic_syntax/fail_assign_to_rval.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/basic_syntax/fail_assign_to_rval.carbon:15: Cannot assign to rvalue '1' diff --git a/executable_semantics/testdata/basic_syntax/fail_invalid_char.carbon b/executable_semantics/testdata/basic_syntax/fail_invalid_char.carbon index 1095e19daa2c..cda65912dd04 100644 --- a/executable_semantics/testdata/basic_syntax/fail_invalid_char.carbon +++ b/executable_semantics/testdata/basic_syntax/fail_invalid_char.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/basic_syntax/fail_invalid_char.carbon:12: invalid character '\xEF' in source file. diff --git a/executable_semantics/testdata/basic_syntax/fail_invalid_integer.carbon b/executable_semantics/testdata/basic_syntax/fail_invalid_integer.carbon index 0d2389a25a65..e96353574994 100644 --- a/executable_semantics/testdata/basic_syntax/fail_invalid_integer.carbon +++ b/executable_semantics/testdata/basic_syntax/fail_invalid_integer.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/basic_syntax/fail_invalid_integer.carbon:15: Invalid integer literal: 11111111111111111111111111 diff --git a/executable_semantics/testdata/basic_syntax/fail_invalid_var_expression.carbon b/executable_semantics/testdata/basic_syntax/fail_invalid_var_expression.carbon index dccd4f1ef803..1df0061451e2 100644 --- a/executable_semantics/testdata/basic_syntax/fail_invalid_var_expression.carbon +++ b/executable_semantics/testdata/basic_syntax/fail_invalid_var_expression.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/basic_syntax/fail_invalid_var_expression.carbon:14: Expected expression for variable type diff --git a/executable_semantics/testdata/basic_syntax/fail_missing_var.carbon b/executable_semantics/testdata/basic_syntax/fail_missing_var.carbon index 31f8f6c0943f..885644a2afa5 100644 --- a/executable_semantics/testdata/basic_syntax/fail_missing_var.carbon +++ b/executable_semantics/testdata/basic_syntax/fail_missing_var.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/basic_syntax/fail_missing_var.carbon:16: syntax error, unexpected COLON, expecting EQUAL or SEMICOLON diff --git a/executable_semantics/testdata/basic_syntax/fail_nested_binding.carbon b/executable_semantics/testdata/basic_syntax/fail_nested_binding.carbon index 8b233397bd0a..3510f004993c 100644 --- a/executable_semantics/testdata/basic_syntax/fail_nested_binding.carbon +++ b/executable_semantics/testdata/basic_syntax/fail_nested_binding.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/basic_syntax/fail_nested_binding.carbon:15: The type of a binding pattern cannot contain bindings. diff --git a/executable_semantics/testdata/basic_syntax/fail_unimplemented_example.carbon b/executable_semantics/testdata/basic_syntax/fail_unimplemented_example.carbon index 691bedd06d2e..1279c4dc08ec 100644 --- a/executable_semantics/testdata/basic_syntax/fail_unimplemented_example.carbon +++ b/executable_semantics/testdata/basic_syntax/fail_unimplemented_example.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/basic_syntax/fail_unimplemented_example.carbon:15: Unimplemented diff --git a/executable_semantics/testdata/basic_syntax/next.carbon b/executable_semantics/testdata/basic_syntax/next.carbon index 53d0584ae114..2517c885094a 100644 --- a/executable_semantics/testdata/basic_syntax/next.carbon +++ b/executable_semantics/testdata/basic_syntax/next.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/basic_syntax/not_compare_precedence.carbon b/executable_semantics/testdata/basic_syntax/not_compare_precedence.carbon index c5871eeb916e..891b1f1f2fbd 100644 --- a/executable_semantics/testdata/basic_syntax/not_compare_precedence.carbon +++ b/executable_semantics/testdata/basic_syntax/not_compare_precedence.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/basic_syntax/not_compare_precedence.carbon:15: syntax error, unexpected EQUAL_EQUAL, expecting SEMICOLON diff --git a/executable_semantics/testdata/basic_syntax/placeholder_variable.carbon b/executable_semantics/testdata/basic_syntax/placeholder_variable.carbon index 0014c433e612..a9383ed5109c 100644 --- a/executable_semantics/testdata/basic_syntax/placeholder_variable.carbon +++ b/executable_semantics/testdata/basic_syntax/placeholder_variable.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/basic_syntax/print.carbon b/executable_semantics/testdata/basic_syntax/print.carbon index 8453bf9336e6..8cc64900a561 100644 --- a/executable_semantics/testdata/basic_syntax/print.carbon +++ b/executable_semantics/testdata/basic_syntax/print.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: Hello world! diff --git a/executable_semantics/testdata/basic_syntax/record.carbon b/executable_semantics/testdata/basic_syntax/record.carbon index bb5016b6a1cf..b0a77111e99a 100644 --- a/executable_semantics/testdata/basic_syntax/record.carbon +++ b/executable_semantics/testdata/basic_syntax/record.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/basic_syntax/star.carbon b/executable_semantics/testdata/basic_syntax/star.carbon index 27077412ea31..f3987914093e 100644 --- a/executable_semantics/testdata/basic_syntax/star.carbon +++ b/executable_semantics/testdata/basic_syntax/star.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/basic_syntax/trace.carbon b/executable_semantics/testdata/basic_syntax/trace.carbon index fb422e4d7fa1..34418f5e6a58 100644 --- a/executable_semantics/testdata/basic_syntax/trace.carbon +++ b/executable_semantics/testdata/basic_syntax/trace.carbon @@ -2,11 +2,11 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // // A lot of output is elided: this is only checking for a few things for simple -// sanity checking on --trace output. +// sanity checking on --parser_debug --trace_file=- output. // // NOAUTOUPDATE // CHECK: ********** source program ********** diff --git a/executable_semantics/testdata/basic_syntax/var_tuple.carbon b/executable_semantics/testdata/basic_syntax/var_tuple.carbon index 19d3ab959dd0..ca52b026939d 100644 --- a/executable_semantics/testdata/basic_syntax/var_tuple.carbon +++ b/executable_semantics/testdata/basic_syntax/var_tuple.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/basic_syntax/zero.carbon b/executable_semantics/testdata/basic_syntax/zero.carbon index 73945f377051..c65ff74395ae 100644 --- a/executable_semantics/testdata/basic_syntax/zero.carbon +++ b/executable_semantics/testdata/basic_syntax/zero.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/block/empty.carbon b/executable_semantics/testdata/block/empty.carbon index 80240f924e8d..f182c2eaa2a3 100644 --- a/executable_semantics/testdata/block/empty.carbon +++ b/executable_semantics/testdata/block/empty.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/block/shadowing.carbon b/executable_semantics/testdata/block/shadowing.carbon index d4922f17ecd9..a7279d59f4ef 100644 --- a/executable_semantics/testdata/block/shadowing.carbon +++ b/executable_semantics/testdata/block/shadowing.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/class/assign.carbon b/executable_semantics/testdata/class/assign.carbon index 1648e4d74ed2..304827650500 100644 --- a/executable_semantics/testdata/class/assign.carbon +++ b/executable_semantics/testdata/class/assign.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/class/assign_member.carbon b/executable_semantics/testdata/class/assign_member.carbon index 9560d963704f..91379af5fc99 100644 --- a/executable_semantics/testdata/class/assign_member.carbon +++ b/executable_semantics/testdata/class/assign_member.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/class/bound_method.carbon b/executable_semantics/testdata/class/bound_method.carbon index 70f1a6beede3..6f83892ede57 100644 --- a/executable_semantics/testdata/class/bound_method.carbon +++ b/executable_semantics/testdata/class/bound_method.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/class/class_function.carbon b/executable_semantics/testdata/class/class_function.carbon index 8a191eaea2d1..94b451c6a09f 100644 --- a/executable_semantics/testdata/class/class_function.carbon +++ b/executable_semantics/testdata/class/class_function.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/class/class_function_from_instance.carbon b/executable_semantics/testdata/class/class_function_from_instance.carbon index 7ca4e329f100..1131b5642207 100644 --- a/executable_semantics/testdata/class/class_function_from_instance.carbon +++ b/executable_semantics/testdata/class/class_function_from_instance.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/class/class_function_value.carbon b/executable_semantics/testdata/class/class_function_value.carbon index f8befe1eca43..3661ca1e1e75 100644 --- a/executable_semantics/testdata/class/class_function_value.carbon +++ b/executable_semantics/testdata/class/class_function_value.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/class/fail_field_access_mismatch.carbon b/executable_semantics/testdata/class/fail_field_access_mismatch.carbon index f3defcc54acc..9d85f79c45c6 100644 --- a/executable_semantics/testdata/class/fail_field_access_mismatch.carbon +++ b/executable_semantics/testdata/class/fail_field_access_mismatch.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/class/fail_field_access_mismatch.carbon:21: class Point does not have a field named z diff --git a/executable_semantics/testdata/class/fail_field_mismatch.carbon b/executable_semantics/testdata/class/fail_field_mismatch.carbon index b1435c19072a..320b907fcbe5 100644 --- a/executable_semantics/testdata/class/fail_field_mismatch.carbon +++ b/executable_semantics/testdata/class/fail_field_mismatch.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/class/fail_field_mismatch.carbon:20: type error in name binding: '{.x: i32, .z: i32}' is not implicitly convertible to 'class Point' diff --git a/executable_semantics/testdata/class/fail_field_missing.carbon b/executable_semantics/testdata/class/fail_field_missing.carbon index b591274b7586..0ed4b0d3d6cd 100644 --- a/executable_semantics/testdata/class/fail_field_missing.carbon +++ b/executable_semantics/testdata/class/fail_field_missing.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/class/fail_field_missing.carbon:20: type error in name binding: '{.x: i32}' is not implicitly convertible to 'class Point' diff --git a/executable_semantics/testdata/class/fail_method_from_class.carbon b/executable_semantics/testdata/class/fail_method_from_class.carbon index 6ec4abc8e863..395f0934bf79 100644 --- a/executable_semantics/testdata/class/fail_method_from_class.carbon +++ b/executable_semantics/testdata/class/fail_method_from_class.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/class/fail_method_from_class.carbon:29: GetX is not a class function diff --git a/executable_semantics/testdata/class/function_param.carbon b/executable_semantics/testdata/class/function_param.carbon index cd22fb4cca1f..8e3020365560 100644 --- a/executable_semantics/testdata/class/function_param.carbon +++ b/executable_semantics/testdata/class/function_param.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/class/global_var.carbon b/executable_semantics/testdata/class/global_var.carbon index 02cb3c7d844e..788a3e7b7f3e 100644 --- a/executable_semantics/testdata/class/global_var.carbon +++ b/executable_semantics/testdata/class/global_var.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/class/method.carbon b/executable_semantics/testdata/class/method.carbon index 5b385fbebdfb..3914057a45f9 100644 --- a/executable_semantics/testdata/class/method.carbon +++ b/executable_semantics/testdata/class/method.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/class/method_call_method.carbon b/executable_semantics/testdata/class/method_call_method.carbon index f3a5a5258d13..86837d9b838e 100644 --- a/executable_semantics/testdata/class/method_call_method.carbon +++ b/executable_semantics/testdata/class/method_call_method.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/class/temp.carbon b/executable_semantics/testdata/class/temp.carbon index 527d6ebf6b6c..8050697d2a3c 100644 --- a/executable_semantics/testdata/class/temp.carbon +++ b/executable_semantics/testdata/class/temp.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/class/var.carbon b/executable_semantics/testdata/class/var.carbon index 8875b06b7968..e0267091c576 100644 --- a/executable_semantics/testdata/class/var.carbon +++ b/executable_semantics/testdata/class/var.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/experimental_continuation/await_maintains_scope.carbon b/executable_semantics/testdata/experimental_continuation/await_maintains_scope.carbon index 0f461f870e73..a379598325eb 100644 --- a/executable_semantics/testdata/experimental_continuation/await_maintains_scope.carbon +++ b/executable_semantics/testdata/experimental_continuation/await_maintains_scope.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 3 diff --git a/executable_semantics/testdata/experimental_continuation/creation_is_noop.carbon b/executable_semantics/testdata/experimental_continuation/creation_is_noop.carbon index 0f306f91ce3f..1bfd0cb28164 100644 --- a/executable_semantics/testdata/experimental_continuation/creation_is_noop.carbon +++ b/executable_semantics/testdata/experimental_continuation/creation_is_noop.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/experimental_continuation/fail_continuation_syntax.carbon b/executable_semantics/testdata/experimental_continuation/fail_continuation_syntax.carbon index 68ee4d90df41..8ba8d78b3762 100644 --- a/executable_semantics/testdata/experimental_continuation/fail_continuation_syntax.carbon +++ b/executable_semantics/testdata/experimental_continuation/fail_continuation_syntax.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/experimental_continuation/fail_continuation_syntax.carbon:16: syntax error, unexpected identifier, expecting LEFT_CURLY_BRACE diff --git a/executable_semantics/testdata/experimental_continuation/fail_lifetime.carbon b/executable_semantics/testdata/experimental_continuation/fail_lifetime.carbon index d3653fcd3b39..de8b3d19b700 100644 --- a/executable_semantics/testdata/experimental_continuation/fail_lifetime.carbon +++ b/executable_semantics/testdata/experimental_continuation/fail_lifetime.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: RUNTIME ERROR: {{.*}}/executable_semantics/testdata/experimental_continuation/fail_lifetime.carbon:21: undefined behavior: access to dead value 1 diff --git a/executable_semantics/testdata/experimental_continuation/recursive.carbon b/executable_semantics/testdata/experimental_continuation/recursive.carbon index 5211fc6d75a4..09767f305523 100644 --- a/executable_semantics/testdata/experimental_continuation/recursive.carbon +++ b/executable_semantics/testdata/experimental_continuation/recursive.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 10 diff --git a/executable_semantics/testdata/experimental_continuation/run.carbon b/executable_semantics/testdata/experimental_continuation/run.carbon index d5f0e6127a89..2563af31f867 100644 --- a/executable_semantics/testdata/experimental_continuation/run.carbon +++ b/executable_semantics/testdata/experimental_continuation/run.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 1 diff --git a/executable_semantics/testdata/experimental_continuation/run_with_await.carbon b/executable_semantics/testdata/experimental_continuation/run_with_await.carbon index 855ec952e183..c4518b78cd0f 100644 --- a/executable_semantics/testdata/experimental_continuation/run_with_await.carbon +++ b/executable_semantics/testdata/experimental_continuation/run_with_await.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 3 diff --git a/executable_semantics/testdata/experimental_continuation/shallow_copy.carbon b/executable_semantics/testdata/experimental_continuation/shallow_copy.carbon index 11cac42cfc5d..6b1a2f40afc7 100644 --- a/executable_semantics/testdata/experimental_continuation/shallow_copy.carbon +++ b/executable_semantics/testdata/experimental_continuation/shallow_copy.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 3 diff --git a/executable_semantics/testdata/function/auto_return/add.carbon b/executable_semantics/testdata/function/auto_return/add.carbon index 3dddebad8c53..59e89c900445 100644 --- a/executable_semantics/testdata/function/auto_return/add.carbon +++ b/executable_semantics/testdata/function/auto_return/add.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/function/auto_return/fail_direct_recurse.carbon b/executable_semantics/testdata/function/auto_return/fail_direct_recurse.carbon index 163c9161c54f..846d7465a856 100644 --- a/executable_semantics/testdata/function/auto_return/fail_direct_recurse.carbon +++ b/executable_semantics/testdata/function/auto_return/fail_direct_recurse.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/function/auto_return/fail_direct_recurse.carbon:18: Function calls itself, but has a deduced return type diff --git a/executable_semantics/testdata/function/auto_return/fail_multiple_returns.carbon b/executable_semantics/testdata/function/auto_return/fail_multiple_returns.carbon index 471f15ec1169..91661622d966 100644 --- a/executable_semantics/testdata/function/auto_return/fail_multiple_returns.carbon +++ b/executable_semantics/testdata/function/auto_return/fail_multiple_returns.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/function/auto_return/fail_multiple_returns.carbon:18: Only one return is allowed in a function with an `auto` return type. diff --git a/executable_semantics/testdata/function/auto_return/fail_no_return.carbon b/executable_semantics/testdata/function/auto_return/fail_no_return.carbon index 46125efd0374..0776f564d584 100644 --- a/executable_semantics/testdata/function/auto_return/fail_no_return.carbon +++ b/executable_semantics/testdata/function/auto_return/fail_no_return.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/function/auto_return/fail_no_return.carbon:15: control-flow reaches end of function that provides a `->` return type without reaching a return statement diff --git a/executable_semantics/testdata/function/auto_return/fail_separate_decl.carbon b/executable_semantics/testdata/function/auto_return/fail_separate_decl.carbon index da78bade4ff0..5095060e41ea 100644 --- a/executable_semantics/testdata/function/auto_return/fail_separate_decl.carbon +++ b/executable_semantics/testdata/function/auto_return/fail_separate_decl.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/function/auto_return/fail_separate_decl.carbon:15: Function declaration has deduced return type but no body diff --git a/executable_semantics/testdata/function/auto_return/modify_arg_type.carbon b/executable_semantics/testdata/function/auto_return/modify_arg_type.carbon index 373fb258bfab..f344a053a3d8 100644 --- a/executable_semantics/testdata/function/auto_return/modify_arg_type.carbon +++ b/executable_semantics/testdata/function/auto_return/modify_arg_type.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/function/auto_return/modify_return_type.carbon b/executable_semantics/testdata/function/auto_return/modify_return_type.carbon index 7c8b84508da0..c74245f8c15e 100644 --- a/executable_semantics/testdata/function/auto_return/modify_return_type.carbon +++ b/executable_semantics/testdata/function/auto_return/modify_return_type.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/function/auto_return/type.carbon b/executable_semantics/testdata/function/auto_return/type.carbon index 0b33684ee7d3..6bf6f2155a9e 100644 --- a/executable_semantics/testdata/function/auto_return/type.carbon +++ b/executable_semantics/testdata/function/auto_return/type.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/function/empty_params.carbon b/executable_semantics/testdata/function/empty_params.carbon index f2d0ab10db72..159a0b1b1986 100644 --- a/executable_semantics/testdata/function/empty_params.carbon +++ b/executable_semantics/testdata/function/empty_params.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/function/fail_call_with_tuple.carbon b/executable_semantics/testdata/function/fail_call_with_tuple.carbon index d43c1897e342..23fc1a9fcb3e 100644 --- a/executable_semantics/testdata/function/fail_call_with_tuple.carbon +++ b/executable_semantics/testdata/function/fail_call_with_tuple.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/function/fail_call_with_tuple.carbon:19: type error in call: '((i32, i32))' is not implicitly convertible to '(i32, i32)' diff --git a/executable_semantics/testdata/function/fail_match_no_return.carbon b/executable_semantics/testdata/function/fail_match_no_return.carbon index 6e8f3a038481..04aff240c255 100644 --- a/executable_semantics/testdata/function/fail_match_no_return.carbon +++ b/executable_semantics/testdata/function/fail_match_no_return.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/function/fail_match_no_return.carbon:17: control-flow reaches end of function that provides a `->` return type without reaching a return statement diff --git a/executable_semantics/testdata/function/fail_match_partial_return.carbon b/executable_semantics/testdata/function/fail_match_partial_return.carbon index 141214c4d990..493be23cd083 100644 --- a/executable_semantics/testdata/function/fail_match_partial_return.carbon +++ b/executable_semantics/testdata/function/fail_match_partial_return.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/function/fail_match_partial_return.carbon:17: control-flow reaches end of function that provides a `->` return type without reaching a return statement diff --git a/executable_semantics/testdata/function/fail_non_exhaustive_match.carbon b/executable_semantics/testdata/function/fail_non_exhaustive_match.carbon index 93bb8eb8042c..f8a57361abf3 100644 --- a/executable_semantics/testdata/function/fail_non_exhaustive_match.carbon +++ b/executable_semantics/testdata/function/fail_non_exhaustive_match.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/function/fail_non_exhaustive_match.carbon:18: non-exhaustive match may allow control-flow to reach the end of a function that provides a `->` return type diff --git a/executable_semantics/testdata/function/fnty.carbon b/executable_semantics/testdata/function/fnty.carbon index 1b301d32286e..b149712194fe 100644 --- a/executable_semantics/testdata/function/fnty.carbon +++ b/executable_semantics/testdata/function/fnty.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/function/ignored_parameter.carbon b/executable_semantics/testdata/function/ignored_parameter.carbon index 04884bba215c..4f1ae30fbdf3 100644 --- a/executable_semantics/testdata/function/ignored_parameter.carbon +++ b/executable_semantics/testdata/function/ignored_parameter.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/function/multiple_args.carbon b/executable_semantics/testdata/function/multiple_args.carbon index bc35e2c56396..1581e5347bae 100644 --- a/executable_semantics/testdata/function/multiple_args.carbon +++ b/executable_semantics/testdata/function/multiple_args.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/function/param_lifetime.carbon b/executable_semantics/testdata/function/param_lifetime.carbon index 80064f1d2eff..c25c0c88cd54 100644 --- a/executable_semantics/testdata/function/param_lifetime.carbon +++ b/executable_semantics/testdata/function/param_lifetime.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/function/recursive.carbon b/executable_semantics/testdata/function/recursive.carbon index 292239894101..3b50d61b7d45 100644 --- a/executable_semantics/testdata/function/recursive.carbon +++ b/executable_semantics/testdata/function/recursive.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/function/return.carbon b/executable_semantics/testdata/function/return.carbon index 53a3ef74511d..d037e0567bf7 100644 --- a/executable_semantics/testdata/function/return.carbon +++ b/executable_semantics/testdata/function/return.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/function/return_exhaustive_match.carbon b/executable_semantics/testdata/function/return_exhaustive_match.carbon index 2bab8912d75a..3c35bde98eb8 100644 --- a/executable_semantics/testdata/function/return_exhaustive_match.carbon +++ b/executable_semantics/testdata/function/return_exhaustive_match.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 1 diff --git a/executable_semantics/testdata/function/type_match.carbon b/executable_semantics/testdata/function/type_match.carbon index a86c8307df35..0d8fd46a2372 100644 --- a/executable_semantics/testdata/function/type_match.carbon +++ b/executable_semantics/testdata/function/type_match.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/generic_class/class_function.carbon b/executable_semantics/testdata/generic_class/class_function.carbon index f58e7a743af7..6a29152d6314 100644 --- a/executable_semantics/testdata/generic_class/class_function.carbon +++ b/executable_semantics/testdata/generic_class/class_function.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/generic_class/fail_argument_deduction.carbon b/executable_semantics/testdata/generic_class/fail_argument_deduction.carbon index 6444be9ece7a..33966b853f5d 100644 --- a/executable_semantics/testdata/generic_class/fail_argument_deduction.carbon +++ b/executable_semantics/testdata/generic_class/fail_argument_deduction.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/generic_class/fail_argument_deduction.carbon:28: type error in argument deduction diff --git a/executable_semantics/testdata/generic_class/fail_bad_parameter_type.carbon b/executable_semantics/testdata/generic_class/fail_bad_parameter_type.carbon index efc090447c3d..802d2c1c0607 100644 --- a/executable_semantics/testdata/generic_class/fail_bad_parameter_type.carbon +++ b/executable_semantics/testdata/generic_class/fail_bad_parameter_type.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/generic_class/fail_bad_parameter_type.carbon:16: unexpected type of deduced parameter i32 diff --git a/executable_semantics/testdata/generic_class/fail_field_access_on_generic.carbon b/executable_semantics/testdata/generic_class/fail_field_access_on_generic.carbon index 8fb6bc506364..576d6b18d26f 100644 --- a/executable_semantics/testdata/generic_class/fail_field_access_on_generic.carbon +++ b/executable_semantics/testdata/generic_class/fail_field_access_on_generic.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/generic_class/fail_field_access_on_generic.carbon:15: field access, unexpected T:! Type of non-interface type Type in a.x diff --git a/executable_semantics/testdata/generic_class/fail_generic_in_pattern.carbon b/executable_semantics/testdata/generic_class/fail_generic_in_pattern.carbon index 0f5acac1fb7e..95f1daf161d0 100644 --- a/executable_semantics/testdata/generic_class/fail_generic_in_pattern.carbon +++ b/executable_semantics/testdata/generic_class/fail_generic_in_pattern.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/generic_class/fail_generic_in_pattern.carbon:17: Generic binding may not occur in pattern with expected type: T:! i32 diff --git a/executable_semantics/testdata/generic_class/fail_instantiate_non_generic.carbon b/executable_semantics/testdata/generic_class/fail_instantiate_non_generic.carbon index 39009345b309..17e144c3affd 100644 --- a/executable_semantics/testdata/generic_class/fail_instantiate_non_generic.carbon +++ b/executable_semantics/testdata/generic_class/fail_instantiate_non_generic.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/generic_class/fail_instantiate_non_generic.carbon:23: attempt to instantiate a non-generic class: Point(i32) diff --git a/executable_semantics/testdata/generic_class/fail_point_equal.carbon b/executable_semantics/testdata/generic_class/fail_point_equal.carbon index 20b275963f61..9e0bcbe2b211 100644 --- a/executable_semantics/testdata/generic_class/fail_point_equal.carbon +++ b/executable_semantics/testdata/generic_class/fail_point_equal.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/generic_class/fail_point_equal.carbon:21: type error in name binding: 'class Point(T = i32)' is not implicitly convertible to 'class Point(T = Bool)' diff --git a/executable_semantics/testdata/generic_class/generic_class_substitution.carbon b/executable_semantics/testdata/generic_class/generic_class_substitution.carbon index ee204b056995..b261ef260666 100644 --- a/executable_semantics/testdata/generic_class/generic_class_substitution.carbon +++ b/executable_semantics/testdata/generic_class/generic_class_substitution.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/generic_class/generic_fun_and_class.carbon b/executable_semantics/testdata/generic_class/generic_fun_and_class.carbon index fc7364f8c6dc..d28cf20a3583 100644 --- a/executable_semantics/testdata/generic_class/generic_fun_and_class.carbon +++ b/executable_semantics/testdata/generic_class/generic_fun_and_class.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/generic_class/generic_point.carbon b/executable_semantics/testdata/generic_class/generic_point.carbon index cd139f19d8f1..2b86c09155cc 100644 --- a/executable_semantics/testdata/generic_class/generic_point.carbon +++ b/executable_semantics/testdata/generic_class/generic_point.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/generic_class/point_with_interface.carbon b/executable_semantics/testdata/generic_class/point_with_interface.carbon index a717da98fdff..22665a00353b 100644 --- a/executable_semantics/testdata/generic_class/point_with_interface.carbon +++ b/executable_semantics/testdata/generic_class/point_with_interface.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/generic_function/apply.carbon b/executable_semantics/testdata/generic_function/apply.carbon index 188519a3915b..b18d23414a9f 100644 --- a/executable_semantics/testdata/generic_function/apply.carbon +++ b/executable_semantics/testdata/generic_function/apply.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: -2 diff --git a/executable_semantics/testdata/generic_function/fail_not_addable.carbon b/executable_semantics/testdata/generic_function/fail_not_addable.carbon index b04c97be7a10..2c049cadf1cf 100644 --- a/executable_semantics/testdata/generic_function/fail_not_addable.carbon +++ b/executable_semantics/testdata/generic_function/fail_not_addable.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/generic_function/fail_not_addable.carbon:17: type error in addition(1) diff --git a/executable_semantics/testdata/generic_function/fail_type_deduction_mismatch.carbon b/executable_semantics/testdata/generic_function/fail_type_deduction_mismatch.carbon index f68befd11b80..a13ecd0518ba 100644 --- a/executable_semantics/testdata/generic_function/fail_type_deduction_mismatch.carbon +++ b/executable_semantics/testdata/generic_function/fail_type_deduction_mismatch.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/generic_function/fail_type_deduction_mismatch.carbon:21: type error in argument deduction diff --git a/executable_semantics/testdata/generic_function/fail_type_deduction_unused.carbon b/executable_semantics/testdata/generic_function/fail_type_deduction_unused.carbon index cbae251312ac..721efdf816bb 100644 --- a/executable_semantics/testdata/generic_function/fail_type_deduction_unused.carbon +++ b/executable_semantics/testdata/generic_function/fail_type_deduction_unused.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/generic_function/fail_type_deduction_unused.carbon:20: could not deduce type argument for type parameter T diff --git a/executable_semantics/testdata/generic_function/non_generic_param.carbon b/executable_semantics/testdata/generic_function/non_generic_param.carbon index 7243b4749ae1..bb42c3d340a2 100644 --- a/executable_semantics/testdata/generic_function/non_generic_param.carbon +++ b/executable_semantics/testdata/generic_function/non_generic_param.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 1 diff --git a/executable_semantics/testdata/generic_function/return_val.carbon b/executable_semantics/testdata/generic_function/return_val.carbon index 3a17c93aa94f..8ccc08e98389 100644 --- a/executable_semantics/testdata/generic_function/return_val.carbon +++ b/executable_semantics/testdata/generic_function/return_val.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/generic_function/swap.carbon b/executable_semantics/testdata/generic_function/swap.carbon index 68f69d28a035..64dad0520fba 100644 --- a/executable_semantics/testdata/generic_function/swap.carbon +++ b/executable_semantics/testdata/generic_function/swap.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/generic_function/tuple_map.carbon b/executable_semantics/testdata/generic_function/tuple_map.carbon index ffde6fce722b..fb3032c2a5de 100644 --- a/executable_semantics/testdata/generic_function/tuple_map.carbon +++ b/executable_semantics/testdata/generic_function/tuple_map.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 1 diff --git a/executable_semantics/testdata/generic_function/type_matching.carbon b/executable_semantics/testdata/generic_function/type_matching.carbon index b7a39607d355..fac859e055a3 100644 --- a/executable_semantics/testdata/generic_function/type_matching.carbon +++ b/executable_semantics/testdata/generic_function/type_matching.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/global_variable/fail_init_order.carbon b/executable_semantics/testdata/global_variable/fail_init_order.carbon index 7a66ef2678f8..bceedac5c2eb 100644 --- a/executable_semantics/testdata/global_variable/fail_init_order.carbon +++ b/executable_semantics/testdata/global_variable/fail_init_order.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: RUNTIME ERROR: {{.*}}/executable_semantics/testdata/global_variable/fail_init_order.carbon:17: could not find `y: i32` diff --git a/executable_semantics/testdata/global_variable/fail_init_type_mismatch.carbon b/executable_semantics/testdata/global_variable/fail_init_type_mismatch.carbon index 8cfd2e4cf536..350028e493da 100644 --- a/executable_semantics/testdata/global_variable/fail_init_type_mismatch.carbon +++ b/executable_semantics/testdata/global_variable/fail_init_type_mismatch.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/global_variable/fail_init_type_mismatch.carbon:16: type error in initializer of variable: 'Bool' is not implicitly convertible to 'i32' diff --git a/executable_semantics/testdata/global_variable/init_and_read.carbon b/executable_semantics/testdata/global_variable/init_and_read.carbon index c3a84a2ac7d4..637cada52ad9 100644 --- a/executable_semantics/testdata/global_variable/init_and_read.carbon +++ b/executable_semantics/testdata/global_variable/init_and_read.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/global_variable/init_from_function.carbon b/executable_semantics/testdata/global_variable/init_from_function.carbon index 6226453c1104..03863ab32263 100644 --- a/executable_semantics/testdata/global_variable/init_from_function.carbon +++ b/executable_semantics/testdata/global_variable/init_from_function.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/global_variable/init_order.carbon b/executable_semantics/testdata/global_variable/init_order.carbon index d682c5157780..c192d39d8107 100644 --- a/executable_semantics/testdata/global_variable/init_order.carbon +++ b/executable_semantics/testdata/global_variable/init_order.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/global_variable/shadowing.carbon b/executable_semantics/testdata/global_variable/shadowing.carbon index 112db0fb5764..b913f39cdf1a 100644 --- a/executable_semantics/testdata/global_variable/shadowing.carbon +++ b/executable_semantics/testdata/global_variable/shadowing.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/global_variable/write.carbon b/executable_semantics/testdata/global_variable/write.carbon index 95559d7e677f..9ede8e7fa5a3 100644 --- a/executable_semantics/testdata/global_variable/write.carbon +++ b/executable_semantics/testdata/global_variable/write.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/global_variable/write_from_function.carbon b/executable_semantics/testdata/global_variable/write_from_function.carbon index a144c891faf0..b4542b2cd0ac 100644 --- a/executable_semantics/testdata/global_variable/write_from_function.carbon +++ b/executable_semantics/testdata/global_variable/write_from_function.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/if_else/if_else.carbon b/executable_semantics/testdata/if_else/if_else.carbon index 9cdabcd9b2d8..3d75c3b32154 100644 --- a/executable_semantics/testdata/if_else/if_else.carbon +++ b/executable_semantics/testdata/if_else/if_else.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/if_else/if_else_if.carbon b/executable_semantics/testdata/if_else/if_else_if.carbon index 8886b996a4dd..25d1375dd182 100644 --- a/executable_semantics/testdata/if_else/if_else_if.carbon +++ b/executable_semantics/testdata/if_else/if_else_if.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/if_else/if_else_if_else.carbon b/executable_semantics/testdata/if_else/if_else_if_else.carbon index 903a9ca975b0..dc327a5daa8e 100644 --- a/executable_semantics/testdata/if_else/if_else_if_else.carbon +++ b/executable_semantics/testdata/if_else/if_else_if_else.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/if_else/if_false.carbon b/executable_semantics/testdata/if_else/if_false.carbon index f98fc6d75814..31ed21986438 100644 --- a/executable_semantics/testdata/if_else/if_false.carbon +++ b/executable_semantics/testdata/if_else/if_false.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/if_else/if_nesting.carbon b/executable_semantics/testdata/if_else/if_nesting.carbon index 628421a899c4..818d9468a52c 100644 --- a/executable_semantics/testdata/if_else/if_nesting.carbon +++ b/executable_semantics/testdata/if_else/if_nesting.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/if_else/if_true.carbon b/executable_semantics/testdata/if_else/if_true.carbon index c2d05bfcb222..7182768e06d6 100644 --- a/executable_semantics/testdata/if_else/if_true.carbon +++ b/executable_semantics/testdata/if_else/if_true.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/if_expression/if_then_else.carbon b/executable_semantics/testdata/if_expression/if_then_else.carbon index 043b3954d41c..e25aed2821e7 100644 --- a/executable_semantics/testdata/if_expression/if_then_else.carbon +++ b/executable_semantics/testdata/if_expression/if_then_else.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 12 diff --git a/executable_semantics/testdata/import/fail_nonexistent_library.carbon b/executable_semantics/testdata/import/fail_nonexistent_library.carbon index 51d533532562..286de2594a9f 100644 --- a/executable_semantics/testdata/import/fail_nonexistent_library.carbon +++ b/executable_semantics/testdata/import/fail_nonexistent_library.carbon @@ -6,7 +6,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/import/fail_nonexistent_package.carbon b/executable_semantics/testdata/import/fail_nonexistent_package.carbon index ef10366a7f13..e2175d47f1c3 100644 --- a/executable_semantics/testdata/import/fail_nonexistent_package.carbon +++ b/executable_semantics/testdata/import/fail_nonexistent_package.carbon @@ -6,7 +6,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/import/fail_order.carbon b/executable_semantics/testdata/import/fail_order.carbon index 0638963c9fa0..949b45961c68 100644 --- a/executable_semantics/testdata/import/fail_order.carbon +++ b/executable_semantics/testdata/import/fail_order.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/import/fail_order.carbon:18: syntax error, unexpected IMPORT, expecting END_OF_FILE diff --git a/executable_semantics/testdata/interface/class_function.carbon b/executable_semantics/testdata/interface/class_function.carbon index 258962e9cfe7..a65779041559 100644 --- a/executable_semantics/testdata/interface/class_function.carbon +++ b/executable_semantics/testdata/interface/class_function.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/interface/external_impl_point_vector.carbon b/executable_semantics/testdata/interface/external_impl_point_vector.carbon index 96eaaf4d907c..9cabd25b8c3a 100644 --- a/executable_semantics/testdata/interface/external_impl_point_vector.carbon +++ b/executable_semantics/testdata/interface/external_impl_point_vector.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/interface/fail_impl_bad_member.carbon b/executable_semantics/testdata/interface/fail_impl_bad_member.carbon index 8dede3e341b0..c6aefff063a9 100644 --- a/executable_semantics/testdata/interface/fail_impl_bad_member.carbon +++ b/executable_semantics/testdata/interface/fail_impl_bad_member.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/interface/fail_impl_bad_member.carbon:28: type error in member of implementation: 'fn (i32) -> i32' is not implicitly convertible to 'fn (i32) -> class Point' diff --git a/executable_semantics/testdata/interface/fail_impl_missing_member.carbon b/executable_semantics/testdata/interface/fail_impl_missing_member.carbon index 7cc22788b3dd..8cb6692be1ed 100644 --- a/executable_semantics/testdata/interface/fail_impl_missing_member.carbon +++ b/executable_semantics/testdata/interface/fail_impl_missing_member.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/interface/fail_impl_missing_member.carbon:26: implementation missing Scale diff --git a/executable_semantics/testdata/interface/fail_interface_missing_member.carbon b/executable_semantics/testdata/interface/fail_interface_missing_member.carbon index 636a110ae219..35d5f16403b6 100644 --- a/executable_semantics/testdata/interface/fail_interface_missing_member.carbon +++ b/executable_semantics/testdata/interface/fail_interface_missing_member.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/interface/fail_interface_missing_member.carbon:19: field access, Scale not in Vector diff --git a/executable_semantics/testdata/interface/fail_no_impl.carbon b/executable_semantics/testdata/interface/fail_no_impl.carbon index 555505a81f79..86250b678de5 100644 --- a/executable_semantics/testdata/interface/fail_no_impl.carbon +++ b/executable_semantics/testdata/interface/fail_no_impl.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/interface/fail_no_impl.carbon:31: could not find implementation of interface Vector for class Point diff --git a/executable_semantics/testdata/interface/generic_call_generic.carbon b/executable_semantics/testdata/interface/generic_call_generic.carbon index 033233c6e9bb..05d84d194d65 100644 --- a/executable_semantics/testdata/interface/generic_call_generic.carbon +++ b/executable_semantics/testdata/interface/generic_call_generic.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/interface/generic_with_two_params.carbon b/executable_semantics/testdata/interface/generic_with_two_params.carbon index cba76a7749e7..fc0b3d112613 100644 --- a/executable_semantics/testdata/interface/generic_with_two_params.carbon +++ b/executable_semantics/testdata/interface/generic_with_two_params.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/interface/tuple_vector_add_scale.carbon b/executable_semantics/testdata/interface/tuple_vector_add_scale.carbon index e1d06fd8ec75..8382f172e886 100644 --- a/executable_semantics/testdata/interface/tuple_vector_add_scale.carbon +++ b/executable_semantics/testdata/interface/tuple_vector_add_scale.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/interface/vector_point_add_scale.carbon b/executable_semantics/testdata/interface/vector_point_add_scale.carbon index c86b8c314fa8..79342883fa73 100644 --- a/executable_semantics/testdata/interface/vector_point_add_scale.carbon +++ b/executable_semantics/testdata/interface/vector_point_add_scale.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/let/fail_function_args.carbon b/executable_semantics/testdata/let/fail_function_args.carbon index 98f040535e2a..6868559e97c3 100644 --- a/executable_semantics/testdata/let/fail_function_args.carbon +++ b/executable_semantics/testdata/let/fail_function_args.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/let/fail_function_args.carbon:16: Cannot assign to rvalue 'y' diff --git a/executable_semantics/testdata/let/fail_global_assign.carbon b/executable_semantics/testdata/let/fail_global_assign.carbon index abd799586b81..99735022719c 100644 --- a/executable_semantics/testdata/let/fail_global_assign.carbon +++ b/executable_semantics/testdata/let/fail_global_assign.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/let/fail_global_assign.carbon:17: Cannot assign to rvalue 'x' diff --git a/executable_semantics/testdata/let/fail_local_assign.carbon b/executable_semantics/testdata/let/fail_local_assign.carbon index 2458faadaaa4..61df566919ed 100644 --- a/executable_semantics/testdata/let/fail_local_assign.carbon +++ b/executable_semantics/testdata/let/fail_local_assign.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/let/fail_local_assign.carbon:16: Cannot assign to rvalue 'x' diff --git a/executable_semantics/testdata/let/fail_match_choice.carbon b/executable_semantics/testdata/let/fail_match_choice.carbon index ebb033e2d5b6..eaefca593a09 100644 --- a/executable_semantics/testdata/let/fail_match_choice.carbon +++ b/executable_semantics/testdata/let/fail_match_choice.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/let/fail_match_choice.carbon:29: Cannot assign to rvalue 'x' diff --git a/executable_semantics/testdata/let/fail_method_args.carbon b/executable_semantics/testdata/let/fail_method_args.carbon index d710ea5fc698..f0ab234eb024 100644 --- a/executable_semantics/testdata/let/fail_method_args.carbon +++ b/executable_semantics/testdata/let/fail_method_args.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/let/fail_method_args.carbon:21: Cannot assign to rvalue 'x' diff --git a/executable_semantics/testdata/let/fail_tuple_pattern_let_context.carbon b/executable_semantics/testdata/let/fail_tuple_pattern_let_context.carbon index 5fde45ee9e2d..895d3f4144d0 100644 --- a/executable_semantics/testdata/let/fail_tuple_pattern_let_context.carbon +++ b/executable_semantics/testdata/let/fail_tuple_pattern_let_context.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/let/fail_tuple_pattern_let_context.carbon:17: Cannot assign to rvalue 'c' diff --git a/executable_semantics/testdata/let/fail_tuple_pattern_let_context_nested.carbon b/executable_semantics/testdata/let/fail_tuple_pattern_let_context_nested.carbon index e5f043e63f27..beb9d4684718 100644 --- a/executable_semantics/testdata/let/fail_tuple_pattern_let_context_nested.carbon +++ b/executable_semantics/testdata/let/fail_tuple_pattern_let_context_nested.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/let/fail_tuple_pattern_let_context_nested.carbon:15: syntax error, unexpected LET diff --git a/executable_semantics/testdata/let/fail_tuple_pattern_let_in_var.carbon b/executable_semantics/testdata/let/fail_tuple_pattern_let_in_var.carbon index e6b9ff409110..d8c113fa2598 100644 --- a/executable_semantics/testdata/let/fail_tuple_pattern_let_in_var.carbon +++ b/executable_semantics/testdata/let/fail_tuple_pattern_let_in_var.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/let/fail_tuple_pattern_let_in_var.carbon:15: syntax error, unexpected LET diff --git a/executable_semantics/testdata/let/nested_tuple_pattern.carbon b/executable_semantics/testdata/let/nested_tuple_pattern.carbon index 84fe7a3940b9..a2751e9c8f39 100644 --- a/executable_semantics/testdata/let/nested_tuple_pattern.carbon +++ b/executable_semantics/testdata/let/nested_tuple_pattern.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/match/any_int.carbon b/executable_semantics/testdata/match/any_int.carbon index 857d170ecc70..9f05a7f303a9 100644 --- a/executable_semantics/testdata/match/any_int.carbon +++ b/executable_semantics/testdata/match/any_int.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/match/int.carbon b/executable_semantics/testdata/match/int.carbon index 09e6d0b77eba..88dbe28ab22b 100644 --- a/executable_semantics/testdata/match/int.carbon +++ b/executable_semantics/testdata/match/int.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/match/int_default.carbon b/executable_semantics/testdata/match/int_default.carbon index a565f228a54d..929b28b0c63f 100644 --- a/executable_semantics/testdata/match/int_default.carbon +++ b/executable_semantics/testdata/match/int_default.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/match/no_match.carbon b/executable_semantics/testdata/match/no_match.carbon index 19c3d95ee1af..0ac8385cc520 100644 --- a/executable_semantics/testdata/match/no_match.carbon +++ b/executable_semantics/testdata/match/no_match.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/match/placeholder.carbon b/executable_semantics/testdata/match/placeholder.carbon index b6e7e5dbd251..5b06ef03aef0 100644 --- a/executable_semantics/testdata/match/placeholder.carbon +++ b/executable_semantics/testdata/match/placeholder.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/name_lookup/fail_block_duplicate.carbon b/executable_semantics/testdata/name_lookup/fail_block_duplicate.carbon index b19082e38e4f..71c25fb1250a 100644 --- a/executable_semantics/testdata/name_lookup/fail_block_duplicate.carbon +++ b/executable_semantics/testdata/name_lookup/fail_block_duplicate.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/name_lookup/fail_block_duplicate.carbon:16: Duplicate name `x` also found at {{.*}}/executable_semantics/testdata/name_lookup/fail_block_duplicate.carbon:15 diff --git a/executable_semantics/testdata/name_lookup/fail_choice_duplicate.carbon b/executable_semantics/testdata/name_lookup/fail_choice_duplicate.carbon index 1d2cfa79b1d1..94eabbae6836 100644 --- a/executable_semantics/testdata/name_lookup/fail_choice_duplicate.carbon +++ b/executable_semantics/testdata/name_lookup/fail_choice_duplicate.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/name_lookup/fail_choice_duplicate.carbon:16: Duplicate name `None` in choice type diff --git a/executable_semantics/testdata/name_lookup/fail_class_duplicate.carbon b/executable_semantics/testdata/name_lookup/fail_class_duplicate.carbon index 00f51814a715..ea09227ce354 100644 --- a/executable_semantics/testdata/name_lookup/fail_class_duplicate.carbon +++ b/executable_semantics/testdata/name_lookup/fail_class_duplicate.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/name_lookup/fail_class_duplicate.carbon:16: Duplicate name `x` also found at {{.*}}/executable_semantics/testdata/name_lookup/fail_class_duplicate.carbon:15 diff --git a/executable_semantics/testdata/name_lookup/fail_global_duplicate.carbon b/executable_semantics/testdata/name_lookup/fail_global_duplicate.carbon index 53733a136cc1..7e81a6f8d3fa 100644 --- a/executable_semantics/testdata/name_lookup/fail_global_duplicate.carbon +++ b/executable_semantics/testdata/name_lookup/fail_global_duplicate.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/name_lookup/fail_global_duplicate.carbon:15: Duplicate name `x` also found at {{.*}}/executable_semantics/testdata/name_lookup/fail_global_duplicate.carbon:14 diff --git a/executable_semantics/testdata/name_lookup/fail_match_duplicate.carbon b/executable_semantics/testdata/name_lookup/fail_match_duplicate.carbon index aba335e1f981..eec8968d565a 100644 --- a/executable_semantics/testdata/name_lookup/fail_match_duplicate.carbon +++ b/executable_semantics/testdata/name_lookup/fail_match_duplicate.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/name_lookup/fail_match_duplicate.carbon:17: Duplicate name `x` also found at {{.*}}/executable_semantics/testdata/name_lookup/fail_match_duplicate.carbon:16 diff --git a/executable_semantics/testdata/name_lookup/fail_use_before_declare.carbon b/executable_semantics/testdata/name_lookup/fail_use_before_declare.carbon index 91f2393257a8..6f04e6867c32 100644 --- a/executable_semantics/testdata/name_lookup/fail_use_before_declare.carbon +++ b/executable_semantics/testdata/name_lookup/fail_use_before_declare.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/name_lookup/fail_use_before_declare.carbon:15: could not resolve 'x' diff --git a/executable_semantics/testdata/name_lookup/global_shadow.carbon b/executable_semantics/testdata/name_lookup/global_shadow.carbon index 8c0def7b1845..81ca51152447 100644 --- a/executable_semantics/testdata/name_lookup/global_shadow.carbon +++ b/executable_semantics/testdata/name_lookup/global_shadow.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/name_lookup/match_shadow.carbon b/executable_semantics/testdata/name_lookup/match_shadow.carbon index ce4f0853fe21..b3e584b9238d 100644 --- a/executable_semantics/testdata/name_lookup/match_shadow.carbon +++ b/executable_semantics/testdata/name_lookup/match_shadow.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/package/fail_missing.carbon b/executable_semantics/testdata/package/fail_missing.carbon index 2018101a5228..a68ac0bbfc04 100644 --- a/executable_semantics/testdata/package/fail_missing.carbon +++ b/executable_semantics/testdata/package/fail_missing.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/package/fail_missing.carbon:12: syntax error, unexpected FN, expecting PACKAGE diff --git a/executable_semantics/testdata/package/with_library.carbon b/executable_semantics/testdata/package/with_library.carbon index ff2c2572111c..a95448bd54d9 100644 --- a/executable_semantics/testdata/package/with_library.carbon +++ b/executable_semantics/testdata/package/with_library.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/pointer/basic.carbon b/executable_semantics/testdata/pointer/basic.carbon index b291868fb52e..69ab0504aa41 100644 --- a/executable_semantics/testdata/pointer/basic.carbon +++ b/executable_semantics/testdata/pointer/basic.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/pointer/fail_rvalue_addressof.carbon b/executable_semantics/testdata/pointer/fail_rvalue_addressof.carbon index 5e00d4a9761c..139c72556678 100644 --- a/executable_semantics/testdata/pointer/fail_rvalue_addressof.carbon +++ b/executable_semantics/testdata/pointer/fail_rvalue_addressof.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/pointer/fail_rvalue_addressof.carbon:16: Argument to & should be an lvalue. diff --git a/executable_semantics/testdata/pointer/struct_pointer.carbon b/executable_semantics/testdata/pointer/struct_pointer.carbon index f3895e9449b3..9e654e0463bc 100644 --- a/executable_semantics/testdata/pointer/struct_pointer.carbon +++ b/executable_semantics/testdata/pointer/struct_pointer.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/return/explicit_empty.carbon b/executable_semantics/testdata/return/explicit_empty.carbon index b389f2394bee..ce69792d120e 100644 --- a/executable_semantics/testdata/return/explicit_empty.carbon +++ b/executable_semantics/testdata/return/explicit_empty.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/return/fail_explicit_with_no_return.carbon b/executable_semantics/testdata/return/fail_explicit_with_no_return.carbon index be2fbf47fd84..69737eb2543d 100644 --- a/executable_semantics/testdata/return/fail_explicit_with_no_return.carbon +++ b/executable_semantics/testdata/return/fail_explicit_with_no_return.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/return/fail_explicit_with_no_return.carbon:15: control-flow reaches end of function that provides a `->` return type without reaching a return statement diff --git a/executable_semantics/testdata/return/fail_explicit_with_plain_return.carbon b/executable_semantics/testdata/return/fail_explicit_with_plain_return.carbon index f857125a1296..95398aa94c69 100644 --- a/executable_semantics/testdata/return/fail_explicit_with_plain_return.carbon +++ b/executable_semantics/testdata/return/fail_explicit_with_plain_return.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/return/fail_explicit_with_plain_return.carbon:15: return; should provide a return value, to match the function's signature. diff --git a/executable_semantics/testdata/return/fail_implicit_with_explicit_return.carbon b/executable_semantics/testdata/return/fail_implicit_with_explicit_return.carbon index e0b8748b7d71..b3910600128d 100644 --- a/executable_semantics/testdata/return/fail_implicit_with_explicit_return.carbon +++ b/executable_semantics/testdata/return/fail_implicit_with_explicit_return.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/return/fail_implicit_with_explicit_return.carbon:15: return (); should not provide a return value, to match the function's signature. diff --git a/executable_semantics/testdata/return/implicit_with_no_return.carbon b/executable_semantics/testdata/return/implicit_with_no_return.carbon index e4f0c6971ebf..c7d3c0073625 100644 --- a/executable_semantics/testdata/return/implicit_with_no_return.carbon +++ b/executable_semantics/testdata/return/implicit_with_no_return.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/return/implicit_with_plain_return.carbon b/executable_semantics/testdata/return/implicit_with_plain_return.carbon index 12b87914eff9..9c6e9196429a 100644 --- a/executable_semantics/testdata/return/implicit_with_plain_return.carbon +++ b/executable_semantics/testdata/return/implicit_with_plain_return.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/string/basic.carbon b/executable_semantics/testdata/string/basic.carbon index 23028652a2c0..26edb6ceaf4d 100644 --- a/executable_semantics/testdata/string/basic.carbon +++ b/executable_semantics/testdata/string/basic.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/string/block.carbon b/executable_semantics/testdata/string/block.carbon index 1357f3960604..91a248f1dba3 100644 --- a/executable_semantics/testdata/string/block.carbon +++ b/executable_semantics/testdata/string/block.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/string/block_escaped_triple_quotes.carbon b/executable_semantics/testdata/string/block_escaped_triple_quotes.carbon index 9ce8d8fede5d..3edc91b52500 100644 --- a/executable_semantics/testdata/string/block_escaped_triple_quotes.carbon +++ b/executable_semantics/testdata/string/block_escaped_triple_quotes.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/string/fail_block_quotes_not_on_own_line.carbon b/executable_semantics/testdata/string/fail_block_quotes_not_on_own_line.carbon index 8c54d5955e6c..0105898231d5 100644 --- a/executable_semantics/testdata/string/fail_block_quotes_not_on_own_line.carbon +++ b/executable_semantics/testdata/string/fail_block_quotes_not_on_own_line.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/string/fail_block_quotes_not_on_own_line.carbon:15: Invalid block string: Should end with triple quotes: error: closing """ diff --git a/executable_semantics/testdata/string/fail_hex_lower.carbon b/executable_semantics/testdata/string/fail_hex_lower.carbon index 145a52b525c8..e0505cf261dd 100644 --- a/executable_semantics/testdata/string/fail_hex_lower.carbon +++ b/executable_semantics/testdata/string/fail_hex_lower.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/string/fail_hex_lower.carbon:15: Invalid escaping in string: "str\xaa" diff --git a/executable_semantics/testdata/string/fail_hex_truncated.carbon b/executable_semantics/testdata/string/fail_hex_truncated.carbon index cd8cdb5d510e..e910a39e919b 100644 --- a/executable_semantics/testdata/string/fail_hex_truncated.carbon +++ b/executable_semantics/testdata/string/fail_hex_truncated.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/string/fail_hex_truncated.carbon:15: Invalid escaping in string: "str\x" diff --git a/executable_semantics/testdata/string/fail_invalid_escape.carbon b/executable_semantics/testdata/string/fail_invalid_escape.carbon index b6ae4e5bb886..8c67a7207ec2 100644 --- a/executable_semantics/testdata/string/fail_invalid_escape.carbon +++ b/executable_semantics/testdata/string/fail_invalid_escape.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/string/fail_invalid_escape.carbon:15: Invalid escaping in string: "str\e" diff --git a/executable_semantics/testdata/string/fail_newline.carbon b/executable_semantics/testdata/string/fail_newline.carbon index e700709ceea7..bd6319adb792 100644 --- a/executable_semantics/testdata/string/fail_newline.carbon +++ b/executable_semantics/testdata/string/fail_newline.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/string/fail_newline.carbon:15: invalid character '\x22' in source file. diff --git a/executable_semantics/testdata/string/fail_octal.carbon b/executable_semantics/testdata/string/fail_octal.carbon index 8fb22643be1e..a059dce11467 100644 --- a/executable_semantics/testdata/string/fail_octal.carbon +++ b/executable_semantics/testdata/string/fail_octal.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/string/fail_octal.carbon:15: Invalid escaping in string: "str\01" diff --git a/executable_semantics/testdata/string/fail_tab.carbon b/executable_semantics/testdata/string/fail_tab.carbon index 0e446786cd1d..96e80a575fe7 100644 --- a/executable_semantics/testdata/string/fail_tab.carbon +++ b/executable_semantics/testdata/string/fail_tab.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/string/fail_tab.carbon:15: Invalid escaping in string: "new line" diff --git a/executable_semantics/testdata/string/hex.carbon b/executable_semantics/testdata/string/hex.carbon index 36560cdbd944..7084e6af754c 100644 --- a/executable_semantics/testdata/string/hex.carbon +++ b/executable_semantics/testdata/string/hex.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/string/newline.carbon b/executable_semantics/testdata/string/newline.carbon index bafd498aee8a..f6e732d2c7a9 100644 --- a/executable_semantics/testdata/string/newline.carbon +++ b/executable_semantics/testdata/string/newline.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/struct/assign.carbon b/executable_semantics/testdata/struct/assign.carbon index 61730aa97f3a..760b0bbaf48d 100644 --- a/executable_semantics/testdata/struct/assign.carbon +++ b/executable_semantics/testdata/struct/assign.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/struct/assign_member.carbon b/executable_semantics/testdata/struct/assign_member.carbon index 562e1221f029..3d962f29fb8e 100644 --- a/executable_semantics/testdata/struct/assign_member.carbon +++ b/executable_semantics/testdata/struct/assign_member.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/struct/empty.carbon b/executable_semantics/testdata/struct/empty.carbon index a75c4911bcca..d923ba419b7f 100644 --- a/executable_semantics/testdata/struct/empty.carbon +++ b/executable_semantics/testdata/struct/empty.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/struct/ending_comma.carbon b/executable_semantics/testdata/struct/ending_comma.carbon index 4d0c0bdde5b1..f386b44f354d 100644 --- a/executable_semantics/testdata/struct/ending_comma.carbon +++ b/executable_semantics/testdata/struct/ending_comma.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/struct/equality.carbon b/executable_semantics/testdata/struct/equality.carbon index 9f443422fbc3..9128880f2bdd 100644 --- a/executable_semantics/testdata/struct/equality.carbon +++ b/executable_semantics/testdata/struct/equality.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/struct/equality_false.carbon b/executable_semantics/testdata/struct/equality_false.carbon index 363d87b8c962..5e40071ee133 100644 --- a/executable_semantics/testdata/struct/equality_false.carbon +++ b/executable_semantics/testdata/struct/equality_false.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/struct/fail_field_access_mismatch.carbon b/executable_semantics/testdata/struct/fail_field_access_mismatch.carbon index a7ee9df973f7..c710aafd2506 100644 --- a/executable_semantics/testdata/struct/fail_field_access_mismatch.carbon +++ b/executable_semantics/testdata/struct/fail_field_access_mismatch.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/struct/fail_field_access_mismatch.carbon:15: struct {.x: i32, .y: i32} does not have a field named z diff --git a/executable_semantics/testdata/struct/name_order.carbon b/executable_semantics/testdata/struct/name_order.carbon index fce18caa07aa..f4af45f21243 100644 --- a/executable_semantics/testdata/struct/name_order.carbon +++ b/executable_semantics/testdata/struct/name_order.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/struct/temp.carbon b/executable_semantics/testdata/struct/temp.carbon index 4edd49d6eb2d..07490c9e7116 100644 --- a/executable_semantics/testdata/struct/temp.carbon +++ b/executable_semantics/testdata/struct/temp.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/struct/var.carbon b/executable_semantics/testdata/struct/var.carbon index 02957e92d968..cd361b71df31 100644 --- a/executable_semantics/testdata/struct/var.carbon +++ b/executable_semantics/testdata/struct/var.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/tuple/ending_comma.carbon b/executable_semantics/testdata/tuple/ending_comma.carbon index 032dfd1afc8d..da014341e16f 100644 --- a/executable_semantics/testdata/tuple/ending_comma.carbon +++ b/executable_semantics/testdata/tuple/ending_comma.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/tuple/equality.carbon b/executable_semantics/testdata/tuple/equality.carbon index b4cc8d4a552d..c5a659e13bae 100644 --- a/executable_semantics/testdata/tuple/equality.carbon +++ b/executable_semantics/testdata/tuple/equality.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/tuple/equality_false.carbon b/executable_semantics/testdata/tuple/equality_false.carbon index 25a6db85ca13..855037083992 100644 --- a/executable_semantics/testdata/tuple/equality_false.carbon +++ b/executable_semantics/testdata/tuple/equality_false.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/tuple/fail_index.carbon b/executable_semantics/testdata/tuple/fail_index.carbon index fee2b4f606f7..90caab2d9637 100644 --- a/executable_semantics/testdata/tuple/fail_index.carbon +++ b/executable_semantics/testdata/tuple/fail_index.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/tuple/fail_index.carbon:16: index 2 is out of range for type (i32, i32) diff --git a/executable_semantics/testdata/tuple/fail_index_var.carbon b/executable_semantics/testdata/tuple/fail_index_var.carbon index 6b3c4a11bb0e..20851bffd080 100644 --- a/executable_semantics/testdata/tuple/fail_index_var.carbon +++ b/executable_semantics/testdata/tuple/fail_index_var.carbon @@ -4,7 +4,7 @@ // // RUN: %{not} %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: RUNTIME ERROR: {{.*}}/executable_semantics/testdata/tuple/fail_index_var.carbon:17: could not find `index: i32` diff --git a/executable_semantics/testdata/tuple/index.carbon b/executable_semantics/testdata/tuple/index.carbon index ef5361ee1245..c4451af88e78 100644 --- a/executable_semantics/testdata/tuple/index.carbon +++ b/executable_semantics/testdata/tuple/index.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/tuple/match.carbon b/executable_semantics/testdata/tuple/match.carbon index 05a4bdd24901..9eb0c7bad780 100644 --- a/executable_semantics/testdata/tuple/match.carbon +++ b/executable_semantics/testdata/tuple/match.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/tuple/match_nested.carbon b/executable_semantics/testdata/tuple/match_nested.carbon index 482bd394806d..fe64e3620ef4 100644 --- a/executable_semantics/testdata/tuple/match_nested.carbon +++ b/executable_semantics/testdata/tuple/match_nested.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/tuple/no_ending_comma.carbon b/executable_semantics/testdata/tuple/no_ending_comma.carbon index c02b9a76a9aa..6daddc825edc 100644 --- a/executable_semantics/testdata/tuple/no_ending_comma.carbon +++ b/executable_semantics/testdata/tuple/no_ending_comma.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/while/basic.carbon b/executable_semantics/testdata/while/basic.carbon index 0142173e1ce7..c86087714734 100644 --- a/executable_semantics/testdata/while/basic.carbon +++ b/executable_semantics/testdata/while/basic.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/while/break.carbon b/executable_semantics/testdata/while/break.carbon index 764b9e434301..d58cc570ffb8 100644 --- a/executable_semantics/testdata/while/break.carbon +++ b/executable_semantics/testdata/while/break.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0 diff --git a/executable_semantics/testdata/while/continue.carbon b/executable_semantics/testdata/while/continue.carbon index dc0f6d83c421..4a1272e27e0b 100644 --- a/executable_semantics/testdata/while/continue.carbon +++ b/executable_semantics/testdata/while/continue.carbon @@ -4,7 +4,7 @@ // // RUN: %{executable_semantics} %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{executable_semantics} --trace %s 2>&1 | \ +// RUN: %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s // AUTOUPDATE: %{executable_semantics} %s // CHECK: result: 0