Skip to content

Conversation

@eigold
Copy link
Contributor

@eigold eigold commented Jun 26, 2017

No description provided.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems unrelated to the actual change. It's also not clear why it's needed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is required for 32 bit systems, as the original code is UB for those, it's not yet obvious how to fix this in general for 32 bit
Still, it should not be part of this PR

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove code instead of commenting out

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems a bit clunky but I think that's just what C++ forces you to do. Other than that; looks good.

martin-cs
martin-cs previously approved these changes Jun 27, 2017
@mgudemann mgudemann self-requested a review June 27, 2017 08:08
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please also run the scripts/cpplint.py script on this
For example, there should be no spaces around = or == or after if

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not use upper case in identifiers.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return buffer.str(); (several occurrences)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could merge this with the previous statement to make it shorter

@eigold
Copy link
Contributor Author

eigold commented Jun 27, 2017 via email

@mgudemann
Copy link
Contributor

@eigold no worries, for the "in progress", this means basically that you are working on it and yes, "ready to Review" will be the next step. But I have to admit that this is not always treated as it should be :-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove code instead of commenting out

@eigold
Copy link
Contributor Author

eigold commented Jun 30, 2017 via email

@peterschrammel
Copy link
Member

Then this should be fixed in the interpreter to work on 32bit systems (can be done as a separate PR).

@eigold
Copy link
Contributor Author

eigold commented Jun 30, 2017 via email

@mgudemann
Copy link
Contributor

mgudemann commented Jun 30, 2017 via email

@mgudemann
Copy link
Contributor

@eigold could you please change the PR, so that it does not contain the change to interpreter.cpp
This can be done by editing the commit and only staging/committing the other changes. This should be described under "interactive rebase" in more git resources. After then, you can push --force the changed commit.
You can also undo the change, commit that change and then squash the commits, again via interactive rebase.

@eigold eigold force-pushed the feature/hexadecimal_float_output_in_expr2java branch from acf1da9 to e46a320 Compare July 3, 2017 09:40
@peterschrammel
Copy link
Member

@eigold, any progress on this?

@eigold
Copy link
Contributor Author

eigold commented Jul 3, 2017 via email

@mgudemann
Copy link
Contributor

@eigold as one of the last commits says "starting a new branch" could it be that the newer commit are simply in a different, new branch? Only commits pushed to eigold:feature/hexadecimal_float_output_in_expr2java will appear here

@eigold
Copy link
Contributor Author

eigold commented Jul 3, 2017 via email

@mgudemann
Copy link
Contributor

@eigold all these commits are shown on github then. You just have to scroll down, "removing and accidental change" is just right in front of Peter's last comment

@eigold
Copy link
Contributor Author

eigold commented Jul 3, 2017 via email

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for Java, this is Double/Float.NEGATIVE_INFINITY or Double/Float.POSITIVE_INFINITY
(cf. https://docs.oracle.com/javase/7/docs/api/java/lang/Float.html)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for Java, this is Float/Double.NaN

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please simplify to buffer << ieee_repr.to_float() << 'f';

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick, explicit bool is not needed, if(src.type()==java_float_type()) would be enough

@eigold
Copy link
Contributor Author

eigold commented Jul 6, 2017 via email

@mgudemann
Copy link
Contributor

mgudemann commented Jul 6, 2017 via email

@eigold
Copy link
Contributor Author

eigold commented Jul 6, 2017 via email

@mgudemann
Copy link
Contributor

mgudemann commented Jul 6, 2017 via email

@eigold
Copy link
Contributor Author

eigold commented Jul 6, 2017 via email

@mgudemann
Copy link
Contributor

mgudemann commented Jul 6, 2017 via email

@eigold
Copy link
Contributor Author

eigold commented Jul 6, 2017 via email

Copy link
Contributor

@mgudemann mgudemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, please squash commits

  removed an accidental change, added code to process special cases: NaN and infiinity
  made required simplications, made corrections in treatment of special cases
@eigold eigold force-pushed the feature/hexadecimal_float_output_in_expr2java branch from 664cda2 to 9b2e643 Compare July 12, 2017 21:58
@eigold
Copy link
Contributor Author

eigold commented Jul 12, 2017 via email

@mgudemann
Copy link
Contributor

obsoleted by #1216

@mgudemann mgudemann closed this Aug 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants