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

Issue 23012003: Add Null class to dart:core. (Closed)

Created:
7 years, 4 months ago by Lasse Reichstein Nielsen
Modified:
5 years, 10 months ago
CC:
reviews_dartlang.org, regis, ahe, karlklose, vm-dev_dartlang.org
Visibility:
Public.

Description

Add Null class to dart:core. Make dart2js accept this class as the type of `null`. Dart2js still fails on tests on the form: x is Null VM does not recognize Null as the type of `null`. BUG= http://dartbug.com/12382 R=fschneider@google.com, karlklose@google.com, sgjesse@google.com Committed: https://code.google.com/p/dart/source/detail?r=26175

Patch Set 1 #

Total comments: 1

Patch Set 2 : Fix "x is Null". Add more tests. Still fail "x is T" if T is Null. #

Total comments: 11

Patch Set 3 : Fixed comments. Added tests. #

Patch Set 4 : FIxed "x is T" with T == Null. #

Patch Set 5 : ADd more tests. #

Patch Set 6 : Add more tests #

Patch Set 7 : Just. One. More. Test #

Patch Set 8 : Also make Null the class of null in the VM. Only faild on is-checks. #

Patch Set 9 : Made VM not fail on x is Null tests. #

Total comments: 3

Patch Set 10 : Null.dart file got lost at some point. #

Patch Set 11 : Fixed IsNullType. All tests succeede for VM now. #

Total comments: 2

Patch Set 12 : Addressed comments. Marked test failing due to new dart2js mirror bug. #

Total comments: 13
Unified diffs Side-by-side diffs Delta from patch set Stats (+252 lines, -87 lines) Patch
M runtime/vm/class_finalizer.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -2 lines 0 comments Download
M runtime/vm/flow_graph_builder.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +11 lines, -18 lines 0 comments Download
M runtime/vm/flow_graph_type_propagator.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -3 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +6 lines, -15 lines 1 comment Download
M sdk/lib/_internal/compiler/implementation/compiler.dart View 1 2 3 4 5 6 7 8 9 2 chunks +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/builder.dart View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/codegen.dart View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +7 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/optimize.dart View 1 1 chunk +2 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M sdk/lib/_internal/lib/foreign_helper.dart View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 2 comments Download
M sdk/lib/_internal/lib/js_helper.dart View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +1 line, -12 lines 0 comments Download
M sdk/lib/_internal/lib/js_rti.dart View 1 2 3 1 chunk +2 lines, -1 line 2 comments Download
M sdk/lib/core/core.dart View 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/core/corelib_sources.gypi View 1 chunk +1 line, -0 lines 0 comments Download
A sdk/lib/core/null.dart View 1 2 3 4 5 6 7 8 9 1 chunk +21 lines, -0 lines 0 comments Download
M tests/language/language.status View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +6 lines, -0 lines 2 comments Download
M tests/language/null_test.dart View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +181 lines, -31 lines 6 comments Download

Messages

