Commit Graph

27 Commits

Author SHA1 Message Date
ager@google.com 75c8f427cc Update remaining usages of Completer.completeException.
R=floitsch@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16840 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-09 09:29:39 +00:00
floitsch@google.com 4a7dfd2da3 Big merge from experimental to bleeding edge.
Review URL: https://codereview.chromium.org//11783009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16687 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 11:23:16 +00:00
floitsch@google.com 3e2f323981 Dynamic -> dynamic.
Review URL: https://codereview.chromium.org//11312237

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14898 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-14 15:33:25 +00:00
lrn@google.com 2208fcd208 Change NotImplementedException to UnimplementedError.
Retain a NotImplementedException type for backwards compatibility.
This class will be removed soon.
The constructor of UnimplementedError is currently const in order to
support the NotImplementedException. That will be fixed too.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14467 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-02 13:18:37 +00:00
floitsch@google.com 9074fd0178 Make hashCode a getter and not a method.
Review URL: https://codereview.chromium.org//11191078

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13866 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-22 12:41:04 +00:00
hausner@google.com 1811a6b913 Support for type dynamic in VM
Old name Dynamic is supported, and automatically converted to
lower-case dynamic when parsed.

VM flag --warn_legacy_dynamic prints warnings when Dynamic
is found.
Review URL: https://codereview.chromium.org//11125005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13637 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-12 22:40:24 +00:00
ager@google.com 7977b42215 Update all occurrences of raw strings.
R=hausner@google.com,kasperl@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12893 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-26 06:01:23 +00:00
turnidge@google.com a28d475ff3 Implement more of the mirrors library, primarily stuff to do with types.
Highlights:

- Implement FunctionClassMirror, used to reflect on the class of
  function objects.

- Implement TypeVariableMirror, used to reflect on type variables.

- Implement TypedefMirror, used to reflect on typedefs.

- Implement returnType for MethodMirror

- Implement type for VariableMirror/ParameterMirror

- Added supporting functions to the dart embedding api:
  - Dart_ClassIsTypedef
  - Dart_ClassGetTypedefReferent
  - Dart_ClassIsFunctionClass
  - Dart_ClassGetFunctionClassSignature
  - Dart_FunctionReturnType
  - Dart_FunctionParameterType
  - Dart_VariableType
  - Dart_GetTypeVariableNames
  - Dart_LookupTypeVariable
  - Dart_IsTypeVariable
  - Dart_TypeVariableOwner
  - Dart_TypeVariableUpperBound

Other stuff:

- Fixed bug in Function::NumberOfImplicitParameters for signature
  functions.

- Chnaged the default upper bound for type variables to Object from
  Dynamic.  Discussed this with Gilad and Regis.

- Fixed some smaller problems in mirrors_impl.dart.
Review URL: https://chromiumcodereview.appspot.com//10916252

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12342 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 17:47:25 +00:00
kasperl@google.com 9beb871852 Get rid of a lot of () for getters.
R=bak@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10919146

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12017 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 11:50:07 +00:00
turnidge@google.com 5c87f7ed8c Fix some typos in mirrors_impl.dart.
Review URL: https://chromiumcodereview.appspot.com//10919017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11716 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-31 19:46:21 +00:00
kasperl@google.com 72e668595d Use new try-catch syntax in runtime/, tools/, and utils/.
R=ngeoffray@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10887023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11514 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 11:58:58 +00:00
podivilov@google.com 93c50c547d Small fix for _LocalMirrorSystemImpl.toString().
R=ager@google.com

Review URL: https://chromiumcodereview.appspot.com//10876065

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11317 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-24 14:53:21 +00:00
turnidge@google.com bcc03b28e9 More mirrors changes to bring vm mirrors more in line with the
current proposed mirrors api.
Review URL: https://chromiumcodereview.appspot.com//10825431

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11095 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 20:46:25 +00:00
turnidge@google.com 1da7c97936 A round of edits to make mirrors.dart more like our current working
proposal.
Review URL: https://chromiumcodereview.appspot.com//10854197

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10918 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 19:56:50 +00:00
rmacnak@google.com 2353835d5b Added InterfaceMirror.newInstance().
Review URL: https://chromiumcodereview.appspot.com//10834056

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10020 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-30 17:48:47 +00:00
rmacnak@google.com 99ad7f4170 Added ClosureMirror to dart:mirrors. Added Dart_ClosureFunction to the
embedding API. ClosureMirrors currently implement answering the closure's
function and applying the closure.
Review URL: https://chromiumcodereview.appspot.com//10800065

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9860 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 17:59:12 +00:00
rmacnak@google.com e0931044c0 Added getField/setField to ObjectMirror. For InstanceMirrors, this get/sets
fields; for InterfaceMirrors, static fields; for LibraryMirrors, top-level 
fields.
Review URL: https://chromiumcodereview.appspot.com//10704259

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9832 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-23 22:53:52 +00:00
rmacnak@google.com 3d1c598ed5 Add a limited version of ParameterMirrors that can only tell whether they are
optional. Add Dart_FunctionParameterCounts. Drop passing isSimpleValue to
instance mirrors: they can compute this on the Dart-side.
Review URL: https://chromiumcodereview.appspot.com//10778005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9683 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-16 22:05:16 +00:00
rmacnak@google.com 79e17e7cb0 Replaced simpleValue with more general reflectee. hasSimpleValue is retained internally for the sake of safe printing: mirrors should not assume their reflectees toString will return quickly and without error.
Review URL: https://chromiumcodereview.appspot.com//10702186

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9637 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-13 16:56:13 +00:00
turnidge@google.com e48dd76856 Some small changes to make the vm dart:mirrors somewhat closer to the
source mirror implementation by Johnni.

