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

Issue 2005723004: Fraction class prototype and test (not to be committed). (Closed)

Created:
4 years, 7 months ago by regis
Modified:
3 years, 9 months ago
Reviewers:
siva, hausner, Ivan Posva
CC:
reviews_dartlang.org, turnidge, rmacnak, vm-dev_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fraction class prototype and test (not to be committed).

Patch Set 1 #

Patch Set 2 : wip #

Patch Set 3 : sync and optimize for percent #

Patch Set 4 : sync #

Patch Set 5 : trying to make snapshots work with fraction class #

Patch Set 6 : add a Fraction VM class #

Patch Set 7 : work in progress #

Patch Set 8 : work in progress #

Patch Set 9 : work in progress #

Patch Set 10 : const constructors, more tests #

Patch Set 11 : Merge branch 'master' into slave #

Patch Set 12 : work in progress #

Patch Set 13 : work in progress #

Patch Set 14 : work in progress #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1693 lines, -395 lines) Patch
M runtime/lib/bigint.dart View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +10 lines, -10 lines 0 comments Download
M runtime/lib/core_sources.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/lib/double.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +68 lines, -0 lines 0 comments Download
M runtime/lib/double.dart View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +45 lines, -1 line 0 comments Download
A runtime/lib/fraction.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +427 lines, -0 lines 0 comments Download
M runtime/lib/integers.dart View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +11 lines, -2 lines 0 comments Download
M runtime/lib/mirrors.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M runtime/observatory/tests/service/get_source_report_test.dart View 1 chunk +3 lines, -3 lines 0 comments Download
M runtime/vm/ast.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -1 line 0 comments Download
M runtime/vm/bootstrap_natives.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/clustered_snapshot.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +80 lines, -0 lines 0 comments Download
M runtime/vm/dart_entry.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/dart_entry.cc View 1 2 3 4 5 2 chunks +14 lines, -6 lines 0 comments Download
M runtime/vm/exceptions.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/flow_graph_compiler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -3 lines 0 comments Download
M runtime/vm/intrinsifier_arm.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -2 lines 0 comments Download
M runtime/vm/intrinsifier_arm64.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -2 lines 0 comments Download
M runtime/vm/intrinsifier_ia32.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -2 lines 0 comments Download
M runtime/vm/intrinsifier_mips.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/intrinsifier_x64.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -2 lines 0 comments Download
M runtime/vm/method_recognizer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 8 chunks +310 lines, -310 lines 0 comments Download
M runtime/vm/object.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +49 lines, -1 line 0 comments Download
M runtime/vm/object.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 10 chunks +213 lines, -1 line 0 comments Download
M runtime/vm/object_service.cc View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/vm/object_store.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +10 lines, -0 lines 0 comments Download
M runtime/vm/object_store.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +4 lines, -0 lines 0 comments Download
M runtime/vm/parser.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/parser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +20 lines, -0 lines 0 comments Download
M runtime/vm/parser_test.cc View 11 chunks +26 lines, -26 lines 0 comments Download
M runtime/vm/raw_object.h View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +20 lines, -4 lines 0 comments Download
M runtime/vm/raw_object.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +9 lines, -0 lines 0 comments Download
M runtime/vm/raw_object_snapshot.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +52 lines, -0 lines 0 comments Download
M runtime/vm/scanner.cc View 2 chunks +5 lines, -2 lines 0 comments Download
M runtime/vm/snapshot.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +3 lines, -0 lines 0 comments Download
M runtime/vm/snapshot.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +8 lines, -1 line 0 comments Download
M runtime/vm/symbols.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +16 lines, -14 lines 0 comments Download
M runtime/vm/token.h View 2 chunks +2 lines, -0 lines 0 comments Download
M sdk/lib/core/num.dart View 1 2 3 4 5 6 7 8 9 10 2 chunks +9 lines, -1 line 0 comments Download
A tests/language/vm/fraction_test.dart View 1 2 3 4 5 6 7 8 9 10 1 chunk +237 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
regis
This is a working experiment showing how to wire a new numerical type extending num ...
4 years, 7 months ago (2016-05-23 22:28:50 UTC) #2
Cutch
On 2016/05/23 22:28:50, regis wrote: > This is a working experiment showing how to wire ...
4 years, 7 months ago (2016-05-24 14:31:00 UTC) #3
regis
On 2016/05/24 14:31:00, Cutch wrote: > On 2016/05/23 22:28:50, regis wrote: > > This is ...
4 years, 7 months ago (2016-05-24 16:44:01 UTC) #4
Cutch
4 years, 7 months ago (2016-05-24 16:45:28 UTC) #5
On 2016/05/24 16:44:01, regis wrote:
> On 2016/05/24 14:31:00, Cutch wrote:
> > On 2016/05/23 22:28:50, regis wrote:
> > > This is a working experiment showing how to wire a new numerical type
> > extending
> > > num in the VM.
> > > 
> > > More work would be required to test and optimize this new class before
> > > submitting it.
> > > 
> > > I am setting this aside and will now work on a Pixel type (scaled decimal)
> for
> > > Flutter.
> > > 
> > > Comments are welcome.
> > 
> > I have a high level question:
> > 
> > Why does this type have to extend from num? Why can't it be a distinct
numeric
> > type like Float32x4?
> 
> I did not give it a lot of thoughts, but it seemed natural to be able to do
> arithmetic with other numerical types. e.g. multiply a fraction by 10. I
suppose
> that more optimizations would be possible by keeping the type separate, at the
> cost of flexibility. Is it why you are asking? It is a good question we can
> raise with the Flutter team when implementing a Pixel type.

Yes, that's why I'm asking

Powered by Google App Engine
This is Rietveld 408576698