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

Issue 1371193004: Add bool value types to type inference. (Closed)

Created:
5 years, 2 months ago by Harry Terkelsen
Modified:
5 years, 2 months ago
CC:
reviews_dartlang.org, herhut
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

dart2js: add bool value types Also optimize if-statements which have a condition with an inferred value BUG= R=sigmund@google.com Committed: https://github.com/dart-lang/sdk/commit/0132043db489ff81d67396ec1dcb248ef6ba3068

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 10

Patch Set 4 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+143 lines, -9 lines) Patch
M pkg/compiler/lib/src/inferrer/concrete_types_inferrer.dart View 1 1 chunk +6 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/inferrer/inferrer_visitor.dart View 2 chunks +2 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/inferrer/node_tracer.dart View 1 chunk +2 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart View 1 chunk +1 line, -0 lines 0 comments Download
M pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart View 2 chunks +5 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/inferrer/type_graph_nodes.dart View 2 chunks +15 lines, -0 lines 1 comment Download
M pkg/compiler/lib/src/ssa/nodes.dart View 1 1 chunk +2 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/ssa/optimize.dart View 1 1 chunk +7 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/types/types.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/concrete_type_inference_test.dart View 1 2 chunks +1 line, -7 lines 0 comments Download
A tests/compiler/dart2js/type_inference8_test.dart View 1 2 3 1 chunk +101 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (2 generated)
Harry Terkelsen
ng2 hello_world codesize before: 1526085 ng2 hello_world codesize after: 1426238 reduction of 7%
5 years, 2 months ago (2015-09-28 22:05:40 UTC) #2
Siggi Cherem (dart-lang)
very cool! Could you add a test (like the type_inference2_test.dart) that would show that this ...
5 years, 2 months ago (2015-09-28 22:13:53 UTC) #3
Harry Terkelsen
ptal, added test
5 years, 2 months ago (2015-09-28 22:58:20 UTC) #4
herhut
Nice! https://codereview.chromium.org/1371193004/diff/40001/tests/compiler/dart2js/type_inference8_test.dart File tests/compiler/dart2js/type_inference8_test.dart (right): https://codereview.chromium.org/1371193004/diff/40001/tests/compiler/dart2js/type_inference8_test.dart#newcode13 tests/compiler/dart2js/type_inference8_test.dart:13: const String TEST = r""" Can you also ...
5 years, 2 months ago (2015-09-28 23:55:30 UTC) #6
Siggi Cherem (dart-lang)
thanks Harry! lgtm with the comments below https://codereview.chromium.org/1371193004/diff/40001/tests/compiler/dart2js/type_inference8_test.dart File tests/compiler/dart2js/type_inference8_test.dart (right): https://codereview.chromium.org/1371193004/diff/40001/tests/compiler/dart2js/type_inference8_test.dart#newcode13 tests/compiler/dart2js/type_inference8_test.dart:13: const String ...
5 years, 2 months ago (2015-09-29 00:08:33 UTC) #7
Harry Terkelsen
https://codereview.chromium.org/1371193004/diff/40001/tests/compiler/dart2js/type_inference8_test.dart File tests/compiler/dart2js/type_inference8_test.dart (right): https://codereview.chromium.org/1371193004/diff/40001/tests/compiler/dart2js/type_inference8_test.dart#newcode13 tests/compiler/dart2js/type_inference8_test.dart:13: const String TEST = r""" On 2015/09/28 23:55:30, herhut ...
5 years, 2 months ago (2015-09-29 00:42:54 UTC) #8
Harry Terkelsen
Committed patchset #4 (id:60001) manually as 0132043db489ff81d67396ec1dcb248ef6ba3068 (presubmit successful).
5 years, 2 months ago (2015-09-29 00:44:30 UTC) #9
sra1
https://codereview.chromium.org/1371193004/diff/40001/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart File pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart (right): https://codereview.chromium.org/1371193004/diff/40001/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart#newcode247 pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart:247: return new BoolLiteralTypeInformation(value, compiler.typesTask.boolType); Is there a way to ...
5 years, 2 months ago (2015-09-29 01:02:05 UTC) #10
sra1
5 years, 2 months ago (2015-09-29 01:02:06 UTC) #11
Harry Terkelsen
Thanks Stephen https://codereview.chromium.org/1371193004/diff/40001/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart File pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart (right): https://codereview.chromium.org/1371193004/diff/40001/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart#newcode247 pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart:247: return new BoolLiteralTypeInformation(value, compiler.typesTask.boolType); On 2015/09/29 01:02:04, ...
5 years, 2 months ago (2015-09-29 01:09:53 UTC) #12
Harry Terkelsen
https://codereview.chromium.org/1371193004/diff/40001/pkg/compiler/lib/src/ssa/optimize.dart File pkg/compiler/lib/src/ssa/optimize.dart (right): https://codereview.chromium.org/1371193004/diff/40001/pkg/compiler/lib/src/ssa/optimize.dart#newcode1310 pkg/compiler/lib/src/ssa/optimize.dart:1310: ValueTypeMask valueType = condition.instructionType; On 2015/09/29 01:09:53, Harry Terkelsen ...
5 years, 2 months ago (2015-09-29 01:16:34 UTC) #13
sra1
On 2015/09/29 01:16:34, Harry Terkelsen wrote: > https://codereview.chromium.org/1371193004/diff/40001/pkg/compiler/lib/src/ssa/optimize.dart > File pkg/compiler/lib/src/ssa/optimize.dart (right): > > https://codereview.chromium.org/1371193004/diff/40001/pkg/compiler/lib/src/ssa/optimize.dart#newcode1310 ...
5 years, 2 months ago (2015-09-29 01:20:26 UTC) #14
sra1
5 years, 2 months ago (2015-09-29 04:12:17 UTC) #15
Message was sent while issue was closed.
DBC

https://codereview.chromium.org/1371193004/diff/60001/pkg/compiler/lib/src/in...
File pkg/compiler/lib/src/inferrer/type_graph_nodes.dart (right):

https://codereview.chromium.org/1371193004/diff/60001/pkg/compiler/lib/src/in...
pkg/compiler/lib/src/inferrer/type_graph_nodes.dart:1133:
BoolLiteralTypeInformation(value, TypeMask mask)
What is the type of 'value'?

Why do we need this TypeInformation?
Should is not be sufficient to propagate the ValueTypeMask?

Powered by Google App Engine
This is Rietveld 408576698