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

Issue 11411142: Support loads from Uint8Array and ExternalUint8Array in the optimizing compiler. (Closed)

Created:
8 years, 1 month ago by Florian Schneider
Modified:
8 years ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org, Mads Ager (google)
Visibility:
Public.

Description

Support loads from Uint8Array and ExternalUint8Array in the optimizing compiler. This is done by extending LoadIndexed to handle Uint8Array and ExternalUint8Array. Small cleanups: - Share code for computing the element addresses for indexed loads. - Remove kGrowableArrayCid where it cannot occur. We only ever emit LoadIndexedInstr for fixed-size arrays. Loads from growable arrays are split into loading the backing store first and then an indexed load from the backing store. Committed: https://code.google.com/p/dart/source/detail?r=15305

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : added Uint8Array #

Total comments: 10

Patch Set 4 : addressed comments #

Patch Set 5 : #

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+142 lines, -56 lines) Patch
M runtime/vm/flow_graph_compiler.cc View 1 2 3 2 chunks +27 lines, -1 line 0 comments Download
M runtime/vm/flow_graph_compiler_ia32.cc View 1 2 1 chunk +0 lines, -20 lines 0 comments Download
M runtime/vm/flow_graph_compiler_x64.cc View 1 2 1 chunk +0 lines, -20 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 1 2 3 6 chunks +26 lines, -5 lines 0 comments Download
M runtime/vm/intermediate_language_ia32.cc View 1 2 3 3 chunks +43 lines, -5 lines 0 comments Download
M runtime/vm/intermediate_language_x64.cc View 1 2 3 3 chunks +42 lines, -5 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Florian Schneider
8 years, 1 month ago (2012-11-22 18:01:03 UTC) #1
srdjan
LGTM after adding tests or verifying that tests exist. https://codereview.chromium.org/11411142/diff/1005/runtime/vm/flow_graph_compiler.cc File runtime/vm/flow_graph_compiler.cc (right): https://codereview.chromium.org/11411142/diff/1005/runtime/vm/flow_graph_compiler.cc#newcode957 runtime/vm/flow_graph_compiler.cc:957: ...
8 years, 1 month ago (2012-11-22 18:18:19 UTC) #2
Mads Ager (google)
Thanks Florian!
8 years, 1 month ago (2012-11-23 07:06:28 UTC) #3
Florian Schneider
8 years, 1 month ago (2012-11-23 14:49:39 UTC) #4
Addressed comments. Uint8Array are tested in byte_array_test and pub tests.

https://codereview.chromium.org/11411142/diff/1005/runtime/vm/flow_graph_comp...
File runtime/vm/flow_graph_compiler.cc (right):

https://codereview.chromium.org/11411142/diff/1005/runtime/vm/flow_graph_comp...
runtime/vm/flow_graph_compiler.cc:957: case kGrowableObjectArrayCid:
On 2012/11/22 18:18:19, srdjan wrote:
> Can we remove kGrowableObjectArrayCid here as well?

Yes, good point.

https://codereview.chromium.org/11411142/diff/1005/runtime/vm/flow_graph_opti...
File runtime/vm/flow_graph_optimizer.cc (right):

https://codereview.chromium.org/11411142/diff/1005/runtime/vm/flow_graph_opti...
runtime/vm/flow_graph_optimizer.cc:628: case kGrowableObjectArrayCid:
On 2012/11/22 18:18:19, srdjan wrote:
> Remove  kGrowableObjectArrayCid?

Here we still need GrowableObjectArray. Only the output of PrepareIndexedOp
cannot be GrowableObjectArray.

https://codereview.chromium.org/11411142/diff/1005/runtime/vm/intermediate_la...
File runtime/vm/intermediate_language.cc (right):

https://codereview.chromium.org/11411142/diff/1005/runtime/vm/intermediate_la...
runtime/vm/intermediate_language.cc:1152: return Type::IntType();
On 2012/11/22 18:18:19, srdjan wrote:
> Could we also add range for the result?

Done. Added LoadIndexedInstr::InferRange.

https://codereview.chromium.org/11411142/diff/1005/runtime/vm/intermediate_la...
File runtime/vm/intermediate_language_ia32.cc (right):

https://codereview.chromium.org/11411142/diff/1005/runtime/vm/intermediate_la...
runtime/vm/intermediate_language_ia32.cc:1222: }
On 2012/11/22 18:18:19, srdjan wrote:
> To be similar to cases above, you could do a return here as well.

Done.

https://codereview.chromium.org/11411142/diff/1005/runtime/vm/intermediate_la...
File runtime/vm/intermediate_language_x64.cc (right):

https://codereview.chromium.org/11411142/diff/1005/runtime/vm/intermediate_la...
runtime/vm/intermediate_language_x64.cc:1090: }
On 2012/11/22 18:18:19, srdjan wrote:
> ditto

Done.

Powered by Google App Engine
This is Rietveld 408576698