Uploaded image for project: 'ClojureScript'
  1. CLJS-773

Use unchecked-*-int functions for real 32-bit math

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects versions: 1.7.145
    • Fix versions: 1.9.671
    • Labels:
    • Environment:

      r2173

      Description

      Currently the unchecked-* functions and macros simply alias the primitive js operators. It would be nice if the unchecked-*-int family of functions and macros implemented C/Java-like signed int operations with silent overflows (just like in Clojure) using asm.js coersion idioms. This should also allow us to share such code between clojure and clojurescript without worrying about their different numerics.

      A use case is that porting hash algorithms from java to clojurescript is trickier and more verbose than it needs to be.

        Attachments

          Activity

            People

            • Assignee:
              favila Francis Avila
              Reporter:
              favila Francis Avila
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: