Commit Graph

595 Commits

Author SHA1 Message Date
rmacnak@google.com c7460aff0f Add Dart_QualifiedClassName.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27539 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-17 00:06:28 +00:00
iposva@google.com 2c0acad1e5 - Tighten assertions in the X64 assembler related to object pool usage.
- Adjust code passing objects into the assembler.
- Fix stack smashing bug in test.

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27445 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 20:44:26 +00:00
hausner@google.com fd57843900 Update handling of ambiguous name references
Update VM to latest spec. Referencing a name that is imported
from more than one library is no longer a compile-time error.
If one of the sources of an ambiguous reference is a dart library,
the dart library declaration is automatically hidden.

Also fixes a bug where looking up a getter name in a library
found the getter even though the name is filtered out in the
'hide' combinator.

Long-term we should fix the need for repeatedly convert between
the mangled getter and setter names and the untangled name.

Fixes 12915, 12913, 12724.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27312 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 21:52:40 +00:00
jacobr@google.com 3aec267398 Fix bug where Script files that only contained patches were lost from the list of LoadedScripts() This resulted in incorrect stack traces for int.parse Many Script files containing patches also contained non-patch classes or top level members and so they still worked.
BUG=
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27254 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-06 17:54:05 +00:00
asiva@google.com 7ad55e3c8e The peer pointer was not being setup at all, fixed that and added a test case
for it.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26561 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-22 22:05:22 +00:00
asiva@google.com 848291cea7 - Setup a peer for read only strings that are not externalized in
Dart_MakeExternalString so that it is not necessary to create
a new reference for it everytime it is accessed in native code.

- Removed unused function Dart_ExternalStringGetPeer

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26538 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-22 17:10:37 +00:00
asiva@google.com 497152cc26 Added Dart API methods:
Dart_GetNativeIntegerArgument
Dart_GetNativeDoubleArgument
Dart_GetNativeBooleanArgument

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26485 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 23:20:30 +00:00
asiva@google.com 29fec5afb2 Comment out check in native fields injection until issue 12455 is resolved.
Review URL: https://codereview.chromium.org//23215002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26151 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 20:57:13 +00:00
asiva@google.com 4b2c10ae32 Added following dart API changes to enable more efficient access based
on the dartium usage pattern:
- Dart_GetNativeStringArgument (gets a String object, peer etc. directly from
  the native arguments)
- Dart_SetWeakHandleReturnValue (allows a weak handle to be passed to the
  return value, this ensures a new local handle does not have to be created
  from a weak handle just to return a value)
- Dart_StringGetProperties (gets some common properties of a string, avoids
  multiple API calls to set up a native string)

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26046 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 01:19:25 +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 303a29b5ba Move Null class out of the VM isolate.
BUG=http://dartbug.com/12071
BUG=http://dartbug.com/12128
BUG=http://dartbug.com/12319
BUG=http://dartbug.com/12337
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25982 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-09 21:54:30 +00:00
rmacnak@google.com 0abc24d494 Fix name of libraries without a library declaration to be the empty string.
BUG=10580
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25981 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-09 21:27:28 +00:00
srdjan@google.com 0cabd24ae6 Do not use guarded cid on externalizable cid-s (one and two byte strings). An externalizable object can change its type on the fly and therefore we cannot rely on the information obntained while storing into the field.
R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25893 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-07 18:56:48 +00:00
rmacnak@google.com e37a1b46a7 Remove unused functions from dart_mirrors_api.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25749 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-02 22:28:10 +00:00
fschneider@google.com eae62fa866 Improve performance of Dart_ListGetAsBytes.
This fixes two performance issues with Dart_ListGetAsBytes:

1. Avoid excessive handle allocation when copying from a generic List.

2. Add a fast path when copying from byte-size typed data view objects. The
old version only supported typed data, but no views.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25731 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-02 11:32:05 +00:00
regis@google.com 9581071936 Refactor resolution code in the vm to properly handle ambiguity errors.
Add test.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25324 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-23 00:19:39 +00:00
asiva@google.com 36a3bafe81 Fix for issue 11770.
R=iposva@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24900 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-11 00:33:41 +00:00
johnmccutchan@google.com 4aeef86a3d Call shutdown callback before the isolate is destroyed
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24844 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-09 14:59:01 +00:00
asiva@google.com e16291b973 Convert implementation in mirrors.cc to use Dart_GetType instead of Dart_GetClass.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24491 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-26 21:30:18 +00:00
asiva@google.com 106b0847fd Fix for issue 11262.
- Add Dart_InstanceGetType
- Wire Dart_New, Dart_Invoke and Dart_[G|S]etField to use types

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24195 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-19 18:20:55 +00:00
vsm@google.com 9ddec8e9a1 Add Dart_Allocate to the C++ API
This change allows us to allocate Dart objects from C++ without
invoking a constructor.  In turn, it allows us to declare Dartium DOM
types with no public generative constructor.

Note, the current constructor has to be public as dart:html Element is
subclassed by dart:svg SvgElement (and eventually by user defined
custom elements as well).  This leads to unfortunate holes such as: https://code.google.com/p/dart/issues/detail?id=11277

This should also give a modest boost in DOM perf as the existing
constructor does absolutely nothing.

BUG=11277
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24189 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-19 15:48:23 +00:00
asiva@google.com 6a306cbb5f Fix build break (add correct return type in test).
Review URL: https://codereview.chromium.org//17286009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24156 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-18 18:37:49 +00:00
asiva@google.com a01261ef7b Fix for issue 11262.
Provide support for types in the Dart API.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24154 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-18 17:47:15 +00:00
asiva@google.com 51651ee00b Split dart_api.h into multiple parts:
dart_api.h - Has the core API functions
dart_mirrors_api.h - Has API functions to support Mirrors or reflection
dart_native_api.h - Has parts which support the native message handling,
                    profilling and other internal tools

R=sgjesse@google.com, vsm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24062 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 23:47:40 +00:00
asiva@google.com ebcb6943bf Fix the isolate unit tests to create an isolate from a snapshot.
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23645 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-05 17:44:39 +00:00
iposva@google.com 1836035266 - Modify dart_api.h to be a proper C API.
- Verify that dart_api.h can be used from C
  by changing the test_extension to be a pure C file.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23476 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-31 16:36:27 +00:00
iposva@google.com b60d09b1fb - Add different types for persistent and weak persistent handles
in the Dart C API.
- Adapt code in the runtime.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23421 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-30 15:55:59 +00:00
floitsch@google.com 09d7da9250 Rewrite double.parse.
BUG= http://dartbug.com/5654
R=lrn@google.com, srdjan@google.com

Committed: https://code.google.com/p/dart/source/detail?r=23062

Reverted: https://code.google.com/p/dart/source/detail?r=23065

Committed: https://code.google.com/p/dart/source/detail?r=23066

Reverted: https://code.google.com/p/dart/source/detail?r=23068

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23071 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 14:30:16 +00:00
floitsch@google.com 9849fb8900 Revert "Rewrite double.parse."
This reverts commit r23066.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23068 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 13:28:37 +00:00
floitsch@google.com 75cafec89d Rewrite double.parse.
BUG= http://dartbug.com/5654
R=lrn@google.com, srdjan@google.com

Committed: https://code.google.com/p/dart/source/detail?r=23062

Reverted: https://code.google.com/p/dart/source/detail?r=23065

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23066 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 13:09:05 +00:00
floitsch@google.com 724fb6b4aa Revert "Rewrite double.parse."
This reverts commit r23062.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23065 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 13:00:05 +00:00
floitsch@google.com d39ef26225 Rewrite double.parse.
BUG= http://dartbug.com/5654
R=lrn@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23062 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 12:00:45 +00:00
asiva@google.com 9041d156a0 Create test isolates using a snapshot, this ensures that we do not depend
on the location of core libraries which can be a problem when we copy
the run_vm_tests executable to a different machine.

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23030 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-22 17:25:25 +00:00
asiva@google.com da9d1d664f Add a call to CheckIsolateState in all paths of Dart_GetField and Dart_SetField.
R=ager@chromium.org

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22893 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-20 16:02:30 +00:00
iposva@google.com e14046206b - Create a local scope so that the GC can collect the external
typed data.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22810 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-16 19:37:14 +00:00
asiva@google.com fbfcf71847 Fix build break in --checked mode.
Review URL: https://codereview.chromium.org//14872009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22433 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-06 17:18:04 +00:00
asiva@google.com 469ff38c70 Fix for issue 10395, call noSuchMethod if a method is not found when using the Dart C API.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22432 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-06 17:07:34 +00:00
hausner@google.com 8e29370a1b BREAKING CHANGE: enforce part of directive
For historical reasons, the VM is currently too lenient when parsing library parts. Files that get loaded through a 'part' directive must start with a 'part of libraryname;' clause. The VM so far has not reported an error if the clause is missing.

This change enforces the grammar as the Spec mandates it. Library parts that do not start with 'part of' will no longer compile.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22278 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-01 20:46:48 +00:00
srdjan@google.com 706e79d074 Fix error reporting when calling static methods and closures withh mismatched arguments.
Closures BEFORE:
----
Unhandled exception:
Class '(dynamic, dynamic, dynamic) => dynamic' has no instance method 'call'.

NoSuchMethodError : method not found: 'call'
Receiver: Closure: (dynamic, dynamic, dynamic, dynamic) => dynamic from Function 'foo':.
Arguments: [2]

Closures NOW:
----
Closure call with mismatched arguments: function 'A.foo'

NoSuchMethodError: incorrect number of arguments passed to method named 'A.foo'
Receiver: Closure: (dynamic, dynamic, dynamic, dynamic) => dynamic from Function 'foo':.
Tried calling: A.foo(2)
Found: A.foo(a, b, c)


Statics BEFORE:
----
Unhandled exception:
No top-level method 'foo' declared.

NoSuchMethodError : method not found: 'foo'
Receiver: Type: class '::'
Arguments: []

Statics NOW:
----
Unhandled exception:
No top-level method 'foo' with matching arguments declared.

NoSuchMethodError: incorrect number of arguments passed to method named 'foo'
Receiver: top-level
Tried calling: foo(...)
Found: foo(a, b, c)

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22209 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-30 22:05:14 +00:00
zra@google.com 6cc59c106b Enables API tests on MIPS
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22132 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-29 17:52:09 +00:00
regis@google.com 52a0f3c983 Enable api tests on ARM.
Disable generation of optimized code on ARM and MIPS.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21972 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-24 18:55:52 +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
asiva@google.com 6955ed0244 Add endian parameter to the get/set functions in ByteData.
Review URL: https://codereview.chromium.org//14332002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21688 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-18 18:19:43 +00:00
ager@google.com 56cca9e81e Support Float32x4List in the embedding API.
This allows Dartium to use Float32x4List arguments to the webgl
uniform4fv methods.

R=asiva@google.com, iposva@google.com, johnmccutchan@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21496 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 18:58:36 +00:00
iposva@google.com 0d0fcbe7e1 Changelist to land https://codereview.chromium.org/13452007/ for Siva.
Review URL: https://codereview.chromium.org//13813018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21160 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-09 17:51:24 +00:00
floitsch@google.com 343fa26d65 Remove deprecated Expect from the libraries.
Review URL: https://codereview.chromium.org//13724021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21079 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-08 16:07:34 +00:00
floitsch@google.com 8fd6d0aafd Remove Expect from core library.
Committed: https://code.google.com/p/dart/source/detail?r=19755
Reverted: http://code.google.com/p/dart/source/detail?r=19756

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20996 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 19:43:16 +00:00
asiva@google.com 647d060f10 - The callback_error_ handle was never being setup.
- Remove some unnecessary DARTSCOPE calls when true/false/null Dart_Handles are
  created.
Review URL: https://codereview.chromium.org//13171004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20701 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-30 00:07:13 +00:00
asiva@google.com 5642025044 Handle TypedDataView objects in Dart_TypedDataAcquireData and
Dart_TypedDataReleaseData
Review URL: https://codereview.chromium.org//12937010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20482 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-25 20:18:44 +00:00
asiva@google.com 3261c500d8 Implement creation of ByteData objects using the Dart API.
Review URL: https://codereview.chromium.org//12938010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20396 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-22 18:14:37 +00:00