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

Operand over 16-bits. Got 72000. #16269

Closed
Turbo87 opened this issue Feb 22, 2018 · 7 comments · Fixed by glimmerjs/glimmer-vm#786
Closed

Operand over 16-bits. Got 72000. #16269

Turbo87 opened this issue Feb 22, 2018 · 7 comments · Fixed by glimmerjs/glimmer-vm#786

Comments

@Turbo87
Copy link
Member

Turbo87 commented Feb 22, 2018

Using the latest 3.1 beta version I'm seeing an error "Operand over 16-bits. Got 72000." in one of our tests which does this:

render(hbs`{{some-component foo=9000}}`);

It seems that the maximum value for literal numbers has decreased significantly in the 3.1-beta 🤔

#15635 might also be related to this.

@rwjblue
Copy link
Member

rwjblue commented Feb 23, 2018

FWIW - This is ultimately a glimmer-vm issue...

chadhietala added a commit to glimmerjs/glimmer-vm that referenced this issue Feb 23, 2018
Fixes emberjs/ember.js#16269.

Prior to this fix we would hard error if operands exceeded 16-bits. This was due to the fact that the program is 16-bit aligned. However, we don't have to take this nuclear option. Instead we can just serialize these larger numbers into the constants pool and reify them properly at runtime. This means you are free to use number literals up to Number.MAX_SAFE_INTEGER.
chadhietala added a commit to glimmerjs/glimmer-vm that referenced this issue Feb 23, 2018
Fixes emberjs/ember.js#16269.

Prior to this fix we would hard error if operands exceeded 16-bits. This was due to the fact that the program is 16-bit aligned. However, we don't have to take this nuclear option. Instead we can just serialize these larger numbers into the constants pool and reify them properly at runtime. This means you are free to use number literals up to Number.MAX_SAFE_INTEGER.
@Turbo87
Copy link
Member Author

Turbo87 commented Feb 24, 2018

Still needs release and update here, right?

@rwjblue rwjblue reopened this Feb 24, 2018
@rwjblue
Copy link
Member

rwjblue commented Feb 24, 2018

Yes, I didn’t close this intentionally...

@rwjblue
Copy link
Member

rwjblue commented Feb 25, 2018

Fixed by #16286

@jdurand
Copy link

jdurand commented Sep 14, 2018

I opened an issue cibernox/ember-ast-helpers#23 but I'm going to log this here just in case this is a regression.

I started having these issues when I upgraded my app to ember-source@3.3.2 (and ember-data@3.4.0 mentioning because from the little I could understand one side effect could be broken hasMany relationships)

Here's a production stack trace: https://sentry.io/share/issue/b3223fa152b04552bf19ab519fcd2218/

I haven't seen this error yet for users that I rolled back to ember-source@3.1.4 & ember-data@3.1.2. I'll report back if I see something else.

@jdurand
Copy link

jdurand commented Oct 26, 2018

I just upgraded my app to ember-source@3.5.0 ember-data@3.5.0 and am running (I believe) glimmer@0.35.10 and I'm still getting this issue :

https://sentry.io/share/issue/0476b177707347dabbf01aef1296c957/

I'm using ember-font-awesome which relies on ember-ast-helpers. The former relied on ember-ast-helpers@0.3.5 which had a hard dependency on glimmer@0.27.0, so I forked it to loosen that dependency (diff). That's what I'm running in production along with @glimmer/compiler@0.35.10 & @glimmer/syntax@0.35.10 specified in my package.json.

I know that ember (glimmer) pre-compiles the templates so the issue has to be around the BuildTimeComponents. Did #16286 fix this use case?

I'll keep digging but, any help or hint would be very much appreciated.

@jdurand
Copy link

jdurand commented Oct 26, 2018

Rolled back to ember-source@3.1.4 (without touching anything else) this morning and the error stopped popping up in my logs.

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 a pull request may close this issue.

3 participants