Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jsexplain
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Verified Software
jsexplain
Commits
b31082bf
Commit
b31082bf
authored
9 years ago
by
charguer
Browse files
Options
Downloads
Patches
Plain Diff
comment_change
parent
a69460f2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
generator/Makefile
+10
-0
10 additions, 0 deletions
generator/Makefile
generator/tests/jsref/JsNumber.ml
+2
-2
2 additions, 2 deletions
generator/tests/jsref/JsNumber.ml
with
12 additions
and
2 deletions
generator/Makefile
+
10
−
0
View file @
b31082bf
...
...
@@ -90,3 +90,13 @@ endif
ifeq
($(MAKECMDGOALS),tests/jsref)
-include
$(ML_JSREF:.ml=.ml.d)
endif
# TODO
# or pattern -> see JsNumber
# records -> replace warning with code
# lazy -> use a function for fresh locations in copied extracted code
# replace "char list" with strings.
This diff is collapsed.
Click to expand it.
generator/tests/jsref/JsNumber.ml
+
2
−
2
View file @
b31082bf
...
...
@@ -136,7 +136,7 @@ let classify_float n =
let
to_int32
=
fun
n
->
match
classify_float
n
with
|
FP_normal
->
|
FP_normal
->
(* ARTHUR hacked this from | FP_normal | FP_subnormal *)
let
i32
=
2
.
**
32
.
in
let
i31
=
2
.
**
31
.
in
let
posint
=
(
if
n
<
0
.
then
(
-
1
.
)
else
1
.
)
*.
(
floor
(
abs_float
n
))
in
...
...
@@ -151,7 +151,7 @@ let to_int32 = fun n ->
let
to_uint32
=
fun
n
->
match
classify_float
n
with
|
FP_normal
->
|
FP_normal
->
(* ARTHUR hacked this from | FP_normal | FP_subnormal *)
let
i32
=
2
.
**
32
.
in
let
posint
=
(
if
n
<
0
.
then
(
-
1
.
)
else
1
.
)
*.
(
floor
(
abs_float
n
))
in
let
int32bit
=
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment