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

Issue 1345333002: src: Use simple/fast macro version of MinMax in JS (Closed)

Created:
5 years, 3 months ago by skomski
Modified:
5 years, 2 months ago
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

src: Use simple/fast macro version of MinMax in JS Use the simple macro version of {Min, Max} where possible to improve performance Little cleanup of variable names Follow-up to CR: https://codereview.chromium.org/1331993004 BUG=

Patch Set 1 #

Patch Set 2 : Back from beginInt to startInt #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -67 lines) Patch
M src/array.js View 3 chunks +1 line, -3 lines 0 comments Download
M src/arraybuffer.js View 1 2 chunks +20 lines, -21 lines 4 comments Download
M src/harmony-array.js View 3 chunks +7 lines, -11 lines 0 comments Download
M src/harmony-atomics.js View 3 chunks +3 lines, -5 lines 0 comments Download
M src/harmony-typedarray.js View 3 chunks +16 lines, -22 lines 0 comments Download
M src/json.js View 2 chunks +1 line, -5 lines 0 comments Download

Messages

Total messages: 7 (1 generated)
skomski
PTAL
5 years, 3 months ago (2015-09-16 21:26:51 UTC) #2
Dan Ehrenberg
One nit. Generally, do you think you could separate this into two patches, one to ...
5 years, 3 months ago (2015-09-16 21:34:22 UTC) #3
skomski
https://codereview.chromium.org/1345333002/diff/20001/src/arraybuffer.js File src/arraybuffer.js (right): https://codereview.chromium.org/1345333002/diff/20001/src/arraybuffer.js#newcode54 src/arraybuffer.js:54: var byteLength = %_ArrayBufferGetByteLength(this); On 2015/09/16 21:34:21, Dan Ehrenberg ...
5 years, 3 months ago (2015-09-16 21:57:39 UTC) #4
Jakob Kummerow
https://codereview.chromium.org/1345333002/diff/20001/src/arraybuffer.js File src/arraybuffer.js (right): https://codereview.chromium.org/1345333002/diff/20001/src/arraybuffer.js#newcode54 src/arraybuffer.js:54: var byteLength = %_ArrayBufferGetByteLength(this); On 2015/09/16 21:57:39, skomski wrote: ...
5 years, 3 months ago (2015-09-17 07:36:34 UTC) #5
skomski
https://codereview.chromium.org/1345333002/diff/20001/src/arraybuffer.js File src/arraybuffer.js (right): https://codereview.chromium.org/1345333002/diff/20001/src/arraybuffer.js#newcode54 src/arraybuffer.js:54: var byteLength = %_ArrayBufferGetByteLength(this); On 2015/09/17 07:36:34, Jakob wrote: ...
5 years, 3 months ago (2015-09-17 08:07:03 UTC) #6
Dan Ehrenberg
5 years, 3 months ago (2015-09-21 22:09:46 UTC) #7
On 2015/09/17 at 08:07:03, karl wrote:
> https://codereview.chromium.org/1345333002/diff/20001/src/arraybuffer.js
> File src/arraybuffer.js (right):
> 
>
https://codereview.chromium.org/1345333002/diff/20001/src/arraybuffer.js#newc...
> src/arraybuffer.js:54: var byteLength = %_ArrayBufferGetByteLength(this);
> On 2015/09/17 07:36:34, Jakob wrote:
> > On 2015/09/16 21:57:39, skomski wrote:
> > > On 2015/09/16 21:34:21, Dan Ehrenberg wrote:
> > > > Why did you move this inside of the conditional rather than before it?
> > > 
> > > Same code as in SubArray; related to
> > https://codereview.chromium.org/201873005.
> > 
> > That's not a good reason. It didn't make sense there, it doesn't make sense
here
> > either.
> 
> First one was not a reason rather I thought he missed that it's the same
construct but the main reason was the related bit.
> 
> 1) TO_INTEGER needs to be called always before GetByteLength
(https://codereview.chromium.org/201873005)
> 2) IS_UNDEFINED does not need to be called twice
> 
> results into this construct.

Oh, I see, the constraint exists because valueOf() may have a side effect. A way
to avoid calling it twice is to store the result of IS_UNDEFINED, and use that
to determine whether to run the later code.

Could you separate out your patch for using MAX_SIMPLE and MIN_SIMPLE into a
separate patch from this code cleanup that you're doing? I feel more comfortable
approving that change than this larger one.

Powered by Google App Engine
This is Rietveld 408576698