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

Issue 1325843003: Add optional message to assert in Dart2js. (Closed)

Created:
5 years, 3 months ago by Lasse Reichstein Nielsen
Modified:
5 years, 3 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org, Paul Berry
Base URL:
https://github.com/dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

No flag guarding the feature.

Patch Set 1 #

Total comments: 4

Patch Set 2 : Address comments. Add command line flag, not passe through to parser yet. #

Patch Set 3 : Address comments #

Total comments: 4

Patch Set 4 : Merge to head #

Patch Set 5 : Address comments, try adding inference test. #

Total comments: 1

Patch Set 6 : Reintroduce assertHelper for asserts without messages. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+261 lines, -238 lines) Patch
M pkg/compiler/lib/src/closure.dart View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/common/backend_api.dart View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M pkg/compiler/lib/src/common/codegen.dart View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/common/registry.dart View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/common/resolution.dart View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart View 1 2 3 1 chunk +0 lines, -14 lines 0 comments Download
M pkg/compiler/lib/src/dart_backend/placeholder_collector.dart View 1 2 3 2 chunks +1 line, -4 lines 0 comments Download
M pkg/compiler/lib/src/inferrer/inferrer_visitor.dart View 1 2 3 1 chunk +0 lines, -11 lines 0 comments Download
M pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart View 1 2 3 1 chunk +0 lines, -14 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/backend.dart View 1 2 3 4 5 4 chunks +13 lines, -6 lines 0 comments Download
M pkg/compiler/lib/src/parser/listener.dart View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/parser/node_listener.dart View 1 2 3 1 chunk +10 lines, -5 lines 0 comments Download
M pkg/compiler/lib/src/parser/parser.dart View 1 2 3 1 chunk +13 lines, -3 lines 0 comments Download
M pkg/compiler/lib/src/resolution/members.dart View 1 2 3 4 5 3 chunks +8 lines, -32 lines 0 comments Download
M pkg/compiler/lib/src/resolution/registry.dart View 1 2 3 4 5 2 chunks +7 lines, -7 lines 0 comments Download
M pkg/compiler/lib/src/resolution/semantic_visitor.dart View 1 2 3 1 chunk +0 lines, -26 lines 0 comments Download
M pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart View 1 2 3 4 3 chunks +0 lines, -25 lines 0 comments Download
M pkg/compiler/lib/src/resolution/send_structure.dart View 1 2 3 1 chunk +0 lines, -29 lines 0 comments Download
M pkg/compiler/lib/src/resolution/tree_elements.dart View 1 2 3 4 5 3 chunks +0 lines, -13 lines 0 comments Download
M pkg/compiler/lib/src/ssa/builder.dart View 1 2 3 4 5 3 chunks +24 lines, -20 lines 0 comments Download
M pkg/compiler/lib/src/tree/nodes.dart View 1 2 3 4 5 3 chunks +26 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/tree/prettyprint.dart View 1 chunk +4 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/tree/unparser.dart View 1 2 3 4 5 1 chunk +12 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/typechecker.dart View 1 2 3 5 2 chunks +6 lines, -4 lines 0 comments Download
M pkg/compiler/lib/src/universe/universe.dart View 1 2 3 2 chunks +1 line, -5 lines 0 comments Download
M pkg/compiler/lib/src/world.dart View 1 2 3 4 5 1 chunk +0 lines, -5 lines 0 comments Download
M sdk/lib/_internal/js_runtime/lib/js_helper.dart View 1 2 3 4 5 3 chunks +28 lines, -4 lines 1 comment Download
M sdk/lib/core/errors.dart View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M tests/compiler/dart2js/backend_dart/dart_printer_test.dart View 1 2 3 1 chunk +7 lines, -2 lines 0 comments Download
M tests/compiler/dart2js/mock_libraries.dart View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download
A tests/compiler/dart2js/type_inference7_test.dart View 1 2 3 4 1 chunk +81 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (3 generated)
Lasse Reichstein Nielsen
FYI, WDYT?
5 years, 3 months ago (2015-09-01 13:09:18 UTC) #2
Johnni Winther
Looks good. https://codereview.chromium.org/1325843003/diff/1/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart File pkg/compiler/lib/src/inferrer/inferrer_visitor.dart (right): https://codereview.chromium.org/1325843003/diff/1/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart#newcode785 pkg/compiler/lib/src/inferrer/inferrer_visitor.dart:785: /// Handle an enabled assertion of [expression]. ...
5 years, 3 months ago (2015-09-01 13:32:05 UTC) #3
Lasse Reichstein Nielsen
https://chromiumcodereview.appspot.com/1325843003/diff/1/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart File pkg/compiler/lib/src/inferrer/inferrer_visitor.dart (right): https://chromiumcodereview.appspot.com/1325843003/diff/1/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart#newcode785 pkg/compiler/lib/src/inferrer/inferrer_visitor.dart:785: /// Handle an enabled assertion of [expression]. On 2015/09/01 ...
5 years, 3 months ago (2015-09-03 11:23:25 UTC) #4
Siggi Cherem (dart-lang)
DBC Thanks for putting this together Lasse, I like the change to make assert an ...
5 years, 3 months ago (2015-09-03 16:13:24 UTC) #6
Siggi Cherem (dart-lang)
(but otherwise lgtm!)
5 years, 3 months ago (2015-09-03 16:14:28 UTC) #7
sra1
I don't understand is how type inference works now there is a new ast node. ...
5 years, 3 months ago (2015-09-03 18:31:18 UTC) #9
Paul Berry
5 years, 3 months ago (2015-09-07 22:47:52 UTC) #10
Lasse Reichstein Nielsen
Addressed comments and added type_inference7_test. The types for the example above are correct in checked ...
5 years, 3 months ago (2015-09-09 12:02:27 UTC) #11
Lasse Reichstein Nielsen
https://codereview.chromium.org/1325843003/diff/40001/pkg/compiler/lib/src/js_backend/backend.dart File pkg/compiler/lib/src/js_backend/backend.dart (right): https://codereview.chromium.org/1325843003/diff/40001/pkg/compiler/lib/src/js_backend/backend.dart#newcode2111 pkg/compiler/lib/src/js_backend/backend.dart:2111: assertThrowMethod = findHelper('assertThrowHelper'); Done. https://codereview.chromium.org/1325843003/diff/40001/pkg/compiler/lib/src/ssa/builder.dart File pkg/compiler/lib/src/ssa/builder.dart (right): https://codereview.chromium.org/1325843003/diff/40001/pkg/compiler/lib/src/ssa/builder.dart#newcode2611 ...
5 years, 3 months ago (2015-09-09 12:02:46 UTC) #12
sra1
On 2015/09/09 12:02:27, Lasse Reichstein Nielsen wrote: > Addressed comments and added type_inference7_test. > > ...
5 years, 3 months ago (2015-09-09 18:04:01 UTC) #13
sra1
This CL adds +1.3% (11k) to swarm compiled with --checked. If we make the names ...
5 years, 3 months ago (2015-09-10 01:56:26 UTC) #14
sra1
5 years, 3 months ago (2015-09-15 23:52:55 UTC) #15
I'm taking ownership of this CL.

The new CL is at https://codereview.chromium.org/1342213003/
I hope to commit very soon so we can fix spurious inclusion from asserts -
https://github.com/dart-lang/sdk/issues/24355

https://chromiumcodereview.appspot.com/1325843003/diff/100001/sdk/lib/_intern...
File sdk/lib/_internal/js_runtime/lib/js_helper.dart (right):

https://chromiumcodereview.appspot.com/1325843003/diff/100001/sdk/lib/_intern...
sdk/lib/_internal/js_runtime/lib/js_helper.dart:3329: if (assertTest(condition))
throw new AssertError();
AssertionError()

Powered by Google App Engine
This is Rietveld 408576698