Files @ 85419b0950c7
Branch filter:

Location: CSY/reowolf/examples/make.py

MH
Rewrote typing to use indices.

Currently it is slower than before, because we do a HashMap lookup
followed up by actually using the index. But it serves as the basis
for a faster type inferencer.

The main goal, however, is to fix the manner in which polymorph
types are determined. The typing queue of functions still needs to
correctly write this data to the type table.
import os, glob, subprocess, time, sys
script_path = os.path.dirname(os.path.realpath(__file__));
for c_file in glob.glob(script_path + "/*/*.c", recursive=False):
  if sys.platform != "linux" and sys.platform != "linux2" and "interop" in c_file:
    print("Not Linux! skipping", c_file)
    continue
  print("compiling", c_file)
  args = [
    "gcc",          # compiler
    "-std=c11",     # C11 mode
    "-Wl,-R./",     # pass -R flag to linker: produce relocatable object
    c_file,         # input source file
    "-o",           # output flag
    c_file[:-2],    # output filename
    "-L",           # lib path flag
    "./",           # where to look for libs
    "-lreowolf_rs"  # add lib called "reowolf_rs"
  ];
  subprocess.run(args)
input("Blocking until newline...");