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

Issue 953563002: Implement experimental exponentiation operator (Closed)

Created:
5 years, 10 months ago by caitp (gmail)
Modified:
4 years, 11 months ago
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Implement experimental exponentiation operator BUG=v8:3915 LOG=N R=

Patch Set 1 #

Patch Set 2 : Remove new hydrogen-instruction #

Patch Set 3 : Add more tests and fix some bugs #

Total comments: 5

Patch Set 4 : Rebase #

Patch Set 5 : Add compiler tests #

Patch Set 6 : Reorganize mjsunit tests #

Total comments: 1

Patch Set 7 : Remove NumberExponentiate operator, add more typing logic #

Patch Set 8 : use Number() instead of OrderedNumber() to include NaN #

Unified diffs Side-by-side diffs Delta from patch set Stats (+229 lines, -10 lines) Patch
M src/ast.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/bootstrapper.cc View 3 chunks +3 lines, -0 lines 0 comments Download
M src/builtins.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/ast-graph-builder.cc View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/js-generic-lowering.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/js-operator.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/js-operator.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/opcodes.h View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M src/compiler/typer.cc View 1 2 3 4 5 6 7 2 chunks +49 lines, -0 lines 0 comments Download
M src/compiler/verifier.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M src/flag-definitions.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M src/full-codegen.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/hydrogen.cc View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M src/ic/ic.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M src/ic/ic-state.h View 1 chunk +1 line, -1 line 0 comments Download
M src/parser.cc View 1 2 3 3 chunks +8 lines, -0 lines 0 comments Download
M src/preparser.h View 1 2 3 3 chunks +15 lines, -2 lines 0 comments Download
M src/runtime.js View 1 chunk +8 lines, -0 lines 0 comments Download
M src/scanner.h View 2 chunks +4 lines, -0 lines 0 comments Download
M src/scanner.cc View 2 chunks +15 lines, -3 lines 0 comments Download
M src/token.h View 1 2 3 chunks +4 lines, -2 lines 0 comments Download
M src/typing.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M test/cctest/compiler/test-run-jsops.cc View 1 2 3 4 1 chunk +14 lines, -0 lines 0 comments Download
A test/mjsunit/harmony/exponentiation.js View 1 2 3 4 5 1 chunk +82 lines, -0 lines 0 comments Download
M test/unittests/compiler/js-operator-unittest.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M test/unittests/compiler/typer-unittest.cc View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (3 generated)
caitp (gmail)
PTAL at your leisure
5 years, 10 months ago (2015-02-24 03:32:58 UTC) #2
Michael Starzinger
Two high-level comments: 1) Why is this being implemented now? Did I miss an "intent ...
5 years, 10 months ago (2015-02-24 14:09:04 UTC) #3
caitp (gmail)
There's no intent thread yet, just a prototype. If it bumps up from stage 0 ...
5 years, 10 months ago (2015-02-24 14:56:13 UTC) #4
titzer
https://codereview.chromium.org/953563002/diff/100001/src/compiler/js-operator.h File src/compiler/js-operator.h (right): https://codereview.chromium.org/953563002/diff/100001/src/compiler/js-operator.h#newcode221 src/compiler/js-operator.h:221: const Operator* Exponentiate(); If this is an experimental feature, ...
5 years, 10 months ago (2015-02-24 18:46:22 UTC) #6
Michael Starzinger
On 2015/02/24 14:56:13, caitp wrote: > There's no intent thread yet, just a prototype. If ...
5 years, 10 months ago (2015-02-24 19:33:31 UTC) #7
caitp (gmail)
On 2015/02/24 19:33:31, Michael Starzinger wrote: > On 2015/02/24 14:56:13, caitp wrote: > > There's ...
5 years, 10 months ago (2015-02-24 19:36:59 UTC) #8
Dmitry Lomov (no reviews)
On 2015/02/24 19:36:59, caitp wrote: > On 2015/02/24 19:33:31, Michael Starzinger wrote: > > On ...
5 years, 10 months ago (2015-02-25 11:21:18 UTC) #9
rossberg
On 2015/02/25 11:21:18, Dmitry Lomov (chromium) wrote: > 1. Writing experimental prototype CLs and seeking ...
5 years, 10 months ago (2015-02-25 12:34:18 UTC) #10
caitp (gmail)
5 years, 10 months ago (2015-02-25 15:23:31 UTC) #11
On 2015/02/25 12:34:18, rossberg wrote:
> On 2015/02/25 11:21:18, Dmitry Lomov (chromium) wrote:
> > 1. Writing experimental prototype CLs and seeking feedback is fine and
greatly
> > encouraged as long as those CLs are clearly marked as such. 
> > 2. I am not convinced that now is the right time to land exponentiation
> operator
> > in V8:
> >    - we are in time of great churn, what with all the ES6 features and
> TurboFan
> > trying to replace Crankshaft
> >    - you see for yourself that this Cl ends up being pretty invasive and a
> > moving part on top of a bunch of other moving parts
> >    - it is not that we see a high demand for exponentiation operator being
> > implemented in V8 at this point
> >    - once this lands, we need to support exp operator throughout any and all
> > changes and refactorings we need to do. To really get exp operator support
on
> > par with other arithmetic operators we have, we would need to implement
> > BinaryOpIC support for it and so on and so forth - I do not think we have
> > bandwidth at this point to do this.
> > 
> > So my recommendation would be to not land this at this point of time.
> 
> I agree with what Dmitry said. A new primitive operator is a rather intrusive
> feature, and we have more than enough loose ends to deal with at the moment. I
> prefer to focus on our current priorities (ES6, Turbofan, strong mode), and
> avoid broadening the surface of the language & system further before we are
> through with all that.
> 
> That said, we of course welcome experimentation. To address Michael's
concerns,
> it would help if the description of experimental CLs clearly stated the
> intention (in particular, when there is no intent to land; an explicit
heads-up
> reply is appreciated once such a CL is emerging from experimental to "real").

So I'll just do the desugar-to-runtime-call thing in parsing and get rid of all
the compiler changes. it's a pretty trivial, this just makes the parser and AST
a bit weirder than they should be. There's no real requirement that this touches
the compiler

Powered by Google App Engine
This is Rietveld 408576698