From: <bi...@us...> - 2014-08-21 22:24:07
|
Revision: 10409 http://sourceforge.net/p/oorexx/code-0/10409 Author: bigrixx Date: 2014-08-21 22:24:02 +0000 (Thu, 21 Aug 2014) Log Message: ----------- Good point for a checkin Modified Paths: -------------- sandbox/rick/newsource/interpreter/api/ThreadContextStubs.cpp sandbox/rick/newsource/interpreter/behaviour/VirtualFunctionTable.cpp sandbox/rick/newsource/interpreter/behaviour/VirtualFunctionTable.xsl sandbox/rick/newsource/interpreter/classes/NumberStringClass.hpp sandbox/rick/newsource/interpreter/classes/StringClass.hpp sandbox/rick/newsource/interpreter/classes/StringClassConversion.cpp sandbox/rick/newsource/interpreter/classes/StringClassMisc.cpp sandbox/rick/newsource/interpreter/classes/StringClassSub.cpp sandbox/rick/newsource/interpreter/classes/StringClassUtil.cpp sandbox/rick/newsource/interpreter/classes/support/StringUtil.cpp sandbox/rick/newsource/interpreter/classes/support/StringUtil.hpp sandbox/rick/newsource/interpreter/execution/NativeCode.hpp sandbox/rick/newsource/interpreter/execution/RexxActivation.cpp sandbox/rick/newsource/interpreter/execution/RexxActivation.hpp sandbox/rick/newsource/interpreter/expression/BuiltinFunctions.cpp sandbox/rick/newsource/interpreter/memory/RexxMemory.cpp sandbox/rick/newsource/interpreter/memory/Setup.cpp sandbox/rick/newsource/interpreter/parser/Clause.cpp sandbox/rick/newsource/interpreter/parser/InstructionParser.cpp sandbox/rick/newsource/interpreter/parser/LanguageParser.cpp sandbox/rick/newsource/interpreter/platform/windows/MemorySupport.cpp sandbox/rick/newsource/interpreter/runtime/Interpreter.cpp Modified: sandbox/rick/newsource/interpreter/api/ThreadContextStubs.cpp =================================================================== --- sandbox/rick/newsource/interpreter/api/ThreadContextStubs.cpp 2014-08-20 22:47:51 UTC (rev 10408) +++ sandbox/rick/newsource/interpreter/api/ThreadContextStubs.cpp 2014-08-21 22:24:02 UTC (rev 10409) @@ -65,6 +65,7 @@ #include "MethodArguments.hpp" #include "LanguageParser.hpp" #include "StemClass.hpp" +#include "NumberStringClass.hpp" BEGIN_EXTERN_C() Modified: sandbox/rick/newsource/interpreter/behaviour/VirtualFunctionTable.cpp =================================================================== --- sandbox/rick/newsource/interpreter/behaviour/VirtualFunctionTable.cpp 2014-08-20 22:47:51 UTC (rev 10408) +++ sandbox/rick/newsource/interpreter/behaviour/VirtualFunctionTable.cpp 2014-08-21 22:24:02 UTC (rev 10409) @@ -50,6 +50,7 @@ /* -- ================================================== -- */ /* -------------------------------------------------------------------------- */ +#include <new> #include "RexxCore.h" @@ -188,505 +189,505 @@ // instantiate an instance of each class into the buffer and // grab the resulting virtual function table - objectPtr = new (objectLoc) RexxObject(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxObject(RESTOREIMAGE); virtualFunctionTable[T_Object] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_ObjectClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_Class] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_ClassClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) ArrayClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) ArrayClass(RESTOREIMAGE); virtualFunctionTable[T_Array] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_ArrayClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) DirectoryClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) DirectoryClass(RESTOREIMAGE); virtualFunctionTable[T_Directory] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_DirectoryClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInteger(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInteger(RESTOREIMAGE); virtualFunctionTable[T_Integer] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxIntegerClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxIntegerClass(RESTOREIMAGE); virtualFunctionTable[T_IntegerClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) ListClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) ListClass(RESTOREIMAGE); virtualFunctionTable[T_List] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_ListClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) MessageClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) MessageClass(RESTOREIMAGE); virtualFunctionTable[T_Message] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_MessageClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) MethodClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) MethodClass(RESTOREIMAGE); virtualFunctionTable[T_Method] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_MethodClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) NumberString(RESTOREIMAGE); + objectPtr = ::new (objectLoc) NumberString(RESTOREIMAGE); virtualFunctionTable[T_NumberString] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_NumberStringClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) QueueClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) QueueClass(RESTOREIMAGE); virtualFunctionTable[T_Queue] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_QueueClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) StemClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) StemClass(RESTOREIMAGE); virtualFunctionTable[T_Stem] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_StemClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxString(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxString(RESTOREIMAGE); virtualFunctionTable[T_String] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_StringClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) SupplierClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) SupplierClass(RESTOREIMAGE); virtualFunctionTable[T_Supplier] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_SupplierClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) TableClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) TableClass(RESTOREIMAGE); virtualFunctionTable[T_Table] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_TableClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) StringTable(RESTOREIMAGE); + objectPtr = ::new (objectLoc) StringTable(RESTOREIMAGE); virtualFunctionTable[T_StringTable] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_StringTableClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RelationClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RelationClass(RESTOREIMAGE); virtualFunctionTable[T_Relation] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_RelationClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) MutableBuffer(RESTOREIMAGE); + objectPtr = ::new (objectLoc) MutableBuffer(RESTOREIMAGE); virtualFunctionTable[T_MutableBuffer] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_MutableBufferClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) PointerClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) PointerClass(RESTOREIMAGE); virtualFunctionTable[T_Pointer] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_PointerClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) BufferClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) BufferClass(RESTOREIMAGE); virtualFunctionTable[T_Buffer] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_BufferClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) WeakReference(RESTOREIMAGE); + objectPtr = ::new (objectLoc) WeakReference(RESTOREIMAGE); virtualFunctionTable[T_WeakReference] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_WeakReferenceClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RoutineClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RoutineClass(RESTOREIMAGE); virtualFunctionTable[T_Routine] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_RoutineClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) PackageClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) PackageClass(RESTOREIMAGE); virtualFunctionTable[T_Package] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_PackageClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxContext(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxContext(RESTOREIMAGE); virtualFunctionTable[T_RexxContext] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_RexxContextClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) IdentityTable(RESTOREIMAGE); + objectPtr = ::new (objectLoc) IdentityTable(RESTOREIMAGE); virtualFunctionTable[T_IdentityTable] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_IdentityTableClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) StackFrameClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) StackFrameClass(RESTOREIMAGE); virtualFunctionTable[T_StackFrame] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_StackFrameClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) SetClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) SetClass(RESTOREIMAGE); virtualFunctionTable[T_Set] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_SetClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) BagClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) BagClass(RESTOREIMAGE); virtualFunctionTable[T_Bag] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE); virtualFunctionTable[T_BagClass] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxNilObject(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxNilObject(RESTOREIMAGE); virtualFunctionTable[T_NilObject] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxBehaviour(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxBehaviour(RESTOREIMAGE); virtualFunctionTable[T_Behaviour] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) MethodDictionary(RESTOREIMAGE); + objectPtr = ::new (objectLoc) MethodDictionary(RESTOREIMAGE); virtualFunctionTable[T_MethodDictionary] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) LibraryPackage(RESTOREIMAGE); + objectPtr = ::new (objectLoc) LibraryPackage(RESTOREIMAGE); virtualFunctionTable[T_LibraryPackage] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxCode(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxCode(RESTOREIMAGE); virtualFunctionTable[T_RexxCode] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) NativeMethod(RESTOREIMAGE); + objectPtr = ::new (objectLoc) NativeMethod(RESTOREIMAGE); virtualFunctionTable[T_NativeMethod] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) NativeRoutine(RESTOREIMAGE); + objectPtr = ::new (objectLoc) NativeRoutine(RESTOREIMAGE); virtualFunctionTable[T_NativeRoutine] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RegisteredRoutine(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RegisteredRoutine(RESTOREIMAGE); virtualFunctionTable[T_RegisteredRoutine] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) CPPCode(RESTOREIMAGE); + objectPtr = ::new (objectLoc) CPPCode(RESTOREIMAGE); virtualFunctionTable[T_CPPCode] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) AttributeGetterCode(RESTOREIMAGE); + objectPtr = ::new (objectLoc) AttributeGetterCode(RESTOREIMAGE); virtualFunctionTable[T_AttributeGetterCode] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) AttributeSetterCode(RESTOREIMAGE); + objectPtr = ::new (objectLoc) AttributeSetterCode(RESTOREIMAGE); virtualFunctionTable[T_AttributeSetterCode] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) ConstantGetterCode(RESTOREIMAGE); + objectPtr = ::new (objectLoc) ConstantGetterCode(RESTOREIMAGE); virtualFunctionTable[T_ConstantGetterCode] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) AbstractCode(RESTOREIMAGE); + objectPtr = ::new (objectLoc) AbstractCode(RESTOREIMAGE); virtualFunctionTable[T_AbstractCode] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) SmartBuffer(RESTOREIMAGE); + objectPtr = ::new (objectLoc) SmartBuffer(RESTOREIMAGE); virtualFunctionTable[T_SmartBuffer] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) IdentityHashContents(RESTOREIMAGE); + objectPtr = ::new (objectLoc) IdentityHashContents(RESTOREIMAGE); virtualFunctionTable[T_IdentityHashContents] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) EqualityHashContents(RESTOREIMAGE); + objectPtr = ::new (objectLoc) EqualityHashContents(RESTOREIMAGE); virtualFunctionTable[T_EqualityHashContents] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) MultiValueContents(RESTOREIMAGE); + objectPtr = ::new (objectLoc) MultiValueContents(RESTOREIMAGE); virtualFunctionTable[T_MultiValueContents] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) StringHashContents(RESTOREIMAGE); + objectPtr = ::new (objectLoc) StringHashContents(RESTOREIMAGE); virtualFunctionTable[T_StringHashContents] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) ListContents(RESTOREIMAGE); + objectPtr = ::new (objectLoc) ListContents(RESTOREIMAGE); virtualFunctionTable[T_ListContents] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxVariable(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxVariable(RESTOREIMAGE); virtualFunctionTable[T_Variable] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) VariableDictionary(RESTOREIMAGE); + objectPtr = ::new (objectLoc) VariableDictionary(RESTOREIMAGE); virtualFunctionTable[T_VariableDictionary] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxSimpleVariable(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxSimpleVariable(RESTOREIMAGE); virtualFunctionTable[T_VariableTerm] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxCompoundVariable(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxCompoundVariable(RESTOREIMAGE); virtualFunctionTable[T_CompoundVariableTerm] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxStemVariable(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxStemVariable(RESTOREIMAGE); virtualFunctionTable[T_StemVariableTerm] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxDotVariable(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxDotVariable(RESTOREIMAGE); virtualFunctionTable[T_DotVariableTerm] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxVariableReference(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxVariableReference(RESTOREIMAGE); virtualFunctionTable[T_IndirectVariableTerm] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxExpressionFunction(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxExpressionFunction(RESTOREIMAGE); virtualFunctionTable[T_FunctionCallTerm] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxExpressionMessage(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxExpressionMessage(RESTOREIMAGE); virtualFunctionTable[T_MessageSendTerm] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxUnaryOperator(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxUnaryOperator(RESTOREIMAGE); virtualFunctionTable[T_UnaryOperatorTerm] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxBinaryOperator(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxBinaryOperator(RESTOREIMAGE); virtualFunctionTable[T_BinaryOperatorTerm] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxExpressionLogical(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxExpressionLogical(RESTOREIMAGE); virtualFunctionTable[T_LogicalTerm] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstruction(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstruction(RESTOREIMAGE); virtualFunctionTable[T_Instruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionAddress(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionAddress(RESTOREIMAGE); virtualFunctionTable[T_AddressInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionAssignment(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionAssignment(RESTOREIMAGE); virtualFunctionTable[T_AssignmentInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionCall(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionCall(RESTOREIMAGE); virtualFunctionTable[T_CallInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionDynamicCall(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionDynamicCall(RESTOREIMAGE); virtualFunctionTable[T_DynamicCallInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionCallOn(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionCallOn(RESTOREIMAGE); virtualFunctionTable[T_CallOnInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionCommand(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionCommand(RESTOREIMAGE); virtualFunctionTable[T_CommandInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionSimpleDo(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionSimpleDo(RESTOREIMAGE); virtualFunctionTable[T_SimpleDoInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionDoForever(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionDoForever(RESTOREIMAGE); virtualFunctionTable[T_DoForeverInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionDoOver(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionDoOver(RESTOREIMAGE); virtualFunctionTable[T_DoOverInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionDoOverUntil(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionDoOverUntil(RESTOREIMAGE); virtualFunctionTable[T_DoOverUntilInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionDoOverWhile(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionDoOverWhile(RESTOREIMAGE); virtualFunctionTable[T_DoOverWhileInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionControlledDo(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionControlledDo(RESTOREIMAGE); virtualFunctionTable[T_ControlledDoInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionControlledDoUntil(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionControlledDoUntil(RESTOREIMAGE); virtualFunctionTable[T_ControlledDoUntilInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionControlledDoWhile(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionControlledDoWhile(RESTOREIMAGE); virtualFunctionTable[T_ControlledDoWhileInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionDoWhile(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionDoWhile(RESTOREIMAGE); virtualFunctionTable[T_DoWhileInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionDoUntil(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionDoUntil(RESTOREIMAGE); virtualFunctionTable[T_DoUntilInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionDoCount(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionDoCount(RESTOREIMAGE); virtualFunctionTable[T_DoCountInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionDoCountUntil(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionDoCountUntil(RESTOREIMAGE); virtualFunctionTable[T_DoCountUntilInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionDoCountWhile(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionDoCountWhile(RESTOREIMAGE); virtualFunctionTable[T_DoCountWhileInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionDrop(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionDrop(RESTOREIMAGE); virtualFunctionTable[T_DropInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionElse(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionElse(RESTOREIMAGE); virtualFunctionTable[T_ElseInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionEnd(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionEnd(RESTOREIMAGE); virtualFunctionTable[T_EndInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionEndIf(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionEndIf(RESTOREIMAGE); virtualFunctionTable[T_EndIfInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionExit(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionExit(RESTOREIMAGE); virtualFunctionTable[T_ExitInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionExpose(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionExpose(RESTOREIMAGE); virtualFunctionTable[T_ExposeInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionForward(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionForward(RESTOREIMAGE); virtualFunctionTable[T_ForwardInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionGuard(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionGuard(RESTOREIMAGE); virtualFunctionTable[T_GuardInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionIf(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionIf(RESTOREIMAGE); virtualFunctionTable[T_IfInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionCaseWhen(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionCaseWhen(RESTOREIMAGE); virtualFunctionTable[T_CaseWhenInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionInterpret(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionInterpret(RESTOREIMAGE); virtualFunctionTable[T_InterpretInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionLabel(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionLabel(RESTOREIMAGE); virtualFunctionTable[T_LabelInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionLeave(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionLeave(RESTOREIMAGE); virtualFunctionTable[T_LeaveInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionMessage(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionMessage(RESTOREIMAGE); virtualFunctionTable[T_MessageInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionNop(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionNop(RESTOREIMAGE); virtualFunctionTable[T_NopInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionNumeric(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionNumeric(RESTOREIMAGE); virtualFunctionTable[T_NumericInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionOptions(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionOptions(RESTOREIMAGE); virtualFunctionTable[T_OptionsInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionOtherwise(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionOtherwise(RESTOREIMAGE); virtualFunctionTable[T_OtherwiseInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionParse(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionParse(RESTOREIMAGE); virtualFunctionTable[T_ParseInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionProcedure(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionProcedure(RESTOREIMAGE); virtualFunctionTable[T_ProcedureInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionQueue(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionQueue(RESTOREIMAGE); virtualFunctionTable[T_QueueInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionRaise(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionRaise(RESTOREIMAGE); virtualFunctionTable[T_RaiseInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionReply(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionReply(RESTOREIMAGE); virtualFunctionTable[T_ReplyInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionReturn(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionReturn(RESTOREIMAGE); virtualFunctionTable[T_ReturnInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionSay(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionSay(RESTOREIMAGE); virtualFunctionTable[T_SayInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionSelect(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionSelect(RESTOREIMAGE); virtualFunctionTable[T_SelectInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionSelectCase(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionSelectCase(RESTOREIMAGE); virtualFunctionTable[T_SelectCaseInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionSignal(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionSignal(RESTOREIMAGE); virtualFunctionTable[T_SignalInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionDynamicSignal(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionDynamicSignal(RESTOREIMAGE); virtualFunctionTable[T_DynamicSignalInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionSignalOn(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionSignalOn(RESTOREIMAGE); virtualFunctionTable[T_SignalOnInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionThen(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionThen(RESTOREIMAGE); virtualFunctionTable[T_ThenInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionTrace(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionTrace(RESTOREIMAGE); virtualFunctionTable[T_TraceInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxInstructionUseStrict(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxInstructionUseStrict(RESTOREIMAGE); virtualFunctionTable[T_UseInstruction] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) ClassDirective(RESTOREIMAGE); + objectPtr = ::new (objectLoc) ClassDirective(RESTOREIMAGE); virtualFunctionTable[T_ClassDirective] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) LibraryDirective(RESTOREIMAGE); + objectPtr = ::new (objectLoc) LibraryDirective(RESTOREIMAGE); virtualFunctionTable[T_LibraryDirective] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RequiresDirective(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RequiresDirective(RESTOREIMAGE); virtualFunctionTable[T_RequiresDirective] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) CompoundTableElement(RESTOREIMAGE); + objectPtr = ::new (objectLoc) CompoundTableElement(RESTOREIMAGE); virtualFunctionTable[T_CompoundElement] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) ParseTrigger(RESTOREIMAGE); + objectPtr = ::new (objectLoc) ParseTrigger(RESTOREIMAGE); virtualFunctionTable[T_ParseTrigger] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) ProgramSource(RESTOREIMAGE); + objectPtr = ::new (objectLoc) ProgramSource(RESTOREIMAGE); virtualFunctionTable[T_ProgramSource] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) ArrayProgramSource(RESTOREIMAGE); + objectPtr = ::new (objectLoc) ArrayProgramSource(RESTOREIMAGE); virtualFunctionTable[T_ArrayProgramSource] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) BufferProgramSource(RESTOREIMAGE); + objectPtr = ::new (objectLoc) BufferProgramSource(RESTOREIMAGE); virtualFunctionTable[T_BufferProgramSource] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) FileProgramSource(RESTOREIMAGE); + objectPtr = ::new (objectLoc) FileProgramSource(RESTOREIMAGE); virtualFunctionTable[T_FileProgramSource] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) NumberArray(RESTOREIMAGE); + objectPtr = ::new (objectLoc) NumberArray(RESTOREIMAGE); virtualFunctionTable[T_NumberArray] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxObject(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxObject(RESTOREIMAGE); virtualFunctionTable[T_Memory] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) InternalStack(RESTOREIMAGE); + objectPtr = ::new (objectLoc) InternalStack(RESTOREIMAGE); virtualFunctionTable[T_InternalStack] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) LiveStack(RESTOREIMAGE); + objectPtr = ::new (objectLoc) LiveStack(RESTOREIMAGE); virtualFunctionTable[T_LiveStack] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) PushThroughStack(RESTOREIMAGE); + objectPtr = ::new (objectLoc) PushThroughStack(RESTOREIMAGE); virtualFunctionTable[T_PushThroughStack] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) Activity(RESTOREIMAGE); + objectPtr = ::new (objectLoc) Activity(RESTOREIMAGE); virtualFunctionTable[T_Activity] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxActivation(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxActivation(RESTOREIMAGE); virtualFunctionTable[T_Activation] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) NativeActivation(RESTOREIMAGE); + objectPtr = ::new (objectLoc) NativeActivation(RESTOREIMAGE); virtualFunctionTable[T_NativeActivation] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) ActivationFrameBuffer(RESTOREIMAGE); + objectPtr = ::new (objectLoc) ActivationFrameBuffer(RESTOREIMAGE); virtualFunctionTable[T_ActivationFrameBuffer] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) Envelope(RESTOREIMAGE); + objectPtr = ::new (objectLoc) Envelope(RESTOREIMAGE); virtualFunctionTable[T_Envelope] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) LanguageParser(RESTOREIMAGE); + objectPtr = ::new (objectLoc) LanguageParser(RESTOREIMAGE); virtualFunctionTable[T_LanguageParser] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxClause(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxClause(RESTOREIMAGE); virtualFunctionTable[T_Clause] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) RexxToken(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxToken(RESTOREIMAGE); virtualFunctionTable[T_Token] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) DoBlock(RESTOREIMAGE); + objectPtr = ::new (objectLoc) DoBlock(RESTOREIMAGE); virtualFunctionTable[T_DoBlock] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) InterpreterInstance(RESTOREIMAGE); + objectPtr = ::new (objectLoc) InterpreterInstance(RESTOREIMAGE); virtualFunctionTable[T_InterpreterInstance] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) SecurityManager(RESTOREIMAGE); + objectPtr = ::new (objectLoc) SecurityManager(RESTOREIMAGE); virtualFunctionTable[T_SecurityManager] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) CommandHandler(RESTOREIMAGE); + objectPtr = ::new (objectLoc) CommandHandler(RESTOREIMAGE); virtualFunctionTable[T_CommandHandler] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) MapBucket(RESTOREIMAGE); + objectPtr = ::new (objectLoc) MapBucket(RESTOREIMAGE); virtualFunctionTable[T_MapBucket] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) MapTable(RESTOREIMAGE); + objectPtr = ::new (objectLoc) MapTable(RESTOREIMAGE); virtualFunctionTable[T_MapTable] = getVftPointer(objectLoc); - objectPtr = new (objectLoc) TrapHandler(RESTOREIMAGE); + objectPtr = ::new (objectLoc) TrapHandler(RESTOREIMAGE); virtualFunctionTable[T_TrapHandler] = getVftPointer(objectLoc); }; Modified: sandbox/rick/newsource/interpreter/behaviour/VirtualFunctionTable.xsl =================================================================== --- sandbox/rick/newsource/interpreter/behaviour/VirtualFunctionTable.xsl 2014-08-20 22:47:51 UTC (rev 10408) +++ sandbox/rick/newsource/interpreter/behaviour/VirtualFunctionTable.xsl 2014-08-21 22:24:02 UTC (rev 10409) @@ -53,6 +53,7 @@ /* -- ================================================== -- */ /* -------------------------------------------------------------------------- */ +#include <new> #include "RexxCore.h" </xsl:text> @@ -96,16 +97,16 @@ <xsl:for-each select="Exported/Class"> <xsl:text> - objectPtr = new (objectLoc) </xsl:text><xsl:value-of select="@class"/><xsl:text>(RESTOREIMAGE); + objectPtr = ::new (objectLoc) </xsl:text><xsl:value-of select="@class"/><xsl:text>(RESTOREIMAGE); virtualFunctionTable[T_</xsl:text><xsl:value-of select="@id"/><xsl:text>] = getVftPointer(objectLoc); </xsl:text> <xsl:if test="@classclass"> <xsl:text> - objectPtr = new (objectLoc) </xsl:text><xsl:value-of select="@classclass"/><xsl:text>(RESTOREIMAGE);</xsl:text> + objectPtr = ::new (objectLoc) </xsl:text><xsl:value-of select="@classclass"/><xsl:text>(RESTOREIMAGE);</xsl:text> </xsl:if> <xsl:if test="not(@classclass)"> <xsl:text> - objectPtr = new (objectLoc) RexxClass(RESTOREIMAGE);</xsl:text> + objectPtr = ::new (objectLoc) RexxClass(RESTOREIMAGE);</xsl:text> </xsl:if> <xsl:text> virtualFunctionTable[T_</xsl:text><xsl:value-of select="@id"/><xsl:text>Class] = getVftPointer(objectLoc); @@ -115,7 +116,7 @@ <xsl:for-each select="Internal/Class"> <xsl:text> - objectPtr = new (objectLoc) </xsl:text><xsl:value-of select="@class"/><xsl:text>(RESTOREIMAGE); + objectPtr = ::new (objectLoc) </xsl:text><xsl:value-of select="@class"/><xsl:text>(RESTOREIMAGE); virtualFunctionTable[T_</xsl:text><xsl:value-of select="@id"/><xsl:text>] = getVftPointer(objectLoc); </xsl:text> </xsl:for-each> @@ -123,13 +124,13 @@ <xsl:for-each select="Transient/Class"> <xsl:if test="@objectvirtual"> <xsl:text> - objectPtr = new (objectLoc) RexxObject(RESTOREIMAGE); + objectPtr = ::new (objectLoc) RexxObject(RESTOREIMAGE); virtualFunctionTable[T_</xsl:text><xsl:value-of select="@id"/><xsl:text>] = getVftPointer(objectLoc); </xsl:text> </xsl:if> <xsl:if test="not(@objectvirtual)"> <xsl:text> - objectPtr = new (objectLoc) </xsl:text><xsl:value-of select="@class"/><xsl:text>(RESTOREIMAGE); + objectPtr = ::new (objectLoc) </xsl:text><xsl:value-of select="@class"/><xsl:text>(RESTOREIMAGE); virtualFunctionTable[T_</xsl:text><xsl:value-of select="@id"/><xsl:text>] = getVftPointer(objectLoc); </xsl:text> </xsl:if> Modified: sandbox/rick/newsource/interpreter/classes/NumberStringClass.hpp =================================================================== --- sandbox/rick/newsource/interpreter/classes/NumberStringClass.hpp 2014-08-20 22:47:51 UTC (rev 10408) +++ sandbox/rick/newsource/interpreter/classes/NumberStringClass.hpp 2014-08-21 22:24:02 UTC (rev 10409) @@ -249,7 +249,6 @@ } //quick test for a numeric overflow - void checkOverflow(); void checkLostDigits(size_t digits); NumberString *operatorArgument(RexxObject *right); Modified: sandbox/rick/newsource/interpreter/classes/StringClass.hpp =================================================================== --- sandbox/rick/newsource/interpreter/classes/StringClass.hpp 2014-08-20 22:47:51 UTC (rev 10408) +++ sandbox/rick/newsource/interpreter/classes/StringClass.hpp 2014-08-21 22:24:02 UTC (rev 10409) @@ -102,7 +102,7 @@ class WordIterator { public: - inline WordIterator(char *b, size_t l) : nextPosition(b), scanLength(l) {} + inline WordIterator(const char *b, size_t l) : nextPosition(b), scanLength(l) {} inline WordIterator(RexxString *s) : nextPosition(s->getStringData()), scanLength(s->getLength()) {} /** Modified: sandbox/rick/newsource/interpreter/classes/StringClassConversion.cpp =================================================================== --- sandbox/rick/newsource/interpreter/classes/StringClassConversion.cpp 2014-08-20 22:47:51 UTC (rev 10408) +++ sandbox/rick/newsource/interpreter/classes/StringClassConversion.cpp 2014-08-21 22:24:02 UTC (rev 10409) @@ -48,6 +48,7 @@ #include "ActivityManager.hpp" #include "StringUtil.hpp" #include "MethodArguments.hpp" +#include "NumberStringClass.hpp" /** @@ -207,7 +208,7 @@ } // get the reduced digit value - char digitValue = (char)(match - DIGITS_BASE64); + int digitValue = (int)(match - DIGITS_BASE64); // digit value is the binary value of this digit. Now, based // on which digit of the input set we're working on, we update @@ -229,14 +230,14 @@ // third digit. 4 bits are used to complete the // current character, the remaining 2 bits go into the next one. case 2: - *destination |= (char)(j >> 2); + *destination |= (char)(digitValue >> 2); destination++; - *destination = (char)(j << 6); + *destination = (char)(digitValue << 6); break; // last character of the set. All 6 bits are inserted into // the current output position. case 3: - *destination |= (char)j; + *destination |= (char)digitValue; destination++; break; } @@ -256,14 +257,8 @@ */ RexxString *RexxString::c2x() { - size_t InputLength; /* length of converted string */ - RexxString *Retval; /* return value */ - const char *Source; /* input string pointer */ - char * Destination; /* output string pointer */ - char ch; /* current character */ - // a null string is still a null string - size_t nputLength = getLength(); + size_t inputLength = getLength(); if (inputLength == 0) { return GlobalNames::NULLSTRING; @@ -489,7 +484,7 @@ // if this is a negative value, we perform the 2s complement negation operation // in place. Note that we are working off of a copy of the original data, so this // is fine. - if (Negative) + if (negative) { char *scan = stringPtr; size_t tempSize = stringLength; @@ -539,13 +534,13 @@ *stringPtr &= 0x0f; } - scan = stringPtr; + char *scan = stringPtr; // all of this is done using the current digits setting, so get a buffer with // sufficient space to perform the math BufferClass *buffer = new_buffer(currentDigits + NumberString::OVERFLOWSPACE + 1); // we start building from the end forward - char *Accumulator = buffer->getData() + currentDigits + NumberString::OVERFLOWSPACE; + char *accumulator = buffer->getData() + currentDigits + NumberString::OVERFLOWSPACE; // make sure the buffer is cleared out memset(buffer->getData(), '\0', currentDigits + NumberString::OVERFLOWSPACE + 1); char *highDigit = accumulator - 1; @@ -555,7 +550,7 @@ { // ok, so for each nibble, we add to the accumulator under base 10, then // we multiply by 16 to perform a shift. - ch = *scan++; + int ch = *scan++; highDigit = NumberString::addToBaseTen((ch & 0xf0) >> 4, accumulator, highDigit); // multiply by 16 @@ -586,7 +581,7 @@ // get accumulator length...this will be our final result length size_t decLength = (accumulator - highDigit); // now we need to turn the math digits into real characters for the result - tempLength = decLength; + size_t tempLength = decLength; scan = highDigit + 1; while (tempLength--) { @@ -621,7 +616,7 @@ RexxString *RexxString::b2x() { // a null bit string converts to a null string - if getLength() == 0) + if (isNullString()) { return GlobalNames::NULLSTRING; } @@ -629,7 +624,7 @@ // validate the string content, getting a bit count back. size_t bits = StringUtil::validateSet(getStringData(), getLength(), "01", 4, false); // every 4 bits will be one hex character in the result - RexxString *retval = raw_string((Bits + 3) / 4); + RexxString *retval = raw_string((bits + 3) / 4); char *destination = retval->getWritableData(); const char *source = getStringData(); @@ -656,7 +651,7 @@ } size_t jump; // string movement offset // get the next nibble worth of characters - StringUtil::chGetSm(&nibble[0] + (4 - excess), source, length, excess, "01", &jump); + StringUtil::chGetSm(&nibble[0] + (4 - excess), source, length, excess, "01", jump); // insert into the destination as a hex character *destination++ = StringUtil::packNibble(nibble); source += jump; @@ -699,7 +694,7 @@ int val = StringUtil::hexDigitToInt(ch); StringUtil::unpackNibble(val, destination); destination += 4; - Nibbles--; + nibbles--; } } return retval; Modified: sandbox/rick/newsource/interpreter/classes/StringClassMisc.cpp =================================================================== --- sandbox/rick/newsource/interpreter/classes/StringClassMisc.cpp 2014-08-20 22:47:51 UTC (rev 10408) +++ sandbox/rick/newsource/interpreter/classes/StringClassMisc.cpp 2014-08-21 22:24:02 UTC (rev 10409) @@ -659,17 +659,6 @@ RexxString *RexxString::translate(RexxString *tableo, RexxString *tablei, RexxString *pad, RexxInteger *_start, RexxInteger *_range) { - RexxString *Retval; /* return value */ - const char *OutTable; /* output table */ - size_t OutTableLength; /* length of output table */ - const char *InTable; /* input table */ - char *ScanPtr; /* scanning pointer */ - size_t ScanLength; /* scanning length */ - size_t InTableLength; /* length of input table */ - char PadChar; /* pad character */ - char ch; /* current character */ - size_t Position; /* table position */ - // if there are no input or output table specified, and no pad, this is just an uppercase. if (tableo == OREF_NULL && tablei == OREF_NULL && pad == OREF_NULL) { @@ -682,7 +671,7 @@ size_t outTableLength = tableo->getLength(); tablei = optionalStringArgument(tablei, GlobalNames::NULLSTRING, ARG_TWO); - size_t nTableLength = tablei->getLength(); + size_t inTableLength = tablei->getLength(); const char *inTable = tablei->getStringData(); const char *outTable = tableo->getStringData(); Modified: sandbox/rick/newsource/interpreter/classes/StringClassSub.cpp =================================================================== --- sandbox/rick/newsource/interpreter/classes/StringClassSub.cpp 2014-08-20 22:47:51 UTC (rev 10408) +++ sandbox/rick/newsource/interpreter/classes/StringClassSub.cpp 2014-08-21 22:24:02 UTC (rev 10409) @@ -189,9 +189,9 @@ } // insert position beyond the length? We might need to insert some leading // pad characters, the front part is everything and there is no back part to copy - else if (position >= targetLength) + else if (insertPosition >= targetLength) { - leadPad = position - targetLength; + leadPad = insertPosition - targetLength; frontLength = targetLength; backLength = 0; } @@ -201,8 +201,8 @@ else { leadPad = 0; - frontLength = position; - backLength = targetLength - position; + frontLength = insertPosition; + backLength = targetLength - insertPosition; } // we might need to truncate the inserted string if the specified length is @@ -221,7 +221,7 @@ builder.pad(padChar, leadPad); // if we have new string data to copy, this is next - builder.append(newStr->getStringData(), newStringLength); + builder.append(newStrObj->getStringData(), newStringLength); // and trailing pad required? builder.pad(padChar, padLength); @@ -283,23 +283,10 @@ */ RexxString *RexxString::overlay(RexxString *newStrObj, RexxInteger *position, RexxInteger *_length, RexxString *pad) { - RexxString *Retval; /* return string */ - RexxString *newStr; /* return string */ - size_t OverlayPos; /* overlay position */ - size_t OverlayLen; /* overlay length */ - size_t NewLen; /* length of overlay string */ - size_t TargetLen; /* target length */ - size_t FrontLen; /* front length */ - size_t BackLen; /* back length */ - size_t FrontPad; /* front pad length */ - size_t BackPad; /* back pad length */ - char PadChar; /* pad character */ - char *Current; /* current copy location */ - size_t targetLen = getLength(); // make sure we have a real string value for the overlay newStrObj = stringArgument(newStrObj, ARG_ONE); - size_t newLen = newStr->getLength(); + size_t newLen = newStrObj->getLength(); // the overlay postion defaults to the first character size_t overlayPos = optionalPositionArgument(position, 1, ARG_TWO); @@ -325,7 +312,7 @@ size_t frontPad = 0; // calculate the default split positions - size_t frontLen = overLayPos - 1; + size_t frontLen = overlayPos - 1; size_t backLen = targetLen - (overlayPos + overlayLen - 1); // if the overlay position is beyond the length of the target @@ -353,7 +340,7 @@ // add any leading padding builder.pad(padChar, frontPad); // copy the overlay string (or portion of the overlay string) - builder.append(newStr->getStringData(), newLen); + builder.append(newStrObj->getStringData(), newLen); // add any possible back padding builder.pad(padChar, backPad); // and finally the trailing section @@ -498,7 +485,7 @@ } RexxString *retval = raw_string(size); - StringBuilfer builder(retval); + StringBuilder builder(retval); // the requested length might be longer than the target string, so // cap at that size Modified: sandbox/rick/newsource/interpreter/classes/StringClassUtil.cpp =================================================================== --- sandbox/rick/newsource/interpreter/classes/StringClassUtil.cpp 2014-08-20 22:47:51 UTC (rev 10408) +++ sandbox/rick/newsource/interpreter/classes/StringClassUtil.cpp 2014-08-21 22:24:02 UTC (rev 10409) @@ -156,7 +156,7 @@ RexxString *parameter = (RexxString *)stringArgument(argument, position); // get the first character of the string - char option == toupper(parameter->getChar(0)); + char option = toupper(parameter->getChar(0)); // if not one of the valid options (null string is not valid), raise the error if (parameter->isNullString() || strchr(validOptions, option) == NULL) { Modified: sandbox/rick/newsource/interpreter/classes/support/StringUtil.cpp =================================================================== --- sandbox/rick/newsource/interpreter/classes/support/StringUtil.cpp 2014-08-20 22:47:51 UTC (rev 10408) +++ sandbox/rick/newsource/interpreter/classes/support/StringUtil.cpp 2014-08-21 22:24:02 UTC (rev 10409) @@ -48,6 +48,7 @@ #include "StringUtil.hpp" #include "QueueClass.hpp" #include "MethodArguments.hpp" +#include "NumberStringClass.hpp" /** @@ -101,7 +102,7 @@ padCount = length - substrLength; } RexxString *retval = raw_string(length); - StringClass::StringBuilder builder(retval); + RexxString::StringBuilder builder(retval); // copy the substring data builder.append(string + position, substrLength); @@ -660,7 +661,7 @@ memset(buf, '0', 4); // set first 4 bytes to zero memcpy(buf+4, string, 4); // copy next 4 bytes from the string - int i = packByte(Buf); // pack to a single byte + int i = packByte(buf); // pack to a single byte return "0123456789ABCDEF"[i]; // convert to a printable character } @@ -723,11 +724,12 @@ size_t residue = 0; const char *current = string; const char *spaceLocation = NULL; + char ch; // scan the entire string section for (; length; length--) { - char ch = *current++; + ch = *current++; // if this is in the set, then add in the count of digits if (ch != '\0' && strchr(set, ch) != NULL) @@ -838,7 +840,7 @@ // if the string we're packing is a null string, the result is also a null string if (stringLength == 0) { - return GlobalNames::NullString; + return GlobalNames::NULLSTRING; } const char *source = string; @@ -866,7 +868,7 @@ chGetSm(buf + 2 - b, source, stringLength, b, "0123456789ABCDEFabcdef", scanned); // now convert this into a single character and insert into the destination string *destination++ = packByte2(buf); - Source += scanned; + source += scanned; stringLength -= scanned; nibbles -= b; } @@ -939,7 +941,7 @@ * * @return The count of located characters. */ -int StringUtil::validateSet(const char *string, size_t length, const char *set, int modulus, size_t &count) +bool StringUtil::validateCharacterSet(const char *string, size_t length, const char *set, int modulus, size_t &count) { // leading whitespace not permitted if (*string == RexxString::ch_SPACE || *string == RexxString::ch_TAB) @@ -952,11 +954,12 @@ size_t residue = 0; const char *current = string; const char *spaceLocation = NULL; + char ch; // scan the entire string section for (; length; length--) { - char ch = *current++; + ch = *current++; // if this is in the set, then add in the count of digits if (ch != '\0' && strchr(set, ch) != NULL) @@ -1028,7 +1031,7 @@ case RexxString::DATATYPE_BINARY: { size_t count; - return booleanObject(len == 0 || valSet(scanp, len, RexxString::BINARY, 4, &count)); + return booleanObject(len == 0 || validateCharacterSet(scanp, len, RexxString::BINARY, 4, count)); } case RexxString::DATATYPE_LOWERCASE: @@ -1070,7 +1073,7 @@ case RexxString::DATATYPE_HEX: { size_t count; - return booleanObject(len == 0 || valSet(scanp, len, RexxString::HEX_CHAR_STR, 2, &count)); + return booleanObject(len == 0 || validateCharacterSet(scanp, len, RexxString::HEX_CHAR_STR, 2, count)); } case RexxString::DATATYPE_SYMBOL: @@ -1112,7 +1115,7 @@ } size_t count = 0; - StringClass::WordIterator counter(string, stringLength) + RexxString::WordIterator counter(string, stringLength); // count the words in the string while (counter.next()) @@ -1299,7 +1302,7 @@ } // get an iterator - StringClass::WordIterator iterator(data, length); + RexxString::WordIterator iterator(data, length); // try to skip ahead to the target word...if we don't have that many words, // return a null string @@ -1344,7 +1347,7 @@ } // get an iterator - StringClass::WordIterator iterator(data, length); + RexxString::WordIterator iterator(data, length); // try to skip ahead to the target word...if we don't have that many words, // return an empty array if (!iterator.skipWords(wordPos)) @@ -1388,7 +1391,7 @@ } // get an iterator - StringClass::WordIterator iterator(data, length); + RexxString::WordIterator iterator(data, length); // try to skip ahead to the target word...if we don't have that many words, // return a null string if (!iterator.skipWords(wordPos)) @@ -1396,7 +1399,7 @@ return GlobalNames::NULLSTRING; } - return new_string(iterator.wordPointer(), iterator.wordLength()) + return new_string(iterator.wordPointer(), iterator.wordLength()); } @@ -1412,7 +1415,7 @@ ArrayClass *StringUtil::words(const char *data, size_t length) { // get an iterator - StringClass::WordIterator iterator(data, length); + RexxString::WordIterator iterator(data, length); // we make this size zero so the size and the items count will match Protected<ArrayClass> result = new_array((size_t)0); @@ -1440,7 +1443,7 @@ size_t wordPos = positionArgument(position, ARG_ONE); // get an iterator - StringClass::WordIterator iterator(data, length); + RexxString::WordIterator iterator(data, length); // try to skip ahead to the target word...if we don't have that many words, // return zero if (!iterator.skipWords(wordPos)) @@ -1468,7 +1471,7 @@ size_t wordPos = positionArgument(position , ARG_ONE); // get an iterator - StringClass::WordIterator iterator(data, length); + RexxString::WordIterator iterator(data, length); // try to skip ahead to the target word...if we don't have that many words, // return zero if (!iterator.skipWords(wordPos)) @@ -1516,14 +1519,14 @@ // we know how many potential search attempts we can make. size_t searchCount = (haystackWords - needleWords - count) + 2; - StringClass::WordIterator haystackIterator(haystack, haystackLength); + RexxString::WordIterator haystackIterator(haystack, haystackLength); // skip the haystack ahead to the target word. We know we have at least // count words already - haystackLength.skipWords(count); + haystackIterator.skipWords(count); // now get an iterator for the needle and position at the first word. - StringClass::WordIterator needleIterator(needle, needleLength); + RexxString::WordIterator needleIterator(needle, needleLength); // this will work because we know the needle has at least one word needleIterator.next(); @@ -1535,8 +1538,8 @@ { // copy the current iterator positions. This allows us to advance // without changing the originals - StringClass::WordIterator tempHaystack = haystackIterator; - StringClass::WordIterator tempNeedle = needleIterator; + RexxString::WordIterator tempHaystack = haystackIterator; + RexxString::WordIterator tempNeedle = needleIterator; ... [truncated message content] |