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

Issue 9383004: Intrinsify InternalByteArray's get_length and []. (Closed)

Created:
8 years, 10 months ago by srdjan
Modified:
8 years, 10 months ago
Reviewers:
siva
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Intrinsify InternalByteArray's get_length and []. Disallow intrinsification of non-corelib methods. Recognize private classes for intrinsification. Committed: https://code.google.com/p/dart/source/detail?r=4171

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 8

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -5 lines) Patch
M runtime/vm/intrinsifier_ia32.cc View 1 2 3 chunks +87 lines, -2 lines 0 comments Download
M tests/standalone/src/ByteArrayTest.dart View 1 2 1 chunk +5 lines, -3 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
srdjan
Note: indexed setter will follow later. Inlined code (optimized codegen) will follow later.
8 years, 10 months ago (2012-02-10 14:36:27 UTC) #1
siva
LGTM http://codereview.chromium.org/9383004/diff/3001/runtime/vm/intrinsifier_ia32.cc File runtime/vm/intrinsifier_ia32.cc (right): http://codereview.chromium.org/9383004/diff/3001/runtime/vm/intrinsifier_ia32.cc#newcode77 runtime/vm/intrinsifier_ia32.cc:77: V(_ByteArrayBase, [], ByteArrayBase_getIndexed) \ The more interesting ones ...
8 years, 10 months ago (2012-02-11 01:39:29 UTC) #2
srdjan
8 years, 10 months ago (2012-02-12 06:52:24 UTC) #3
http://codereview.chromium.org/9383004/diff/3001/runtime/vm/intrinsifier_ia32.cc
File runtime/vm/intrinsifier_ia32.cc (right):

http://codereview.chromium.org/9383004/diff/3001/runtime/vm/intrinsifier_ia32...
runtime/vm/intrinsifier_ia32.cc:77: V(_ByteArrayBase, [],
ByteArrayBase_getIndexed)                              \
On 2012/02/11 01:39:29, asiva wrote:
> The more interesting ones are the getInt8, getUint8, getInt16, getUint16,
> getInt32 ..... getFloar32(), getFloar64() etc. functions. Will you also be
> intrinsifying those?

Do we have existing code/benchmarks that are already using those methods?
I picked the two methods above because I know that Peter is using them in the
scanner.
But, yes, all the mentioned methods will be intrinsified.

http://codereview.chromium.org/9383004/diff/3001/runtime/vm/intrinsifier_ia32...
runtime/vm/intrinsifier_ia32.cc:333: // Handles only class InternalByteArray.
On 2012/02/11 01:39:29, asiva wrote:
> Would you at some point also implement a similar intrinsification for external
> byte arrays?

Yes.

http://codereview.chromium.org/9383004/diff/3001/runtime/vm/intrinsifier_ia32...
runtime/vm/intrinsifier_ia32.cc:368: __ SmiTag(EAX);
On 2012/02/11 01:39:29, asiva wrote:
> Perhaps a comment that values stored in the byte array are regular values and
> hence we need to SmiTag them on access.

Done.

http://codereview.chromium.org/9383004/diff/3001/runtime/vm/intrinsifier_ia32...
runtime/vm/intrinsifier_ia32.cc:1224: }                                         
                                \
On 2012/02/11 01:39:29, asiva wrote:
> This piece of code here seems too big to repeat for every function being
> instrisified, why not make it a function and call it here in the macro...
> 
> The function could return true in which case you return destination(assembler)
> otherwise keep going.

Good point. Done.

Powered by Google App Engine
This is Rietveld 408576698