Commit Graph

67 Commits

Author SHA1 Message Date
Ryan Macnak f9a6a5bdd2 [vm] Update NULL to nullptr in runtime/vm.
TEST=build
Change-Id: I2834ef7cf7cb7c8770f8167a2438cbedcee5c623
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292063
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2023-04-10 18:15:12 +00:00
Ryan Macnak 6fe15f6df9 [vm] Represent tagged pointers as C++ value types instead of C++ pointer types.
This works around bugs in UndefinedBehaviorSanitizer and Clang.

Bug: b/28638298
Change-Id: I6be595f9664516019d28017d24559583a1ae3a21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144354
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2020-04-25 05:21:27 +00:00
asiva 30aa464f77 [VM] Remove 'corelib' and 'dart-io' sources generation into C++ arrays
- Remove all code that generates the corelib and dart:io library sources into C++ arrays and link them into dart_bootstrap
- Remove the executable dart_bootstrap and all uses of it
- Remove bootstrap_nolib.cc and builtin_nocore.cc
- Remove the Dart 1 code in core lib bootstrap path

Change-Id: Ifd33496204285a08b42fe09e39428e7a92b416b6
Reviewed-on: https://dart-review.googlesource.com/c/77241
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-10-02 23:27:05 +00:00
Régis Crelier 12b33ada44 [VM interpreter] Support NativeCall kernel bytecode.
Change-Id: I89c905d17fb48447239ee4b0c1c8c50060239b88
Reviewed-on: https://dart-review.googlesource.com/59560
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-06-13 23:30:44 +00:00
Ryan Macnak a5c11d7d03 [vm] Remove Dart_ReadKernelBinary, take 2.
Update status for simulators, which the test harness invokes with DIL files instead of source files.

Change-Id: I8444ad7e17a0a71a1ce3c0021487397baa1c3e65
Reviewed-on: https://dart-review.googlesource.com/54622
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2018-05-14 20:58:08 +00:00
Ryan Macnak 407872b9e5 Revert "[vm] Remove Dart_ReadKernelBinary."
This reverts commit 2998c32951.

Reason for revert: Failures with kernel + simulators

Original change's description:
> [vm] Remove Dart_ReadKernelBinary.
> 
>  - Fix const-ness of Dart_FileReadCallback and callers.
>  - Fix leak on read error in DartUtils::FileRead.
> 
> This is progress towards sharing kernel memory on Fuchsia.
> 
> Bug: https://github.com/dart-lang/sdk/issues/32618
> Change-Id: I47f8b224905d6a105a5ca0ab2ee4ab6a42b5e342
> Reviewed-on: https://dart-review.googlesource.com/47102
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=aam@google.com,rmacnak@google.com,asiva@google.com

Change-Id: Ibb636b817de1629a062fe0a6ef9462a2fef669ef
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/32618
Reviewed-on: https://dart-review.googlesource.com/54560
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-10 01:36:39 +00:00
Ryan Macnak 2998c32951 [vm] Remove Dart_ReadKernelBinary.
- Fix const-ness of Dart_FileReadCallback and callers.
 - Fix leak on read error in DartUtils::FileRead.

This is progress towards sharing kernel memory on Fuchsia.

Bug: https://github.com/dart-lang/sdk/issues/32618
Change-Id: I47f8b224905d6a105a5ca0ab2ee4ab6a42b5e342
Reviewed-on: https://dart-review.googlesource.com/47102
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-05-10 00:35:37 +00: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
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
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
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 103881d01c Make header include guards great again
i.e. #ifndef VM_WHATEVER -> #ifndef RUNTIME_VM_WHATEVER

This lets us remove a hack from the PRESUBMIT.py script that existed
for reasons that are no longer valid, and sets us up to add some
presubmit checks for the GN build.

R=asiva@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org/2450713004 .
2016-10-26 00:26:03 -07: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
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
John McCutchan d7450e43fb Update GN build files for Mojo roll
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org//1142293007
2015-05-22 11:32:14 -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
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
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
lrn@google.com 0098710559 Rename internal library dart:_collection-dev to dart:_internal.
BUG= http://dartbug.com/14140
R=floitsch@google.com

Review URL: https://codereview.chromium.org//133893007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31823 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-15 09:24:46 +00:00
whesse@google.com 3b54950144 Remove dart:platform library.
This reverts commits r29154, r29244, r29251, r29268, and r29272.
The dart:io Platform class will not be moved to a dart:platform library.

R=ajohnsen@google.com

Review URL: https://codereview.chromium.org//50573002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29435 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 11:33:34 +00:00
ajohnsen@google.com 28efa85e19 Add empty dart:platform library.
dart:platform will be a library that contains information about the runtime
platform. While it's not written in stones, this is examples of properties that
may be queried:

- OS
- Browser
- Browser version
- Dart Version
- numberOfProcessors
- pathSeparator
- Native or JS VM

BUG=
R=ahe@google.com, asiva@google.com, floitsch@google.com, iposva@google.com, kasperl@google.com

Review URL: https://codereview.chromium.org//32683002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29154 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 06:56:36 +00:00
lrn@google.com 6764a2462c Made old dart:json library use convert to parse JSON.
Make convert library use "null" as marker for top-level value in reviver calls.
Moved JSON implementation into convert_patch files.
Move error classes into convert library, and reexport from dart:json.

R=floitsch@google.com

Review URL: https://codereview.chromium.org//23554004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26767 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 07:56:12 +00:00
asiva@google.com b4d9e0d620 Auto create ApiLocalScope before calling native functions, this ensures that
native functions do not have to call Dart_EnterScope/Dart_ExitScope
when they callback into the VM.

Remove Dart_EnterScope/Dart_ExitScope calls around native functions in 'bin'
directory.

