Commit graph

15748 commits

Author SHA1 Message Date
Zachary Anderson ac16656161 Remove MIPS support
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2858623002 .
2017-06-22 08:49:22 -07:00
Brian Wilkerson a420a1fbb5 Remove more dead code from analysis server
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2949103003 .
2017-06-22 08:21:03 -07:00
Brian Wilkerson e28064f405 Restore partial analysis of analysis options files
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2946313003 .
2017-06-22 08:00:50 -07:00
danrubel ebdc0eda11 add Parser.withoutFasta constructor
This renames an existing private Parser constructor as a short term fix
so that the angular plugin can extend the Parser.

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2952113002 .
2017-06-22 09:41:46 -04:00
Erik Corry 8378b8fdbf VM: Reland Inline instance object hash code into object header on 64bit.
Inline instance object hash code into object header on 64 bit.

64 bit objects have 32 bits of free space in the header word.
This is used for the hash code in string objects. We take it
for the default hash code on all objects that don't override
the hashCode getter.

This is both faster and a memory reduction. Eg it makes the
MegaHashCode part of the Megamorphic benchmark 6 times faster.

This is a reland of https://codereview.chromium.org/2912863006/
It fixes issues with the 32 bit compare-swap instruction on
ARM64 and fixes a fragile tree shaking test that is sensitive
to which private methods are in the core libraries.

R=kustermann@google.com, vegorov@google.com
BUG=

Review-Url: https://codereview.chromium.org/2954453002 .
2017-06-22 14:56:24 +02:00
Peter von der Ahé 94a44e0290 Refactor parseType in preparation for bigger changes.
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2951463002 .
2017-06-22 12:47:53 +02:00
Vijay Menon febded6052 Fix mocked operator methods
R=jacobr@google.com

Review-Url: https://codereview.chromium.org/2949123002 .
2017-06-21 16:54:08 -07:00
Vijay Menon ecca1e1c2a Add FallThroughError patch
TBR=jensj@google.com,rnystrom@google.com

Review-Url: https://codereview.chromium.org/2953693002 .
2017-06-21 16:33:31 -07:00
Paul Berry 945540c8bb Clean up duplicate type inference code for fetching parameter types.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2950193002 .
2017-06-21 14:57:43 -07:00
Paul Berry 95aaba5085 In strong mode, properly infer the return types of setters as void
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2952873002 .
2017-06-21 14:51:40 -07:00
Paul Berry 348b42c98b Properly type infer for-in loops when the iterator type is a type parameter.
Also, fix a minor bug in variable declaration inference that was
preventing a local variable without an initializer from having its
type properly "inferred" as `dynamic`.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2949093002 .
2017-06-21 14:46:54 -07:00
Paul Berry b2c4b0ac0a Implement override-based type inference for instance methods.
Also, fix a rare infinite loop bug in analyzer exposed by one of the
tests.

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

Review-Url: https://codereview.chromium.org/2946273002 .
2017-06-21 13:56:04 -07:00
Brian Wilkerson fcb23e967c Remove the unused class SingleContextManager
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2945313002 .
2017-06-21 11:21:25 -07:00
Emily Fortuna a721f87f99 More rearranging the deck chairs on the titanic.
According to the comments, only closures proper have free variables. Running tests support this. So let's move it into that branch.

BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2951923002 .
2017-06-21 10:47:54 -07:00
Brian Wilkerson 53e01faa43 Remove unused implementation of SearchEngine and rename the driver-based implementation
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2949823002 .
2017-06-21 09:33:51 -07:00
Brian Wilkerson 6e89075952 Disable finding plugin locations in the pubspec
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2947153002 .
2017-06-21 09:30:32 -07:00
Brian Wilkerson ab8158f582 Revert status change after disabling problematic test
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2951773003 .
2017-06-21 08:45:12 -07:00
Brian Wilkerson 6e8453ed94 Fix invalid initializing formal by adding a field
R=pquitslund@google.com

