This makes the following improvements:
* Always show the call that was made, with arguments.
* ...and show the actual arguments in more cases.
* Be less confusing in the case of a call on the null receiver.
* Be less redundant in the output.
* Report when a constructor is called with the wrong number of arguments.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/2405353002 .
If an error happens during the compilation of a function body, an Error is thrown which can be intercepted, and ensures that finally blocks are executed before the isolate is terminated.
The language spec is vague about compilation errors. A doc describing the intentions behind this CL is at
https://docs.google.com/document/d/1_MWOgwJadLCQSBps0zD6Rj5dG4iP1UBuiDvTMH-WMzI/edit#
Example:
1 void bad() {
2 return 5
3 }
4
5 void main(args) {
6 bad();
7 }
Before this CL:
$ dart ~/tmp/e.dart
'file:///Users/hausner/tmp/e.dart': error: line 2 pos 11: semicolon expected
return 5
^
$
After this change:
$ dart ~/tmp/e.dart
Unhandled exception:
'file:///Users/hausner/tmp/e.dart': error: line 2 pos 11: semicolon expected
return 5
^
#0 main (file:///Users/hausner/tmp/e.dart:6:3)
#1 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:259)
#2 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:148)
$
Notice that the stack trace points to the call site of bad(), not the text location of the syntax error. That's not a bug. The location of the syntax error is given in the error message.
BUG= https://github.com/dart-lang/sdk/issues/23684R=asiva@google.com, lrn@google.com
Review URL: https://codereview.chromium.org/2044753002 .
Replace the C++ implementation of the default Map constructor with a
Dart version that uses the existing native setters to initialize members.
This avoid the expensive runtime transition when doing "new Map()".
BUG=#26046
R=asiva@google.com
Review URL: https://codereview.chromium.org/2278273003 .
The call sequence is very similar to a classic IC call, except the guarded class and the target are loaded indirectly from the constant pool instead of as immediates. In the monomorphic case, we call directly to the expected target with a class check in the callee. In the unlinked, polymorphic and megamorphic cases, we call a stub; these case are now call-through instead of call-and-return.
Every code, except stubs involved in switchable calls, includes the class check sequence at the beginning. So we now distinguish between a checked and an unchecked entry point. Generated code except the switchable call continues to use the unchecked entry point.
PC offsets are calculated relative to the beginning of the instruction stream, rather than either entry point.
BUG=
R=fschneider@google.com
Review URL: https://codereview.chromium.org/2226893002 .
Allow members of patch classes to be annotated with @patch. The VM
ignores the annotation. I simply replaces the original method
if the name matches, or reports an error if field names match.
Adding a bit is_patched to members to do more checking remains a
TODO. There are currently no unused bits available, and I don’t want
to increase the size of Function objects for this.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/2230383003 .
Annotate patch classes and top-level patch functions with @patch
instead of the pseudo-keyword patch. This allows the analyzer
to read patch files, and matches the syntax that dart2js uses.
The deprecated syntax is still supported, but a warning is printed when detected.
BUG=
Review URL: https://codereview.chromium.org/2220883004 .
This pattern ensures the generation of 'and' instructions on the Smi x Smi path of a polymorphic & operation.
There are two 'and' operations on most simple _InternalLinkedHashMap and _CompactLinkedHashSet operations. One of the inputs, the hashCode, is occasionally a _Bigint. This change ensures that the usual case path has an 'and' instruction instead of a call to _IntegerImplementation.&
R=regis@google.com
Review URL: https://codereview.chromium.org/1913663002 .
Optimize parser and make it recognize a class of URIs that don't need extra
handling: no escapes, no funny characters, already (nearly or completely)
normalized.
Have a class specifically for those URIs which retains the original
input string without having allocate any further strings.
R=floitsch@google.com
Review URL: https://codereview.chromium.org/2086613003.
This cl implements an experimental filesystem maintained in the vm, called dart-devfs. This will allow service protocol users to read and write source files while the vm is running. This is needed for the reload support for flutter.
R=turnidge@google.com
Review URL: https://codereview.chromium.org/2059883003 .
- [x] The first caller of the tag handler blocks, recursive callers queue work and exit.
- [x] Use a NativeMessageHandler to receive I/O results from the service isolate.
- [x] Preserve load error message format.
- [x] Move packages map into service isolate.
- [x] Wire up Todd's native URI code.
R=turnidge@google.com
Review URL: https://codereview.chromium.org/1998963003 .
In Flutter, this caused
RangeError (index): Index out of range: index should be less than null: 0
Uint32List.[]= (dart:typed_data)
_HashVMBase&MapMixin&&_LinkedHashMapMixin._insert (dart:collection-patch/compact_hash.dart)
This reverts commit 0ae4ae5033.
TBR=fschneider@google.com
Review URL: https://codereview.chromium.org/2023423002 .