R=regis@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org//22303002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25827 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-06 19:27:48 +00:00
floitsch@google.com f601233af9 Remove dart:codec and move classes into dart:convert.
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//19941002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25267 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-22 12:25:16 +00:00
floitsch@google.com b0913f7894 First version of Codecs and Converters.
No chunked conversions, yet.

R=asiva@google.com, lrn@google.com

Review URL: https://codereview.chromium.org//19000006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24999 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-15 10:26:38 +00:00
sgjesse@google.com bb6d8c6d20 Remove library dart:crypto
Moved the contnet of dart:crypto to the package pkg/crypto.

R=dgrove@google.com, floitsch@google.com, iposva@google.com, nweiz@google.com
BUG=

Review URL: https://codereview.chromium.org//15820008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23322 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-29 07:29:29 +00:00
sgjesse@google.com 9d6a64e81b Merge the dart:uri library into dart:core and update the Uri class
This merges the dart:uri library into dart:core removing the dart:uri library. Besides moving the library the Url class has been changed.

* Removed existing Uri constructor as it was equivalent with Uri.parse
* Remamed constructor Uri.fromComponents to Uri
* Moved toplevel function encodeUriComponent to static method Uri.encodeComponent
* Moved toplevel function decodeUriComponent to static method Uri.decodeComponent
* Moved toplevel function encodeUri to static method Uri.encodeFull
* Moved toplevel function decodeUri to static method Uri.decodeFull
* Rename domain to host
* Added static methods Uri.encodeQueryComponent and Uri.decodeQueryComponent
* Added support for path generation and splitting
* Added support for query generation and splitting
* Added some level of normalization

R=floitsch@google.com, lrn@google.com, nweiz@google.com, scheglov@google.com
BUG=

Review URL: https://codereview.chromium.org//16019002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23266 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-28 13:35:01 +00:00
asiva@google.com 4577abd566 Third step towards loading core library scripts directly from the sources
- Read the patch source files using the source mapping array generated for
  patch files instead of relying on a generated buffer containing the sources.

- Modify the gyp files to ensure that all patch libraries are read directly
  from the sources. Remove the source buffer generation step in the gypi
  files for all patch files.

R=hausner@google.com, iposva@google.com

Review URL: https://codereview.chromium.org//14784010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22436 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-06 18:16:25 +00:00
asiva@google.com ea5a3919c5 Resubmit 22380 after fixing the windows build.
R=hausner@google.com

Review URL: https://codereview.chromium.org//14645025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22396 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 22:50:26 +00:00
asiva@google.com dab8758e7a Revert 22380 to investigate windows build break.
Review URL: https://codereview.chromium.org//14927003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22382 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 18:26:34 +00:00
asiva@google.com 27e78fb6f8 Second step towards loading core library scripts directly from the sources
- Modify the library source generator to generate a source mapping array
  The generated array is of the following format:
  const char* dart::Bootstrap::corelib_source_paths_[] = {
    "dart:core", "/workspace1/dart-all/dart/sdk/lib/core/core.dart", 

    "bool.dart", "/workspace1/dart-all/dart/sdk/lib/core/bool.dart", 
    ...
    ...
  };

- Read the source file using the source mapping array instead of relying on
  a generated buffer containing the sources

- Modify the gyp files to ensure that all libraries are read directly
  from the sources. This CL does not change the patch part yet.
  Remove the source concatentation step in the gypi files for all the core
  libraries.

R=hausner@google.com, iposva@google.com

Review URL: https://codereview.chromium.org//14786012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22380 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 18:12:24 +00:00
asiva@google.com 04cb8721ad First step towards loading the core library scripts directly from the sources
instead of concatenating all the scripts and linking them into the executable.
- Refactor the bootstrap script loading and compilation part to use a
  custom bootstrap library tag handler

R=iposva@google.com

Review URL: https://codereview.chromium.org//14520010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22154 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-29 22:00:18 +00:00
ager@google.com 431954b584 Rename dart:typeddata to dart:typed_data.
R=asiva@google.com, floitsch@google.com, srdjan@google.com
BUG=

Review URL: https://codereview.chromium.org//14426006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21871 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-23 11:54:54 +00:00
ahe@google.com 45ad548837 Update dart:mirrors to use Symbol.
Review URL: https://codereview.chromium.org//14173005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21460 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 15:00:45 +00:00
kasperl@google.com f15b6960c0 Add a new implementation of HashMap that uses JS objects for its (multiple) hash tables.
I'll start refactoring the implementation to make it a bit more
maintainable, but I wanted to get your first impressions.

R=erikcorry@google.com,lrn@google.com,srdjan@google.com
BUG=

Review URL: https://codereview.chromium.org//12827018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20770 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-02 11:51:36 +00:00
asiva@google.com 2f7ca6843f Remove support for 'dart:scalarlist' in the Dart VM.
Review URL: https://codereview.chromium.org//13139002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20680 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-29 18:33:54 +00:00
asiva@google.com 97f6dee777 First step towards implementing dart:typeddata library.
Review URL: https://codereview.chromium.org//12313088

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19427 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-04 22:11:45 +00:00
iposva@google.com b564104ea5 - Properly load the core libraries as libraries and not as scripts.
This will honor their imports and library names.
Review URL: https://codereview.chromium.org//12321082

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19017 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 23:25:29 +00:00
sra@google.com 039864883a Revert "Revert "Use browsers JSON.parse for parsing JSON (#3)""
Fix more IE special cases

Review URL: https://codereview.chromium.org//12320072

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18933 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-23 00:21:24 +00:00
sra@google.com 0d95ced3dc Revert "Use browsers JSON.parse for parsing JSON (#3)"
Review URL: https://codereview.chromium.org//12313069

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18911 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-22 19:34:08 +00:00