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

Issue 610863004: Start implementing checked mode compile time errors in analyzer. (Closed)

Created:
6 years, 2 months ago by Paul Berry
Modified:
6 years, 2 months ago
CC:
reviews_dartlang.org, ricow1
Visibility:
Public.

Description

Start implementing checked mode compile time errors in analyzer. This enables the Java-based command-line analyzer to accept the "--enable_type_checks" flag so that it can be told whether to report type checking errors during constant evaluation. Also it fixes the tests language/compile_time_constant_checked2_test and language/compile_time_constant_checked3_test in unchecked mode, by causing CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE to be escalated to an error only in checked mode. Note: in order to test this properly, I had to remove a hack from test_runner.dart which caused it to effectively ignore the "checked mode compile-time error" test annotation when testing analyzer. With this hack removed, several new lines needed to be added to the .status files. BUG=dartbug.com/16391 R=jwren@google.com, kustermann@google.com Committed: https://code.google.com/p/dart/source/detail?r=40780

Patch Set 1 #

Total comments: 6

Patch Set 2 : Fixes based on review comments and in-person discussion #

Unified diffs Side-by-side diffs Delta from patch set Stats (+150 lines, -23 lines) Patch
M editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerImpl.java View 1 chunk +1 line, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerOptions.java View 1 2 chunks +12 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/context/AnalysisOptions.java View 1 chunk +6 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/context/AnalysisContextImpl.java View 1 chunk +1 line, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/context/AnalysisOptionsImpl.java View 4 chunks +19 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/verifier/ErrorVerifier.java View 1 4 chunks +16 lines, -1 line 0 comments Download
M editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/context/AnalysisContextImplTest.java View 1 chunk +2 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/context/AnalysisOptionsImplTest.java View 3 chunks +9 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java View 1 chunk +4 lines, -1 line 0 comments Download
M editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java View 1 chunk +11 lines, -0 lines 0 comments Download
M tests/language/language_analyzer.status View 1 2 chunks +32 lines, -9 lines 0 comments Download
M tests/language/language_analyzer2.status View 1 2 chunks +36 lines, -9 lines 0 comments Download
M tools/testing/dart/test_runner.dart View 1 chunk +1 line, -3 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
Paul Berry
6 years, 2 months ago (2014-09-29 15:57:22 UTC) #2
kustermann
test runner changes: lgtm https://codereview.chromium.org/610863004/diff/1/tests/language/language_analyzer2.status File tests/language/language_analyzer2.status (right): https://codereview.chromium.org/610863004/diff/1/tests/language/language_analyzer2.status#newcode469 tests/language/language_analyzer2.status:469: map_literal1_test/01: CompileTimeError # Issue 16391 ...
6 years, 2 months ago (2014-09-29 16:11:28 UTC) #3
jwren
LGTM https://codereview.chromium.org/610863004/diff/1/editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerOptions.java File editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerOptions.java (right): https://codereview.chromium.org/610863004/diff/1/editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerOptions.java#newcode192 editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerOptions.java:192: @Option(name = "--enable_type_checks",// feels like "constant" keyword is ...
6 years, 2 months ago (2014-09-29 16:42:46 UTC) #4
Paul Berry
https://codereview.chromium.org/610863004/diff/1/editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerOptions.java File editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerOptions.java (right): https://codereview.chromium.org/610863004/diff/1/editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerOptions.java#newcode192 editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerOptions.java:192: @Option(name = "--enable_type_checks",// On 2014/09/29 16:42:45, jwren wrote: > ...
6 years, 2 months ago (2014-09-29 17:42:23 UTC) #6
Paul Berry
6 years, 2 months ago (2014-09-29 18:59:22 UTC) #7
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as 40780 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698