Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Issue 198533007: Inline mathematical constants (Closed)

Created:
6 years, 9 months ago by p.antonov
Modified:
6 years, 9 months ago
Reviewers:
Toon Verwaest
CC:
v8-dev
Base URL:
https://github.com/v8/v8.git@master
Visibility:
Public.

Description

Inline mathematical constants Where possible, mathematical constant references such as Math.PI are replaced with HConstant of their actual value. R=verwaest@chromium.org BUG=

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+221 lines, -2 lines) Patch
M src/hydrogen.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/hydrogen.cc View 2 chunks +72 lines, -1 line 0 comments Download
M src/objects.h View 1 chunk +3 lines, -1 line 0 comments Download
M src/objects.cc View 8 chunks +31 lines, -0 lines 0 comments Download
A test/mjsunit/compiler/math-constants.js View 1 chunk +113 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
p.antonov
6 years, 9 months ago (2014-03-21 13:30:49 UTC) #1
Toon Verwaest
No LGTM. We inline read-only properties of global constants using a more general mechanism.
6 years, 9 months ago (2014-03-21 14:53:48 UTC) #2
Toon Verwaest
With no lgtm, I meant not lgtm.
6 years, 9 months ago (2014-03-21 14:54:07 UTC) #3
p.antonov
On 2014/03/21 14:53:48, Toon Verwaest wrote: > No LGTM. > > We inline read-only properties ...
6 years, 9 months ago (2014-03-21 15:01:08 UTC) #4
p.antonov
> can do Math.PI = {1.24}; for example. err. I mean Math = {PI: 1.24};
6 years, 9 months ago (2014-03-21 15:01:51 UTC) #5
kbalazs
What is the performance impact of this patch?
6 years, 9 months ago (2014-03-21 16:15:16 UTC) #6
Toon Verwaest
Sure, the optimization I'm suggesting isn't there yet. It's just "the right thing to do". ...
6 years, 9 months ago (2014-03-21 17:22:47 UTC) #7
p.antonov
On 2014/03/21 17:22:47, Toon Verwaest wrote: > Sure, the optimization I'm suggesting isn't there yet. ...
6 years, 9 months ago (2014-03-21 18:28:56 UTC) #8
Toon Verwaest
The AllowUndefinedAsNaN optimization is pretty tricky, and more extensive than just kElementsCantBeAdded. kElementsCantBeAdded will trigger ...
6 years, 9 months ago (2014-03-24 13:04:11 UTC) #9
p.antonov
I see, so it has to be done with inserted guards then, or do you ...
6 years, 9 months ago (2014-03-24 13:19:57 UTC) #10
Toon Verwaest
So I still don't suggest you do this work as you are doing it here, ...
6 years, 9 months ago (2014-03-24 13:26:50 UTC) #11
Toon Verwaest
Also, you don't need to add any guards, you just need to extend load-handling in ...
6 years, 9 months ago (2014-03-24 13:28:11 UTC) #12
p.antonov
On 2014/03/24 13:28:11, Toon Verwaest wrote: > Also, you don't need to add any guards, ...
6 years, 9 months ago (2014-03-24 14:19:13 UTC) #13
Toon Verwaest
6 years, 9 months ago (2014-03-24 16:19:19 UTC) #14
Message was sent while issue was closed.
I closed this issue. Please upload a new patch if you try the other approach.

Powered by Google App Engine
This is Rietveld 408576698