Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Commit

Permalink
Add fixme comments to read(u)int64.
Browse files Browse the repository at this point in the history
  • Loading branch information
kg committed Jun 19, 2012
1 parent 0152e3b commit b76bead
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Libraries/JSIL.IO.js
Expand Up @@ -645,6 +645,8 @@ JSIL.ImplementExternals("System.IO.BinaryReader", function ($) {
$.Method({Static:false, Public:true }, "ReadInt64",
(new JSIL.MethodSignature($.Int64, [], [])),
function ReadInt64 () {
// FIXME: Does this work right for negative numbers or does 53-bit rounding kill it?
// FIXME: Generate warnings for values out of 53-bit range.
var value = this.ReadUInt64();
if (value > System.Int64.MaxValue)
return value - 18446744073709551616;
Expand Down Expand Up @@ -706,6 +708,7 @@ JSIL.ImplementExternals("System.IO.BinaryReader", function ($) {
$.Method({Static:false, Public:true }, "ReadUInt64",
(new JSIL.MethodSignature($.UInt64, [], [])),
function ReadUInt64 () {
// FIXME: Generate warnings for values out of 53-bit range.
var low1 = this.m_stream.ReadByte();
var low2 = this.m_stream.ReadByte();
var low3 = this.m_stream.ReadByte();
Expand Down

0 comments on commit b76bead

Please sign in to comment.