Skip to content

Commit

Permalink
added packager helper
Browse files Browse the repository at this point in the history
  • Loading branch information
drkameleon committed Nov 6, 2023
1 parent a020da6 commit 2531fcc
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions src/helpers/packager.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#=======================================================
# Arturo
# Programming Language + Bytecode VM compiler
# (c) 2019-2023 Yanis Zafirópulos
#
# @file: helpers/packager.nim
#=======================================================

#=======================================
# Libraries
#=======================================

# import algorithm, bitops, std/math, sequtils, sugar

# when defined(WEB):
# import std/jsbigints
# elif not defined(NOGMP):
# import helpers/bignums as BignumsHelper

# when defined(NOGMP):
# import vm/errors

# import vm/values/value

#=======================================
# Methods
#=======================================

# func addmod*[T: SomeInteger](a, b, modulus: T): T =
# let a_m = if a < modulus: a else: a mod modulus
# if b == 0.T: return a_m
# let b_m = if b < modulus: b else: b mod modulus

# let b_from_m = modulus - b_m
# if a_m >= b_from_m: return a_m - b_from_m
# return a_m + b_m

0 comments on commit 2531fcc

Please sign in to comment.