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

Issue 546006: Some cleanup of the toplevel code generator:... (Closed)

Created:
10 years, 11 months ago by Kevin Millikin (Chromium)
Modified:
9 years, 7 months ago
Reviewers:
Lasse Reichstein
CC:
v8-dev
Visibility:
Public.

Description

Some cleanup of the toplevel code generator: * Rename the operation of filling a context with a value. Formerly it was 'Move', now it's 'Apply' so as to avoid confusion with various other Moves (eg, in the toplevel codegen, in the macro assemblers). * Use the abstraction Drop rather than math on the stack pointer. * Add a predicate on AST expression nodes to abstract a repeated test whether we should us a regular (named) IC or a keyed IC. Committed: http://code.google.com/p/v8/source/detail?r=3580

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+446 lines, -538 lines) Patch
M src/arm/codegen-arm.cc View 1 chunk +1 line, -9 lines 0 comments Download
M src/arm/fast-codegen-arm.cc View 37 chunks +111 lines, -152 lines 1 comment Download
M src/arm/macro-assembler-arm.h View 1 chunk +5 lines, -1 line 0 comments Download
M src/arm/macro-assembler-arm.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M src/ast.h View 2 chunks +13 lines, -0 lines 0 comments Download
M src/compiler.cc View 2 chunks +2 lines, -10 lines 0 comments Download
M src/fast-codegen.h View 2 chunks +17 lines, -10 lines 0 comments Download
M src/fast-codegen.cc View 2 chunks +34 lines, -1 line 0 comments Download
M src/ia32/codegen-ia32.cc View 1 chunk +1 line, -9 lines 0 comments Download
M src/ia32/fast-codegen-ia32.cc View 36 chunks +124 lines, -166 lines 5 comments Download
M src/ia32/macro-assembler-ia32.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/x64/codegen-x64.cc View 1 chunk +1 line, -9 lines 1 comment Download
M src/x64/fast-codegen-x64.cc View 36 chunks +128 lines, -168 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Kevin Millikin (Chromium)
10 years, 11 months ago (2010-01-11 14:09:50 UTC) #1
Lasse Reichstein
10 years, 11 months ago (2010-01-12 08:30:04 UTC) #2
LGTM!

http://codereview.chromium.org/546006/diff/3001/3011
File src/arm/fast-codegen-arm.cc (right):

http://codereview.chromium.org/546006/diff/3001/3011#newcode785
src/arm/fast-codegen-arm.cc:785: switch (expr->context()) {
This switch is identical to the one at line 703. Could they be combined somehow?

http://codereview.chromium.org/546006/diff/3001/3003
File src/ia32/fast-codegen-ia32.cc (right):

http://codereview.chromium.org/546006/diff/3001/3003#newcode199
src/ia32/fast-codegen-ia32.cc:199: Register scratch) {
This function looks generic enough that it could be in fast-codegen.cc

http://codereview.chromium.org/546006/diff/3001/3003#newcode220
src/ia32/fast-codegen-ia32.cc:220: void
FastCodeGenerator::Apply(Expression::Context context, Literal* lit) {
If we had MacroAssembler::Push(Handle<Object> source) on all backends and always
used kResultRegister as scratch, this function could be moved to fast-codegen.cc
too.

http://codereview.chromium.org/546006/diff/3001/3003#newcode254
src/ia32/fast-codegen-ia32.cc:254: __ mov(eax, Operand(esp, 0));
With a function like MacroAssembler::MoveToStack(int stack_offset, Register
source), this function could be generic too.

http://codereview.chromium.org/546006/diff/3001/3003#newcode275
src/ia32/fast-codegen-ia32.cc:275: Register reg) {
And this one too!
(A good abstraction of the stack and a few registers seems to be all we are
using :)

http://codereview.chromium.org/546006/diff/3001/3003#newcode592
src/ia32/fast-codegen-ia32.cc:592: __ nop();
Can we assume that DropAndMove does not start with "test"?

http://codereview.chromium.org/546006/diff/3001/3013
File src/x64/codegen-x64.cc (right):

http://codereview.chromium.org/546006/diff/3001/3013#newcode4250
src/x64/codegen-x64.cc:4250: if (property->key()->IsPropertyName()) {
This is a really great clean-up! So much easier to read and write.

Powered by Google App Engine
This is Rietveld 408576698