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

Issue 1644793002: Replace intptr_t with TokenDescriptor (Closed)

Created:
4 years, 11 months ago by Cutch
Modified:
4 years, 10 months ago
Reviewers:
rmacnak, hausner, Ivan Posva
CC:
hausner, reviews_dartlang.org, turnidge, rmacnak, vm-dev_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Replace intptr_t with TokenDescriptor - Use TokenDescriptor instead of intptr_t for all token positions. - Use TokenDescriptor in raw_object instead of int32_t. - TokenDescriptor is a POD with an int32_t (this shrinks the size of AST and IR nodes by 32-bits on 64-bit architectures). There are some cleanups I plan on doing as a follow up CL: - Replace TokenDescriptor::value() with TokenDescriptor::TokenPos() R=iposva@google.com, rmacnak@google.com Committed: https://github.com/dart-lang/sdk/commit/d77d37612458b34773926b38b35ae58af34bebe8

Patch Set 1 #

Total comments: 6

Patch Set 2 : #

Total comments: 17

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2127 lines, -1785 lines) Patch
M runtime/lib/errors.cc View 1 2 3 4 chunks +8 lines, -7 lines 0 comments Download
M runtime/lib/mirrors.cc View 1 2 3 4 chunks +5 lines, -5 lines 0 comments Download
M runtime/lib/object.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/vm/ast.h View 1 2 3 52 chunks +63 lines, -58 lines 0 comments Download
M runtime/vm/ast.cc View 1 2 3 3 chunks +4 lines, -4 lines 0 comments Download
M runtime/vm/ast_printer.cc View 1 2 3 3 chunks +9 lines, -9 lines 0 comments Download
M runtime/vm/ast_printer_test.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/ast_test.cc View 1 2 3 chunks +14 lines, -11 lines 0 comments Download
M runtime/vm/ast_transformer.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/ast_transformer.cc View 1 2 3 4 chunks +7 lines, -6 lines 0 comments Download
M runtime/vm/class_finalizer.h View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M runtime/vm/class_finalizer.cc View 1 2 3 5 chunks +7 lines, -7 lines 0 comments Download
M runtime/vm/class_finalizer_test.cc View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M runtime/vm/code_descriptors.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/vm/code_descriptors.cc View 1 2 3 3 chunks +8 lines, -6 lines 0 comments Download
M runtime/vm/code_descriptors_test.cc View 1 2 6 chunks +13 lines, -13 lines 0 comments Download
M runtime/vm/code_generator.cc View 1 2 3 8 chunks +8 lines, -8 lines 0 comments Download
M runtime/vm/code_generator_test.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/code_patcher_arm64_test.cc View 1 2 1 chunk +4 lines, -3 lines 0 comments Download
M runtime/vm/code_patcher_arm_test.cc View 1 2 1 chunk +4 lines, -3 lines 0 comments Download
M runtime/vm/code_patcher_ia32_test.cc View 1 2 3 4 1 chunk +4 lines, -3 lines 0 comments Download
M runtime/vm/code_patcher_mips_test.cc View 1 2 1 chunk +4 lines, -3 lines 0 comments Download
M runtime/vm/code_patcher_x64_test.cc View 1 2 1 chunk +4 lines, -3 lines 0 comments Download
M runtime/vm/compiler.cc View 1 2 3 3 chunks +9 lines, -6 lines 0 comments Download
M runtime/vm/compiler_stats.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/coverage.cc View 1 2 3 3 chunks +12 lines, -7 lines 0 comments Download
M runtime/vm/dart_api_impl.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/debugger.h View 1 2 12 chunks +27 lines, -27 lines 0 comments Download
M runtime/vm/debugger.cc View 1 2 3 4 38 chunks +84 lines, -79 lines 0 comments Download
M runtime/vm/debugger_api_impl.cc View 1 2 3 6 chunks +7 lines, -7 lines 0 comments Download
M runtime/vm/deopt_instructions.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/exceptions.h View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M runtime/vm/exceptions.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/flow_graph_builder.h View 1 2 10 chunks +30 lines, -29 lines 0 comments Download
M runtime/vm/flow_graph_builder.cc View 1 2 3 41 chunks +57 lines, -54 lines 0 comments Download
M runtime/vm/flow_graph_builder_test.cc View 1 2 3 4 chunks +32 lines, -30 lines 0 comments Download
M runtime/vm/flow_graph_compiler.h View 1 2 10 chunks +26 lines, -26 lines 0 comments Download
M runtime/vm/flow_graph_compiler.cc View 1 2 3 7 chunks +8 lines, -8 lines 0 comments Download
M runtime/vm/flow_graph_compiler_arm.cc View 1 2 3 21 chunks +26 lines, -25 lines 0 comments Download
M runtime/vm/flow_graph_compiler_arm64.cc View 1 2 3 21 chunks +26 lines, -25 lines 0 comments Download
M runtime/vm/flow_graph_compiler_ia32.cc View 1 2 3 21 chunks +26 lines, -25 lines 0 comments Download
M runtime/vm/flow_graph_compiler_mips.cc View 1 2 3 21 chunks +26 lines, -25 lines 0 comments Download
M runtime/vm/flow_graph_compiler_x64.cc View 1 2 3 21 chunks +26 lines, -25 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.h View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M runtime/vm/il_printer.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/il_printer.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/intermediate_language.h View 1 2 3 114 chunks +146 lines, -130 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 1 2 6 chunks +6 lines, -6 lines 0 comments Download
M runtime/vm/intermediate_language_arm.cc View 1 2 3 5 chunks +5 lines, -5 lines 0 comments Download
M runtime/vm/intermediate_language_arm64.cc View 1 2 3 5 chunks +5 lines, -5 lines 0 comments Download
M runtime/vm/intermediate_language_ia32.cc View 1 2 5 chunks +5 lines, -5 lines 0 comments Download
M runtime/vm/intermediate_language_mips.cc View 1 2 3 5 chunks +5 lines, -5 lines 0 comments Download
M runtime/vm/intermediate_language_x64.cc View 1 2 3 5 chunks +5 lines, -5 lines 0 comments Download
M runtime/vm/intrinsifier.cc View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M runtime/vm/isolate.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/isolate.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/json_stream.h View 1 2 3 6 chunks +13 lines, -3 lines 0 comments Download
M runtime/vm/json_stream.cc View 1 2 3 5 chunks +17 lines, -5 lines 0 comments Download
M runtime/vm/megamorphic_cache_table.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/object.h View 1 2 3 36 chunks +62 lines, -58 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 82 chunks +133 lines, -125 lines 0 comments Download
M runtime/vm/object_test.cc View 1 2 3 18 chunks +82 lines, -64 lines 0 comments Download
M runtime/vm/parser.h View 1 2 3 23 chunks +79 lines, -68 lines 0 comments Download
M runtime/vm/parser.cc View 1 2 3 266 chunks +442 lines, -405 lines 0 comments Download
M runtime/vm/precompiler.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/vm/precompiler.cc View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M runtime/vm/raw_object.h View 1 2 3 10 chunks +12 lines, -11 lines 0 comments Download
M runtime/vm/raw_object_snapshot.cc View 1 2 17 chunks +25 lines, -20 lines 0 comments Download
M runtime/vm/regexp.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/regexp_assembler_ir.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/report.h View 1 2 3 3 chunks +11 lines, -6 lines 0 comments Download
M runtime/vm/report.cc View 1 2 3 4 8 chunks +12 lines, -9 lines 0 comments Download
M runtime/vm/report_test.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/vm/runtime_entry.cc View 1 2 1 chunk +11 lines, -3 lines 0 comments Download
M runtime/vm/scanner.h View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M runtime/vm/scanner.cc View 1 2 2 chunks +7 lines, -5 lines 0 comments Download
M runtime/vm/scopes.h View 1 2 11 chunks +19 lines, -19 lines 0 comments Download
M runtime/vm/scopes.cc View 1 2 4 chunks +7 lines, -7 lines 0 comments Download
M runtime/vm/scopes_test.cc View 1 2 1 chunk +5 lines, -5 lines 0 comments Download
M runtime/vm/service.cc View 1 2 1 chunk +4 lines, -1 line 0 comments Download
M runtime/vm/simulator_arm.cc View 1 2 5 chunks +8 lines, -8 lines 0 comments Download
M runtime/vm/simulator_arm64.cc View 1 2 5 chunks +8 lines, -8 lines 0 comments Download
M runtime/vm/simulator_mips.cc View 1 2 5 chunks +7 lines, -7 lines 0 comments Download
M runtime/vm/snapshot_test.cc View 1 2 3 3 chunks +11 lines, -5 lines 0 comments Download
M runtime/vm/source_report.h View 1 2 3 3 chunks +6 lines, -4 lines 0 comments Download
M runtime/vm/source_report.cc View 1 2 3 13 chunks +31 lines, -25 lines 0 comments Download
M runtime/vm/stack_frame.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/stack_frame.cc View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M runtime/vm/stub_code_arm64_test.cc View 1 2 1 chunk +4 lines, -3 lines 0 comments Download
M runtime/vm/stub_code_arm_test.cc View 1 2 1 chunk +4 lines, -3 lines 0 comments Download
M runtime/vm/stub_code_ia32_test.cc View 1 2 1 chunk +4 lines, -3 lines 0 comments Download
M runtime/vm/stub_code_mips_test.cc View 1 2 1 chunk +4 lines, -3 lines 0 comments Download
M runtime/vm/stub_code_x64_test.cc View 1 2 1 chunk +4 lines, -3 lines 0 comments Download
M runtime/vm/token.h View 2 chunks +0 lines, -119 lines 0 comments Download
M runtime/vm/token.cc View 1 chunk +0 lines, -18 lines 0 comments Download
A runtime/vm/token_position.h View 1 2 3 1 chunk +204 lines, -0 lines 0 comments Download
A runtime/vm/token_position.cc View 1 2 3 1 chunk +63 lines, -0 lines 0 comments Download
M runtime/vm/unit_test.cc View 1 2 3 chunks +9 lines, -5 lines 0 comments Download
M runtime/vm/vm_sources.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (4 generated)
Cutch
All architectures are passing tests. PTAL because I'd like to land this ASAP to avoid ...
4 years, 11 months ago (2016-01-27 23:55:25 UTC) #3
rmacnak
lgtm https://chromiumcodereview.appspot.com/1644793002/diff/1/runtime/vm/token_descriptor.h File runtime/vm/token_descriptor.h (right): https://chromiumcodereview.appspot.com/1644793002/diff/1/runtime/vm/token_descriptor.h#newcode32 runtime/vm/token_descriptor.h:32: // into the snapshot as an int32_t. encoded ...
4 years, 10 months ago (2016-01-28 18:21:50 UTC) #4
hausner
DBC: I have a hard time digesting this change. I thought you were making a ...
4 years, 10 months ago (2016-01-28 18:43:25 UTC) #6
hausner
BTW, there is already a type called TokenDescriptor, in the Scanner class. What you are ...
4 years, 10 months ago (2016-01-28 19:07:36 UTC) #7
Cutch
On 2016/01/28 19:07:36, hausner wrote: > BTW, there is already a type called TokenDescriptor, in ...
4 years, 10 months ago (2016-01-28 23:41:37 UTC) #8
Ivan Posva
Some comments inline. To answer the larger question: I suggest using TokenPosition as the name. ...
4 years, 10 months ago (2016-02-01 17:16:53 UTC) #9
Cutch
Patch Set 3 uses TokenPosition instead of TokenDescriptor. Now addressing individual comments.
4 years, 10 months ago (2016-02-01 22:47:44 UTC) #10
Cutch
https://codereview.chromium.org/1644793002/diff/1/runtime/vm/token_descriptor.h File runtime/vm/token_descriptor.h (right): https://codereview.chromium.org/1644793002/diff/1/runtime/vm/token_descriptor.h#newcode31 runtime/vm/token_descriptor.h:31: // NOTE: While token positions are passed around as ...
4 years, 10 months ago (2016-02-02 18:00:20 UTC) #11
Cutch
4 years, 10 months ago (2016-02-02 18:15:50 UTC) #13
Message was sent while issue was closed.
Committed patchset #6 (id:100001) manually as
d77d37612458b34773926b38b35ae58af34bebe8 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698