Review-Url: https://codereview.chromium.org/2946093002 .
2017-06-21 07:56:26 -07:00
Jens Johansen 80860e7fb7 [kernel] Stream kernel_reader
Mostly stream kernel_reader, i.e. the code that sets up the libraries,
classes, methods etc.

Mostly because it still takes a "Program" ast node, and looks at the
"Library" ast nodes to get their kernel offset in the binary.
Currently the scripts (containing breakable points etc) are also created
from the ast nodes.

The rest is now streamed.
This also means that more ast visitors could be deleted.

R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2931813002 .
2017-06-21 14:58:58 +02:00
Johnni Winther 0600f0ad9a Add closure_test for kernel based members
+ change id_equivalence_test to check kernel from .dill

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2951723002 .
2017-06-21 09:52:46 +02:00
Jens Johansen be9a3043aa [kernel] Make fasta call a new constructor on FallThroughError
On a switch fall through error, Fasta currently generates
```
throw new core::FallThroughError::•();
```

which generates the error-message via the VM:
```
'null': Switch case fall-through at line null.
```

This introduces a new constructor taking a url and a linenumber,
which then can give a better error message.

BUG=
R=ahe@google.com

Review-Url: https://codereview.chromium.org/2951453002 .
2017-06-21 08:40:59 +02:00
Paul Berry e981c6fdbc Add tests of null-aware constructs in void contexts.
Fasta desugares some expressions differently in void contexts, so to
be on the safe side, we should test that null-aware invocations and
property accesses work in both void and non-void contexts.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2948843002 .
2017-06-20 15:12:01 -07:00
Paul Berry 5dd84a802e Only set types of conditional expressions in strong mode.
In spec mode the types aren't meaningful anyway (due to the fact that
the spec mode type system is unsound), and they don't match the
behavior of Rasta (causing bot failures).

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2953503002 .
2017-06-20 14:59:29 -07:00
Paul Berry d514347a44 Add type inference for null-aware method invocations.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2950923002 .
2017-06-20 12:16:34 -07:00
Mike Fairhurst 47c9dcad97 Update plugin whitelist to accomodate angular plugin rename
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2947953002 .
2017-06-20 12:01:51 -07:00
Paul Berry eadfe2816b Record static types in the desugaring of null-aware property gets.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2946943002 .
2017-06-20 11:29:50 -07:00
Brian Wilkerson 5582824e3c Rename the plugin location key and directory name
R=mfairhurst@google.com

Review-Url: https://codereview.chromium.org/2952583003 .
2017-06-20 11:06:39 -07:00
Paul Berry d0f8a47f33 Rename "field" -> "accessor" in several type inference methods.
No functional change.  This just adjusts nomenclature to reflect the
fact that much of the type inference logic for dealing with fields
also applies to getters/setters.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2948773002 .
2017-06-20 10:34:27 -07:00
Jennifer Messerly 070f31a899 optimize null safe ops by using DDC's let abstraction
We were already using it for most other things (increment ops, op assign, ??, cascades, etc)

R=vsm@google.com

Review-Url: https://codereview.chromium.org/2944413002 .
2017-06-20 10:31:30 -07:00
Dan Rubel d0910ce078 translate fasta parser error to analyzer error
* translate fasta parser BuiltInIdentifierAsType error to analyzer error
* remove unused error listener field

R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2944383002 .
2017-06-20 13:18:48 -04:00
Dan Rubel 966d1a4701 integrating fasta parser
* start integrating fasta parser into analyzer
* extract new Scanner.fasta factory

R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2948473002 .
2017-06-20 12:24:13 -04:00
Brian Wilkerson 24996fbfe7 Add support to pass the location of the analysis options file to plugins
R=mfairhurst@google.com

Review-Url: https://codereview.chromium.org/2947743002 .
2017-06-20 07:41:03 -07:00
Paul Berry 1594006758 Print static types of conditional expressions.
I want to start testing that Fasta sets the static types of
conditional expressions correctly, so I need Fasta's expectations
files to include them.

This CL just adds the static types to the printing logic in
ast_to_text.dart and updates expectations so that the tests continue
to pass.  I will make behavioral changes to Fasta in future CLs.

