Commits

Anonymous committed f7e7c8d

#50: mainlining directly

Comments (0)

Files changed (57)

docs/src/BuildSystem.txt

 Available Targets
 -----------------
 
-GNU project have, by convention, a set of typical targets that can be built.
+GNU projects have, by convention, a set of typical targets that can be built.
 The PyMite build system shall support the following set of targets
 by typing ``make`` `<target>` at the command prompt:
 
     Compiles and executes PyMite self-tests found in ``src/tests/``.
 
 
-Testing
--------
+Build Options
+-------------
 
-While it is possible to write unit tests for PyMite's VM.  It is often more
-effective to write small Python programs to run in the PyMite VM to test the
-VM and libraries.  The tests in ``src/tests/`` do exactly this.  By running
-``make check``, the VM, pmstdlib, and all programs in ``src/tests/`` are built.
+There are a handful of build options that one can provide to ``make`` that
+alter PyMite's behavior or set its configuration in some way.  The following
+is a list of the build options and their possible values.
+
+``DEBUG``:
+    Builds PyMite with extra debugging information and code.
+    Possible values: ``true``, ``false``.  The default is ``false``.
+    Example: ``make DEBUG=true``
+
+``HEAP_SIZE``:
+    Specifies the desired size of the PyMite heap in bytes.
+    Possible values can be any positive integer.  To avoid errors, the size
+    should be less than the size of physical memory and (for ARM targets)
+    an integer multiple of 4.  The default value depends on the ``TARGET``.
+    See the Makefile for details.  Example: ``make HEAP_SIZE=0x1000``
+
+``TARGET``:
+    Specifies the intended build target.  Possible values: ``ARM``, ``AVR``,
+    ``DESKTOP``.  The default is ``DESKTOP``.  Example: ``make TARGET=AVR``
+
+``TARGET_MCU``:
+    Specifies the precise chip to compile for when ``TARGET`` is something
+    other than ``DESKTOP``.  For example, if the ``TARGET=AVR``, the
+    ``TARGET_MCU`` can be any value that would be given as an argument to
+    ``avr-gcc -mmcu``.  The default value depends on ``TARGET``; there is no
+    value when ``TARGET`` is ``DESKTOP``.  See the Makefile for details.
+    Example: ``make TARGET=AVR TARGET_MCU=atmega128``.
+
+
+Self Testing
+------------
+
+PyMite has both unit tests and system tests to provide some amount of
+code validity.  Running ``make check`` will build the VM if needed and all self
+tests and then execute the self tests.  More details on self tests can be found
+in Testing_
+
+.. _Testing: Testing.html
 
 Testing the VM is primarily intended for the desktop target because the desktop
 offers greater resources (size and execution speed) and can quickly run all
     /* If wrong number of args, raise TypeError */
     if (NATIVE_GET_NUM_ARGS() != 0)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* If wrong number of args, raise TypeError */
     if (NATIVE_GET_NUM_ARGS() != 1)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* If wrong number of args, raise TypeError */
     if (NATIVE_GET_NUM_ARGS() != 1)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
 
         default:
             /* If not a string or sequence type, raise TypeError */
-            PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+            PM_RAISE(retval, PM_RET_EX_TYPE);
     }
 
     NATIVE_SET_TOS(pr);
     /* If wrong number of args, raise TypeError */
     if (NATIVE_GET_NUM_ARGS() != 0)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* If wrong number of args, raise TypeError */
     if (NATIVE_GET_NUM_ARGS() != 2)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* If args are wrong type, raise TypeError */
     if (OBJ_GET_TYPE(*pf) != OBJ_TYPE_FXN)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
             break;
 
         default:
-            PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+            PM_RAISE(retval, PM_RET_EX_TYPE);
             return retval;
     }
 
             /* If 3rd arg is 0, ValueError */
             if (((pPmInt_t)pc)->val == 0)
             {
-                PM_RAISE(retval, PM_RET_EX_VAL, __LINE__);
+                PM_RAISE(retval, PM_RET_EX_VAL);
                 return retval;
             }
             break;
 
         default:
             /* If wrong number of args, raise TypeError */
