Skip to content

Conversation

bnoordhuis
Copy link
Member

Copy link
Contributor

Choose a reason for hiding this comment

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

What alternative is there?

Copy link
Member Author

Choose a reason for hiding this comment

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

One-byte strings or if you want more radical, buffers or typed arrays. It also depends on the platform: file paths are untyped binary blobs on most Unices, but on OS X (i.e. HFS+) and Windows, they're Unicode.

I'm not sure yet what the right answer is, just that our current approach is wrong. :-)

Copy link
Contributor

Choose a reason for hiding this comment

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

Good point about different data formats. I was only thinking about string encoding.

@trevnorris
Copy link
Contributor

One non-blocking question. LGTM

Rewrite ErrnoException() so that it doesn't turn the file path into a
string twice.

PR-URL: nodejs#1148
Reviewed-By: Trevor Norris <[email protected]>
With --max_old_space_size=12345 it's possible to create a JS heap that
is larger than what fits in an unsigned int so use Number::New() rather
than Integer::NewFromUnsigned().

Performance-wise, it doesn't matter much.  If V8 can fit the double in
a SMI, it will.

PR-URL: nodejs#1148
Reviewed-By: Trevor Norris <[email protected]>
@bnoordhuis bnoordhuis closed this Mar 16, 2015
@bnoordhuis bnoordhuis deleted the minor-fixups branch March 16, 2015 17:03
@bnoordhuis bnoordhuis merged commit 2551c1d into nodejs:v1.x Mar 16, 2015
@rvagg rvagg mentioned this pull request Mar 17, 2015
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.

2 participants