We currently use a mix of C standard includes (e.g. limits.h) and their
C++ variants (e.g. climits). This migrates to a consistent style for all
cases where the C++ variants are acceptable, but leaves the C
equivalents in place where they are required, such as in the embedder
API and other headers that may be used from C.
This patch optimizes C++11 range-based for loops where the variable is
copied in each iteration but it would suffice to obtain it by const
reference. This is only applied to loop variables of types that are
expensive to copy which means they are not trivially copyable or have a
non-trivial copy constructor or destructor.
To ensure that it is safe to replace the copy with a const reference
only the following cases are modified:
* The loop variable is const-qualified.
* The loop variable is not const, but only const methods or operators
are invoked on it, or it is used as const reference or value argument
in constructors or function calls.
This is an application of the internal performance-for-range-copy
clang-tidy analysis.
A number of POSIX methods were renamed on Windows to match standards
requirements, giving deprecation warnings when calling strdup on Windows.
This adds a wrapper, to allow calling _strdup on Windows instead.
Part of #16256
This reverts commit a801e2264fc2f48646d3a3bc2f15a3416e6dc87b. This address the use case of an internal customer. In a subsequent patch, I will add a test for this functionality. Instead of removing support for the same from tonic (along with the stuff surrounding filesystem access and package map handling), I’ll rework the same to use FML to avoid code duplication and maintainability.
This is only used in the command line VM. The only conceivable use of this would
be with IsolateMirror.loadURI which is not supported in Flutter or used in known
embedder API implementations (even ones that use mirrors).
The Android embedder had been using a JNI call to get the observatory URI from
DartServiceIsolate. This call was not thread safe and was redundant with the
server status callback mechanism used on iOS.
Some components in the Flutter engine were derived from the forked blink codebase. While the forked components have either been removed or rewritten, the use of the blink namespace has mostly (and inconsistently) remained. This renames the blink namesapce to flutter for consistency. There are no functional changes in this patch.
- Switch core snapshot to Dart 2 and remove support for loading platform.dill.
- Remove support for loading script snapshots.
- Remove support for loading source.
- Remove settings and fix names to reflect the above.
- Remove support for loading the service isolate from source.
Eliminates support for running directly from sources or script snapshots. In
debug mode, we run from a kernel snapshot; in profile and release modes, we
link in AOT-compiled code.
Renames --dart-non-checked-mode to --disable-dart-asserts since checked mode
does not make sense in Dart 2.
* Roll dart to b298fc6d8f6a0e1aa841dbbdda26663d6012a79a.
Changes since last roll:
```
b298fc6d8f Revert "[kernel] Change dill representation of doubles"
9a7e1f64a2 Revert "Revert "Fix incorrect handling of NSM forwarders and pull all logic into CFE.""
cbca4006f8 fix#30907, add library constants for all SDK libraries
61c226b4ea Only create Goma's analyzer on Linux.
24dd9b4176 Revert "Fix incorrect handling of NSM forwarders and pull all logic into CFE."
bed71b7776 Migrate and clean up the prefix negative tests.
1fcd896ed9 [VM] Avoid deadlock by allowing us to run kernel isolate from a script snapshot, fixes all dartk-sim* builders
0bc6e7217a Update expression compilation expectations.
9038b8f45f CFE support for compiling individual expressions in a context.
7d5025e814 Fix incorrect handling of NSM forwarders and pull all logic into CFE.
e2247e5e00 Put the '@' outside the revision variables.
9381424204 Fix presubmit on Windows. Dart executable is not called .bat
2a8c3515b2 Avoid strong+checked mode: strong mode supersedes checked mode
b7698dcbce Update status for Windows
8baa82413b [infra] Remove --no-preview-dart-2 flag from gardening tools
47e9039512 Don't encode strings up front; don't toString uris
4a0ac85cc3 Update co19 status
ce7329849d Fix build breakages - use platform independent path specification is test so that it works on windows - skip test for precompiled and dartk builds as the test uses spawnUri which is not supported in these modes
ee6351a147 [VM] Set up package config value when invoking the front end for compilation, this should fix issue 32950 "(Isolate.spawnUri() ignores packageConfig argument in Dart 2 mode.'
d1286a367e Strong mode update for swarm
fd27cc3435 Don't store bytes in the file cache.
73abd61304 Re-land "Clean up the use of deprecated API in the analyzer_plugin package".
607f4f5769 [vm] Get more helpful errors from Dart_SetVMFlags and Dart_MakeIsolateRunnable.
f044637c8b [infra] Upgrade checked in SDKs to 2.0.0-dev.52.0
dcf10816aa [infra] Add script that updates checked in SDKs
f8bea2a7e6 dart2js: Register inlined native methods for dump info
7fe8659613 dump-info: Use relative paths for library canonicalUri...
dcf4886500 [frontend-server] Add verbose option.
5087ffa481 [release] Move DDC sync-async flip to correct section in the release notes
fe7056ebaa [release] Update changelog for 2.0.0-dev.52.0
```
* Pick up another revert to fix https://github.com/flutter/flutter/issues/17214 and few more dart commits landed since:
```
4c9b712052 Revert "Don't encode strings up front; don't toString uris"
a1fbf62742 [build] Place 'extern "C"' before __attribute__, as required by gcc.
258c5172df [vm] Remove dart_mirrors_api.h.
384c55c29e Update dartdoc & dependencies to v0.19.0.
```
* fix licenses
* Read core platform kernel file during Dart initialization.
Currently service isolate is initialized from the source code parsed by VM.
This CL changes it so service isolate created during Dart initialization
is created from the kernel platform.dill file if it is present in the application
bundle. Then this platform kernel file is kept in dart_init module and reused
for application sciprt isolates.
* Reformat and merge
* Use accessor method
* Avoid passing running_from_kernel param. Add TODO for cleanup. Rename param.