- Add the MirrorSystem interface
- Add a simple TypeMirror
Review URL: https://chromiumcodereview.appspot.com//10700149

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9612 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 20:40:06 +00:00
turnidge@google.com 22fb45f640 Implement method and variable reflection in dart:mirrors.
Review URL: https://chromiumcodereview.appspot.com//10687004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9493 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-09 23:57:08 +00:00
cshapiro@google.com 00b6963338 Fix some warnings in the core library identified by the static analyzer.
This foray uncovered a latent bug in the byte array view constructor and
its use of default arguments.  That bug has been corrected and new tests
have been added to the test suite.

BUG=2136

Review URL: https://chromiumcodereview.appspot.com//10653002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9013 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-22 04:27:57 +00:00
turnidge@google.com 312702a5ac Second local mirrors CL.
Implement a few chunks of new mirror functionality.  Many changes, notably:

- Added currentIsolateMirror() to provide non-async access to the
  local isolate mirror.

- Added mirrorOf(o) to provide access to local instance mirrors.

- Fleshed out InstanceMirror, InterfaceMirror, and LibraryMirror to
  various degrees.

- Added the MirroredError hierarchy, which lets the user handle Dart
  errors of various sorts from invocation, etc.

- Introduce lazy resolvers for interface mirrors and library mirrors.
  These allow us to build the self-referential library/interface
  hierarchy without going mad.

- Added better toStrings all around.

- Extended the isolate_mirror_local_test to cover new functionality.

Other changes that were required or seemed prudent:

- Exposed the error hierarchy to the embedder.  They need to be able
  to distinguish different error types in some situations.  Improved
  the documetation around error handles and error propagation.

- Added new functions to the dart embedding api as required.  Added
  tests for all new dart api functions.
Review URL: https://chromiumcodereview.appspot.com//10538043

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8575 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 21:07:49 +00:00
turnidge@google.com ede2df7949 Fix type-check failure...
Review URL: https://chromiumcodereview.appspot.com//10449072

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8118 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-30 17:28:28 +00:00
turnidge@google.com ec36e02c28 Remove the partially completed code for remote IsolateMirrors and
replace it with the beginnings of a local (same isolate) IsolateMirror
implementation.

Removed old mirror tests and added two new mirror tests.

Even though mirrors.cc is part of the vm, I chose to implement most of
it using the dart embedding interface instead of our internal
interfaces because the embedding interface was more convenient.
mirrors.cc is basically all new in this CL -- don't pay any attention
to diffs for that file.

Added dart embedding functions required for the functionality in this
CL: Dart_DebugName, Dart_GetNativeInstanceFieldCount,
Dart_RootLibrary, Dart_RegisteredLibraryUrls, and Dart_LibraryName.

Extended or modified some existing dart api functions, primarily to
make them propagate error handles properly.

Added tests for new dart embedding api functionality.

Added the ability to determine if a port is local to the current isolate.

Extended NotImplementedException to accept an optional string
argument.  I wanted to give more descriptive error messages.
Review URL: https://chromiumcodereview.appspot.com//10416050

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8117 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-30 17:07:19 +00:00
turnidge@google.com 353b66038e Rework mirrors implementation.
(Note that the current mirrors implementation is just a heartbeat
implementation of a single method)

Use native code instead of dart code to do the work.

Use JSON instead of Lists/Maps for commands/responses.

Reenable disabled tests.
Review URL: https://chromiumcodereview.appspot.com//10175011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6864 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-23 22:26:09 +00:00
turnidge@google.com ff26341fd6 Heartbeat implementation of dart:mirrors.
Add the skeleton for the dart:mirrors library in all the appropriate
places.  The only thing we can do right now is ask an Isolate for its
debugName.  Add a few tests.
Review URL: https://chromiumcodereview.appspot.com//9420038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5370 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-12 23:51:03 +00:00