Commit graph

52131 commits

Author SHA1 Message Date
Morten Krogh-Jespersen d7e687fecb Revert "Add triggering of dart2js bots on sdk-builders."
This reverts commit 645acdbd0e.

TBR: athom@google.com

Bug:
Change-Id: Ia47a15e000dddfe1bb040ce148ac3d9cc2ceac8f
Reviewed-on: https://dart-review.googlesource.com/23669
Reviewed-by: Morten Krogh-jespersen <mkroghj@google.com>
2017-11-27 12:06:07 +00:00
Morten Krogh-Jespersen 645acdbd0e Add triggering of dart2js bots on sdk-builders.
DO NOT LAND until we have more machines.

Bug:
Change-Id: I0ad43356f3b429c807568d44a53988a30172bfe2
Reviewed-on: https://dart-review.googlesource.com/20980
Reviewed-by: Alexander Thomas <athom@google.com>
2017-11-27 11:07:28 +00:00
Morten Krogh-Jespersen a9a5081e10 Remove duplicate entries in same section from status files.
If two sections are syntactically equal, they are considered same section.

The discovery of duplicate entries was perfomed by the test in the CL:
https://dart-review.googlesource.com/#/c/sdk/+/21341

All removals has been done by hand to make sure the best comment was chosen.

Bug:
Change-Id: I105f6375adc1b5f555eb7c2af7d7d1e4e1922a32
Reviewed-on: https://dart-review.googlesource.com/21340
Reviewed-by: Alexander Thomas <athom@google.com>
2017-11-27 11:07:18 +00:00
Johnni Winther 69106c6c8c Support simple static inlining from kernel.
Change-Id: Ie9a062b2d825c9fb0ed7bd5933eb7cf841509409
Reviewed-on: https://dart-review.googlesource.com/23660
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2017-11-27 10:19:41 +00:00
Kevin Millikin 05426fe0f5 Fix an issue in constructors
Static fields should not be initialized in constructors.

Bug:
Change-Id: I34cb16a1eaa1c38b13266883199b6541f35fe340
Reviewed-on: https://dart-review.googlesource.com/23600
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2017-11-27 09:39:11 +00:00
Johnni Winther da9d21c49e Add inlining test
Change-Id: I17663d41d0f4e2b6f3bb7f44bed694cfff7fac38
Reviewed-on: https://dart-review.googlesource.com/23481
Reviewed-by: Stephen Adams <sra@google.com>
2017-11-27 09:22:57 +00:00
Johnni Winther d29cd4f183 Add toText to SideEffects and TypeMask for testing
- and make toString more structured.

Change-Id: If62cfb8e7ee110db6dfb713236e119e7e2f0e244
Reviewed-on: https://dart-review.googlesource.com/22401
Reviewed-by: Stephen Adams <sra@google.com>
2017-11-27 09:12:42 +00:00
Konstantin Shcheglov cf4db2be5e Apply resolution to InstanceCreationExpression.
R=brianwilkerson@google.com

Bug:
Change-Id: I213f58fd8c71eb9933c13f696f6d1a407f4553bb
Reviewed-on: https://dart-review.googlesource.com/23727
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-11-27 03:00:51 +00:00
Brian Wilkerson ce477d7f93 Convert parseArguments and rewriteAndRecover
Change-Id: I375e9782fa2f9a28389c62f2011bfa3cb1c2adcc
Reviewed-on: https://dart-review.googlesource.com/23740
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-11-26 22:48:52 +00:00
Paul Berry b47ef6bdeb Insert implicit downcasts for the conditions of assert statements.
Tests that have begun failing due to this change are marked with a
reference to issue #31402.

Change-Id: Ife1531ee029dda32e91f7aa0d5720353de7996d5
Reviewed-on: https://dart-review.googlesource.com/23726
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-11-26 17:06:00 +00:00
Brian Wilkerson 866519999d Convert Parser.skipExpression to accept and return the last consumed token
Change-Id: Iefee099badddc5dc2791d30553c600ed3e49bf56
Reviewed-on: https://dart-review.googlesource.com/23722
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-11-26 16:31:12 +00:00
Vyacheslav Egorov 26735519cb Revert "[kernel] Implementation of fine-grained strong mode argument type-checks, phase 2"
This reverts commit f13f772bb2.

