Commit Graph

1243 Commits

Author SHA1 Message Date
Vijay Menon f70f544e57 Fix source map entries for field accesses
This improves:
- stepping through assignment expressions in devtools
- hover on fields when on lhs

Change-Id: Ifee0d7b0fe2de65494182f6818b9dbcd0a79087d
Reviewed-on: https://dart-review.googlesource.com/21820
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Alan Knight <alanknight@google.com>
2017-11-17 23:38:45 +00:00
Leaf Petersen 63918ea921 Remove comment syntax from lib/async.
Eliminate uses of the comment syntax in lib/async.  This is mostly
done simply by turning explicit (but commented) casts into implicit
casts to avoid regressing dart2js performance.

Bug:
Change-Id: I286c7bffbf609b5e2fa24b9d48b90876c2c45a9b
Reviewed-on: https://dart-review.googlesource.com/21566
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2017-11-17 20:40:47 +00:00
Leaf Petersen 85ca7df7e2 Avoid fuzzy arrows when parsing json.
Change the types on the json decoding reviver to avoid fuzzy arrow
checks.

Bug:
Change-Id: I3ca52d7676b6305c398f128d370bc9859fd65820
Reviewed-on: https://dart-review.googlesource.com/21564
Reviewed-by: Vijay Menon <vsm@google.com>
2017-11-17 20:37:07 +00:00
Lasse R.H. Nielsen b0f6c4c8b1 Don't deprecate old constant names yet.
Flutter reacts badly to using deprecated members.

Change-Id: Id7933ddbc0c2fa68d9a232e2ad4c74dfd0ecdf35
Reviewed-on: https://dart-review.googlesource.com/21601
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2017-11-17 10:58:33 +00:00
Kevin Millikin a16234be9b Fix the dartdevk tests
Change-Id: I75af5c6c1e571e80d5ed023081d17b6a64a14827
Reviewed-on: https://dart-review.googlesource.com/21400
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2017-11-17 09:51:32 +00:00
Leaf Petersen 4a56f7b360 Add back missing cast failure cache on function types.
Casts for function types got moved off of the generic path, and hence
are missing the memo cache.  Added a second function type  cast cache.

Fixes #31392

Bug:
Change-Id: Ie1b87adf630f5059b57d01956778f5adde0533fc
Reviewed-on: https://dart-review.googlesource.com/21525
Reviewed-by: Vijay Menon <vsm@google.com>
2017-11-16 22:48:13 +00:00
Alan Knight abf5e4bad4 Use toString() for DDC header previews
For ObjectFormatter right now we just show the class name. Some objects,
e.g. Int64, have descriptive toString() operations that are much more
informative than their internal structure.

This changes the default header to be
  Instance of 'Thing'
rather than just
  Thing
which is a little worse, but it's much better for these kinds of classes.
For Int64 we will now show
  12345 (Int64)

We also clip the toString() if it's too long.

Bug:
Change-Id: Iae6a8e66fdbe1d9f5c157ecdb983a833e26d00f4
Reviewed-on: https://dart-review.googlesource.com/21522
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Alan Knight <alanknight@google.com>
2017-11-16 21:54:02 +00:00
Paul Berry 1034ad336d Strong mode fix for line_splitter.dart.
The new front end doesn't support generic comment syntax yet, so it's
getting the wrong type for LineSplitter in strong mode.  Since we no
longer to preserve legacy mode semantics for LineSplitter, we can just
use the correct strong mode types without generic comment syntax.

Change-Id: If2dcb2fb3fae9eb49685838e4e84958e545650c7
Reviewed-on: https://dart-review.googlesource.com/21286
Reviewed-by: Florian Loitsch <floitsch@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-11-16 19:52:51 +00:00
Leaf Petersen c7df667e9f Regenerate DDC sdk.
Bug:
Change-Id: Id92703841e1be358b27275aeecc3cc94eae89972
Reviewed-on: https://dart-review.googlesource.com/21385
Reviewed-by: Paul Berry <paulberry@google.com>
2017-11-16 17:03:25 +00:00
Kevin Millikin 680ac3c500 Fix compilation of break and continue in loops
Kernel represents break and continue in Dart uniformly as break.  When
compiling to JavaScript we would like to use continue where possible and
avoid labeling statements that do not need to be labeled.

The basic idea is: at compile time maintain a list of Kernel targets
(LabeledStatements) that can be compiled to JS break without a label at a
given point in the program, and a list of Kernel targets that can be
compiled to JS continue without a label, and a map from Kernel targets to
the 'effective' target that will be labeled if necessary when compiled to
JS, and a mapping from effective targets to their label names if they must
be labeled.

Change-Id: Ie660cf3dd68399ebff128116fe38c250cb6b7f35
Reviewed-on: https://dart-review.googlesource.com/21120
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2017-11-16 10:17:42 +00:00
Karl Klose ccde2ffcc2 Handle Kernel specific mixin name encoding
Change-Id: Ibcd4a5f54aaf621052331887d872866579e13dbc
Reviewed-on: https://dart-review.googlesource.com/19683
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2017-11-15 10:39:31 +00:00
Kevin Millikin 17430920f7 Fix nesting of try and finally blocks.
Kernel try and finally statements do not necessarily compile to JS
blocks, but the JS AST requires blocks for try and finally.  Ensure
that these statements are blocks.

Bug:
Change-Id: I7abe6ae55650dc726cc89d86d12757d21a783064
Reviewed-on: https://dart-review.googlesource.com/20721
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2017-11-15 09:46:51 +00:00
Kevin Millikin d95f73f018 Flatten nested block function bodies.
In many cases function bodies were a block containing a single nested
block.  Flatten these cases.

Change the test for whether a lexically-scoped local variable clashes
with a parameter to work on the generated code, not the source.

Change-Id: I74d37fe686e481e3300bb9d37b30857e8e375cb5
Reviewed-on: https://dart-review.googlesource.com/20661
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2017-11-15 08:58:51 +00:00
Lasse R.H. Nielsen 0b58c4bd10 Change some constant declarations to lowerCase.
Retain the old values.

Reapply of https://dart-review.googlesource.com/c/sdk/+/20680 with fixes
for VM method fingerprints.

Change-Id: Ie14e7ccc3194d5561983348e6b6752728913ff4d
Reviewed-on: https://dart-review.googlesource.com/20664
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2017-11-14 12:59:14 +00:00
Lasse R.H. Nielsen e61fc07b58 Revert "Change some constant declarations to lowerCase."
This reverts commit c048cfb178.

Reason for revert: VM code fingerprints needs update.

Original change's description:
> Change some constant declarations to lowerCase.
> 
> Retain the old values.
> 
> Change-Id: I03bd326f379fe5f96d8f6081a7133de956d745c0
> Reviewed-on: https://dart-review.googlesource.com/11520
> Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Florian Loitsch <floitsch@google.com>

TBR=lrn@google.com,floitsch@google.com

Change-Id: I095e8198304ca4e59b39d30b0fdf0af4945e5231
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/20680
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2017-11-14 11:23:08 +00:00
Lasse R.H. Nielsen c048cfb178 Change some constant declarations to lowerCase.
Retain the old values.

Change-Id: I03bd326f379fe5f96d8f6081a7133de956d745c0
Reviewed-on: https://dart-review.googlesource.com/11520
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-11-14 11:13:04 +00:00
Leaf Petersen 01f9fbd29a Name mixin classes to workaround V8 bug.
V8 is inferring arbitrarily large names (many kilobytes each) for
anonymous functions in certain conditions.  Naming top level classes
works around this.

See also: https://bugs.chromium.org/p/v8/issues/detail?id=7069

Bug:
Change-Id: I7bce1701ca81c12bb3cb970b959bc9512592975d
Reviewed-on: https://dart-review.googlesource.com/20261
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2017-11-10 22:47:58 +00:00
Vijay Menon 6bf9d357b2 Fix declaration order for mixins
Fixes #31290