-            PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+            PM_RAISE(retval, PM_RET_EX_TYPE);
             return retval;
     }
 
     /* If wrong number of args, raise TypeError */
     if (NATIVE_GET_NUM_ARGS() != 1)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* If wrong number of args, throw type exception */
     if (NATIVE_GET_NUM_ARGS() != 1)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     pc = NATIVE_GET_LOCAL(0);
     if (OBJ_GET_TYPE(*pc) != OBJ_TYPE_INT)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* If wrong number of args, throw type exception */
     if (NATIVE_GET_NUM_ARGS() != 1)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     pc = NATIVE_GET_LOCAL(0);
     if (OBJ_GET_TYPE(*pc) != OBJ_TYPE_INT)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* If wrong number of args, throw type exception */
     if (NATIVE_GET_NUM_ARGS() != 2)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     if ((OBJ_GET_TYPE(*pf) != OBJ_TYPE_INT) ||
         (OBJ_GET_TYPE(*pms) != OBJ_TYPE_INT))
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* If wrong number of args, throw type exception */
     if (NATIVE_GET_NUM_ARGS() != 1)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     pc = NATIVE_GET_LOCAL(0);
     if (OBJ_GET_TYPE(*pc) != OBJ_TYPE_INT)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* If wrong number of args, throw type exception */
     if (NATIVE_GET_NUM_ARGS() != 0)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* If wrong number of args, throw type exception */
     if (NATIVE_GET_NUM_ARGS() != 1)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     pc = NATIVE_GET_LOCAL(0);
     if (OBJ_GET_TYPE(*pc) != OBJ_TYPE_INT)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* If wrong number of args, throw type exception */
     if (NATIVE_GET_NUM_ARGS() != 0)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* If wrong number of args, throw type exception */
     if (NATIVE_GET_NUM_ARGS() != 0)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* If wrong number of args, throw type exception */
     if (NATIVE_GET_NUM_ARGS() != 0)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* If wrong number of args, throw type exception */
     if (NATIVE_GET_NUM_ARGS() != 1)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     ps = NATIVE_GET_LOCAL(0);
     if (OBJ_GET_TYPE(*ps) != OBJ_TYPE_STR)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* If wrong number of args, throw type exception */
     if (NATIVE_GET_NUM_ARGS() != 1)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     pn = NATIVE_GET_LOCAL(0);
     if (OBJ_GET_TYPE(*pn) != OBJ_TYPE_INT)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* If wrong number of args, throw type exception */
     if (NATIVE_GET_NUM_ARGS() != 1)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* If wrong number of args, throw type exception */
     if (NATIVE_GET_NUM_ARGS() != 1)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     ps = NATIVE_GET_LOCAL(0);
     if (OBJ_GET_TYPE(*ps) != OBJ_TYPE_INT)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* If wrong number of args, throw type exception */
     if (NATIVE_GET_NUM_ARGS() != 1)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     ps = NATIVE_GET_LOCAL(0);
     if (OBJ_GET_TYPE(*ps) != OBJ_TYPE_INT)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* If wrong number of args, throw type exception */
     if (NATIVE_GET_NUM_ARGS() != 0)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* If wrong number of args, throw type exception */
     if (NATIVE_GET_NUM_ARGS() != 1)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* Otherwise, throw type exception */
     else
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* If wrong number of args, throw type exception */
     if (NATIVE_GET_NUM_ARGS() != 1)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     ps = NATIVE_GET_LOCAL(0);
     if (OBJ_GET_TYPE(*ps) != OBJ_TYPE_STR)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* If wrong number of args, throw type exception */
     if (NATIVE_GET_NUM_ARGS() != 1)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     pms = NATIVE_GET_LOCAL(0);
     if (OBJ_GET_TYPE(*pms) != OBJ_TYPE_INT)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* If wrong number of args, raise TypeError */
     else
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* Raise the SystemExit exception */
-    PM_RAISE(retval, PM_RET_EX_EXIT, __LINE__);
+    PM_RAISE(retval, PM_RET_EX_EXIT);
     return retval;
     """
     pass

src/sample/arm/AT91SAM7S64-RAM.ld

File contents unchanged.

src/sample/arm/AT91SAM7S64-ROM.ld

File contents unchanged.

src/sample/arm/AT91SAM7S64.h

File contents unchanged.

src/sample/arm/Board.h

File contents unchanged.

src/sample/arm/Cstartup.S

File contents unchanged.

src/sample/arm/Cstartup_SAM7.c

File contents unchanged.

src/sample/arm/Makefile

File contents unchanged.

src/sample/arm/lib_AT91SAM7S64.h

File contents unchanged.

src/sample/arm/sample.c

File contents unchanged.

src/sample/arm/sample.py

     /* If wrong number of args, raise TypeError */
     if (NATIVE_GET_NUM_ARGS() != 1)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     pn = NATIVE_GET_LOCAL(0);
     if (OBJ_GET_TYPE(*pn) != OBJ_TYPE_INT)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* If wrong number of args, raise TypeError */
     if (NATIVE_GET_NUM_ARGS() != 1)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     pn = NATIVE_GET_LOCAL(0);
     if (OBJ_GET_TYPE(*pn) != OBJ_TYPE_INT)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 

src/sample/avr/sample.c

File contents unchanged.

src/tests/system/t003.c

File contents unchanged.

src/tests/unit/ut_dict.c

File contents unchanged.

src/tests/unit/ut_list.c

File contents unchanged.

src/tools/pmImgCreator.py

                                     "     * This function should not be called.\n"
                                     "     */\n"
                                     "    PmReturn_t retval;\n"
-                                    "    PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);\n"
+                                    "    PM_RAISE(retval, PM_RET_EX_SYS);\n"
                                     "    return retval;\n"
                                    ))
 
 OBJECTS = $(SOURCES:.c=.o)
 PRODUCT_VM := libpmvm.a
 
+ifeq ($(DEBUG),true)
+	DEFS += -D__DEBUG__=1
+endif
 ifeq ($(TARGET), DESKTOP)
 	CFLAGS += -ansi
 else

src/vm/codeobj.c

File contents unchanged.

src/vm/codeobj.h

File contents unchanged.
     if ((pdict == C_NULL) ||
         (OBJ_GET_TYPE(*pdict) != OBJ_TYPE_DIC))
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
         || (pkey == C_NULL)
         || (pval == C_NULL))
     {
-        PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_SYS);
         return retval;
     }
 
     /* if it's not a dict, raise TypeError */
     if (OBJ_GET_TYPE(*pdict) != OBJ_TYPE_DIC)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* if dict is null, raise SystemError */
     if (pdict == C_NULL)
     {
-        PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_SYS);
         return retval;
     }
 
     /* if it's not a dict, raise TypeError */
     if (OBJ_GET_TYPE(*pdict) != OBJ_TYPE_DIC)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* if dict is empty, raise KeyError */
     if (((pPmDict_t)pdict)->length <= 0)
     {
-        PM_RAISE(retval, PM_RET_EX_KEY, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_KEY);
         return retval;
     }
 
     /* if key not found, raise KeyError */
     if (retval == PM_RET_NO)
     {
-        PM_RAISE(retval, PM_RET_EX_KEY, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_KEY);
     }
     /* return any other error */
     PM_RETURN_IF_ERROR(retval);

src/vm/dict.h

File contents unchanged.

src/vm/fileid.txt

File contents unchanged.
     /* TypeError if passed func's CO is not a true COB */
     if (OBJ_GET_TYPE(*pco) != OBJ_TYPE_COB)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 

src/vm/frame.h

File contents unchanged.
     if ((OBJ_GET_TYPE(*pco) != OBJ_TYPE_COB) &&
         (OBJ_GET_TYPE(*pco) != OBJ_TYPE_NOB))
     {
-        PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_SYS);
         return retval;
     }
 
         (OBJ_GET_TYPE(*pbases) != OBJ_TYPE_TUP) ||
         (OBJ_GET_TYPE(*pname) != OBJ_TYPE_STR))
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 

src/vm/func.h

File contents unchanged.

src/vm/global.c

File contents unchanged.

src/vm/global.h

File contents unchanged.
     /* If size request is invalid, raise a SystemError */
     if (size > HEAP_MAX_CHUNK_SIZE) 
     {
-        PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_SYS);
         return retval;
     }
 
     }
 
     /* else return out-of-memory exception */
-    PM_RAISE(retval, PM_RET_EX_MEM, __LINE__);
+    PM_RAISE(retval, PM_RET_EX_MEM);
     return retval;
 }
 

src/vm/heap.h

File contents unchanged.
         type = mem_getByte(memspace, paddr);
         if (type != OBJ_TYPE_TUP)
         {
-            PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+            PM_RAISE(retval, PM_RET_EX_TYPE);
             return retval;
         }
         /* get index of last obj in tuple */
     type = mem_getByte(memspace, paddr);
     if (type != OBJ_TYPE_STR)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 

src/vm/img.h

File contents unchanged.
     /* ensure it's an int */
     if (OBJ_GET_TYPE(*pobj) != OBJ_TYPE_INT)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* ensure it's an int */
     if (OBJ_GET_TYPE(*pobj) != OBJ_TYPE_INT)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* ensure it's an int */
     if (OBJ_GET_TYPE(*pobj) != OBJ_TYPE_INT)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 

src/vm/int.h

File contents unchanged.
         {
             case STOP_CODE:
                 /* SystemError, unknown opcode */
-                PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                PM_RAISE(retval, PM_RET_EX_SYS);
                 break;
 
             case POP_TOP:
                 /* TypeError if TOS is not an int */
                 if (OBJ_GET_TYPE(*TOS) != OBJ_TYPE_INT)
                 {
-                    PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_TYPE);
                     break;
                 }
                 /* when TOS is an int, this is a no-op */
 
             case UNARY_CONVERT:
                 /* SystemError, unknown opcode */
-                PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                PM_RAISE(retval, PM_RET_EX_SYS);
                 break;
 
             case UNARY_INVERT:
                 /* TypeError if it's not an int */
                 if (OBJ_GET_TYPE(*TOS) != OBJ_TYPE_INT)
                 {
-                    PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_TYPE);
                     break;
                 }
                 /* else perform bit-wise complement */
 
             case BINARY_POWER:
                 /* SystemError, unknown opcode */
-                PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                PM_RAISE(retval, PM_RET_EX_SYS);
                 break;
 
             case BINARY_MULTIPLY:
                     pobj1 = PM_POP();
                     if (OBJ_GET_TYPE(*pobj1) != OBJ_TYPE_INT)
                     {
-                        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                        PM_RAISE(retval, PM_RET_EX_TYPE);
                         break;
                     }
                     t16 = (int16_t)((pPmInt_t)pobj1)->val;
                 /* else it's a TypeError */
                 else
                 {
-                    PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_TYPE);
                     break;
                 }
 
                     /* ZeroDivisionError */
                     if (((pPmInt_t)pobj1)->val == 0)
                     {
-                        PM_RAISE(retval, PM_RET_EX_ZDIV, __LINE__);
+                        PM_RAISE(retval, PM_RET_EX_ZDIV);
                         break;
                     }
                     /* perform division */
                 /* else it's a TypeError */
                 else
                 {
-                    PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_TYPE);
                     break;
                 }
 
                     /* ZeroDivisionError */
                     if (((pPmInt_t)pobj1)->val == 0)
                     {
-                        PM_RAISE(retval, PM_RET_EX_ZDIV, __LINE__);
+                        PM_RAISE(retval, PM_RET_EX_ZDIV);
                         break;
                     }
                     retval = int_new(
                 /* else it's a TypeError */
                 else
                 {
-                    PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_TYPE);
                     break;
                 }
 
                 /* else it's a TypeError */
                 else
                 {
-                    PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_TYPE);
                     break;
                 }
 
                 /* else it's a TypeError */
                 else
                 {
-                    PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_TYPE);
                     break;
                 }
 
                     /* TypeError; sequence index must be int */
                     if (OBJ_GET_TYPE(*pobj1) != OBJ_TYPE_INT)
                     {
-                        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                        PM_RAISE(retval, PM_RET_EX_TYPE);
                         break;
                     }
 
                     /* TypeError; sequence index must be int */
                     if (OBJ_GET_TYPE(*pobj1) != OBJ_TYPE_INT)
                     {
-                        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                        PM_RAISE(retval, PM_RET_EX_TYPE);
                         break;
                     }
                     /* get the tuple item */
                     /* TypeError; sequence index must be int */
                     if (OBJ_GET_TYPE(*pobj1) != OBJ_TYPE_INT)
                     {
-                        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                        PM_RAISE(retval, PM_RET_EX_TYPE);
                         break;
                     }
                     /* get the list item */
                 /* TypeError; unsubscriptable object */
                 else
                 {
-                    PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_TYPE);
                     break;
                 }
 
                 /* TypeError; unhashable type */
                 else
                 {
-                    PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_TYPE);
                     break;
                 }
 
             case DELETE_SLICE_2:
             case DELETE_SLICE_3:
                 /* SystemError, unknown opcode */
-                PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                PM_RAISE(retval, PM_RET_EX_SYS);
                 break;
 
             case INPLACE_ADD:
                 /* TypeError; unsupported type */
                 else
                 {
-                    PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_TYPE);
                     break;
                 }
 
                 /* TypeError; unsupported type */
                 else
                 {
-                    PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_TYPE);
                     break;
                 }
 
                 /* TypeError; unsupported type */
                 else
                 {
-                    PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_TYPE);
                     break;
                 }
 
                 if ((OBJ_GET_TYPE(*TOS) != OBJ_TYPE_INT)
                     || (OBJ_GET_TYPE(*TOS1) != OBJ_TYPE_INT))
                 {
-                    PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_TYPE);
                     break;
                 }
 
                 /* ZeroDivisionError */
                 if (((pPmInt_t)TOS)->val == 0)
                 {
-                    PM_RAISE(retval, PM_RET_EX_ZDIV, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_ZDIV);
                     break;
                 }
 
                 if ((OBJ_GET_TYPE(*TOS) != OBJ_TYPE_INT)
                     || (OBJ_GET_TYPE(*TOS1) != OBJ_TYPE_INT))
                 {
-                    PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_TYPE);
                     break;
                 }
 
                 /* ZeroDivisionError */
                 if (((pPmInt_t)TOS)->val == 0)
                 {
-                    PM_RAISE(retval, PM_RET_EX_ZDIV, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_ZDIV);
                     break;
                 }
 
                     /* ensure subscr is an int */
                     if (OBJ_GET_TYPE(*pobj1) != OBJ_TYPE_INT)
                     {
-                        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                        PM_RAISE(retval, PM_RET_EX_TYPE);
                         break;
                     }
                     /* set the list item */
                 }
 
                 /* TypeError for all else */
-                PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                PM_RAISE(retval, PM_RET_EX_TYPE);
                 break;
 
             case DELETE_SUBSCR:
                 /* SystemError, unknown opcode */
-                PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                PM_RAISE(retval, PM_RET_EX_SYS);
                 break;
 
             case BINARY_LSHIFT:
                 if ((OBJ_GET_TYPE(*TOS) != OBJ_TYPE_INT)
                     || (OBJ_GET_TYPE(*TOS1) != OBJ_TYPE_INT))
                 {
-                    PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_TYPE);
                     break;
                 }
 
                 if ((OBJ_GET_TYPE(*TOS) != OBJ_TYPE_INT)
                     || (OBJ_GET_TYPE(*TOS1) != OBJ_TYPE_INT))
                 {
-                    PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_TYPE);
                     break;
                 }
 
                 if ((OBJ_GET_TYPE(*TOS) != OBJ_TYPE_INT)
                     || (OBJ_GET_TYPE(*TOS1) != OBJ_TYPE_INT))
                 {
-                    PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_TYPE);
                     break;
                 }
 
                 if ((OBJ_GET_TYPE(*TOS) != OBJ_TYPE_INT)
                     || (OBJ_GET_TYPE(*TOS1) != OBJ_TYPE_INT))
                 {
-                PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                PM_RAISE(retval, PM_RET_EX_TYPE);
                 break;
                 }
 
                 if ((OBJ_GET_TYPE(*TOS) != OBJ_TYPE_INT)
                     || (OBJ_GET_TYPE(*TOS1) != OBJ_TYPE_INT))
                 {
-                    PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_TYPE);
                     break;
                 }
                 pobj1 = PM_POP();
             case PRINT_ITEM_TO:
             case PRINT_NEWLINE_TO:
                 /* SystemError, unknown opcode */
-                PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                PM_RAISE(retval, PM_RET_EX_SYS);
                 break;
 
             case INPLACE_LSHIFT:
                 if ((OBJ_GET_TYPE(*TOS) != OBJ_TYPE_INT)
                     || (OBJ_GET_TYPE(*TOS1) != OBJ_TYPE_INT))
                 {
-                    PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_TYPE);
                     break;
                 }
 
                 if ((OBJ_GET_TYPE(*TOS) != OBJ_TYPE_INT)
                     || (OBJ_GET_TYPE(*TOS1) != OBJ_TYPE_INT))
                 {
-                    PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_TYPE);
                     break;
                 }
 
                 if ((OBJ_GET_TYPE(*TOS) != OBJ_TYPE_INT)
                     || (OBJ_GET_TYPE(*TOS1) != OBJ_TYPE_INT))
                 {
-                    PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_TYPE);
                     break;
                 }
 
                 if ((OBJ_GET_TYPE(*TOS) != OBJ_TYPE_INT)
                     || (OBJ_GET_TYPE(*TOS1) != OBJ_TYPE_INT))
                 {
-                    PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_TYPE);
                     break;
                 }
 
                 if ((OBJ_GET_TYPE(*TOS) != OBJ_TYPE_INT)
                     || (OBJ_GET_TYPE(*TOS1) != OBJ_TYPE_INT))
                 {
-                    PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_TYPE);
                     break;
                 }
 
                     /* ensure there's a block */
                     if (pb1 == C_NULL)
                     {
-                        PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                        PM_RAISE(retval, PM_RET_EX_SYS);
                         break;
                     }
 
             case IMPORT_STAR:
             case EXEC_STMT:
                 /* SystemError, unknown opcode */
-                PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                PM_RAISE(retval, PM_RET_EX_SYS);
                 break;
 
             case POP_BLOCK:
                     /* If there's no block, raise SystemError */
                     if (pb == C_NULL)
                     {
-                        PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                        PM_RAISE(retval, PM_RET_EX_SYS);
                         break;
                     }
 
             case END_FINALLY:
             case BUILD_CLASS:
                 /* SystemError, unknown opcode */
-                PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                PM_RAISE(retval, PM_RET_EX_SYS);
                 break;
 
 
 
             case DELETE_NAME:
                 /* SystemError, unknown opcode */
-                PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                PM_RAISE(retval, PM_RET_EX_SYS);
                 break;
 
             case UNPACK_SEQUENCE:
                 /* Other types result in an AttributeError */
                 else
                 {
-                    PM_RAISE(retval, PM_RET_EX_ATTR, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_ATTR);
                     break;
                 }
                 /* if attrs is not a dict, raise SystemError */
                 if (OBJ_GET_TYPE(*pobj2) != OBJ_TYPE_DIC)
                 {
-                    PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_SYS);
                     break;
                 }
                 /* get name/key obj */
 
             case DELETE_ATTR:
                 /* SystemError, unimplemented opcode */
-                PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                PM_RAISE(retval, PM_RET_EX_SYS);
                 break;
 
             case STORE_GLOBAL:
 
             case DELETE_GLOBAL:
                 /* SystemError, unimplemented opcode */
-                PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                PM_RAISE(retval, PM_RET_EX_SYS);
                 break;
 
             case DUP_TOPX:
                 else
                 {
                     /* Python compiler is responsible for keeping arg <= 3 */
-                    PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_SYS);
                     break;
                 }
                 continue;
                         if (retval == PM_RET_EX_KEY)
                         {
                             /* name not defined, raise NameError */
-                            PM_RAISE(retval, PM_RET_EX_NAME, __LINE__);
+                            PM_RAISE(retval, PM_RET_EX_NAME);
                             break;
                         }
                     }
                 /* Other types result in an AttributeError */
                 else
                 {
-                    PM_RAISE(retval, PM_RET_EX_ATTR, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_ATTR);
                     break;
                 }
                 /* if attrs is not a dict, raise SystemError */
                 if (OBJ_GET_TYPE(*pobj1) != OBJ_TYPE_DIC)
                 {
-                    PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_SYS);
                     break;
                 }
                 /* get name */
                         case COMP_GE: t8 = (a >= b); break;
                         case COMP_IN: /* fallthrough */
                         case COMP_NOT_IN:
-                            PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                            PM_RAISE(retval, PM_RET_EX_TYPE);
                             break;
                         case COMP_IS: t8 = (pobj1 == pobj2); break;
                         case COMP_IS_NOT: t8 = (pobj1 != pobj2); break;
                         /* Other compares are not yet supported */
                         default:
-                            PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                            PM_RAISE(retval, PM_RET_EX_SYS);
                             break;
                     }
                     PM_BREAK_IF_ERROR(retval);
                 /* Other compare not implemented yet */
                 else
                 {
-                    PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_SYS);
                     break;
                 }
                 PM_PUSH(pobj3);
 
             case IMPORT_FROM:
                 /* SystemError, unknown opcode */
-                PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                PM_RAISE(retval, PM_RET_EX_SYS);
                 break;
 
             case JUMP_FORWARD:
                 /* ensure index is an int */
                 if (OBJ_GET_TYPE(*pobj1) != OBJ_TYPE_INT)
                 {
-                    PM_RAISE(retval, PM_RET_EX_INDX, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_INDX);
                     break;
                 }
                 /* dup a const int to allow it to incr (TRASH)*/
                 /* TypeError: loop over non-sequence */
                 else
                 {
-                    PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_TYPE);
                     break;
                 }
 
                     /* no such global, raise NameError */
                     if (retval == PM_RET_EX_KEY)
                     {
-                        PM_RAISE(retval, PM_RET_EX_NAME, __LINE__);
+                        PM_RAISE(retval, PM_RET_EX_NAME);
                         break;
                     }
                 }
 
             case CONTINUE_LOOP:
                 /* SystemError, unknown opcode */
-                PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                PM_RAISE(retval, PM_RET_EX_SYS);
                 break;
 
             case SETUP_LOOP:
             case SETUP_EXCEPT:
             case SETUP_FINALLY:
                 /* SystemError, unknown opcode */
-                PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                PM_RAISE(retval, PM_RET_EX_SYS);
                 break;
 
             case LOAD_FAST:
 
             case DELETE_FAST:
                 /* SystemError, unknown opcode */
-                PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                PM_RAISE(retval, PM_RET_EX_SYS);
                 break;
 
             case SET_LINENO:
                 /* Only supports taking 1 arg for now */
                 if (t16 != 1)
                 {
-                    PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_SYS);
                     break;
                 }
 
                 pobj1 = PM_POP();
                 if (OBJ_GET_TYPE(*pobj1) != OBJ_TYPE_EXN)
                 {
-                    PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_TYPE);
                     break;
                 }
 
                 /* ensure no keyword args */
                 if ((t16 & (uint16_t)0xFF00) != 0)
                 {
-                    PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                    PM_RAISE(retval, PM_RET_EX_SYS);
                     break;
                 }
                 /* get the func */
                     /* ensure num args fits in native frame */
                     if (t16 > NATIVE_NUM_LOCALS)
                     {
-                        PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                        PM_RAISE(retval, PM_RET_EX_SYS);
                         break;
                     }
 
             case EXTENDED_ARG:
             default:
                 /* SystemError, unknown opcode */
-                PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+                PM_RAISE(retval, PM_RET_EX_SYS);
                 break;
 
         } /* switch (interpret) */

src/vm/interp.h

File contents unchanged.
     /* if either obj is null, raise ValueError exception */
     if ((plist == C_NULL) || (pobj == C_NULL))
     {
-        PM_RAISE(retval, PM_RET_EX_VAL, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_VAL);
         return retval;
     }
 
     /* if pobj1 is not a list, raise a TypeError exception */
     if (OBJ_GET_TYPE(*plist) != OBJ_TYPE_LST)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* If it's not a list, raise TypeError */
     if (OBJ_GET_TYPE(*plist) != OBJ_TYPE_LST)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* Check the bounds of the index */
     if ((index < 0) || (index >= ((pPmList_t)plist)->length))
     {
-        PM_RAISE(retval, PM_RET_EX_INDX, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_INDX);
         return retval;
     }
 
     if ((psrclist == C_NULL)
         || (r_pnewlist == C_NULL))
     {
-        PM_RAISE(retval, PM_RET_EX_VAL, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_VAL);
         return retval;
     }
 
     /* If first arg is not a list, raise TypeError */
     if (OBJ_GET_TYPE(*psrclist) != OBJ_TYPE_LST)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
     length = ((pPmList_t)psrclist)->length;

src/vm/list.h

File contents unchanged.

src/vm/mem.c

File contents unchanged.

src/vm/mem.h

File contents unchanged.

src/vm/misc.h

File contents unchanged.
     /* if it's not a code obj, raise TypeError */
     if (OBJ_GET_TYPE(*pco) != OBJ_TYPE_COB)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 
     /* if it's not a string obj, raise SyntaxError */
     if (OBJ_GET_TYPE(*pstr) != OBJ_TYPE_STR)
     {
-        PM_RAISE(retval, PM_RET_EX_SYNTAX, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_SYNTAX);
         return retval;
     }
 
     /* if img was not found, raise ImportError */
     if (pii == C_NULL)
     {
-        PM_RAISE(retval, PM_RET_EX_IMPRT, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_IMPRT);
         return retval;
     }
 

src/vm/module.h

File contents unchanged.
 
         /* All other types should not be in an img obj */
         default:
-            PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+            PM_RAISE(retval, PM_RET_EX_SYS);
             break;
     }
     return retval;

src/vm/obj.h

File contents unchanged.
  * be used after an assignment such as "retval = " or a return statement
  */
 #if __DEBUG__
-#define PM_RAISE(retexn, exn, line) \
+#define PM_RAISE(retexn, exn) \
         do \
         { \
             retexn = (exn); \
             gVmGlobal.errFileId = __FILE_ID__; \
-            gVmGlobal.errLineNum = (uint16_t)(line); \
+            gVmGlobal.errLineNum = (uint16_t)__LINE__; \
         } while (0)
 #else
-#define PM_RAISE(retexn, exn, line) \
+#define PM_RAISE(retexn, exn) \
         retexn = (exn)
 #endif
 
-/** error macro for unit tests */
-#define TEST_ERR(arg)   for(;;)
-
 /** return an error code if it is not PM_RET_OK */
 #define PM_RETURN_IF_ERROR(retval)  if((retval) != PM_RET_OK) \
                                         return (retval)
     /* if index is out of bounds, raise SystemError */
     if ((*r_indx < 0) || (*r_indx > SEGLIST_OBJS_PER_SEG))
     {
-        PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_SYS);
         return retval;
     }
 
          */
         if (pseg == C_NULL)
         {
-            PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+            PM_RAISE(retval, PM_RET_EX_SYS);
             return retval;
         }
         pseg = pseg->next;
         /* if went past last segment, return nothing */
         if (pseg == C_NULL)
         {
-            PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+            PM_RAISE(retval, PM_RET_EX_SYS);
             return retval;
         }
         pseg = pseg->next;
     if ((pseg == pseglist->sl_lastseg)
         && (segindx >= pseglist->sl_lastindx))
     {
-        PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_SYS);
         return retval;
     }
 
         /* if past end of list */
         if ((segnum != 0) || (segindx != 0))
         {
-            PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+            PM_RAISE(retval, PM_RET_EX_SYS);
             return retval;
         }
 
          */
         if (pseg == C_NULL)
         {
-            PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+            PM_RAISE(retval, PM_RET_EX_SYS);
             return retval;
         }
     }
         && (segindx >= pseglist->sl_lastindx))
     {
         /* caller must convert this err to exception */
-        PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_SYS);
         return retval;
     }
 
         /* if ran past end of list, raise SystemError */
         if (pseg == C_NULL)
         {
-            PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+            PM_RAISE(retval, PM_RET_EX_SYS);
             return retval;
         }
     }
     if ((pseg == pseglist->sl_lastseg) &&
         (segindx >= pseglist->sl_lastindx))
     {
-        PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_SYS);
         return retval;
     }
 

src/vm/seglist.h

File contents unchanged.

src/vm/sli.c

File contents unchanged.

src/vm/sli.h

File contents unchanged.
     /* ensure string obj */
     if (OBJ_GET_TYPE(*pstr) != OBJ_TYPE_STR)
     {
-        PM_RAISE(retval, PM_RET_EX_TYPE, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_TYPE);
         return retval;
     }
 

src/vm/string.h

File contents unchanged.
     /* XXX for larger tuple, break into segments */
     if (n > 100)
     {
-        PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_SYS);
         return retval;
     }
 
     /* ensure type */
     if (OBJ_GET_TYPE(*ptup) != OBJ_TYPE_TUP)
     {
-        PM_RAISE(retval, PM_RET_EX_SYS, __LINE__);
+        PM_RAISE(retval, PM_RET_EX_SYS);
         return retval;
     }
 

src/vm/tuple.h

File contents unchanged.