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

Issue 9464009: Add enough compiler support to compile empty functions on x64. (Closed)

Created:
8 years, 10 months ago by Kevin Millikin (Google)
Modified:
8 years, 10 months ago
Reviewers:
srdjan
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Add enough compiler support to compile empty functions on x64. Implement a simple compilation visitor for the intermediate language. Copy code from the x64 code generator to support compilation of functions with no arguments, no locals, and that return a literal. Compiled code is not used, but it can be disassembled and visually checked against the code from the old code generator. R=srdjan@google.com BUG= TEST=expected to pass all tests on x64 Committed: https://code.google.com/p/dart/source/detail?r=4601

Patch Set 1 #

Patch Set 2 : Include file inadvertently left out. #

Total comments: 12
Unified diffs Side-by-side diffs Delta from patch set Stats (+435 lines, -83 lines) Patch
M runtime/vm/code_generator_x64.h View 4 chunks +74 lines, -2 lines 4 comments Download
M runtime/vm/code_generator_x64.cc View 1 chunk +0 lines, -69 lines 0 comments Download
M runtime/vm/compiler.cc View 2 chunks +11 lines, -0 lines 4 comments Download
M runtime/vm/flow_graph_builder.h View 2 chunks +6 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_builder.cc View 1 chunk +21 lines, -11 lines 0 comments Download
A runtime/vm/flow_graph_compiler.h View 1 chunk +14 lines, -0 lines 0 comments Download
A runtime/vm/flow_graph_compiler_x64.h View 1 chunk +66 lines, -0 lines 4 comments Download
A runtime/vm/flow_graph_compiler_x64.cc View 1 1 chunk +227 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language.h View 5 chunks +13 lines, -1 line 0 comments Download
M runtime/vm/vm_sources.gypi View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Kevin Millikin (Google)
I'm aware that this is *extremely* rough. Think of it as a way to get ...
8 years, 10 months ago (2012-02-24 14:40:44 UTC) #1
Kevin Millikin (Google)
Also: it includes the changes from http://codereview.chromium.org/9463007/ which I will land first or revert from ...
8 years, 10 months ago (2012-02-24 14:42:22 UTC) #2
srdjan
LGTM with comments https://chromiumcodereview.appspot.com/9464009/diff/11/runtime/vm/code_generator_x64.h File runtime/vm/code_generator_x64.h (right): https://chromiumcodereview.appspot.com/9464009/diff/11/runtime/vm/code_generator_x64.h#newcode87 runtime/vm/code_generator_x64.h:87: class DescriptorList; Why the move? https://chromiumcodereview.appspot.com/9464009/diff/11/runtime/vm/code_generator_x64.h#newcode233 ...
8 years, 10 months ago (2012-02-24 23:13:01 UTC) #3
Kevin Millikin (Google)
8 years, 10 months ago (2012-02-27 08:22:06 UTC) #4
http://codereview.chromium.org/9464009/diff/11/runtime/vm/code_generator_x64.h
File runtime/vm/code_generator_x64.h (right):

http://codereview.chromium.org/9464009/diff/11/runtime/vm/code_generator_x64....
runtime/vm/code_generator_x64.h:87: class DescriptorList;
On 2012/02/24 23:13:02, srdjan wrote:
> Why the move?

Making it public for class FlowGraphCompiler.  A friend class seemed
unnecessary.

http://codereview.chromium.org/9464009/diff/11/runtime/vm/code_generator_x64....
runtime/vm/code_generator_x64.h:233: class CodeGenerator::DescriptorList :
public ZoneAllocated {
On 2012/02/24 23:13:02, srdjan wrote:
> Remove since I have moved it into code_generator.h

Thanks, done.

http://codereview.chromium.org/9464009/diff/11/runtime/vm/compiler.cc
File runtime/vm/compiler.cc (right):

http://codereview.chromium.org/9464009/diff/11/runtime/vm/compiler.cc#newcode126
runtime/vm/compiler.cc:126: if (FLAG_use_new_compiler) {
On 2012/02/24 23:13:02, srdjan wrote:
> ASSERT(!optimized).

Done.

http://codereview.chromium.org/9464009/diff/11/runtime/vm/compiler.cc#newcode140
runtime/vm/compiler.cc:140: graph_compiler.CompileGraph();
On 2012/02/24 23:13:02, srdjan wrote:
> It would be better to implement "dummy" FlowGraphCompiler in _ia32 and simarm.
> This can happen in a later CL (please add a TODO).

Agreed.  Done.

http://codereview.chromium.org/9464009/diff/11/runtime/vm/flow_graph_compiler...
File runtime/vm/flow_graph_compiler_x64.h (right):

http://codereview.chromium.org/9464009/diff/11/runtime/vm/flow_graph_compiler...
runtime/vm/flow_graph_compiler_x64.h:22: explicit FlowGraphCompiler(Assembler*
assembler,
On 2012/02/24 23:13:02, srdjan wrote:
> remove explicit

Thanks, done.

http://codereview.chromium.org/9464009/diff/11/runtime/vm/flow_graph_compiler...
runtime/vm/flow_graph_compiler_x64.h:44: // Compile a Value into register RAX.
On 2012/02/24 23:13:02, srdjan wrote:
> Why into RAX and not on TOS?

This is 'pop', when we consume a value (for temps they should already be on top
of the stack).

I'll rename it LoadValue.  Eventually we'll want an explicit register argument,
I think, but I'll wait until that's obvious.

Powered by Google App Engine
This is Rietveld 408576698