GP-5752 Fixed missing characters at the end of operands, for example closing parenthesis added in the base sleigh instruction constructor.

This commit is contained in:
emteere 2025-07-17 15:49:39 -04:00
parent 9ddc746e6f
commit 9979a6f9ec
6 changed files with 16 additions and 28 deletions

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -708,7 +708,7 @@ public class SleighInstructionPrototype implements InstructionPrototype {
}
@Override
public String getSeparator(int opIndex, InstructionContext context) {
public String getSeparator(int opIndex) {
if (opIndex < 0 || opIndex > opresolve.length) {
return null;
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -550,7 +550,7 @@ public class PseudoInstruction extends PseudoCodeUnit implements Instruction, In
@Override
public String getSeparator(int opIndex) {
return instrProto.getSeparator(opIndex, this);
return instrProto.getSeparator(opIndex);
}
@Override

View file

@ -349,18 +349,7 @@ public class InstructionDB extends CodeUnitDB implements Instruction, Instructio
@Override
public String getSeparator(int opIndex) {
if (opIndex < 0 || opIndex >= getNumOperands()) {
return null;
}
lock.acquire();
try {
return proto.getSeparator(opIndex, this);
}
finally {
lock.release();
}
return proto.getSeparator(opIndex);
}
@Override

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -194,10 +194,9 @@ public interface InstructionPrototype {
* The separator string for numOperands+1 are the characters after the last operand.
*
* @param opIndex valid values are 0 thru numOperands+1
* @param context the instruction context
* @return separator string, or null if there is no string
*/
public String getSeparator(int opIndex, InstructionContext context);
public String getSeparator(int opIndex);
/**
* Get a List of Objects that can be used to render an operands representation.

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -176,7 +176,7 @@ public class InvalidPrototype implements InstructionPrototype, ParserContext {
}
@Override
public String getSeparator(int opIndex, InstructionContext context) {
public String getSeparator(int opIndex) {
return null;
}