From 468a68dcd0014cd89b3e44e2de5e7da7a61abd8b Mon Sep 17 00:00:00 2001 From: Andrew Plotkin Date: Sun, 28 May 2023 20:09:27 -0400 Subject: [PATCH] It's ...level, eloc. --- inform7/runtime-module/Chapter 2/Emit Code.w | 4 ++-- inter/building-module/Chapter 2/Emitting Inter Schemas.w | 2 +- .../bytecode-module/Chapter 4/The OrigSource Construct.w | 8 ++++---- inter/pipeline-module/Chapter 3/Compile Splats Stage.w | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/inform7/runtime-module/Chapter 2/Emit Code.w b/inform7/runtime-module/Chapter 2/Emit Code.w index a68ede3d6..b096aaf99 100644 --- a/inform7/runtime-module/Chapter 2/Emit Code.w +++ b/inform7/runtime-module/Chapter 2/Emit Code.w @@ -74,8 +74,8 @@ void EmitCode::comment(text_stream *text) { = void EmitCode::origsource(text_provenance *from) { - Produce::guard(OrigSourceInstruction::new(EmitCode::at(), from->textual_filename, (unsigned int)from->line_number, NULL, - (inter_ti) EmitCode::level())); + Produce::guard(OrigSourceInstruction::new_from_provenance(EmitCode::at(), *from, + (inter_ti) EmitCode::level(), NULL)); } @h In value context. diff --git a/inter/building-module/Chapter 2/Emitting Inter Schemas.w b/inter/building-module/Chapter 2/Emitting Inter Schemas.w index 740df8648..c29617e34 100644 --- a/inter/building-module/Chapter 2/Emitting Inter Schemas.w +++ b/inter/building-module/Chapter 2/Emitting Inter Schemas.w @@ -518,7 +518,7 @@ Therefore: } } inter_bookmark *IBM = Produce::at(I); - Produce::guard(OrigSourceInstruction::new(IBM, origfilename, (unsigned int)origlinenum, NULL, (inter_ti) Produce::level(I))); + Produce::guard(OrigSourceInstruction::new(IBM, origfilename, (unsigned int)origlinenum, (inter_ti) Produce::level(I), NULL)); @ An |EVAL_ISNT| node can have any number of children, they are sequentially diff --git a/inter/bytecode-module/Chapter 4/The OrigSource Construct.w b/inter/bytecode-module/Chapter 4/The OrigSource Construct.w index c5f771271..05abccb62 100644 --- a/inter/bytecode-module/Chapter 4/The OrigSource Construct.w +++ b/inter/bytecode-module/Chapter 4/The OrigSource Construct.w @@ -34,7 +34,7 @@ from any specific source location." The line number is ignored in this case. = inter_error_message *OrigSourceInstruction::new(inter_bookmark *IBM, text_stream *file_name, inter_ti line_number, - inter_error_location *eloc, inter_ti level) { + inter_ti level, inter_error_location *eloc) { inter_ti FID = 0; if (file_name) { inter_warehouse *warehouse = InterBookmark::warehouse(IBM); @@ -54,8 +54,8 @@ inter_error_message *OrigSourceInstruction::new(inter_bookmark *IBM, inter_error_message *OrigSourceInstruction::new_from_provenance(inter_bookmark *IBM, text_provenance prov, - inter_error_location *eloc, inter_ti level) { - return OrigSourceInstruction::new(IBM, prov.textual_filename, (unsigned int)prov.line_number, eloc, level); + inter_ti level, inter_error_location *eloc) { + return OrigSourceInstruction::new(IBM, prov.textual_filename, (unsigned int)prov.line_number, level, eloc); } void OrigSourceInstruction::transpose(inter_construct *IC, inter_tree_node *P, @@ -92,7 +92,7 @@ void OrigSourceInstruction::read(inter_construct *IC, inter_bookmark *IBM, inter inter_ti line_number = 0; if (Str::len(lc) > 0) line_number = (inter_ti) Str::atoi(lc, 0); *E = OrigSourceInstruction::new(IBM, temp_filename, line_number, - eloc, (inter_ti) ilp->indent_level); + (inter_ti) ilp->indent_level, eloc); } DISCARD_TEXT(file_as_text) } diff --git a/inter/pipeline-module/Chapter 3/Compile Splats Stage.w b/inter/pipeline-module/Chapter 3/Compile Splats Stage.w index 124e3d523..70c33acb0 100644 --- a/inter/pipeline-module/Chapter 3/Compile Splats Stage.w +++ b/inter/pipeline-module/Chapter 3/Compile Splats Stage.w @@ -157,7 +157,7 @@ meaningful; the node just winds up tacked onto the end of the kit. inter_bookmark content_at = InterBookmark::after_this_node(P); inter_bookmark *IBM = &content_at; inter_ti B = (inter_ti) InterBookmark::baseline(IBM) + 1; - Produce::guard(OrigSourceInstruction::new(IBM, origfilestr, (unsigned int)origline, NULL, B)); + Produce::guard(OrigSourceInstruction::new(IBM, origfilestr, (unsigned int)origline, B, NULL)); NodePlacement::remove(P); } Regexp::dispose_of(&mr); @@ -1487,9 +1487,9 @@ int CompileSplatsStage::function_bodies(pipeline_step *step, compile_splats_stat IdentifierFinders::next_priority(&finder, scope1); IdentifierFinders::next_priority(&finder, scope2); IdentifierFinders::set_namespace(&finder, req->namespace); - Produce::guard(OrigSourceInstruction::new_from_provenance(Produce::at(I), req->provenance, NULL, (inter_ti) Produce::level(I))); + Produce::guard(OrigSourceInstruction::new_from_provenance(Produce::at(I), req->provenance, (inter_ti) Produce::level(I), NULL)); EmitInterSchemas::emit(I, &VH, sch, finder, NULL, NULL, NULL); - Produce::guard(OrigSourceInstruction::new(Produce::at(I), NULL, 0, NULL, (inter_ti) Produce::level(I))); + Produce::guard(OrigSourceInstruction::new(Produce::at(I), NULL, 0, (inter_ti) Produce::level(I), NULL)); CompileSplatsStage::report_kit_errors(sch, req); Produce::pop_code_position(I); Produce::set_function(I, NULL);