Bug:31290
Change-Id: I9f1874cf0b9173851655c0b1a2641e06b78a858a
Reviewed-on: https://dart-review.googlesource.com/19024
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2017-11-08 00:32:10 +00:00
Jenny Messerly 384678e4b3 port DDC's code_generator to Kernel
Change-Id: I2b6a5f56a69f5d3a965aefc3f8d4550d5940ac5a
Reviewed-on: https://dart-review.googlesource.com/17980
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2017-11-04 22:17:56 +00:00
Jenny Messerly f2478e5526 fix SDK for fuzzy arrows change to main function
Change-Id: I7b7d5b64c1694b0cd4d5b6d8b13231db236617cc
Reviewed-on: https://dart-review.googlesource.com/18688
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2017-11-04 08:20:24 +00:00
Jenny Messerly 4705eecde1 fix async recursive calls
Change-Id: I5dcc2d030309ee4a8451ccf6313a9559b84a0aaa
Reviewed-on: https://dart-review.googlesource.com/18421
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2017-11-02 21:06:09 +00:00
Jenny Messerly 1dfa9d2320 fix DDC SDK for Symbol.computeUnmangledName
Change-Id: I8b793744339dd934833f6188b5b8267d4dad1746
Reviewed-on: https://dart-review.googlesource.com/17864
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2017-11-01 20:38:06 +00:00
Vijay Menon 48cfab5deb Fix source maps for better dev tools hover
Change-Id: Id706a1c5817f174a3b512e5c7e2f29599b078eb8
Reviewed-on: https://dart-review.googlesource.com/17700
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2017-10-31 22:09:10 +00:00
Jacob Richman 8b221d13a4 Fix ddc debugger_test Fix regression in custom formatters due to change in metadata signatures to use Object.__proto__ instead of a null __proto__.
Bug:
Change-Id: I68fdb980e777b7c3f335fd6b57181134e3159cc3
Reviewed-on: https://dart-review.googlesource.com/17060
Commit-Queue: Jacob Richman <jacobr@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2017-10-31 19:45:27 +00:00
Alan Knight dfcce6d012 Make trapRuntimeErrors false by default
Bug:
Change-Id: I4e631113b00d5c39feaee74f4895a2e1f75641d0
Reviewed-on: https://dart-review.googlesource.com/17620
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
Commit-Queue: Alan Knight <alanknight@google.com>
2017-10-31 18:59:59 +00:00
Jenny Messerly 9bd19a49da Fixing renaming on top-level member
Fixes #31117

Change-Id: I7210ceb505963a547e244ae743a99b8688af2e48
Reviewed-on: https://dart-review.googlesource.com/14240
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2017-10-28 01:29:38 +00:00
Jenny Messerly 0aa6801f8a fix function type printing in DDC to match VM
Change-Id: I2e15d34c8a40d9ed86b44f5c3db7052fb7c8a783
Reviewed-on: https://dart-review.googlesource.com/14780
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2017-10-27 22:35:20 +00:00
Bob Nystrom cf8a477cb7 Support test packages in dartdevk in test.dart.
This allows dartdevk to compile tests that import packages like expect.
There are a few pieces to this:

- Add support to build_pkgs.dart to build the kernel summaries for each
  test package (in addition to the analyzer summaries it already
  builds).

- Plumb that through the dartdevc_test target in the GN build as well.

- While we're at it, use GN to build the ddc_sdk.dill file and have
  test.dart load that one instead of the manually built one from calling
  ./tool/kernel_sdk.dart.

- Add command-line arguments to dartdevk for passing in the path to the
  SDK summary and the other summaries to compile against.

- Fix a little typo in processed_options.dart that was preventing it
  from resolving "package:" URIs.

- In test.dart, when compiling a test, link in the summaries for all of
  the test packages.

At runtime, it still uses the JS for those packages generated from the
old analyzer-based front end since the kernel-based compiler isn't
complete enough to compile any of those packages yet.

With all of this, if I change a test to:

  import "package:expect/expect.dart";

  main() {
    Expect.equals("a", "b");
  }

Then it compiles but fails at runtime. The compiler is completing, but
the generated code has some bugs. I don't know enough to fix them
myself, but here's what I've found out:

- In _libraryToModule(), the Library we get from kernel has a null
  fileUri, so this returns an empty string. That in turn means the
  generated JS tries to use "$" as the module name.

  Using this works around it temporarily:

      if (moduleName.isEmpty) moduleName = library.name;

- In _emitTopLevelNameNoInterop(), it doesn't handle the case where the
  NamedNode is a static method on a class. It just generates the library
  and method name, skipping the class, so "Expect.equals(1, 2)" gets
  compiled to "expect.equals(1, 2)" instead of
  "expect.Expect.equals(1, 2)".

Change-Id: I6bd9d98bc9706965160d8fb7cf70b20eeebab3a8
Reviewed-on: https://dart-review.googlesource.com/16687
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2017-10-27 21:25:58 +00:00
Jenny Messerly 5a4100b595 add a workaround to async/await for DDC's ignore cast fail unsoundness
Change-Id: Ic5e58d31b6b5d46bf74a3c7363e19fca239cdc21
Reviewed-on: https://dart-review.googlesource.com/17040
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2017-10-27 20:12:39 +00:00
Jenny Messerly 77775c5292 Unroll mixins in DDC, so each mixin application is generated
This is for compatibility with Kernel, as well as fixing several bugs,
and generally being a more robust architecture.

