Regis Crelier
3633c5bd5e
Rename Closure instance field type_arguments_ to instantiator_.
...
Simplify handling of closures as deferred objects.
The name "type_arguments_" is confusing, because class Closure is not generic.
Class Closure was forcefully made (kinda) generic by setting its
type_arguments_field_offset_in_words_ field to a valid value, so that the
type_arguments_ field in closure instances could be accessed similarly as in
generic instances. With generic functions, closures will potentially have more
than one instantiator and the name type_arguments_ becomes nonsensical.
R=johnmccutchan@google.com
Review-Url: https://codereview.chromium.org/2719603002 .
2017-02-27 11:14:04 -08:00
Florian Schneider
15a4d5d6d1
Windows: Link library sources into gen_snapshot/dart_bootstrap
...
This allows gen_snapshot and dart_bootstrap to run without having
a full SDK snapshot around.
The generated cc file looks like:
static const char source_array_1[] = {
'\x2f', '\x2f', '\x20', '\x43', '\x6f', ...
};
static const char source_array_2[] = {
'\x2f', '\x2f', '\x20', '\x43', '\x6f', ...
};
...
const char* dart::Bootstrap::core_source_paths_[] = {
"dart:core",
"/path/to/sdk/lib/core/core.dart",
source_array_1,
"annotations.dart",
"/path/to/sdk/lib/core/annotations.dart",
source_array_2,
...
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2668353004 .
2017-02-01 15:55:59 -08:00
Kevin Millikin
d9f80a9ac1
Turn the VM's dart:typed_data into a patch
...
Before, the VM's dart:typed_data was a complete replacement of the SDK's
dart:typed_data implementation instead of a patch. This is unlike all
the other SDK libraries. This difference requires special-casing for
dart:typed_data in tools that handle the SDK libraries (e.g., the
Analyzer's patching support, the GN build).
This change makes dart:typed_data back into a patch to the SDK's
implementation. It reintroduces a distinction between abstract
interface and concrete implementation classes, so there are more
classes.
BUG=
R=fschneider@google.com , vegorov@google.com
Committed: https://github.com/dart-lang/sdk/commit/a9b906d319c32525a0600c75c008c92753591d86
Review-Url: https://codereview.chromium.org/2571563005 .
2016-12-22 10:57:21 +01:00
Kevin Millikin
f97440848f
Revert "Turn the VM's dart:typed_data into a patch"
...
This reverts commit a9b906d319 .
A lot of things were broken by the changes to implementation class
names.
BUG=
Review-Url: https://codereview.chromium.org/2598603002 .
2016-12-21 12:28:33 +01:00
Kevin Millikin
a9b906d319
Turn the VM's dart:typed_data into a patch
...
Before, the VM's dart:typed_data was a complete replacement of the SDK's
dart:typed_data implementation instead of a patch. This is unlike all
the other SDK libraries. This difference requires special-casing for
dart:typed_data in tools that handle the SDK libraries (e.g., the
Analyzer's patching support, the GN build).
This change makes dart:typed_data back into a patch to the SDK's
implementation. It reintroduces a distinction between abstract
interface and concrete implementation classes, so there are more
classes.
BUG=
R=fschneider@google.com
Review-Url: https://codereview.chromium.org/2571563005 .
2016-12-21 08:34:52 +01:00
Siva Annamalai
93043a3662
Set the default value for use_corelib_source_files to true on windows as we do not have the source bits baked in.
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/2522943004 .
2016-11-23 11:09:25 -08:00
Siva Annamalai
7d287b232b
Add flag use_corelib_source_files to control how dart_bootstrap and gen_snapshot load core libraries during the boot strap process. If this flag is true then an attempt is made to read the core library sources files and if not present fallsback to the source bits baked in the binary.
...
By default the flag is false.
BUG=#27860
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/2527693002 .
2016-11-23 10:26:06 -08:00
Martin Kustermann
1aff626804
VM: [Kernel] Split kernel API into 3 steps: ([read binary], parse-binary, bootstrap, load program)
...
This avoids reading and parsing the kernel binary multiple times and avois
having it multiple times in memory (we don't free the 'kernel::Program*' object
ATM).
R=kmillikin@google.com
Review URL: https://codereview.chromium.org/2525623002 .
2016-11-23 09:26:15 +01:00
Martin Kustermann
63af3f56ee
VM: [Kernel] Cherry-pick from dart-lang/kernel_sdk
...
Fix a trio of issues in type finalization.
1. We were using is_type_finalized to detect classes that had already been
initialized by DilReader::ReadPreliminaryClass. This state is not
guaranteed by this function, however is_cycle_free is.
2. In the VM, classes that were created type finalized were not marked as
cycle free because finalization did not consider them so cycle-freeness
didn't matter. We would therefore try to initialize these classes with
DilReader::ReadPreliminaryClass and mutate types in them. This causes
them to have unfinalized types but still have is_type_finalized true.
3. Types in top-level procedures were not necessarily finalized. A simple
way to achieve this is to finalize each library's top-level class.
Review URL: https://chromereviews.googleplex.com/520437013 .
R=kmillikin@google.com
Review URL: https://codereview.chromium.org/2514373002 .
2016-11-21 16:38:30 +01:00
Jens Johansen
63e9c7641b
Merge of source position information from kernel-sdk.
...
I.e. use offsets (on some nodes) in the dill file to
get stacktraces with line- and column numbers.
"sdk" version of "kernel-sdk"s
https://chromereviews.googleplex.com/520617013/
R=kmillikin@google.com
Review URL: https://codereview.chromium.org/2512653002 .
Committed: https://github.com/dart-lang/sdk/commit/6fd3a42edb4c7902a49811318de6bb6b18dbd829
2016-11-21 14:13:46 +01:00
Jens Johansen
1056c562aa
Revert "Merge of source position information from kernel-sdk."
...
The commit broke 2 tests:
vm/cc/IsolateReload_TypeIdentityGeneric
vm/cc/SourceReport_Coverage_AllFunctions_ForceCompile
This reverts commit 6fd3a42edb .
BUG=
Review URL: https://codereview.chromium.org/2517953002 .
2016-11-21 11:16:29 +01:00
Jens Johansen
6fd3a42edb
Merge of source position information from kernel-sdk.
...
I.e. use offsets (on some nodes) in the dill file to
get stacktraces with line- and column numbers.
"sdk" version of "kernel-sdk"s
https://chromereviews.googleplex.com/520617013/
R=kmillikin@google.com
Review URL: https://codereview.chromium.org/2512653002 .
2016-11-21 10:19:31 +01:00
Vyacheslav Egorov
8b123831e5
VM: Fix libdart_lib_nosnapshot_precompiled_runtime build target.
...
TBR=zra@google.com
Review URL: https://codereview.chromium.org/2508923002 .
2016-11-16 16:11:09 +01:00
Vyacheslav Egorov
23fd1a184b
VM: Support bootstrapping core libraries from Kernel binaries instead of source.
...
BUG=http://dartbug.com/27590
R=asiva@google.com
Review URL: https://codereview.chromium.org/2485993002 .
2016-11-16 13:56:20 +01:00
Zachary Anderson
630d24bec8
clang-formats remaining files and adds a presubmit check.
...
R=asiva@google.com , johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2483363002 .
2016-11-09 12:43:57 -08:00
Vyacheslav Egorov
6dce6e87f8
Reduce amount of boilerplate associated with bootstrap libraries.
...
R=fschneider@google.com
BUG=
Review URL: https://codereview.chromium.org/2493473002 .
2016-11-09 16:38:50 +01:00
Zachary Anderson
a1bcf051d8
clang-format runtime/vm
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2481873005 .
2016-11-08 13:54:47 -08:00
Ivan Posva
b2ac279269
- Use a map to lookup libraries by URL.
...
- Ensure the uniqueness of private keys without having to
search the existing key space.
- Pass a thread parameter where useful to library methods.
BUG=
Review URL: https://codereview.chromium.org/1947393003 .
2016-05-05 10:42:28 -07:00
Ivan Posva
5be5d54529
- Refactor Symbol allocation to expect a thread parameter.
...
- Preallocate all tokens as symbols to avoid repeated lookups.
- Pass thread/zone where useful while doing this change.
- Avoid allocating symbols for error messages.
BUG=
R=fschneider@google.com
Review URL: https://codereview.chromium.org/1870343002 .
2016-04-11 16:28:29 -07:00
Florian Schneider
f3de2377ab
Move the VM's typed_data implementation to runtime/lib.
...
This removes the additional indirection to the VM's implementation
for all the factory constructors.
Additionally, it removes one class per typed data list type, thus reducing
snapshot and generated code size.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1790593002 .
2016-03-21 13:39:49 +01:00
Siva Annamalai
f7d2b2e31e
- Fix for issue 25950 (add registration of a thread exit callback)
...
- Moved some of the file and entropy callbacks to class Dart from
class Isolate as they are not isolate specific.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1807293002 .
2016-03-17 13:40:20 -07:00
Srdjan Mitrovic
71419cc089
Eagerly finalize bool class, before bool constants are used in the compiler.
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1808523002 .
2016-03-15 15:55:52 -07:00
John McCutchan
8266501a72
Remove mirrors in product mode
...
(stripped) dart_product before: 5307888
(stripped) dart_product after: 5232976
Reduction in size: 74912 bytes.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1712843002 .
2016-02-22 09:55:20 -08:00
Siva Annamalai
e72c1fb47d
Implement safepointing of threads :
...
- uses thread execution status transition to track when a thread is in a safepoint or needs to block for a safepoint
- introduces a monitor per Thread object
- uses a per thread safepoint handshake between the thread requesting a safepoint and the requested thread.
The ThreadRegistry class now contains only the thread list for an isolate and the functionality of scheduling a thread onto an Isolate and unscheduling it from teh isolate. We could fold this functionality into the Isolate class in a different CL.
R=rmacnak@google.com , zra@google.com
Review URL: https://codereview.chromium.org/1541073002 .
2016-02-01 10:57:34 -08:00
Regis Crelier
7f57ebcfa1
Remove signature classes from the VM.
...
They were used as the class of closure instances and as the type class of
function types.
All closure instances now have class _Closure and function types are represented
by a new class FunctionType extending AbstractType.
Fix issue 24567 and add regression test.
R=asiva@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org/1584223006 .
2016-01-19 16:32:59 -08:00
Siva Annamalai
01b69ebabc
Move ApiLocalScope out of class ApiState into class Thread so that the API local handles and zone etc. are thread specific instead of being Isolate specific.
...
R=zra@google.com
Review URL: https://codereview.chromium.org/1473403003 .
2015-11-25 11:07:22 -08:00
Ivan Posva
d97c7bdbde
- Include sources in gen_snapshot and dart_no_snapshot to allow
...
creating full snapshots without having a full Dart SDK checkout.
BUG=
R=asiva@google.com , chinmaygarde@google.com
Review URL: https://codereview.chromium.org/1449163003 .
2015-11-17 14:58:09 -08:00
Florian Loitsch
be025b8412
Revert "Remove deprecated dart:profiler library"
...
This reverts commit 535a9715ac .
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1415843008 .
2015-11-04 01:59:53 +01:00
Srdjan Mitrovic
5039117f50
Remove isolate parameter when allocating handles
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1401643002 .
2015-10-12 15:51:06 -07:00
John McCutchan
4831a1a315
Properly split dart:_vmservice across sdk and runtime
...
- This is needed to satisfy the GN build system (mojo, flutter).
- It also makes dart:_vmservice even more regular with othe rlibraries.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1396603002 .
2015-10-07 13:19:55 -07:00
John McCutchan
535a9715ac
Remove deprecated dart:profiler library
...
Fixes #24510
R=turnidge@google.com
Review URL: https://codereview.chromium.org/1398433002 .
2015-10-07 10:01:33 -07:00
John McCutchan
af0ab36f7c
Make dart:_vmservice a proper builtin library
...
- Drops custom resource table for sources.
- Stops loading dart:vmservice library by sources.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1387043002 .
2015-10-06 07:58:14 -07:00
Ivan Posva
4bd7cdc75c
- Ensure that HandleScope is initialized with a thread. (Remove
...
deprecated isolate based API.)
- Update all code impacted by this change. E.g. DARTSCOPE
- TEST_CASE now passes the current thread as a parameter to the unit test.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//1310463005 .
2015-09-01 17:18:55 -07:00
Siva Annamalai
228e0877a7
Use Object::null_instance and Object::null_function and do not create Handles everytime.
...
BUG=
R=hausner@google.com
Review URL: https://codereview.chromium.org//1289813005 .
2015-08-13 10:57:18 -07:00
Siva Annamalai
b9b5a05265
Fix for bug 23484 (obscure error when a compilation error happens during Object::Init())
...
BUG=23484
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//1135173008
2015-05-19 11:19:21 -07:00
John McCutchan
6e42aec4f6
Deprecate 'dart:profiler' and move functionality to 'dart:developer'
...
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//1133713006
2015-05-18 11:31:20 -07:00
johnmccutchan@google.com
f01c1490f7
Revert 45783
...
BUG=
Review URL: https://codereview.chromium.org//1138993005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45784 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-14 00:32:32 +00:00
johnmccutchan@google.com
95515238cc
Move 'dart:profiler' contents into 'dart:developer' and remove 'dart:profiler'
...
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//1139503002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45783 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-13 23:48:04 +00:00
johnmccutchan@google.com
1f851efdbb
Rename 'dart:debugger' to 'dart:developer'
...
- Rename 'dart:debugger' to 'dart:developer'
- Make 'breakHere' and 'breakHereIf' top level functions.
R=iposva@google.com
Review URL: https://codereview.chromium.org//1132113002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45658 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 21:24:57 +00:00
johnmccutchan@google.com
a19cd071e5
Add 'dart:debugger' library
...
- Add the 'dart:debugger' library.
- Add the 'Debugger' class.
- Add explicit Dart breakpoint triggered by a call to: Debugger.breakHere();
- Add Debugger.breakHereIf(bool expr)
R=hausner@google.com , turnidge@google.com
Review URL: https://codereview.chromium.org//1116263004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45529 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-05 17:05:37 +00:00
zra@google.com
0219bdb81a
Regularize naming to make BUILD.gn files easier to write.
...
Review URL: https://codereview.chromium.org//703693002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41510 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-04 22:03:57 +00:00
regis@google.com
874324c411
Do not eagerly compile the function implementation class in case of an error.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//605493002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40646 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-24 20:28:33 +00:00
asiva@google.com
0d5f816a4c
Skip compilation of signature classes.
...
R=regis@google.com
Review URL: https://codereview.chromium.org//569313002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40273 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-15 20:25:19 +00:00
hausner@google.com
4258c115b4
Handle load errors in deferred code
...
IO errors on the URL of a deferred library are forwarded to the Future
that handles the deferred load. Syntax errors and finalization errors
are lethal, killing the isolate.
Review URL: https://codereview.chromium.org//419103003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38800 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-31 21:09:33 +00:00
asiva@google.com
97b903c665
Fix for issue 19817
...
- do not try to finalize classes on every Dart API call which could
potentially result in calls to dart code
- Invoke Dart_FinalizeLoading after all loads are done to ensure that
classes are finalized
R=hausner@google.com
Review URL: https://codereview.chromium.org//411633002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38471 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-22 20:08:15 +00:00
hausner@google.com
4eac05607f
Lazy loading of deferred libraries
...
Defer reading of source code of deferred libraries until the
Dart code executes the loadLibrary() call.
R=iposva@google.com
Review URL: https://codereview.chromium.org//328923002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37334 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-13 22:43:31 +00:00
johnmccutchan@google.com
8f0056371d
Initial UserTag and dart:profiler library
...
R=asiva@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//230863005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34949 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 22:32:45 +00:00
asiva@google.com
29de1e8e59
Enter and Exit scope when calling into the native library tag handler
...
instead of relying on an outer enclosing scope.
R=hausner@google.com
Review URL: https://codereview.chromium.org//141803019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32346 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-05 23:42:06 +00:00
lrn@google.com
3b3e87cabc
Revert "Rename internal library dart:_collection-dev to dart:_internal."
...
Dartium needs updating too.
Committed: https://code.google.com/p/dart/source/detail?r=31827
R=floitsch@google.com
Review URL: https://codereview.chromium.org//133273011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31877 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-16 12:06:38 +00:00
lrn@google.com
ead87f47e9
Revert "Rename internal library dart:_collection-dev to dart:_internal."
...
Dartium needs updating too.
Review URL: https://codereview.chromium.org//133273011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31827 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-15 12:27:44 +00:00