Total messages: 20 (0 generated)
Lasse Reichstein Nielsen
7 years, 4 months ago (2013-08-13 08:21:51 UTC) #1
Lasse Reichstein Nielsen
7 years, 4 months ago (2013-08-13 08:24:19 UTC) #2
Lasse Reichstein Nielsen
https://codereview.chromium.org/23012003/diff/1/sdk/lib/core/null.dart File sdk/lib/core/null.dart (right): https://codereview.chromium.org/23012003/diff/1/sdk/lib/core/null.dart#newcode20 sdk/lib/core/null.dart:20: factory Null() { Should this be a private constructor, ...
7 years, 4 months ago (2013-08-13 08:25:57 UTC) #3
ahe
I'd argue the time is past half-implemented features, so before this goes in, I'd like ...
7 years, 4 months ago (2013-08-13 09:17:55 UTC) #4
Søren Gjesse
https://codereview.chromium.org/23012003/diff/8001/sdk/lib/core/null.dart File sdk/lib/core/null.dart (right): https://codereview.chromium.org/23012003/diff/8001/sdk/lib/core/null.dart#newcode12 sdk/lib/core/null.dart:12: * Extending or implementing `Null` is not allowed, and ...
7 years, 4 months ago (2013-08-13 14:53:52 UTC) #5
rmacnak
https://codereview.chromium.org/23012003/diff/8001/sdk/lib/core/null.dart File sdk/lib/core/null.dart (right): https://codereview.chromium.org/23012003/diff/8001/sdk/lib/core/null.dart#newcode12 sdk/lib/core/null.dart:12: * Extending or implementing `Null` is not allowed, and ...
7 years, 4 months ago (2013-08-14 01:23:13 UTC) #6
Lasse Reichstein Nielsen
https://codereview.chromium.org/23012003/diff/8001/sdk/lib/core/null.dart File sdk/lib/core/null.dart (right): https://codereview.chromium.org/23012003/diff/8001/sdk/lib/core/null.dart#newcode12 sdk/lib/core/null.dart:12: * Extending or implementing `Null` is not allowed, and ...
7 years, 4 months ago (2013-08-14 08:18:35 UTC) #7
Lasse Reichstein Nielsen
Filed bug 12445 that was detected by an added test. That and "null is T" ...
7 years, 4 months ago (2013-08-14 08:20:19 UTC) #8
Lasse Reichstein Nielsen
Only remaining bug is 12445 which is unrelated to Null (it applies to String and ...
7 years, 4 months ago (2013-08-14 09:07:11 UTC) #9
Søren Gjesse
lgtm
7 years, 4 months ago (2013-08-14 10:15:12 UTC) #10
Lasse Reichstein Nielsen
7 years, 4 months ago (2013-08-14 11:16:34 UTC) #11
Lasse Reichstein Nielsen
VM people, please review changes. I'll remove the comments from the test and language.status before ...
7 years, 4 months ago (2013-08-14 11:40:21 UTC) #12
karlklose
dart2js changes LGTM.
7 years, 4 months ago (2013-08-14 11:55:36 UTC) #13
Florian Schneider
VM changes LGTM. Please make sure all tests pass: Closure equality should work as expected ...
7 years, 4 months ago (2013-08-14 12:22:12 UTC) #14
rmacnak
Debug VM crashes on 'x as Null'. From flow_graph_type_propagator.cc remove lines 570-571: //We should never ...
7 years, 4 months ago (2013-08-14 16:25:30 UTC) #15
Lasse Reichstein Nielsen
Committed patchset #12 manually as r26175 (presubmit successful).
7 years, 4 months ago (2013-08-15 09:12:39 UTC) #16
ahe
https://codereview.chromium.org/23012003/diff/45001/sdk/lib/_internal/lib/foreign_helper.dart File sdk/lib/_internal/lib/foreign_helper.dart (right): https://codereview.chromium.org/23012003/diff/45001/sdk/lib/_internal/lib/foreign_helper.dart#newcode181 sdk/lib/_internal/lib/foreign_helper.dart:181: String JS_NULL_CLASS_NAME() {} I would have preferred if you ...
7 years, 4 months ago (2013-08-15 11:16:46 UTC) #17
Lasse Reichstein Nielsen
https://codereview.chromium.org/23012003/diff/31001/runtime/vm/object.cc File runtime/vm/object.cc (right): https://codereview.chromium.org/23012003/diff/31001/runtime/vm/object.cc#newcode1106 runtime/vm/object.cc:1106: // The class 'Null' is not register in the ...
7 years, 4 months ago (2013-08-15 12:24:44 UTC) #18
Lasse Reichstein Nielsen
https://codereview.chromium.org/23012003/diff/45001/sdk/lib/_internal/lib/foreign_helper.dart File sdk/lib/_internal/lib/foreign_helper.dart (right): https://codereview.chromium.org/23012003/diff/45001/sdk/lib/_internal/lib/foreign_helper.dart#newcode181 sdk/lib/_internal/lib/foreign_helper.dart:181: String JS_NULL_CLASS_NAME() {} Why be different from, e.g., Object ...
7 years, 4 months ago (2013-08-15 13:06:10 UTC) #19
Ivan Posva
7 years, 4 months ago (2013-08-16 23:13:47 UTC) #20
Message was sent while issue was closed.
https://codereview.chromium.org/23012003/diff/45001/runtime/vm/object.cc
File runtime/vm/object.cc (right):

https://codereview.chromium.org/23012003/diff/45001/runtime/vm/object.cc#newc...
runtime/vm/object.cc:420: cls.set_is_prefinalized();
Please change this back to set_is_finalized().

Powered by Google App Engine
This is Rietveld 408576698