|
|
Fix for issue 6678: Result of identical(a, b) with a and b doubles not consistent.
Implement proposed new identity spec (flag --new_identity_spec). It will be enabled/committed once the new spec been confirmed.
The new spec says that identity of numbers is computed on their values instead of on the object reference. This provides deterministic behavior without having to disable optimizations in the VM. In some cases 'identical' is now slower than 'equality' as more checks need to be done. The VM compiler can optimize 'identical' in the future.
My benchmarks do not show any slow down.
Committed: https://code.google.com/p/dart/source/detail?r=15332
Total comments: 22
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+421 lines, -16 lines) |
Patch |
 |
M |
runtime/vm/code_generator.cc
|
View
|
1
2
3
4
|
2 chunks |
+14 lines, -0 lines |
0 comments
|
Download
|
 |
M |
runtime/vm/flow_graph_builder.cc
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
runtime/vm/flow_graph_compiler_ia32.h
|
View
|
1
2
3
4
|
1 chunk |
+6 lines, -1 line |
0 comments
|
Download
|
 |
M |
runtime/vm/flow_graph_compiler_ia32.cc
|
View
|
1
2
3
4
|
1 chunk |
+36 lines, -2 lines |
0 comments
|
Download
|
 |
M |
runtime/vm/flow_graph_compiler_x64.h
|
View
|
1
2
3
4
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
M |
runtime/vm/flow_graph_compiler_x64.cc
|
View
|
1
2
3
4
|
1 chunk |
+36 lines, -2 lines |
0 comments
|
Download
|
 |
M |
runtime/vm/flow_graph_optimizer.h
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
runtime/vm/flow_graph_optimizer.cc
|
View
|
1
2
3
4
|
2 chunks |
+28 lines, -0 lines |
0 comments
|
Download
|
 |
M |
runtime/vm/intermediate_language.h
|
View
|
1
2
3
4
|
2 chunks |
+8 lines, -4 lines |
0 comments
|
Download
|
 |
M |
runtime/vm/intermediate_language.cc
|
View
|
1
2
3
4
|
5 chunks |
+30 lines, -6 lines |
0 comments
|
Download
|
 |
M |
runtime/vm/stub_code.h
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
runtime/vm/stub_code_ia32.cc
|
View
|
1
2
3
4
|
1 chunk |
+86 lines, -0 lines |
0 comments
|
Download
|
 |
M |
runtime/vm/stub_code_x64.cc
|
View
|
1
2
3
4
|
1 chunk |
+76 lines, -0 lines |
0 comments
|
Download
|
 |
M |
tests/language/language_dart2js.status
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
A |
tests/language/number_identity2_test.dart
|
View
|
1
2
3
4
|
1 chunk |
+18 lines, -0 lines |
0 comments
|
Download
|
 |
A |
tests/language/number_identity_test.dart
|
View
|
1
2
3
4
5
|
1 chunk |
+42 lines, -0 lines |
0 comments
|
Download
|
 |
A |
tests/standalone/number_identity_test.dart
|
View
|
1
2
3
4
5
6
|
1 chunk |
+29 lines, -0 lines |
0 comments
|
Download
|
 |
M |
tests/standalone/standalone.status
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
Total messages: 3 (0 generated)
|