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

Issue 10014006: Try/catch in graph builder. (Closed)

Created:
8 years, 8 months ago by srdjan
Modified:
8 years, 8 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Try/catch in new compiler. Added try index to appropriate instructions. If any instruction throws an exception, the try index tells us which catch entry the exception belongs to. Committed: https://code.google.com/p/dart/source/detail?r=6389

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 4

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+448 lines, -122 lines) Patch
M runtime/vm/compiler.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/flow_graph_builder.h View 1 2 3 4 5 4 chunks +18 lines, -5 lines 0 comments Download
M runtime/vm/flow_graph_builder.cc View 1 2 3 4 5 41 chunks +203 lines, -70 lines 0 comments Download
M runtime/vm/flow_graph_compiler_x64.h View 1 2 3 4 5 5 chunks +9 lines, -3 lines 0 comments Download
M runtime/vm/flow_graph_compiler_x64.cc View 1 2 3 4 5 30 chunks +90 lines, -24 lines 0 comments Download
M runtime/vm/intermediate_language.h View 1 2 3 4 5 37 chunks +124 lines, -16 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
srdjan
8 years, 8 months ago (2012-04-10 22:38:19 UTC) #1
regis
LGTM But I am not sure I understand exactly why you need to pass try_index ...
8 years, 8 months ago (2012-04-10 22:58:24 UTC) #2
srdjan
8 years, 8 months ago (2012-04-10 23:11:57 UTC) #3
About passing try_index explicitly, I assume meaning storing it in the
instructions:
The old compiler is traversing the AST node hierarchically and can therefore
maintain a try-index scope. The flow graph compiler has lost that scoping and
has to rely on explicitly stored try-index values (similar to context-levels
stored in the variable access instructions).

https://chromiumcodereview.appspot.com/10014006/diff/4004/runtime/vm/flow_gra...
File runtime/vm/flow_graph_builder.cc (right):

https://chromiumcodereview.appspot.com/10014006/diff/4004/runtime/vm/flow_gra...
runtime/vm/flow_graph_builder.cc:151: const LocalVariable& context_variable,
intptr_t start_index) {
On 2012/04/10 22:58:24, regis wrote:
> Should you also call the variable in BuildStoreContext "context_variable" for
> symmetry? Or this one just "variable".

-> variable

https://chromiumcodereview.appspot.com/10014006/diff/4004/runtime/vm/flow_gra...
File runtime/vm/flow_graph_builder.h (right):

https://chromiumcodereview.appspot.com/10014006/diff/4004/runtime/vm/flow_gra...
runtime/vm/flow_graph_builder.h:36: intptr_t allocate_try_index() { return
++last_used_try_index_; }
On 2012/04/10 22:58:24, regis wrote:
> Shouldn't this be camel case?

Done.

Powered by Google App Engine
This is Rietveld 408576698