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

Issue 2026133002: Throw TypeError instead of CastError for type coercions. (Closed)

Created:
4 years, 6 months ago by sra1
Modified:
4 years, 6 months ago
Reviewers:
vsm, Leaf
CC:
dev-compiler+reviews_dartlang.org
Base URL:
https://github.com/dart-lang/dev_compiler@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Throw TypeError instead of CastError for type coercions. Added 'tag' type StrongModeError, implemented by all errors that are specific to strong mode semantics. Failed casts throw CastError(Implementation) or StrongModeCastError. Failed type assertions and reified coercions throw TypeError or StrongModeTypeError. Triaged some tests. Some pass due to now throwing a TypeError, many pass for unknown reasons. R=leafp@google.com Committed: https://github.com/dart-lang/dev_compiler/commit/1da73c61eeeb6efcc22b93839ce663c19dd3d19a

Patch Set 1 #

Total comments: 1

Patch Set 2 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+727 lines, -651 lines) Patch
M lib/runtime/dart_sdk.js View 404 chunks +619 lines, -564 lines 0 comments Download
M lib/src/compiler/code_generator.dart View 2 chunks +15 lines, -7 lines 0 comments Download
M test/browser/language_tests.js View 1 9 chunks +11 lines, -53 lines 0 comments Download
M tool/input_sdk/patch/core_patch.dart View 1 chunk +3 lines, -0 lines 0 comments Download
M tool/input_sdk/private/ddc_runtime/errors.dart View 1 chunk +21 lines, -2 lines 0 comments Download
M tool/input_sdk/private/ddc_runtime/operations.dart View 3 chunks +18 lines, -5 lines 0 comments Download
M tool/input_sdk/private/ddc_runtime/runtime.dart View 1 chunk +3 lines, -1 line 0 comments Download
M tool/input_sdk/private/ddc_runtime/utils.dart View 1 chunk +3 lines, -12 lines 0 comments Download
M tool/input_sdk/private/js_helper.dart View 2 chunks +33 lines, -6 lines 2 comments Download
M tool/sdk_expected_errors.txt View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (3 generated)
sra1
4 years, 6 months ago (2016-05-31 23:06:09 UTC) #2
sra1
https://codereview.chromium.org/2026133002/diff/1/test/browser/language_tests.js File test/browser/language_tests.js (right): https://codereview.chromium.org/2026133002/diff/1/test/browser/language_tests.js#newcode36 test/browser/language_tests.js:36: //'arithmetic2_test': fail, I will remove this
4 years, 6 months ago (2016-05-31 23:09:51 UTC) #3
sra1
4 years, 6 months ago (2016-06-01 16:43:41 UTC) #5
Leaf
lgtm https://codereview.chromium.org/2026133002/diff/20001/tool/input_sdk/private/js_helper.dart File tool/input_sdk/private/js_helper.dart (right): https://codereview.chromium.org/2026133002/diff/20001/tool/input_sdk/private/js_helper.dart#newcode802 tool/input_sdk/private/js_helper.dart:802: CastErrorImplementation(Object value, Object actualType, Object expectedType) Why the ...
4 years, 6 months ago (2016-06-01 17:01:51 UTC) #6
sra1
https://codereview.chromium.org/2026133002/diff/20001/tool/input_sdk/private/js_helper.dart File tool/input_sdk/private/js_helper.dart (right): https://codereview.chromium.org/2026133002/diff/20001/tool/input_sdk/private/js_helper.dart#newcode802 tool/input_sdk/private/js_helper.dart:802: CastErrorImplementation(Object value, Object actualType, Object expectedType) On 2016/06/01 17:01:51, ...
4 years, 6 months ago (2016-06-01 17:07:13 UTC) #7
sra1
4 years, 6 months ago (2016-06-01 17:18:29 UTC) #9
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
1da73c61eeeb6efcc22b93839ce663c19dd3d19a (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698