This moves the hash code into the header word for strings on 64 bit
platforms. With the old layout, 9 character strings became 48-byte
objects. With the new layout you have to go to 17 characters before
you are bumped from 4 to 6 words (32 to 48 bytes).
As a side effect, the class ID field is now 16 bits on all platforms
instead of having two different sizes, and the size field is 8 bits
on all platforms.
This also paves the way for moving the hash code for instance objects
into the header, so we won't need the side-lookup in the
hash-table-of-hash-codes on 64 bit platforms.
This is a reapplication of https://codereview.chromium.org/2893553002/
after issues were fixed in https://codereview.chromium.org/2888413002/
and https://codereview.chromium.org/2896583002/R=vegorov@google.com
BUG=
Review-Url: https://codereview.chromium.org/2895183002 .
We have limited support for folding away length loads from constant
arrays and strings. However we were not folding away loads in code
like:
enum E { V }
isV(flags) => (flags & (1 << E.V.index)) != 0;
Here we would emit load index and shift for mask computation
instead of simply emitting 1.
This change fixes the oversight by enabling folding away loads
of final fields from constants.
This relands the original commit 746ab58f46
with a fix for precompiler crashes: ArgumentError.value constructor is
added to the precompiler roots.
TBR=erikcorry@google.com
Review-Url: https://codereview.chromium.org/2897803002 .
For BinarySmiOpInstr and ShiftMintOpInstr we use range information to both
decide if instruction can deopt and decide which checks should be emitted
when emitting native code for this instruction.
However because range information is attached to the definition and not
uses it often gets out of sync as we mutate the graph. For example we might
first make a decision that an instruction can't deoptimize based on more
precise range information but then use less precise information in the
backend for deciding which parts of the instruction to emit (because
redifinition or a phi-instruction was removed from the graph). This mismatch
can lead to a crash if less precise information tells backend that one of the
inputs need to be checked - because there is no deoptimization label to jump
to.
This CL is addressing this problem by ensuring that range information is
cached at the use and both ComputeCanDeoptimize() and backend use the same
range information.
Additionally this CL kills overly generic MergedMath instruction and replaces it
with TruncDivModInstr.
BUG=https://github.com/dart-lang/sdk/issues/29620R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2891113002 .
This has a few advantages:
- We can track dependencies more precisely
- ninja can assemble things in parallel as they're ready rather than
sequentially all at once.
- It is easier to customize SDKs depending on target platform, e.g.
Fuchsia.
This CL also has a number of cleanups:
- Defining is_fuchsia and is_fuchsia host so we don't always have to check
- Piping through toolchain overrides in more places
- Fixing bugs in copy_tree.py, not using list_files.py, which is broken on Windows
related #29558R=whesse@google.com
Review-Url: https://codereview.chromium.org/2848943003 .
This reverts commit d9e9382373.
There were bot failures on incremental_kernel_generator test and in
incremental_resolved_ast_test, I'm not sure yet why tests passed locally though.
BUG=
Review-Url: https://codereview.chromium.org/2894273002 .
Some details:
- Adds the tree-shaker logic and unit tests for it,
Note: I'm still not clear on what degree of tree-shaking we can get away
with. For now I have a mode to delete anything that is not seen explicitly.
This passes verification for all of our tests so far, but breaks both the
mixin and the async/await transformer in some scenarios.
- Writes a prototype of kernelForBuildUnit (although no automated tests for it
yet).
- Moves a few more pieces to ProcessedOptions
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2893493004 .
These tools are used to support applying source maps to stack traces
and running the Dart dev compiler in the browser as part of an extension.
This CL adds the following files
dart-sdk/lib/dev_compiler/web/ddc_web_compiler.js
dart-sdk/lib/dev_compiler/web/dart_stack_trace_mapper
BUG=
R=rmacnak@google.com, vsm@google.com
Review-Url: https://codereview.chromium.org/2889253002 .
We have limited support for folding away length loads from constant
arrays and strings. However we were not folding away loads in code
like:
enum E { V }
isV(flags) => (flags & (1 << E.V.index)) != 0;
Here we would emit load index and shift for mask computation
instead of simply emitting 1.
This change fixes the oversight by enabling folding away loads
of final fields from constants.
BUG=
R=erikcorry@google.com
Review-Url: https://codereview.chromium.org/2897603002 .