This may also perform better than the current design.

Notable fixes include several issues around deferred classes.

Change-Id: I1b6f44ebdf6304b10b47d19026156a25e04146ef
Reviewed-on: https://dart-review.googlesource.com/16337
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2017-10-27 04:26:44 +00:00
Jenny Messerly 07f189703a Optimize DDC's async/await code to avoid unnecessary zone registration
Other improvements:
* avoids an extra intermediate future in `async`, and unnecessary type tests
* uses optimized type tests instead of older isSubtypeOf
* avoids an extra closure for async/async*
* avoids Function.apply for async/async*/sync*
* avoids an extra cosure for sync* if the arguments are not modified

Change-Id: I897708387fce59a97696f05b01cc668f1043fe5c
Reviewed-on: https://dart-review.googlesource.com/16332
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2017-10-27 01:07:04 +00:00
Vijay Menon 4f9f77aedc Remove dcall in dart:convert
Seeing this in the hot path on an internal app.

Change-Id: I921f12ece706b4ea92d9a97858fde2799972f653
Reviewed-on: https://dart-review.googlesource.com/15940
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2017-10-25 18:28:06 +00:00
Bob Nystrom 67ca95fc2c Support different module formats in dartdevk.
Change-Id: I0683c1bdaa5e67332d67f9ec84052851b4b0c649
Reviewed-on: https://dart-review.googlesource.com/15760
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2017-10-20 23:25:08 +00:00
Bob Nystrom 9c0a6fd27c Add rudimentary support for dartdevk to test.dart.
It's added as a new compiler, so pass "-c dartdevk" to use it.

It doesn't support any test packages yet, so tests that, say, import
package expect won't compile. I'll work on that next, but it will
require adding some stuff to the build scripts to build .dill files for
those packages.

This does get test.dart invoking the compiler, running the resulting
test, and correctly reporting the result:

- A test that doesn't throw an exception and stays within the bounds of
  what is currently implemented in dartdevk passes.

- A test that compiles correctly but fails at runtime fails with a
  RuntimeError.

- A test that contains a compile error fails with a non-zero exit code
  and is reported as a CompileTimeError.

Change-Id: Icacbf1ff54dfe7aa4d245382d3b0aeb375cf105b
Reviewed-on: https://dart-review.googlesource.com/15420
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2017-10-20 16:00:28 +00:00
kmillikin 95982b53cd [ddc-kernel] Compile return and arrow functions
Compile return statements.  Kernel function bodies are statements, not
necessarily blocks.  In that case, blockify the JS function body.

Bug:
Change-Id: Ibbed1c2039b103151b7244774f3daf8992264a88
Reviewed-on: https://dart-review.googlesource.com/15280
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2017-10-19 20:58:37 +00:00
Leaf Petersen dd17a4c7f7 Alpha-vary generic function types before performing inference.
Generic function types were not previously renamed before using them
for inference, which resulted in capture problems when doing inference
on recursive generic method invocations.

Fixes #30980

Bug:
Change-Id: I1c610606dd65d86735cb615e077d720066a85e1a
Reviewed-on: https://dart-review.googlesource.com/15040
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2017-10-19 19:26:07 +00:00
Jenny Messerly 4234e18593 workaround fasta test incorrectly analyzing DDC code
pkg/front_end/test/fasta/analyze_test is incorrectly failing because of DDC changes.
This must be fixed, but in the meantime this works around it.

Change-Id: I72fd56f9b306dce9b1f34e810c6ece3f6d8f49fb
Reviewed-on: https://dart-review.googlesource.com/14342
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2017-10-17 00:26:22 +00:00
Jenny Messerly ef3ac59dd6 add a dartdevk command that compiles with the new front end
This ports a fairly large part of DDC's Analyzer-based code generator,
however most nodes are not supported yet.

The goal is to preserve all functionality of code that was ported,
except for deprecated features (e.g. mirrors, fuzzy arrows, libraryRoot).

Change-Id: I3b10d5773c7c10a740fa336720243b03c6b82529
Reviewed-on: https://dart-review.googlesource.com/10705
Reviewed-by: Vijay Menon <vsm@google.com>
2017-10-16 21:13:52 +00:00
Jennifer Messerly 697e531c17 fix IdentityMap setter concurrent modification detection
Change-Id: Ib999210cf5709a4cef6a14a8d7fafe7b516f09c9
Reviewed-on: https://dart-review.googlesource.com/13641
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2017-10-13 20:57:24 +00:00
Vijay Menon 0553e2ba15 Regen DDC SDK
TBR=rnystrom@google.com

