Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc improvements #1910

Merged
merged 6 commits into from
Dec 11, 2018
Merged

misc improvements #1910

merged 6 commits into from
Dec 11, 2018

Conversation

elia
Copy link
Member

@elia elia commented Dec 10, 2018

Here's a list of changes:

  • trying to define singleton methods on string/number will raise a TypeError, just like it would in MRI for numbers and frozen strings
  • dropped the TMP_name_1 format on temp vars in favor of $name$1, should be easier to follow compiled code when sourcemaps ain't enough.
  • set the displayName on methods, this way we'll get much more readable stack traces, avoiding that browser heuristic for which they'll pick the TMP var name instead of the method name

@elia elia added language usability Stuff that improves the life of the developer labels Dec 10, 2018
@elia elia self-assigned this Dec 10, 2018
Copy link
Contributor

@iliabylich iliabylich left a comment

Choose a reason for hiding this comment

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

👍

elia added 4 commits December 10, 2018 23:59
Remove the TMP_ noise and use cleaner names for punctuation.
That's the same error Ruby raises for numbers and frozen strings.
For better stack traces, even without source maps.
@elia elia force-pushed the elia/misc-improvements branch from 1dcd305 to ccf73fd Compare December 10, 2018 22:59
@elia elia merged commit e7cff26 into master Dec 11, 2018
@elia elia deleted the elia/misc-improvements branch December 11, 2018 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language usability Stuff that improves the life of the developer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants