Commit Graph

817 Commits

Author SHA1 Message Date
mlippautz@google.com 817a6fff3a Implement ParameterMirror.{isFinal,hasDefaultValue,defaultValue}.
Fixes issue 12196 and partially addresses issue 12430.

BUG=
R=ahe@google.com, asiva@google.com, gbracha@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26730 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 17:31:09 +00:00
mlippautz@google.com b708a455d1 Fix Function.end_token_pos() and implement MethodMirror.source getter.
Move .source getter from ClosureMirror to MethodMirror (as the TODO already suggested) and provide an implementation.

BUG=
R=asiva@google.com, hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26659 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 17:14:07 +00:00
lrn@google.com 4582e5218a Make Invocation.positionalArguments and .namedArguments never be null.
In the cases where they were previously null, they are now an empty list
or map.

The list or map should always be unmodifiable, but the non-empty ones
aren't yet.

BUG= http://dartbug.com/6357
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26635 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 10:57:33 +00:00
rmacnak@google.com 7ed3644358 Make reflectClass(dynamic) throw an illegal argument exception.
BUG=
R=gbracha@google.com, iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26550 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-22 20:05:51 +00:00
rmacnak@google.com 2f192be945 Provide a way to get a Type back from a ClassMirror.
BUG= http://dartbug.com/6433
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26407 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 23:05:31 +00:00
johnmccutchan@google.com 6d11a8fa15 Add signMask getter to Float32x4
R=srdjan@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26394 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 21:35:53 +00:00
jacobr@google.com 605b33c1bc fix cpp11 compile errors
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26387 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 20:24:11 +00:00
mlippautz@google.com 1c0cff6f62 Implement MethodMirror.isOperator
Fixes issue 11944.

BUG=http://dartbug.com/11944
R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26369 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 16:39:34 +00:00
johnmccutchan@google.com 7c1e9d8298 Add add and subtract operations to Uint32x4
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26358 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 14:34:06 +00:00
lrn@google.com 479386335b Make pow fail for non-number arguments.
Previous change removed a check that was expected by a co19 test.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26351 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 12:57:52 +00:00
lrn@google.com 5343ef8d32 Add documentation to dart:math pow function.
Also add test, and modify implementation to match on the single case where it didn't.

BUG= http://dartdog.com/1952
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26347 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 12:23:00 +00:00
lrn@google.com 653ee92bfb Remove int.pow and double.pow from VM library.
BUG= http://dartbug.com/10268
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26340 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 08:13:13 +00:00
johnmccutchan@google.com f05ee4985a Replace shuffle getters with shuffle method and masks.
BUG=
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26278 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-16 16:19:18 +00:00
lrn@google.com 4723e4142d Changed names of parameters of double.parse in patches to match change in external signature.
Review URL: https://codereview.chromium.org//23146008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26273 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-16 12:41:07 +00:00
rmacnak@google.com 8e50d89b10 Improve DartDocs for dart:core classes that may not be extended or implemented.
R=ahe@google.com, gbracha@google.com, kathyw@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26216 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-15 20:53:22 +00:00
rmacnak@google.com 8bdc9b5696 Cleanup making Null a public class of dart:core in the VM. Remove special cases for Null in lookup and compile-time type tests.
BUG=http://dartbug.com/12364
R=asiva@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26205 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-15 18:34:23 +00:00
mlippautz@google.com 187ec3d4fc Fix ClassMirror.typeArguments handling for dynamic only type arguments.
Addresses an issue where we did not return the appropriate type arguments for instances with all dynamic type arguments.

Example:
Class <E> {}

main() {
  var cm = reflectClass(new C()).type;
  print(cm.typeArguments);
  // now prints: {Symbol("E"): TypeMirror on 'dynamic'}
  // previously: crashed
}

BUG=
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26135 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 18:41:30 +00:00
srdjan@google.com 1f31dcc424 Fix for running with --throw_on_javascript_int_overflow: recognize pattern (a << b) & mask and test for overflow only after the mask.
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26122 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 15:12:39 +00:00
fschneider@google.com 447ddebd68 Fix equality of implicit closures in the Dart VM.
This CL also lifts the restriction that classes could not
extends or implement 'Function'.

BUG=https://code.google.com/p/dart/issues/detail?id=10849
BUG=https://code.google.com/p/dart/issues/detail?id=12411

TEST=tests/language/bound_closure_equality_test.dart,
tests/language/black_listed_test.dart

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26114 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 11:43:50 +00:00
rmacnak@google.com 0d665249d7 Hide methods marked as not-visible from reflective member lists and invocation.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26093 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 23:17:44 +00:00
mlippautz@google.com c79874a413 ParameterMirror: Implement some missing getters.
Fixes issue 11334 and issue 11684 and issue 11567.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26086 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 21:38:36 +00:00
rmacnak@google.com 1edde1e0bf Ensure the classes void and dynamic have empty arrays for fields, functions, etc. Move their Types to the VM isolate, and as a side-effect they are now canonicalized.
BUG=http://dartbug.com/12071
BUG=http://dartbug.com/12246
R=asiva@google.com, iposva@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26043 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 00:11:42 +00:00
regis@google.com 9eb12ad303 Implement updated method overriding rules in the vm (issue 11495).
Introduce --error-on-bad-override flag and use it when generating snapshots.
Fix signature checking when patching methods.
Fix errors in patch files.
Fix receiver type of constructors.
Fix finalization of mixin application typedefs.
Update tests and status files.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26027 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-12 20:28:52 +00:00
rmacnak@google.com 5c63370d25 Make ClosureMirror handle instances of user-defined classes that implement call.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25944 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 20:25:46 +00:00
rmacnak@google.com fe85bf84bb Reflection on generics.
BUG=
R=ahe@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25942 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 20:06:56 +00:00
karlklose@google.com 57f68eeb94 Convert null-marker in HashMap.forEach.
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25925 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 13:49:13 +00:00
sgjesse@google.com cfba41b714 Add support for file URIs and extracting the file path from file URIs
A file URI can now be created directly using the constructor Uri.file.

The file path for a file URI can now be extracted using the toFilePath() method.

The path strings involved use either Windows or non-Windows
semantics. Both the Uri.file constructor and the toFilePath()
method have optional anamed arguments for specifying the
semantics. The default semantic is determined from the platform
Dart is running on.

R=ahe@google.com, whesse@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25872 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-07 12:55:09 +00:00
fschneider@google.com 98070a3bec Collect all Dart frames when creating a full stacktrace.
BUG=https://code.google.com/p/dart/issues/detail?id=11261
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25867 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-07 09:32:14 +00:00
rmacnak@google.com ce55909b63 Deal with "classes" that don't belong to any library. Addresses issue 12231.
Review URL: https://codereview.chromium.org/22043005/



git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25785 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-05 18:54:01 +00:00
regis@google.com 09bcdc6d6d Fix VM implementation of CastError not to extend TypeError (issue 5280).
Remove non-compliant fields in various Error classes (issue 10144).
Remove implicit constructor when patching in a constructor (issue 12217).
Patch corelib Error classes instead of declaring subclasses.
Update tests and status files.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25782 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-05 18:35:04 +00:00
srdjan@google.com c891612920 Adapt Random class to be able to run in javascript integer compatibility mode.
R=asiva@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25753 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-02 23:07:55 +00:00
zra@google.com f60d2f6df4 Fixes obo error in javascript int checking.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25733 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-02 16:06:45 +00:00
srdjan@google.com 8cc2fe2869 Corrected MAX_EXACT_INT_TO_DOUBLE.
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25725 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-01 23:15:43 +00:00
rmacnak@google.com 6ab88ae6d5 Implement metadata for libraries. Partially addresses issue 10906.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25721 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-01 20:45:49 +00:00
mlippautz@google.com f1dcf02f75 Inline CreateClassMirror and remove dead code.
(Almost) no more embedding API, yay!

Fixes issue 12135.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25717 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-01 18:27:32 +00:00
rmacnak@google.com 409f02d3f9 Implement mirror equality on the VM. Resolves issue 12026.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25711 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-01 16:40:10 +00:00
rmacnak@google.com 8ee3299833 Allow InstanceMirror.invoke to find private members. Resolves issue 11771.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25690 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-31 23:45:12 +00:00
mlippautz@google.com 9f602cfa83 Also fixes issue 11897.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25689 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-31 23:31:14 +00:00
zra@google.com 42add423d2 Fixes javascript integer overflow check.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25675 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-31 17:51:23 +00:00
regis@google.com 3b7cdf80a0 Update VM to handle malformed types according to revised spec (issues 9055,
12105, 7247).
Update language tests.
Update status files.
Allow map literals to specify a key type that is not a String.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25666 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-31 15:20:28 +00:00
mlippautz@google.com c5c6df3548 BUG=
R=asiva@google.com, rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25651 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-30 22:57:59 +00:00
mlippautz@google.com 58beb194dc Hoist .simpleName and .qualifiedName up to _LocalDeclarationMirrorImpl.
Current tests already cover this change.

BUG=
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25647 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-30 22:22:17 +00:00
mlippautz@google.com 8bfc72b1b9 Inline CreateLibraryMirror.
BUG=
R=asiva@google.com, rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25640 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-30 20:52:44 +00:00
srdjan@google.com d75a60f4af Remove unnecessary, performance degrading equality override in class bool.
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25627 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-30 18:09:23 +00:00
rmacnak@google.com b68bc10c6c Create the local MirrorSystem with internal code.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25601 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-30 01:09:05 +00:00
rmacnak@google.com 47f7d23626 Ensure FunctionTypeMirrors have a proper reflectee and implement ClassMirror.superinterfaces with internal code. Remove some unnecessary fields and constructor arguments.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25599 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-30 00:29:52 +00:00
rmacnak@google.com 844a406c8a Implement reflect() with Dart code, InstanceMirror.type and ClosureMirror.function with internal code.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25594 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-29 23:57:31 +00:00
johnmccutchan@google.com 2e4754ecf5 Add Float32x4List.fromList to runtime implementation and some tests
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25586 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-29 21:32:06 +00:00
mlippautz@google.com 5f4e6e6000 Remove dead code from native mirrors library.
BUG=
R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25576 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-29 17:49:04 +00:00
rmacnak@google.com bd07e14c9a Make ClassMirror.constructors an internal native and lazy.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25533 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-26 18:29:38 +00:00