Rationale:
catch (e) had a very interesting shadowing
with math's constant e, which unintentionally
allowed exeption text to enter the divergence
mechanism; here we were fuzzing the fuzzing
really :-)
https://github.com/dart-lang/sdk/issues/36916
Change-Id: Ie5cd61755ea61921b903684532d404f4dc734edd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102062
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
The stack slot in question may contain a stale value, but it could
be scanned by GC, so the fix is to clean it up even if it looks
unused.
While debugging I saw bytecode PCs in that stack slot.
So it is likely that compact bytecode instructions (68de477535)
increased the probability of these crashes, as with compact bytecodes
PCs could be unaligned and treated as Dart objects by GC, while
previously PCs were always aligned and treated as Smis by GC,
effectively masking the failure.
Fixes https://github.com/dart-lang/sdk/issues/36909
Change-Id: I82ccaa2bd87aca4ca4b44c9db69b0efd18dad955
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102061
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This is the first of several CLs that move error tokens to the head
of the token stream so that parser handling of error tokens
can be simplified and less error prone.
In this particular CL:
- update parser to handle error tokens at the head of the token stream
- remove several places that analyzer was preprocessing error tokens
now that the parser handles them
Change-Id: Iddf60ab2879567a345a692b64043bd42f1871947
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102040
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
This feature was for Goma work that has been marked obsolete.
Bug: FL-48
Change-Id: I9997f8aefbe1d55f86cff2ab377166a0bce1ed53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101925
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
There might be some false negatives, when there *is* another top-level
declaration with the same name as we are removing. But this is a
pre-existing conflict, so I think we should not be very concerned. At
some point we might collect initial potentially conflicting names using
the same SyntacticScopeNamesCollector instead of element model. With
element model we don't know about parser recovery.
R=brianwilkerson@google.com
Bug: https://github.com/dart-lang/sdk/issues/36890
Change-Id: Ia05db299990f41f16feb493c2812237be84f3d2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101902
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
In a follow-up CL I will add nullability support to the summary
linker.
Change-Id: I99f3dce1a695da65c7c09c11e73462c93aeb637f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101882
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
And plumb FeatureSet into more of the analysis engine.
Change-Id: I40f7061d48c5eb2a597f95a32738bd3133fe21d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101224
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Bytecode format v3 landed March 26 2019 in
61f0f5bc43
Change-Id: Id20742e1e04fa53ed4420ec0233302477db0e4be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101880
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
To test the loading logic, I created sample modular test folders which also
illustrate what modular tests will look like in the future.
Change-Id: Iaa8e076e5be66107391d258f5c72456c89841123
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101780
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
In the long term this class will take over much of the role played by
RestrictedAnalysisContext. For now it is simply a container for the
analysis options, declared variables, type provider, and type system.
In follow-up CLs I will plumb this object through various parts of the
analyzer, especially the LinterContext; this will enable the
canBeConst... methods to be moved into SynchronousSession, and that
will allow us to stop creating a LinterContext in
BestPracticesVerifier.
Change-Id: I7ac2d386c10d2e5339d9715848b185c163e1f858
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Change-Id: I2053afe2ebf05b5ff10de72757fc83ffc81d1590
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101862
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
document.registerElement is going away soon, and dart2js never implemented window.customElements.define.
Replace the inheritance with composition for each FooElement.
When used to create a DOM tree, replace `new FooElement()` with `new FooElement().element`.
In CSS, replace each custom element selector with a class selector, i.e. `foo-element` with `.foo-element`.
Bug: https://github.com/dart-lang/sdk/issues/34107
Change-Id: Id5ab5b6104a6165a8ad3b01d73ee9d76e46024ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101061
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
While adding support for new compact bytecode instructions,
VM also keeps support for old bytecode instructions to preserve
backwards compatibility and allow soft transition.
This change is separate from bytecode generator changes in order
to test VM with old bytecode generator.
Corresponding bytecode generator changes:
https://dart-review.googlesource.com/c/sdk/+/99400
Change-Id: Icf5ceee7d51f27ffe3f79d0eae81e0ddc0a7e855
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101062
Reviewed-by: Ryan Macnak <rmacnak@google.com>
This is a preliminary refactoring to prepare for compact
variable-length encoding of bytecode instructions.
Change-Id: I7b15926ab5a6222fbcd1f0090adc0b7222359b07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99960
Reviewed-by: Ryan Macnak <rmacnak@google.com>
* Fix possible race condition when flushing `stdout` and `stderr`.
* Add help option and usage text (saves me from digging into the file when I
forget a flag).
* Avoid passing `enable-experiment` with an empty string.
Change-Id: Iea288a1fad43f16c494510302efbcc65a2d91502
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101744
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
It already is a static method in implementation, so this way
we don't duplicate the work of looking up the library. In addition,
it checks has_pragma, so we don't need to check before calling it.
Change-Id: I88281cf22615e30157c842c570bd0f6b499a6a3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101821
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
To use for modular codegen. Creates ModularName and ModularVariableUse
for naming decisions that need to be deferred to world-impact application
time.
The class is still unused, awaiting refactoring of world-impact application.
Change-Id: I7d4d30da587ccf814b2d879b26f76de2eb3ca276
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101525
Reviewed-by: Sigmund Cherem <sigmund@google.com>
- to use in ssa builder, optimization and codegen pipeline.
Change-Id: I214c17d5994aa0afa86007b2c3add1491c000b08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101521
Reviewed-by: Sigmund Cherem <sigmund@google.com>