Change-Id: I4406552de08e379cac8a75f9c8e0e353dd927a21
Reviewed-on: https://dart-review.googlesource.com/13440
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2017-10-12 04:07:05 +00:00
Jennifer Messerly 8c36b4685f fix #31049, fix #31050, avoid name collision for static members
Change-Id: I5a14315b99ace15aa6ac0c67f753bc3e1f39b3a9
Reviewed-on: https://dart-review.googlesource.com/12481
Commit-Queue: Jennifer Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2017-10-11 21:00:02 +00:00
Vijay Menon 4917131ff4 Regen DDC sdk
TBR=rnystrom@google.com

Change-Id: I58e832edd16bd6b864eadb27b91dc3645be13e90
Reviewed-on: https://dart-review.googlesource.com/13001
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2017-10-11 15:19:10 +00:00
Vijay Menon c1d45769c3 Inline constant values
Change-Id: Iee929bc64c152be989e6e7ba38132f806c33c7e0
Reviewed-on: https://dart-review.googlesource.com/11960
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Jennifer Messerly <jmesserly@google.com>
2017-10-10 13:21:41 +00:00
Jennifer Messerly 32eb7e3612 fix #30944, mark specific nodes with source information
This change fixes bugs that users see when we mark declaration code,
while also reducing the source map size (improving startup & reducing
the load on devtools). The SDK source map is reduced by 41%.

Stack traces and stepping should be more accurate after this change, but
if we identify any node(s) that need different marking, we now have
the tools to refine it further.

Change-Id: Ie50c6aca873be7b7c0f7c238a9db2001acbceb5c
Reviewed-on: https://dart-review.googlesource.com/10210
Commit-Queue: Jennifer Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Alan Knight <alanknight@google.com>
2017-10-10 03:40:40 +00:00
Jennifer Messerly c05a4439bc fix DDC handling of @notNull annotation for ?. method calls
Change-Id: I9be22e126ff32c16a90fc85e3d754258e9fc98c3
Reviewed-on: https://dart-review.googlesource.com/12344
Reviewed-by: Vijay Menon <vsm@google.com>
2017-10-10 00:35:31 +00:00
Vijay Menon 05619da8ea Optimize String.length
Change-Id: I7e8481c8822d170492112704e04b92b19d5e5f2e
Reviewed-on: https://dart-review.googlesource.com/12340
Reviewed-by: Jennifer Messerly <jmesserly@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2017-10-10 00:22:36 +00:00
Vijay Menon a7e5d104bf Fill array on allocation
Fixes #31002

Change-Id: Idaee4ca544e567b4239098c852a040128e6b5d82
Reviewed-on: https://dart-review.googlesource.com/11242
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Jennifer Messerly <jmesserly@google.com>
2017-10-05 20:04:24 +00:00
Jennifer Messerly 3a79c35f3c optimize maps/sets in DDC, fixes #29865
- string/int keys use identity maps
- construct the correct type rather than relying on factory constructors when possible
- checks if key has identity semantics and use that when possible
- avoid helper calls/casts/etc in implementations
- use native ES6 Map/Set key order tracking
- optimized constructor for map literals
- fixes #30466, const maps are now canonicalized correctly

Change-Id: Id44acf3d9bf8cb153a4755aa28df08fe91bfc633
Reviewed-on: https://dart-review.googlesource.com/8167
Reviewed-by: Vijay Menon <vsm@google.com>
2017-10-04 19:04:27 +00:00
Vijay Menon d6582a9d1b Use unique proto object for each library object
This appears to	 improve Gabriel's is-check benchmark by 2x and
DeltaBlue by about 30% (DDC on d8-tip).

I suspect this is improving inlining of top-level accesses on library
objects (including helpers like dart.is).

Change-Id: I1629d821b481194075a80dd6858334c1f678dd12
Reviewed-on: https://dart-review.googlesource.com/7446
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2017-10-04 18:06:59 +00:00
Vijay Menon d22557b560 Regen DDC SDK
TBR=rnystrom@google.com

Change-Id: I50cb06235bb5f9a0bd8cae8e7cc6500c33c812c2
Reviewed-on: https://dart-review.googlesource.com/10703
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2017-10-03 21:49:21 +00:00