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

Issue 10823308: Implement basic support for deferred slow path code with calls that save and restore live registers. (Closed)

Created:
8 years, 4 months ago by Vyacheslav Egorov (Google)
Modified:
8 years, 4 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Implement basic support for deferred slow path code with calls that save and restore live registers. Use it to avoid spilling over stack-checks. R=kmillikin@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=10639

Patch Set 1 #

Total comments: 8

Patch Set 2 : address Kevin's comments #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+304 lines, -80 lines) Patch
M runtime/vm/flow_graph_allocator.h View 1 9 chunks +40 lines, -7 lines 1 comment Download
M runtime/vm/flow_graph_allocator.cc View 1 12 chunks +101 lines, -42 lines 2 comments Download
M runtime/vm/flow_graph_compiler.h View 1 chunk +18 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_compiler.cc View 1 2 chunks +30 lines, -1 line 2 comments Download
M runtime/vm/flow_graph_compiler_ia32.h View 3 chunks +6 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_compiler_x64.h View 3 chunks +6 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/intermediate_language_ia32.cc View 1 chunk +30 lines, -10 lines 0 comments Download
M runtime/vm/intermediate_language_x64.cc View 1 chunk +31 lines, -13 lines 0 comments Download
M runtime/vm/locations.h View 1 4 chunks +35 lines, -4 lines 2 comments Download
M runtime/vm/locations.cc View 1 chunk +6 lines, -2 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Vyacheslav Egorov (Google)
8 years, 4 months ago (2012-08-14 09:06:07 UTC) #1
Kevin Millikin (Google)
LGTM except for some naming suggestions. https://chromiumcodereview.appspot.com/10823308/diff/1/runtime/vm/flow_graph_allocator.cc File runtime/vm/flow_graph_allocator.cc (right): https://chromiumcodereview.appspot.com/10823308/diff/1/runtime/vm/flow_graph_allocator.cc#newcode315 runtime/vm/flow_graph_allocator.cc:315: SafepointPosition* new_pos = ...
8 years, 4 months ago (2012-08-14 11:18:16 UTC) #2
Vyacheslav Egorov (Google)
Thanks for the review. Landing. https://chromiumcodereview.appspot.com/10823308/diff/1/runtime/vm/flow_graph_allocator.cc File runtime/vm/flow_graph_allocator.cc (right): https://chromiumcodereview.appspot.com/10823308/diff/1/runtime/vm/flow_graph_allocator.cc#newcode315 runtime/vm/flow_graph_allocator.cc:315: SafepointPosition* new_pos = new ...
8 years, 4 months ago (2012-08-14 12:31:13 UTC) #3
srdjan
DBC https://chromiumcodereview.appspot.com/10823308/diff/6001/runtime/vm/flow_graph_allocator.cc File runtime/vm/flow_graph_allocator.cc (right): https://chromiumcodereview.appspot.com/10823308/diff/6001/runtime/vm/flow_graph_allocator.cc#newcode1229 runtime/vm/flow_graph_allocator.cc:1229: template<typename PositionType> I think this kind of code ...
8 years, 4 months ago (2012-08-15 00:12:03 UTC) #4
Kevin Millikin (Google)
https://chromiumcodereview.appspot.com/10823308/diff/6001/runtime/vm/flow_graph_compiler.cc File runtime/vm/flow_graph_compiler.cc (right): https://chromiumcodereview.appspot.com/10823308/diff/6001/runtime/vm/flow_graph_compiler.cc#newcode213 runtime/vm/flow_graph_compiler.cc:213: assembler()->PushRegister(reg); On 2012/08/15 00:12:03, srdjan wrote: > How does ...
8 years, 4 months ago (2012-08-15 08:02:15 UTC) #5
Vyacheslav Egorov (Google)
8 years, 4 months ago (2012-08-15 13:08:07 UTC) #6
https://chromiumcodereview.appspot.com/10823308/diff/6001/runtime/vm/flow_gra...
File runtime/vm/flow_graph_allocator.cc (right):

https://chromiumcodereview.appspot.com/10823308/diff/6001/runtime/vm/flow_gra...
runtime/vm/flow_graph_allocator.cc:1229: template<typename PositionType>
On 2012/08/15 00:12:03, srdjan wrote:
> I think this kind of code sharing makes code less maintainable, and would
prefer
> to use subclassing instead.

I keep in mind that we try to avoid using templates and tried subclassing first.
Unfortunately in this particular case it does not fit well because return type
and head pointer will require additional ugly casts: Derived** is not actually
assignable to Base** for obvious reasons, handling of return value will also
require cast.

https://chromiumcodereview.appspot.com/10823308/diff/6001/runtime/vm/locations.h
File runtime/vm/locations.h (right):

https://chromiumcodereview.appspot.com/10823308/diff/6001/runtime/vm/location...
runtime/vm/locations.h:298: bool contains_call() const {
On 2012/08/15 00:12:03, srdjan wrote:
> I find is_call vs contains_call too similar/confusing
> 
> maybe is_always_call vs is_slow_path_call ?
> 
> Also, I would expect an accessor named contains_call() to return the field
> contains_call_

I rename contains_call() into can_call(), is_call into always_calls()

Powered by Google App Engine
This is Rietveld 408576698