R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2949753002 .
2017-06-20 07:33:54 -07:00
Brian Wilkerson 5976c78a79 Handle unresolved constructor (issue 29925)
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2944083002 .
2017-06-20 06:16:23 -07:00
Paul Berry be01632bc0 Fix type inference of getters that "override" setters and vice versa.
Normally getters and setters are considered distinct and unrelated by
the type inference algorithm.  However, if a getter has no declared
type and doesn't override anything, then we fall back on inferring its
type from an inherited setter, and vice versa.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2946733003 .
2017-06-20 05:34:31 -07:00
Johnni Winther e41d0a63c2 Compute KernelClosureRepresentationInfo.variableIsUsedInTryOrSync
This handles one of the current inequivalences on hello world from dill.

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2938203003 .
2017-06-20 12:45:51 +02:00
Johnni Winther 4a31a0be47 Add closure_test
- currently only for AST-based elements; IR-based to come

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2950493002 .
2017-06-20 12:27:19 +02:00
Emily Fortuna 8ba4f78dd3 Revert "Reapply "Minor adjustment to usage of the ClosureClassRepresentation interface.""
This reverts commit d9c6ae3438.

BUG=

Review-Url: https://codereview.chromium.org/2944163003 .
2017-06-19 17:49:21 -07:00
Emily Fortuna d9c6ae3438 Reapply "Minor adjustment to usage of the ClosureClassRepresentation interface."
This reverts commit 0ee0717cc3.

BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2944073003 .
2017-06-19 17:39:20 -07:00
Emily Fortuna 0ee0717cc3 Revert "Minor adjustment to usage of the ClosureClassRepresentation interface."
This reverts commit 85f37133f9.

BUG=

Review-Url: https://codereview.chromium.org/2946843002 .
2017-06-19 17:11:17 -07:00
Emily Fortuna 85f37133f9 Minor adjustment to usage of the ClosureClassRepresentation interface.
BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2947763002 .
2017-06-19 16:42:37 -07:00
Paul Berry 8bb13b8740 Verify that inference ignores setters with function-typed arguments.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2948693002 .
2017-06-19 15:14:27 -07:00
Paul Berry a4743540d0 Implement type inference for null-aware property gets.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2944933002 .
2017-06-19 15:08:56 -07:00
Paul Berry fdf77ba36f Implement type inference for if-null expressions (a ?? b).
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2944903002 .
2017-06-19 13:46:09 -07:00
Vijay Menon ed8de04f08 Fixes for super tearoff in constructor
Fixes #29932

R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2944003003 .
2017-06-19 13:39:53 -07:00
Paul Berry e8131d6f1a Fix ParameterElementImpl.hasImplicitType for function-typed parameters.
UnlinkedParam.type serves a dual role: for ordinary parameters it is
the declared type; for function-typed parameters it is the declared
return type.  So to determine whether a parameter has an implicit type
it is not sufficient to check whether UnlinkedParam.type is `null`.
We also need to check whether the parameter is function-typed.

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2947703002 .
2017-06-19 13:13:53 -07:00
Brian Wilkerson d30c5070a2 Disable a test to fix the bots (TBR)
Review-Url: https://codereview.chromium.org/2946763002 .
2017-06-19 12:02:52 -07:00
Brian Wilkerson eafc070479 Remove ReplacementRange
R=danrubel@google.com, maxkim@google.com

Review-Url: https://codereview.chromium.org/2946573003 .
2017-06-19 10:15:36 -07:00
Brian Wilkerson fe368f956c Mark a test as slow to try to fix the bots
Review-Url: https://codereview.chromium.org/2943363002 .
2017-06-19 09:56:45 -07:00
Kevin Millikin 8340cfda55 Revert "Proper sequencing of _asyncStackTraceHelper in Kernel"
This reverts commit 0489249d29.  The
change causes failures in the front end tests.

BUG=
R=sivachandra@google.com

Review-Url: https://codereview.chromium.org/2949533003 .
2017-06-19 17:21:22 +02:00