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

Issue 10447133: FlowGraphCompiler is not a visitor any longer. Start consolidating shared code between the x64 and … (Closed)

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

Description

FlowGraphCompiler is not a visitor any longer. Start consolidating shared code between the x64 and ia32 compilers into a FlowGraphCompilerShared. Idea would to use the FlowGraphCompilerShared type from shared code, and FlowGraphCompiler from machine specific code. Committed: https://code.google.com/p/dart/source/detail?r=8207

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 8

Patch Set 5 : #

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+420 lines, -752 lines) Patch
M runtime/vm/flow_graph_compiler_ia32.h View 1 2 3 4 5 3 chunks +2 lines, -46 lines 0 comments Download
M runtime/vm/flow_graph_compiler_ia32.cc View 1 2 3 4 5 16 chunks +34 lines, -151 lines 0 comments Download
A runtime/vm/flow_graph_compiler_shared.h View 1 2 3 4 1 chunk +147 lines, -0 lines 0 comments Download
A runtime/vm/flow_graph_compiler_shared.cc View 1 2 3 4 1 chunk +148 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_compiler_x64.h View 1 2 3 4 5 4 chunks +2 lines, -82 lines 0 comments Download
M runtime/vm/flow_graph_compiler_x64.cc View 1 2 3 4 5 20 chunks +40 lines, -466 lines 0 comments Download
M runtime/vm/intermediate_language.h View 1 2 3 4 5 5 chunks +7 lines, -7 lines 0 comments Download
M runtime/vm/intermediate_language_ia32.cc View 1 2 3 4 5 1 chunk +19 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language_x64.cc View 1 2 3 4 5 1 chunk +19 lines, -0 lines 0 comments Download
M runtime/vm/vm_sources.gypi View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
srdjan
8 years, 6 months ago (2012-06-01 00:14:20 UTC) #1
Vyacheslav Egorov (Google)
lgtm https://chromiumcodereview.appspot.com/10447133/diff/5003/runtime/vm/flow_graph_compiler_ia32.h File runtime/vm/flow_graph_compiler_ia32.h (right): https://chromiumcodereview.appspot.com/10447133/diff/5003/runtime/vm/flow_graph_compiler_ia32.h#newcode94 runtime/vm/flow_graph_compiler_ia32.h:94: Assembler* assembler_; assembler_, block_order_, current_block_, deopt_stubs_, is_optimizing_ and ...
8 years, 6 months ago (2012-06-01 10:55:24 UTC) #2
srdjan
8 years, 6 months ago (2012-06-01 17:44:46 UTC) #3
https://chromiumcodereview.appspot.com/10447133/diff/5003/runtime/vm/flow_gra...
File runtime/vm/flow_graph_compiler_ia32.h (right):

https://chromiumcodereview.appspot.com/10447133/diff/5003/runtime/vm/flow_gra...
runtime/vm/flow_graph_compiler_ia32.h:94: Assembler* assembler_;
On 2012/06/01 10:55:24, Vyacheslav Egorov (Google) wrote:
> assembler_, block_order_, current_block_, deopt_stubs_, is_optimizing_ and all
> related accessors can be shared between compilers as well


Did not want to make the CL too big, but since you insist, you insist ...

https://chromiumcodereview.appspot.com/10447133/diff/5003/runtime/vm/flow_gra...
File runtime/vm/flow_graph_compiler_shared.cc (right):

https://chromiumcodereview.appspot.com/10447133/diff/5003/runtime/vm/flow_gra...
runtime/vm/flow_graph_compiler_shared.cc:42:
FlowGraphCompilerShared::GetBlockLabel(BlockEntryInstr* block_entry) const {
On 2012/06/01 10:55:24, Vyacheslav Egorov (Google) wrote:
> this is a very strange formatting. 

Done.

https://chromiumcodereview.appspot.com/10447133/diff/5003/runtime/vm/flow_gra...
File runtime/vm/flow_graph_compiler_x64.cc (right):

https://chromiumcodereview.appspot.com/10447133/diff/5003/runtime/vm/flow_gra...
runtime/vm/flow_graph_compiler_x64.cc:758: current_block_->EmitNativeCode(this);
On 2012/06/01 10:55:24, Vyacheslav Egorov (Google) wrote:
> This is extremely confusing to read, if I did not know that current_block_ is
> just current_block_entry_label_ I would thing that this call emits native code
> for all instructions in the block.
> 
> Maybe add a comment.

Agreed with readability problem, needs at least a comment or a different  name
of method. Renaming: instead of EmitNativeCode -> PrepareEntry

https://chromiumcodereview.appspot.com/10447133/diff/5003/runtime/vm/flow_gra...
runtime/vm/flow_graph_compiler_x64.cc:776: __
jmp(&block_info()[successor->postorder_number()]->label);
On 2012/06/01 10:55:24, Vyacheslav Egorov (Google) wrote:
> use GetLabelFor?

Done.

Powered by Google App Engine
This is Rietveld 408576698