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

Issue 10831172: Introduced TypeFeedbackId and BailoutId types. (Closed)

Created:
8 years, 4 months ago by Sven Panne
Modified:
8 years, 4 months ago
Reviewers:
Michael Starzinger
CC:
v8-dev
Visibility:
Public.

Description

Introduced TypeFeedbackId and BailoutId types. This is a refactoring-only CL which improves the typing of IDs associated with AST nodes. The interesting parts are in utils.h and ast.h, the rest of the CL basically follows mechanically. Committed: https://code.google.com/p/v8/source/detail?r=12263

Patch Set 1 #

Total comments: 24

Patch Set 2 : Incorporated review feedback. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+563 lines, -464 lines) Patch
M src/arm/assembler-arm.h View 2 chunks +6 lines, -6 lines 0 comments Download
M src/arm/assembler-arm.cc View 2 chunks +5 lines, -1 line 0 comments Download
M src/arm/deoptimizer-arm.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M src/arm/full-codegen-arm.cc View 21 chunks +24 lines, -21 lines 0 comments Download
M src/arm/lithium-arm.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/arm/lithium-arm.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M src/arm/lithium-codegen-arm.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/arm/macro-assembler-arm.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/arm/macro-assembler-arm.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M src/assembler.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/ast.h View 1 43 chunks +99 lines, -89 lines 0 comments Download
M src/ast.cc View 3 chunks +12 lines, -9 lines 0 comments Download
M src/compiler.h View 4 chunks +3 lines, -7 lines 0 comments Download
M src/compiler.cc View 6 chunks +6 lines, -6 lines 0 comments Download
M src/deoptimizer.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/deoptimizer.cc View 1 5 chunks +11 lines, -10 lines 0 comments Download
M src/frames.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M src/full-codegen.h View 4 chunks +7 lines, -6 lines 0 comments Download
M src/full-codegen.cc View 6 chunks +7 lines, -7 lines 0 comments Download
M src/hydrogen.h View 14 chunks +21 lines, -21 lines 0 comments Download
M src/hydrogen.cc View 1 27 chunks +32 lines, -32 lines 0 comments Download
M src/hydrogen-instructions.h View 5 chunks +8 lines, -8 lines 0 comments Download
M src/hydrogen-instructions.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/ia32/assembler-ia32.h View 2 chunks +3 lines, -3 lines 0 comments Download
M src/ia32/assembler-ia32.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/ia32/assembler-ia32-inl.h View 1 chunk +3 lines, -3 lines 0 comments Download
M src/ia32/deoptimizer-ia32.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 20 chunks +25 lines, -22 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M src/ia32/lithium-ia32.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/ia32/lithium-ia32.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M src/ia32/macro-assembler-ia32.h View 1 chunk +1 line, -1 line 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/lithium.h View 3 chunks +3 lines, -3 lines 0 comments Download
M src/lithium.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/mips/assembler-mips.h View 2 chunks +6 lines, -6 lines 0 comments Download
M src/mips/assembler-mips.cc View 2 chunks +5 lines, -1 line 0 comments Download
M src/mips/deoptimizer-mips.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M src/mips/full-codegen-mips.cc View 21 chunks +25 lines, -22 lines 0 comments Download
M src/mips/lithium-codegen-mips.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/mips/lithium-mips.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/mips/lithium-mips.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M src/mips/macro-assembler-mips.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/mips/macro-assembler-mips.cc View 4 chunks +5 lines, -4 lines 0 comments Download
M src/objects.h View 6 chunks +23 lines, -8 lines 0 comments Download
M src/objects.cc View 5 chunks +5 lines, -6 lines 0 comments Download
M src/objects-inl.h View 1 chunk +4 lines, -4 lines 0 comments Download
M src/parser.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M src/runtime.cc View 1 5 chunks +7 lines, -7 lines 0 comments Download
M src/type-info.h View 1 6 chunks +8 lines, -8 lines 0 comments Download
M src/type-info.cc View 1 24 chunks +47 lines, -39 lines 0 comments Download
M src/utils.h View 1 1 chunk +46 lines, -0 lines 0 comments Download
M src/x64/assembler-x64.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/x64/assembler-x64.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/x64/assembler-x64-inl.h View 1 chunk +3 lines, -3 lines 0 comments Download
M src/x64/deoptimizer-x64.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 20 chunks +25 lines, -22 lines 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/x64/lithium-x64.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/x64/lithium-x64.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Sven Panne
8 years, 4 months ago (2012-08-05 11:42:19 UTC) #1
Michael Starzinger
LGTM (with a few nits). I like this change! https://chromiumcodereview.appspot.com/10831172/diff/1/src/ast.h File src/ast.h (right): https://chromiumcodereview.appspot.com/10831172/diff/1/src/ast.h#newcode1205 src/ast.h:1205: ...
8 years, 4 months ago (2012-08-06 13:03:41 UTC) #2
Sven Panne
8 years, 4 months ago (2012-08-06 14:08:40 UTC) #3
Feedback addressed, landing...

