The analyzer has a stricter patch parser than the VM. Patch files
cannot change signatures of patched members. Specifically, they cannot
change:
- the return type
- a parameter's name
- a parameter to an initializing formal
- an optional parameter's default value
BUG=
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2612043002 .
Clean up the VM's dart:core and dart:async library patches so that
they are clean according to the patching rules implemented in the
analyzer. Specifically:
- If a member is patched in a patch file, it must be declared external
in the SDK.
- If a member is introduced in a patch file, it must be private.
- A non-private superclass member cannot be overridden in a patch
file.
BUG=
R=lrn@google.com, sigmund@google.com
Review-Url: https://codereview.chromium.org/2563633002 .
- bring patched SDK generation scripts and VM patch tweaks that allow VM patch files to be parsed by analyzer front-end;
Patched SDK is an SDK with all VM patches spliced into it. Kernel compiler is based on the analyzer front-end which does
not have any patch files support/model so for it to produce Kernel files that match VM we need to generate a such patched SDKs.
- bring test script modifications that allow to test Kernel pipeline
BUG=
R=asiva@google.com, kmillikin@google.com, whesse@google.com, zra@google.com
Review URL: https://codereview.chromium.org/2434123003 .
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 .
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 .
original token stream in the presence of combinations of
multiline string and string interpolation. If not this will
cause mismatches when accessing code snippets, e.g when
reporting parser errors or assertions.
- Ensure that ScanAll and ScanTo are in sync when adding or
counting tokens.
- Added unit test for multiline strings and interpolation.
- Expanded GenerateSource unit test to iterate through all
loaded libraries.
- Do not report columns for compilation errors in snapshotted
code.
- Do not report columns from exceptions and errors when dealing
with snapshotted code.
- Remove length field from TokenDescriptor. It was unused.
- Remove TokenStream::ComputeTokenPosition. It was unused.
R=fschneider@google.com, hausner@google.com
Review URL: https://codereview.chromium.org//36323003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29110 260f80e4-7a28-3924-810f-c04153c831b5
- implicitly store a full stack trace in Error objects when they are thrown.
- the shlFromInt on Mints and Bigints was trying to allocate a new OutOfMemory
exception objects instead of using the pre-allocated exception object.
Made the implementation of these methods native so that they can use the
pre-allocated object.
- Ensure that it is not possible to allocate new OutOfMemory or StackOverflow
exception objects.
R=ahe@google.com, srdjan@google.com
Review URL: https://codereview.chromium.org//19106008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25492 260f80e4-7a28-3924-810f-c04153c831b5