Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions js/dtoa_stubs.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
*/

//Provides: flow_shortest_string_of_float const
//Requires: caml_js_from_float, caml_new_string
//Requires: caml_js_from_float, caml_string_of_jsbytes
function flow_shortest_string_of_float(num) {
// TODO: shorten string (drop +, leading 0, shift ., etc)
return caml_new_string(caml_js_from_float(num).toString());
return caml_string_of_jsbytes(caml_js_from_float(num).toString());
}

//Provides: flow_ecma_string_of_float const
//Requires: caml_js_from_float, caml_new_string
//Requires: caml_js_from_float, caml_string_of_jsbytes
function flow_ecma_string_of_float(num) {
return caml_new_string(caml_js_from_float(num).toString());
return caml_string_of_jsbytes(caml_js_from_float(num).toString());
}

//Provides: flow_g_fmt const
//Requires: caml_js_from_float, caml_new_string
//Requires: caml_js_from_float, caml_string_of_jsbytes
function flow_g_fmt(num) {
// TODO: shorten string
return caml_new_string(caml_js_from_float(num).toString());
return caml_string_of_jsbytes(caml_js_from_float(num).toString());
}
Loading