Reason for revert: dartk(p)-strong debug mode is completely broken
because we convert int values non-representable as Smi to Smi, which
triggers that assert. The code that does tagging checks that
Untag(Tag(x)) == x, however for our purposes this identity does not
need to hold because we only care about lower bits and ignore the sign.

Reverting to restore green-ness of DEBUG builds.

TBR=sjindel@google.com

Bug:
Change-Id: Id436cbe000d6dec8db3469070ed531327cc82d89
Reviewed-on: https://dart-review.googlesource.com/23661
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-26 10:21:01 +00:00
Paul Berry 419a8c342e Insert implicit downcasts for field initializers.
Tests that have begun failing due to this change are marked with a
reference to issue #31402.

Change-Id: I0ea8fcf94728e70d92f4be771f3ca5d10c366375
Reviewed-on: https://dart-review.googlesource.com/23725
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-11-26 06:33:50 +00:00
Devon Carew 331c3ab82f Only show dart files in the imports code completion.
Bug:
Change-Id: Ib2e48422e85c6abcdf0c8af33a8f80e6d36111f5
Reviewed-on: https://dart-review.googlesource.com/23700
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-11-25 22:20:08 +00:00
Konstantin Shcheglov f85a962d97 Apply types to field declarations.
R=brianwilkerson@google.com

Bug:
Change-Id: Ia7e95459fd926ba384e89910589b914c8f94bf86
Reviewed-on: https://dart-review.googlesource.com/23723
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-11-25 21:36:48 +00:00
Konstantin Shcheglov 7e6ff7eb6e Use implementation from ResolutionApplier to apply types in DeclarationResolver.
If this conflicts with any change you have in flight, I'm fine with
delaying this one until your changes land.

R=brianwilkerson@google.com

Bug:
Change-Id: Ic1dca27035562e74c9f4dfdd68319be16daea93b
Reviewed-on: https://dart-review.googlesource.com/23721
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-11-25 18:03:19 +00:00
Konstantin Shcheglov 1eaf6d9fe5 Translate references to Kernel Field(s).
R=brianwilkerson@google.com

Bug:
Change-Id: I3cff476bd7160a0ea39cf1919b3a297634bb517b
Reviewed-on: https://dart-review.googlesource.com/23720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-11-25 04:53:28 +00:00
Konstantin Shcheglov 435fd394bd Apply created local parameter elements to nodes.
R=brianwilkerson@google.com

Bug:
Change-Id: Ia8431cbbdfd2fa31b30edff6d6a7d901975a71da
Reviewed-on: https://dart-review.googlesource.com/23642
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-11-25 00:50:19 +00:00
Brian Wilkerson c946d31b79 Convert parseCascadeExpression and parseArgumentOrIndexStar
Change-Id: I030cdaff5fc44d0c491f7146c84150105b10a66a
Reviewed-on: https://dart-review.googlesource.com/23641
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-11-24 20:31:29 +00:00
Samir Jindel f13f772bb2 [kernel] Implementation of fine-grained strong mode argument type-checks, phase 2
This revision continues the implementation of:
https://docs.google.com/document/d/1KK8b6kzr0pQev5YNftSZhN3M6I8HcvOJwJ6U-cW4nfw/edit?ts=5a05b3e9#heading=h.7j21arix8p2

* Add argument checking bits for named arguments in the arguments descriptor.
* Add argument checking bits for type arguments.
* Calculate argument checking bits for setters.
* Add dispatch category to PropertySet and DirectPropertySet.

Bug:
Change-Id: Ieb0a4a99c401f53a72de473fda7bab61581f9996
Reviewed-on: https://dart-review.googlesource.com/22700
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2017-11-24 18:23:57 +00:00
Brian Wilkerson a5c60e3d84 Mark a test as failing (TBR)
Change-Id: Ifc7191d6e024b39da7faa5f910fa773974e88356
Reviewed-on: https://dart-review.googlesource.com/23640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-11-24 17:34:27 +00:00
Brian Wilkerson 45a41f7fbe Accept the last consumed token in several methods
Change-Id: Ib6d4b134cfcc85ab2421f88a0ed6fa14246b330b
Reviewed-on: https://dart-review.googlesource.com/23460
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-11-24 17:11:18 +00:00
Florian Loitsch 1d9438ed0d Newsletter 2017-11-24.
Change-Id: Iea1fe57c076d978b6e9308b07d2479a856729ee9
Reviewed-on: https://dart-review.googlesource.com/23620
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-11-24 16:27:00 +00:00
Brian Wilkerson 042af775af Apply some element data, improve handling of generic function types, improve tests
Change-Id: I501a5273834cc2f7f73465377bf145da183cd207
Reviewed-on: https://dart-review.googlesource.com/23241
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-11-24 15:44:09 +00:00
Kevin Millikin 4f551306f5 Fix a pair of superficial issues in generated JS
1. Catch bodies were unconditionally wrapped in a block, even when
they were already a block.

2. Finally was on a line by itself and indented incorrectly because of
an extra newline.

Bug:
Change-Id: I006cd2841c159a0fc86501bfaf282c7ad4c0ab0b
Reviewed-on: https://dart-review.googlesource.com/23580
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2017-11-24 15:31:27 +00:00
Kevin Millikin f84f656d56 Fix a bug in compilation of try/finally
Compilation of Kernel's try/finally included a flattening optimization
when the body was a JS try/catch.  This optimization duplicated the
catch block, which changes the semantics of exceptions thrown from the
catch block.

Bug:
Change-Id: I65aefa798d7f9026ab24ed6d1d484dea53235955
Reviewed-on: https://dart-review.googlesource.com/23560
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2017-11-24 15:29:47 +00:00
Jens Johansen b561850fb5 [DDC] Stacktrace tests
This CL copied stacktrace test ccases from dart2js and updates them
to DDC (mostly kernel version).

Some tests fail (marked in status file) because of dartbug.com/31451.

Bug:
Change-Id: If89c292eedb162fe7fe2832e909654e4ee083340
Reviewed-on: https://dart-review.googlesource.com/23500
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-11-24 14:05:20 +00:00
Jens Johansen c69cf9312d [DDC-kernel] Add source information to async wrapper and named parameter
This CL adds source information to the wrapping code for async and named
parameters. This is done for the source mapping not making Chrome (etc)
point to something completely wrong.

Tests are added too.

Bug:
Change-Id: Ifcd16428e0ca8c273fd6377e93297bbfbb37d773
Reviewed-on: https://dart-review.googlesource.com/23480
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2017-11-24 14:05:20 +00:00
Jens Johansen 19a0100a96 [DDC-kernel] Add source mapping to classes
This CL adds (initial) source mapping to classes and adds (some) tests
of wanted behaviour.

Bug:
Change-Id: I07a38930963b9d93e3bae5206b9eceda69643f7d
Reviewed-on: https://dart-review.googlesource.com/23300
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2017-11-24 14:05:20 +00:00
Jens Johansen 139e8f4175 [DDC-kernel] Make source-map stepping test output html too
Make the tests output html too so it's easy to fire the test up in
"real Chrome" too and step through it in the browser.

Make the test *NOT* delete the output folder when failing and it's run in
debug mode.

Bug:
Change-Id: I1f004e0a408238dcd9b6a296566c808e31b73ccd
Reviewed-on: https://dart-review.googlesource.com/23261
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2017-11-24 14:05:20 +00:00
Jens Johansen 28607729fc [DDC-kernel]: Stepping into constructor with initializers
This CL adds a test for stepping into a constructor with initializers.
It additionally changes the stack map in the kernel pipeline to produce
a better result in this case.

Bug:
Change-Id: If0a43b030446c4a7370f386f0f51411d223dda83
Reviewed-on: https://dart-review.googlesource.com/20720
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2017-11-24 14:05:20 +00:00
Dmitry Stefantsov 68f2c12756 [ddc-kernel] Remove type parameters from function types of constructors
Bug:
Change-Id: I62a078d5c406358f2037dfc40900b7d957487e93
Reviewed-on: https://dart-review.googlesource.com/22081
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Karl Klose <karlklose@google.com>
2017-11-24 13:39:07 +00:00
Lasse R.H. Nielsen 847cf039f0 Lower-case Isolate.{IMMEDIATE,BEFORE_NEXT_EVENT}.
Change-Id: I9a7071a7f6dc61b502f5aa9bc9bc2455247a7513
Reviewed-on: https://dart-review.googlesource.com/22984
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-11-24 12:44:17 +00:00
Erik Corry 3b3406fea0 [VM] Fix golden disassembler output on IA32
R=johnniwinther@google.com

Bug:
Change-Id: If8fe92a2811dc114b5e0dce208ef82bd47408086
Reviewed-on: https://dart-review.googlesource.com/23540
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-11-24 11:40:59 +00:00
Erik Corry 1d9ff70a08 [VM] Pick more compact instruction encodings on x64
Several tricks here:
* When zeroing registers we can use xorl instead of xorq because the 'l'
  variant will zero the top bits.
* test and 'and' instructions with immediate arguments can use 8-bit and 32 bit
  variants more heavily.
* mov reg, immediate can use more compact encodings when sign-extension is not
  needed.

Performance is better than +1% when measured on Dart2JS.

R=vegorov@google.com

Intel optimization manual says: "Assembly/Compiler Coding Rule 64. (H impact, M
generality) Use the 32-bit versions of instructions in 64-bit mode to reduce
code size unless the 64-bit version is necessary to access 64-bit data or
additional registers."
Bug:
Change-Id: I2a989315c45f8d8ebab719653fbfa2b18ebb77c9
Reviewed-on: https://dart-review.googlesource.com/23400
Commit-Queue: Erik Corry <erikcorry@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-24 10:53:17 +00:00
Erik Ernst 062e5d6db3 Now explicitly defines variant occurrences of type parameters.
The discussion about SDK issue 31305 showed that the definition of
covariant/contravariant/invariant occurrences need to be given
somewhere, and also that covariant-from-class.md is a reasonable place
to put it.

This CL adds those definitions there, based on Leaf's proposal in the
above-mentioned issue, and adjusts the definition of what it means to
be a covariant parameter such that the case where the relevant type
parameter occurs in the bound of a formal type parameter in a function
type is taken into account.

(It also reformats the document to stay within 80 columns and follow
the style of newer informal specs more closely, but that should be
easy to skip over because Gerrit colors white space changes
differently from "real" changes).

Change-Id: I0b0a688c616d0bb56755ceea08e1792abfa7936d
Reviewed-on: https://dart-review.googlesource.com/23422
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2017-11-24 09:21:47 +00:00
Konstantin Shcheglov 57f652d5d5 Associate invocation arguments with parameters.
R=brianwilkerson@google.com

Bug:
Change-Id: I675a7dd2dcfc61f1b0d46d49dbb40e4679598ffb
Reviewed-on: https://dart-review.googlesource.com/23461
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-11-24 05:26:27 +00:00
Konstantin Shcheglov be2bf3f126 Create local function parameters.
R=brianwilkerson@google.com

Bug:
Change-Id: I58715cc989d346d525a55e01dc14f91c8a436a82
Reviewed-on: https://dart-review.googlesource.com/23280
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-11-23 21:23:37 +00:00
Kevin Millikin fed1e4bd49 Fix a bug in compilation of while loops
Unlabeled while loops in Kernel (these are ones that are not the
target of a break) did not shadow labeled ones.  The compiler would
generate a break without a label in JS which would target the wrong
loop.

Bug:
Change-Id: Ib060ab66326a3ea0779eaceccaf1ca06ccfafb75
Reviewed-on: https://dart-review.googlesource.com/23421
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2017-11-23 20:53:06 +00:00
Paul Berry 5ce5811216 Insert implicit downcasts for the conditions of for statements.
Change-Id: I213617cb4ea1a5c29f8a6a56f54792c59cc4e132
Reviewed-on: https://dart-review.googlesource.com/23221
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-11-23 16:47:32 +00:00
Paul Berry b7a0db69a6 Fix compile-time error in implicit_downcast_not.dart test case
Change-Id: Icf58ba984fadd27580dc37c901532dcdbf101a99
Reviewed-on: https://dart-review.googlesource.com/23146
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-11-23 16:39:47 +00:00
Paul Berry 9255de668e Insert implicit downcasts for constructor initializer expressions.
Change-Id: Ic258db9c353a4a0ab33a96c3847b174937fcf9e5
Reviewed-on: https://dart-review.googlesource.com/23220
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-11-23 16:39:28 +00:00
Brian Wilkerson 934c6239d5 Return the last consumed token from three methods
Change-Id: I53acff5bef2fc22212333e3866ae6ddf43d21b76
Reviewed-on: https://dart-review.googlesource.com/23161
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-11-23 15:09:07 +00:00
Kevin Millikin fa1d2c896d Fix order of arguments to Expect.equals in some tests
Expect.equals (and Expect.listEquals) takes expected first and actual
second.  When these are flipped in tests, the failure message can be super
hard to understand.

Bug:
Change-Id: I1d3c5a31365fa41ee7bcc7781474d76de9184cd5
Reviewed-on: https://dart-review.googlesource.com/23420
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2017-11-23 14:45:46 +00:00
Jens Johansen bf81788671 [DDC-kernel]: Stepping over foo = new Foo.named()
This CL adds a test for stepping over - among others - a reassignment of
a variable with a new named constructor.
It additionally improves the situation in DDC via kernel.

Bug:
Change-Id: I1658d433575e6614b1cbbbeb7f1765651b0d34bb
Reviewed-on: https://dart-review.googlesource.com/20667
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-11-23 11:58:26 +00:00
Kevin Millikin 16ec97c0bb Update dartdevk test status files again
Bug:
Change-Id: I836d69b5e142d6fb287597e4829c596f9ed77420
Reviewed-on: https://dart-review.googlesource.com/23340
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2017-11-23 11:45:46 +00:00
Jens Johansen e97f818778 [DDC-kernel] Stacktrace test
First stacktrace test making use of the shared testing functionality
originally used by dart2js.

Bug:
Change-Id: Ia3528e2860a5bea48365c32a6526811d06ec001c
Reviewed-on: https://dart-review.googlesource.com/23060
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-11-23 11:25:16 +00:00
Dmitry Stefantsov 92d59a67a7 [ddc-kernel] Update status file for dartdevk
More tests are passing due to 8cdd9d323c

Bug:
Change-Id: Ia871cc46638caa145394f14fd6ec66bf6ea5dbba
Reviewed-on: https://dart-review.googlesource.com/23040
Reviewed-by: Karl Klose <karlklose@google.com>
2017-11-23 09:21:35 +00:00
Alexander Thomas 9698df457c Merge SDK build steps in test matrix
Change-Id: Icc9b03e33c7375c5cc1460f1d7116efed2157d44
Reviewed-on: https://dart-review.googlesource.com/22804
Reviewed-by: Morten Krogh-jespersen <mkroghj@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2017-11-23 09:10:16 +00:00
Jens Johansen c41c39d876 [DDC-kernel] Add missing copyright notice to sourcemap testing files
Bug:
Change-Id: Iec24647acc9ad7ee49ed3f4e83bf534d483e94b8
Reviewed-on: https://dart-review.googlesource.com/22981
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2017-11-23 08:49:36 +00:00