From e65e734e5df3746ffb7df2cc9fa33826e0083fcd Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 6 May 2018 03:30:47 -0400 Subject: - Re-named shift-left -> left-shift, shift-right -> logical-right-shift, signed-shift-right -> arithmetic-right-shift. --- .../luxc/lang/translation/js/runtime.jvm.lux | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux') diff --git a/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux index 2adb118f8..afb3cd538 100644 --- a/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux @@ -310,7 +310,7 @@ "return " cast ";" "})"))) -(runtime: bit//shift-left "shlI64" +(runtime: bit//left-shift "shlI64" (format "(function " @ "(input,shift) {" "shift &= 63;" (format "if(shift === 0) {" @@ -329,7 +329,7 @@ "}") "})")) -(runtime: bit//signed-shift-right "shrI64" +(runtime: bit//arithmetic-right-shift "shrI64" (format "(function " @ "(input,shift) {" "shift &= 63;" (format "if(shift === 0) {" @@ -349,7 +349,7 @@ "}") "})")) -(runtime: bit//shift-right "ushrI64" +(runtime: bit//logical-right-shift "ushrI64" (format "(function " @ "(input,shift) {" "shift &= 63;" (format "if(shift === 0) {" @@ -379,9 +379,9 @@ __bit//not __bit//count32 __bit//count - __bit//shift-left - __bit//signed-shift-right - __bit//shift-right)) + __bit//left-shift + __bit//arithmetic-right-shift + __bit//logical-right-shift)) (runtime: int//- "subI64" (format "(function " @ "(l,r) {" @@ -494,8 +494,8 @@ [(=I int//min "parameter") (js.return! int//one)]) (js.block! (list (js.var! "approximation" - (#.Some (js.apply bit//shift-left - (list (recur (js.apply bit//signed-shift-right + (#.Some (js.apply bit//left-shift + (list (recur (js.apply bit//arithmetic-right-shift (list "subject" (js.number 1.0))) "parameter") (js.number 1.0))))) @@ -628,7 +628,7 @@ [(>N "subject" "parameter") (js.return! int//zero)] - [(>N (js.apply bit//shift-right + [(>N (js.apply bit//logical-right-shift (list "subject" (js.number 1.0))) "parameter") (js.return! int//one)]) @@ -684,11 +684,11 @@ "var lH = " int//from-number "(l.H);" "var rH = " int//from-number "(r.H);" - "var bottom = " bit//shift-right "(" int//* "(lL,rL),32);" + "var bottom = " bit//logical-right-shift "(" int//* "(lL,rL),32);" "var middle = " int//+ "(" int//* "(lH,rL)," int//* "(lL,rH));" "var top = " int//* "(lH,rH);" - "var bottomAndMiddle = " bit//shift-right "(" int//+ "(middle,bottom),32);" + "var bottomAndMiddle = " bit//logical-right-shift "(" int//+ "(middle,bottom),32);" "return " int//+ "(top,bottomAndMiddle);" "})")) @@ -698,7 +698,7 @@ "var zeroes = 64;" (format "while(!" int//= "(input," int//zero ")) {" "zeroes--;" - "input = " bit//shift-right "(input,1);" + "input = " bit//logical-right-shift "(input,1);" "}") "return zeroes;" "})")) @@ -710,9 +710,9 @@ "}" "else {" "var minShift = Math.min(" deg//leading-zeroes "(l), " deg//leading-zeroes "(r));" - "l = " bit//shift-left "(l,minShift);" - "r = " bit//shift-left "(r,minShift);" - "return " bit//shift-left "(" int/// "(l," int//from-number "(r.H)),32);" + "l = " bit//left-shift "(l,minShift);" + "r = " bit//left-shift "(r,minShift);" + "return " bit//left-shift "(" int/// "(l," int//from-number "(r.H)),32);" "}") "})")) -- cgit v1.2.3