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

Issue 10704216: Fix type checking of void type. (Closed)

Created:
8 years, 5 months ago by regis
Modified:
8 years, 5 months ago
Reviewers:
srdjan, siva
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fix type checking of void type. Fix library and tests accordingly. Add new test. Disable new test for dart2js. Disable some now failing co19 tests (new issue 158 filed). Hide internal VM String types from user (not complete). Committed: https://code.google.com/p/dart/source/detail?r=9672

Patch Set 1 #

Total comments: 6

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+253 lines, -142 lines) Patch
M runtime/bin/directory_impl.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M runtime/bin/http_parser.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M runtime/bin/mime_multipart_parser.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M runtime/bin/process_impl.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M runtime/lib/byte_array.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M runtime/lib/byte_array.dart View 1 40 chunks +40 lines, -40 lines 0 comments Download
M runtime/vm/code_generator.cc View 1 1 chunk +4 lines, -2 lines 0 comments Download
M runtime/vm/dart_api_impl_test.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/debugger_api_impl_test.cc View 1 6 chunks +20 lines, -20 lines 0 comments Download
M runtime/vm/flow_graph_builder.cc View 1 2 chunks +20 lines, -14 lines 0 comments Download
M runtime/vm/flow_graph_compiler_ia32.cc View 1 3 chunks +20 lines, -19 lines 0 comments Download
M runtime/vm/flow_graph_compiler_x64.cc View 1 3 chunks +20 lines, -19 lines 0 comments Download
M runtime/vm/heap_test.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/vm/object.cc View 1 4 chunks +14 lines, -1 line 0 comments Download
M runtime/vm/snapshot_test.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M tests/co19/co19-runtime.status View 1 1 chunk +4 lines, -0 lines 0 comments Download
M tests/language/generics_test.dart View 1 2 chunks +1 line, -2 lines 0 comments Download
M tests/language/language_dart2js.status View 1 1 chunk +1 line, -0 lines 0 comments Download
M tests/language/type_cast_vm_test.dart View 1 4 chunks +4 lines, -4 lines 0 comments Download
M tests/language/type_vm_test.dart View 1 12 chunks +12 lines, -12 lines 0 comments Download
A tests/language/void_type_test.dart View 1 chunk +84 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
regis
8 years, 5 months ago (2012-07-13 23:44:50 UTC) #1
srdjan
LGTM with one question. Maybe it would be worth it to send a separate email ...
8 years, 5 months ago (2012-07-16 15:21:11 UTC) #2
siva
LGTM with one comment regarding setter methods of byte array, I believe they need to ...
8 years, 5 months ago (2012-07-16 16:41:33 UTC) #3
regis
8 years, 5 months ago (2012-07-16 18:05:34 UTC) #4
Thanks!

I'll send a heads up email, as suggested.

-- Regis

https://chromiumcodereview.appspot.com/10704216/diff/1/runtime/lib/byte_array.cc
File runtime/lib/byte_array.cc (right):

https://chromiumcodereview.appspot.com/10704216/diff/1/runtime/lib/byte_array...
runtime/lib/byte_array.cc:65: ByteArray::Copy(array, index.Value(), &src,
sizeof(ValueT));
On 2012/07/16 16:41:33, asiva wrote:
> I think the setter methods of byte array need to return a value, they are not
> 'void'.

Good point! I reverted the change here and instead modified the dart version to
return an int.

https://chromiumcodereview.appspot.com/10704216/diff/1/runtime/lib/byte_array...
runtime/lib/byte_array.cc:124: ByteArray::Copy(array, index.Value(), &value,
sizeof(uint64_t));
On 2012/07/16 16:41:33, asiva wrote:
> Ditto.

Done.

https://chromiumcodereview.appspot.com/10704216/diff/1/runtime/vm/flow_graph_...
File runtime/vm/flow_graph_compiler_ia32.cc (right):

https://chromiumcodereview.appspot.com/10704216/diff/1/runtime/vm/flow_graph_...
runtime/vm/flow_graph_compiler_ia32.cc:425: return SubtypeTestCache::null();
On 2012/07/16 15:21:12, srdjan wrote:
> When can the type we check agains be void?

When we type check a value returned from a void function. Note that we will not
reach here if the returned value is null, since this case is handled by the
inlined code. So this case will result in a type error.
I have added a comment.
Remember also that this helper is used in both 'instance of' and 'check
assignable'.

Powered by Google App Engine
This is Rietveld 408576698