http://codereview.chromium.org/10831172/diff/1/src/ast.h
File src/ast.h (right):

http://codereview.chromium.org/10831172/diff/1/src/ast.h#newcode1205
src/ast.h:1205: TypeFeedbackId LiteralFeedbackId() const { return reuse(id()); }
On 2012/08/06 13:03:41, Michael Starzinger wrote:
> Can we move that down right after Match()?

Done.

http://codereview.chromium.org/10831172/diff/1/src/ast.h#newcode1573
src/ast.h:1573: void RecordTypeFeedback(TypeFeedbackOracle* oracle,
On 2012/08/06 13:03:41, Michael Starzinger wrote:
> Should fit onto one line.

Done.

http://codereview.chromium.org/10831172/diff/1/src/ast.h#newcode1579
src/ast.h:1579: TypeFeedbackId CallFeedbackId() const { return reuse(id()); }
On 2012/08/06 13:03:41, Michael Starzinger wrote:
> Can we move that up to be the first method in this block and prefix this block
> with the "// Type feedback information." comments?

Done.

http://codereview.chromium.org/10831172/diff/1/src/ast.h#newcode1640
src/ast.h:1640: TypeFeedbackId CallNewFeedbackId() const { return reuse(id()); }
On 2012/08/06 13:03:41, Michael Starzinger wrote:
> Likewise.

Done.

http://codereview.chromium.org/10831172/diff/1/src/ast.h#newcode1758
src/ast.h:1758: TypeFeedbackId BinaryOperationFeedbackId() const { return
reuse(id()); }
On 2012/08/06 13:03:41, Michael Starzinger wrote:
> We should have a consistent ordering, first bailout accessors and then
> type-feedback accessors.

Done.

http://codereview.chromium.org/10831172/diff/1/src/ast.h#newcode1859
src/ast.h:1859: TypeFeedbackId CompareOperationFeedbackId() const { return
reuse(id()); }
On 2012/08/06 13:03:41, Michael Starzinger wrote:
> Likewise.

Done.

http://codereview.chromium.org/10831172/diff/1/src/ast.h#newcode1967
src/ast.h:1967: TypeFeedbackId AssignmentFeedbackId() { return reuse(id()); }
On 2012/08/06 13:03:41, Michael Starzinger wrote:
> Likewise.

Done.

http://codereview.chromium.org/10831172/diff/1/src/deoptimizer.cc
File src/deoptimizer.cc (right):

http://codereview.chromium.org/10831172/diff/1/src/deoptimizer.cc#newcode1582
src/deoptimizer.cc:1582: // TODO(svenpanne) Shouldn't we use
Safepoint::kNoDeoptimizationIndex?
On 2012/08/06 13:03:41, Michael Starzinger wrote:
> Let's make that a Safepoint::kNoDeoptimizationIndex right away.

Done.

http://codereview.chromium.org/10831172/diff/1/src/hydrogen.cc
File src/hydrogen.cc (right):

http://codereview.chromium.org/10831172/diff/1/src/hydrogen.cc#newcode4009
src/hydrogen.cc:4009: BailoutId join_id = !default_id.IsNone()
On 2012/08/06 13:03:41, Michael Starzinger wrote:
> Should fit into one line now.

Done.

http://codereview.chromium.org/10831172/diff/1/src/parser.cc
File src/parser.cc (right):

http://codereview.chromium.org/10831172/diff/1/src/parser.cc#newcode500
src/parser.cc:500: isolate->set_ast_node_id(BailoutId::Declarations().ToInt() +
1);
On 2012/08/06 13:03:41, Michael Starzinger wrote:
> Let's turn that into BailoutId::FirstUsable() or something like that.

Done.

http://codereview.chromium.org/10831172/diff/1/src/type-info.cc
File src/type-info.cc (right):

http://codereview.chromium.org/10831172/diff/1/src/type-info.cc#newcode74
src/type-info.cc:74: static uint32_t IdToKey(TypeFeedbackId id) {
On 2012/08/06 13:03:41, Michael Starzinger wrote:
> Let's use "ast_id" as a name for this local variable throughout the file, for
> consistency.

Done.

http://codereview.chromium.org/10831172/diff/1/src/type-info.h
File src/type-info.h (right):

http://codereview.chromium.org/10831172/diff/1/src/type-info.h#newcode245
src/type-info.h:245: bool StoreIsMonomorphicNormal(TypeFeedbackId id);
On 2012/08/06 13:03:41, Michael Starzinger wrote:
> Let's rename "id" to "ast_id" for consistency.

Done.

Powered by Google App Engine
This is Rietveld 408576698