Commit graph

15027 commits

Author SHA1 Message Date
danrubel 4da09b06d0 enable fasta scanner in analyzer by default
* update test because fasta scanner correctly warns on 1.e+2
* fasta scanner correctly produces compile time error
    see dartbug.com/28664
    fix dartbug.com/28680
* update fasta AsciiControlCharacter error code
* enable fasta scanner in analyzer by default

R=ahe@google.com, paulberry@google.com

Review-Url: https://codereview.chromium.org/2967363003 .
2017-07-06 13:35:50 -04:00
Johnni Winther 69421f0f62 Bring js_model/model_test on par with compile_from_dill tests.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2967933002 .
2017-07-06 16:38:15 +02:00
Johnni Winther e340ee517a Handle static fields in js_model/model_test
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2970673004 .
2017-07-06 16:30:55 +02:00
Johnni Winther 550b74233f Handle instance/super methods in js_model/model_test
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2969993002 .
2017-07-06 16:15:54 +02:00
Johnni Winther ba4220c563 Split ClassEnv into env and data to avoid copying types/constants from the k-model
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2971673002 .
2017-07-06 15:45:41 +02:00
Johnni Winther f081f8b47d Support creating elements from IR nodes in JsKernelToElementMap
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2969013002 .
2017-07-06 15:29:56 +02:00
Johnni Winther 09c5828204 Add EquivalenceVisitor to tools in js_ast
R=sra@google.com

Review-Url: https://codereview.chromium.org/2967843002 .
2017-07-06 10:39:28 +02:00
Johnni Winther 0238b6a37f Implement JsEquivalenceVisitor using NodeVisitor1 interface
Review-Url: https://codereview.chromium.org/2970693002 .
2017-07-06 10:30:02 +02:00
Jennifer Messerly 5533a256cb fix #30030, fix #27327 - fix tearoffs and various Object member bugs
this includes various cleanups found along the way:
* various issues with JS annotations, see #30043
* getGenericClass is now optimized when used in a JS builtin with a Type literal
* typed list literals should be slightly faster to create
* memoized getters used by dart:_runtime should be faster
* registerExtension should be a tad faster, and now understands JSArray
* dart.bind "safeName" hack gone in codegenerator
* JSArray<E>.runtimeType returns List<E>
* JSArray<E>.noSuchMethod works
* cleans up code that generates `setExtensionBaseClass` (used only by JSArray)
* _throwUnsafe helper for generating a `throw` in --unsafe compile mode
* fix tearoff of JS interop types (_emitSimpleIdentifier)
* fix TODO about splitting LazyJSType and AnonymousJSType
* fix is/as/cast methods on TypeRep and related classes
* fix codegenerator to not tearoff "hashCode" and "runtimeType" (they are not methods)
* fix NoSuchMethodError.toString()   (update via dart2js sdk impl)

R=vsm@google.com

Review-Url: https://codereview.chromium.org/2962263002 .
2017-07-05 14:17:53 -07:00
Bob Nystrom 1bd907dc2e Run dartdevc tests on drt instead of Chrome on the bots.
Also, do another triage pass on the tests.

R=vsm@google.com

Review-Url: https://codereview.chromium.org/2964043004 .
2017-07-05 09:45:16 -07:00
Florian Loitsch 304665a5b8 Fix status file line.
Review-Url: https://codereview.chromium.org/2970073002 .
2017-07-05 16:04:00 +02:00
Peter von der Ahé 5999f45148 Implement type variables on old style function-typed formal parameters.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2969053002 .
2017-07-05 14:54:21 +02:00
Peter von der Ahé 6bb89e4fbf Use type variables on Typedef correctly.
R=johnniwinther@google.com, paulberry@google.com

Review-Url: https://codereview.chromium.org/2967923002 .
2017-07-05 13:12:27 +02:00
Florian Loitsch 89365d4d9a Mark max-device-aspect-ratio_t01 as flaky.
Review-Url: https://codereview.chromium.org/2972663002 .
2017-07-04 16:12:15 +02:00
Florian Loitsch 97a458adf7 Update status files.
R=ahe@google.com

Review-Url: https://codereview.chromium.org/2972613003 .
2017-07-04 12:54:36 +02:00
Florian Loitsch 3df3725f27 Mark type_object tests as co19 issues.
R=whesse@google.com

Review-Url: https://codereview.chromium.org/2964913002 .
2017-07-04 12:14:18 +02:00
Florian Loitsch 6a9337ee82 Mark mouseOverEvent test as flaky.
Review-Url: https://codereview.chromium.org/2970813002 .
2017-07-04 10:09:58 +02:00
Vyacheslav Egorov f167ad18da test.py: temporarily disable background optimizer in vm-dartk-debug config.
It is causing flakiness on bots.

Unmark tests marked as flaky by 45e4d848d2

See https://github.com/dart-lang/sdk/issues/30016.

BUG=
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2970733002 .
2017-07-03 17:05:12 +02:00
Peter von der Ahé e3939aa96c Fix status file expression.
Review-Url: https://codereview.chromium.org/2969843003 .
2017-07-03 15:43:01 +02:00
Peter von der Ahé 45e4d848d2 [gardening] Update status files for kernel debug mode.
Review-Url: https://codereview.chromium.org/2969883002 .
2017-07-03 15:37:16 +02:00
Johnni Winther 8ce912063e Split implementation of KernelToElementMapImpl
- to enable testing of pure implementations of the frontend/backend KernelToElementMap interfaces

This introduces Indexed* entities to enable sharing envs/data between K and J elements.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2964683003 .
2017-07-03 10:06:33 +02:00
Lasse R.H. Nielsen 62bc61b367 Use relative URIs for core library part-of statements.
Reapply "Change some platform libraries to use `part of URI`."
Change to used relative URIs in the part-of declarations.

R=brianwilkerson@google.com, floitsch@google.com

Review-Url: https://codereview.chromium.org/2911903002 .
2017-07-03 10:04:06 +02:00
Johnni Winther 3433c71c2e Add equivalence testing on JS nodes to support different label names
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2963193003 .
2017-07-03 10:00:31 +02:00
Jens Johansen 6873d96db3 [kernel] Update status file
Removed no-longer-current status-file entry.

See issue #28790.

BUG=
R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2962303002 .
2017-07-03 08:17:17 +02:00
Emily Fortuna b6671a0e3f Revert "Added for-loop variable tracking and regular closures/initializers captured variable tracking."
I think I had a bad merge. Reverting to figure out the issue.

This reverts commit d40f84fbf8.

BUG=

Review-Url: https://codereview.chromium.org/2964113004 .
2017-07-01 07:33:53 -07:00
Emily Fortuna d40f84fbf8 Added for-loop variable tracking and regular closures/initializers captured variable tracking.
This whole thing is hanging together by a thread. A BUNCH of tests and more implementation coming next once the KernelClosureClass is truly functional.

BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2961253005 .
2017-07-01 07:12:37 -07:00
Leaf Petersen 6f73694bb7 Generate better code for '==', core.identical, and dart.test.
Avoid falling back to the dart.equal runtime helper where possible based on static types.  Also uses JS `==` or `===` in some cases.

Treat core.identical as a compiler intrinsic, based on type.

Make dart.test assume correct types, use dart.dtest for combined cast and nullability check only when required.

Fixes https://github.com/dart-lang/sdk/issues/29851
Fixes https://github.com/dart-lang/sdk/issues/29772
BUG=
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2926613003 .
2017-06-30 15:04:29 -07:00
Johnni Winther 8d9562ecd0 Support break in switch and break/continue in do statements
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2965763002 .
2017-06-30 21:17:11 +02:00
Johnni Winther 63f74d855f Always store GlobalTypeInferenceElementData on the member context
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2961313002 .
2017-06-30 10:13:40 +02:00
Jens Johansen bbb463ac20 [kernel] Delete most of the AST
Now basically only Program (with ~no children) persists.

BUG=
R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2931773005 .
2017-06-30 07:55:08 +02:00
Jennifer Messerly 94af6bf093 fix #29733, handle variables that completely shadow parameters
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2961863003 .
2017-06-29 10:39:09 -07:00
Zachary Anderson 50475dd351 [Fuchsia] Fix test image. Update status files for vm and language suites
IN-70

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2957233003 .
2017-06-29 07:45:19 -07:00
Johnni Winther 34290dca77 Split inference type-info accessors into members, parameters and local functions
This prepares for using LocalFunctionElement.callMethod as the key for local
functions instead of the local functions themselves - corresponding to the world
after closure conversion.

Main changes in
  elements/elements.dart
  inferrer/inferrer_engine.dart
  inferrer/type_graph_inferrer.dart
  inferrer/type_system.dart

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2955353002 .
2017-06-29 14:46:48 +02:00
Peter von der Ahé ba84f801f4 Change how unresolved super sends are handled.
The mixin transformer is now responsible for adding no-such-method calls.

Fixes https://github.com/dart-lang/sdk/issues/30000

R=paulberry@google.com, sigmund@google.com

Review-Url: https://codereview.chromium.org/2963763002 .
2017-06-29 12:21:49 +02:00
Jens Johansen 6cb702b723 [Kernel] Add check in the constant evaluator.
Currently some tests pass in checked mode but fails in non-checked mode
because we don't check the result of a constant-evaluation that should
be bool in non-checked mode.
This CL changes it so we always check the bool result in the constant-evaluator.

BUG=
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2956493003 .
2017-06-29 11:18:10 +02:00
Johnni Winther fc1ec82757 Move locals and closure classes from kernel/ to js_model/
- and rename K* to J*

R=efortuna@google.com, sigmund@google.com

Review-Url: https://codereview.chromium.org/2960153002 .
2017-06-29 11:08:24 +02:00
Paul Berry 0958e40357 Adjust return types of spec-mode function expressions to match VM.
R=scheglov@google.com

The spec is unclear about what is supposed to happen here (see
https://github.com/dart-lang/sdk/issues/30044).  Matching the VM
behavior allows us to pass the existing tests.
Review-Url: https://codereview.chromium.org/2958363002 .
2017-06-28 14:36:00 -07:00
Zachary Anderson 4ecf748d5e [dart:io] Fixes a crash in VM shutdown when signals are watched
This CL fixes a crash in VM shutdown which is triggered by Dart programs
that throw unhandled exceptions while watching OS signals.

fixes #30033

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2961993002 .
2017-06-28 11:05:07 -07:00
Brian Wilkerson 563720617c Allow trailing comma in assert
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2961063002 .
2017-06-28 10:46:44 -07:00
Florian Loitsch 978213d427 Revert "Make Zone API strong mode clean."
This reverts commit 0b35711d48.

BUG=

Review-Url: https://codereview.chromium.org/2963743002 .
2017-06-28 13:31:32 +02:00
Florian Loitsch 0b35711d48 Make Zone API strong mode clean.
Review-Url: https://codereview.chromium.org/2959163002 .
2017-06-28 13:16:39 +02:00
Johnni Winther a6127e7361 Steps towards handling new Element.div()
- need to have a closure class for this.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2958013002 .
2017-06-28 10:30:09 +02:00
Johnni Winther 4f5eb70e67 Share test-source between full emitter and fast startup emitter dill tests.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2959773003 .
2017-06-28 10:07:50 +02:00
Johnni Winther 4d26bc56b4 Handle super-method call
+ add BackendUsage.isMirrorUsed

(yes, these were related!)

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2960723004 .
2017-06-28 10:02:00 +02:00
Johnni Winther a9fca6fba9 Split KernelToElementMap mixins to match interfaces
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2955093002 .
2017-06-28 09:43:01 +02:00
Régis Crelier d9cc3b0e67 Allocate local variable holding type arguments in generic functions in Kernel.
Capture instantiators when calling generic functions with uninstantiated type
arguments.
Add VM flag to generic functions tests that do not expect reification.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2958833003 .
2017-06-27 15:19:37 -07:00
Vijay Menon fd6164cce4 Handle toString on DOM types
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2952363003 .
2017-06-27 09:22:25 -07:00
Johnni Winther 7d026b538e Handle continue and break in for-in and while loops
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2956883002 .
2017-06-27 11:07:18 +02:00
Johnni Winther e7ba4959ca Split KernelToElementMap into sub-interfaces
This prepares for a more direct implementation of J-elements by
splitting out the parts needed for world-impact vs ssa-building.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2960633002 .
2017-06-27 10:28:29 +02:00
Johnni Winther 07b0f45181 Add compile_from_dill_fast_startup_test
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2959683002 .
2017-06-27 09:59:23 +02:00