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

Issue 10540052: Only generate assert in checked mode. (Closed)

Created:
8 years, 6 months ago by ngeoffray
Modified:
8 years, 6 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Only generate assert in checked mode. Committed: https://code.google.com/p/dart/source/detail?r=8430

Patch Set 1 : #

Patch Set 2 : #

Total comments: 13

Patch Set 3 : #

Patch Set 4 : #

Total comments: 4

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -3 lines) Patch
M lib/compiler/implementation/apiimpl.dart View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M lib/compiler/implementation/compiler.dart View 1 2 4 chunks +5 lines, -0 lines 0 comments Download
M lib/compiler/implementation/lib/mock.dart View 1 2 1 chunk +4 lines, -1 line 0 comments Download
M lib/compiler/implementation/resolver.dart View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M lib/compiler/implementation/ssa/builder.dart View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M lib/compiler/implementation/tree/nodes.dart View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M lib/compiler/implementation/warnings.dart View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M tests/co19/co19-leg.status View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M tests/language/language_dart2js.status View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
ngeoffray
8 years, 6 months ago (2012-06-07 16:02:18 UTC) #1
kasperl
LGTM. https://chromiumcodereview.appspot.com/10540052/diff/5001/lib/compiler/implementation/lib/mock.dart File lib/compiler/implementation/lib/mock.dart (right): https://chromiumcodereview.appspot.com/10540052/diff/5001/lib/compiler/implementation/lib/mock.dart#newcode31 lib/compiler/implementation/lib/mock.dart:31: void assert(condition) { I think this needs a ...
8 years, 6 months ago (2012-06-08 05:34:05 UTC) #2
ahe
LGTM, if you address Kasper's comments and change the implementation of "isCall". https://chromiumcodereview.appspot.com/10540052/diff/5001/lib/compiler/implementation/tree/nodes.dart File lib/compiler/implementation/tree/nodes.dart ...
8 years, 6 months ago (2012-06-08 06:56:16 UTC) #3
karlklose
https://chromiumcodereview.appspot.com/10540052/diff/5001/lib/compiler/implementation/ssa/builder.dart File lib/compiler/implementation/ssa/builder.dart (right): https://chromiumcodereview.appspot.com/10540052/diff/5001/lib/compiler/implementation/ssa/builder.dart#newcode2376 lib/compiler/implementation/ssa/builder.dart:2376: stack.add(graph.addConstantNull()); I guess we add null here because we ...
8 years, 6 months ago (2012-06-08 07:42:42 UTC) #4
ahe
Still LGTM https://chromiumcodereview.appspot.com/10540052/diff/5001/lib/compiler/implementation/resolver.dart File lib/compiler/implementation/resolver.dart (right): https://chromiumcodereview.appspot.com/10540052/diff/5001/lib/compiler/implementation/resolver.dart#newcode1057 lib/compiler/implementation/resolver.dart:1057: if (!inInstanceContext) error(node, MessageKind.CANNOT_RESOLVE, [node]); I'm not ...
8 years, 6 months ago (2012-06-08 07:59:14 UTC) #5
ngeoffray
Thanks all! https://chromiumcodereview.appspot.com/10540052/diff/5001/lib/compiler/implementation/lib/mock.dart File lib/compiler/implementation/lib/mock.dart (right): https://chromiumcodereview.appspot.com/10540052/diff/5001/lib/compiler/implementation/lib/mock.dart#newcode31 lib/compiler/implementation/lib/mock.dart:31: void assert(condition) { On 2012/06/08 05:34:05, kasperl ...
8 years, 6 months ago (2012-06-08 09:40:58 UTC) #6
Lasse Reichstein Nielsen
dbc https://chromiumcodereview.appspot.com/10540052/diff/6003/lib/compiler/implementation/lib/mock.dart File lib/compiler/implementation/lib/mock.dart (right): https://chromiumcodereview.appspot.com/10540052/diff/6003/lib/compiler/implementation/lib/mock.dart#newcode31 lib/compiler/implementation/lib/mock.dart:31: void assert(condition) { This defines a top-level,i.e., scoped ...
8 years, 6 months ago (2012-06-08 10:39:10 UTC) #7
ngeoffray
8 years, 6 months ago (2012-06-08 10:50:36 UTC) #8
https://chromiumcodereview.appspot.com/10540052/diff/6003/lib/compiler/implem...
File lib/compiler/implementation/lib/mock.dart (right):

https://chromiumcodereview.appspot.com/10540052/diff/6003/lib/compiler/implem...
lib/compiler/implementation/lib/mock.dart:31: void assert(condition) {
On 2012/06/08 10:39:10, Lasse Reichstein Nielsen wrote:
> This defines a top-level,i.e., scoped assert function.
> If a class defines an assert method, the top-level method will shadow it,
which
> it shouldn't.

I will let the resolver guys fix it :)

https://chromiumcodereview.appspot.com/10540052/diff/6003/lib/compiler/implem...
lib/compiler/implementation/lib/mock.dart:32: if (condition is Function)
condition = condition();
On 2012/06/08 10:39:10, Lasse Reichstein Nielsen wrote:
> It's a "dynamic error" if condition isn't a bool here.
> Since the exact behavior of dynamic errors aren't specified, I guess it's ok
to
> throw an AssertionError, but we should probably document the decission here.

It's a "dynamic type error" and a dynamic type error looks pretty well specified
in the last spec. So I'm not sure what do you want to change here?

Powered by Google App Engine
This is Rietveld 408576698