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
asiva@google.com
d6aaf0cc94
1. Add flag --trace-api to trace API function invocation
...
2. Add tracing of external native functions under --trace-natives flag
3. Added a _printCurrentStacktrace() function so that one could get a
dart stack trace under 'gdb' when in a native or runtime function.
R=regis@google.com
Review URL: https://codereview.chromium.org//23453035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27166 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-04 23:42:13 +00:00
kmillikin@google.com
4f80ef09df
Change Bool::Get to return a handle instead of a pointer to a raw object.
...
Replace occurrences of 'expr ? Bool::True() : Bool::False()' with simply
'Bool::Get(expr)' and analogously for its negation. The pointer to the raw
object can still be extracted with 'Bool::Get(expr).raw()'.
R=iposva@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//23480005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26770 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 08:38:56 +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
543d80f5f8
Fix signature of Dart_SetIntegerReturnValue.
...
R=vsm@google.com
Review URL: https://codereview.chromium.org//22897020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26487 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 23:45:02 +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
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
asiva@google.com
fc5ffa288f
Simplify access to peer pointer for external strings.
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//23118006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26202 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-15 17:10:07 +00:00
asiva@google.com
872fafc6cf
Minor cleanup.
...
R=regis@google.com
Review URL: https://codereview.chromium.org//23152003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26146 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 20:42:44 +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
johnmccutchan@google.com
33d528a787
Remove race(s) in vmservice tests.
...
BUG=https://code.google.com/p/dart/issues/detail?id=12294
R=iposva@google.com
Review URL: https://codereview.chromium.org//22607005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25927 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 15:44:21 +00:00
asiva@google.com
17c19b0033
Add Dart_GetNativeReceiver to special case access to the native field
...
of a receiver argument (helps eliminate number of validity checks).
R=srdjan@google.com
Review URL: https://codereview.chromium.org//21986002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25750 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-02 22:47:26 +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
asiva@google.com
a0571ccb07
Fix incorrect usage of NoGCScope in previous change (dart objects are being
...
allocated so it is possible to have GC).
R=srdjan@google.com
Review URL: https://codereview.chromium.org//21252005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25691 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-31 23:47:04 +00:00
asiva@google.com
2c5c1fb855
- Add following additional methods to the API to make returning values
...
from Dartium easier:
Dart_SetBooleanReturnValue
Dart_SetIntegerReturnValue
Dart_SetDoubleReturnValue
- Use Isolate value stored in NativeArguments instead of calling
Isolate::Current
R=srdjan@google.com
Review URL: https://codereview.chromium.org//21319002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25676 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-31 18:05:05 +00:00
regis@google.com
b55b249409
Delay resolution of redirecting factory targets in order to avoid class
...
finalization cycles (issue 12041).
Ensure that a super class is finalized before the class extending it.
R=asiva@google.com
Review URL: https://codereview.chromium.org//20503003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25532 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-26 18:18:56 +00:00
asiva@google.com
eb88e500d2
Add a new Dart API call Dart_GetNativeFieldOfArgument
...
which combines Dart_GetNativeArgument and Dart_GetNativeInstanceField
Dartium always gets the receiver by first getting the NativeArgument
corresponding to 0 using Dart_GetNativeArgument and then invokes
Dart_GetNativeInstanceField on the returned handle to get the native
field corresponding to the native DOM element.
When Dartium is changed to use this combined API call the numbers for a
sample Dromaeo-drt benchmark is as follows:
Dromaeo-drt getAttribute runs-per-second 653.0
Dromaeo-drt element_property_access runs-per-second 579.0
Dromaeo-drt setAttribute runs-per-second 396.0
Dromaeo-drt element_property_assignment runs-per-second 539.0
When the old API calls are used:
Dromaeo-drt getAttribute runs-per-second 596.0
Dromaeo-drt element_property_access runs-per-second 528.0
Dromaeo-drt setAttribute runs-per-second 385.0
Dromaeo-drt element_property_assignment runs-per-second 513.49
R=srdjan@google.com
Review URL: https://codereview.chromium.org//19563005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25354 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-23 18:57: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
9e7f76623a
Reuse the top ApiLocalScope so that we do not allocate and free an ApiLocalScope
...
for each Dart_EnterScope/Dart_ExitScope sequence.
The runtime of UseDartApi benchmark on linux ia32 improves from
187316 to 121083.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//19974002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25292 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-22 18:46:14 +00:00
fschneider@google.com
dfd21c06e0
Change resolving of instance methods to check early for name mismatch.
...
The names of actual arguments are checked at resolving time
for a mismatch instead of deferring this check to the function
prologue (emitted as part of the CopyParameters() prologue).
For example:
class A {
foo({a:42}) => null;
}
main() {
var a = new A();
a.foo(b:123); // noSuchMethod: no named parameter named "b".
}
This enables e.g. fast noSuchMethod invocation in the case
of a named argument mismatch.
It also makes the function prologue for instance functions that
use optional parameters shorter by omitting the check for a
name mismatch there.
R=regis@google.com
Review URL: https://codereview.chromium.org//19200002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25041 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-16 09:38:13 +00:00
srdjan@google.com
46c46f5c62
List class was not initialized properly (it has type parameters). Do not preinitialize it incorrectly, instead let it be loaded and finalized the normal way.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//18737004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24922 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-11 17:32:16 +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
5f0c327096
Add Dart_GetSupertype to the dart debugger API so that the dartium
...
debugger interface can use this instead of Dart_GetSuperClass.
R=regis@google.com
Review URL: https://codereview.chromium.org//18238003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24648 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-01 19:46:42 +00:00
asiva@google.com
010c23dc7c
Fix Dart_GetType to get the correct number of type arguments.
...
R=regis@google.com
Review URL: https://codereview.chromium.org//17617006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24422 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-25 17:25:35 +00:00
johnmccutchan@google.com
83230d2acc
Preallocate objects in Dart::InitializeIsolate not in Api::CheckIsolateState
...
BUG=https://code.google.com/p/dart/issues/detail?id=11396
R=iposva@google.com
Review URL: https://codereview.chromium.org//17066009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24371 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-24 22:12:53 +00:00
johnmccutchan@google.com
b7003f166b
Stop unwanted class finalization when using dart:io HttpClient from builtin.dart
...
BUG=11232
R=iposva@google.com
Review URL: https://codereview.chromium.org//17503002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24252 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-20 20:51:14 +00:00
asiva@google.com
16c945cb88
Minor cleanups to use null_array(), null_object() and null_string() handles.
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//17501003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24247 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-20 19:49:30 +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
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
srdjan@google.com
52488f7296
When unwraping handles, verify only if --verify_handles. Fixes issue 11265,
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//16816007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23942 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-12 23:15:12 +00:00
hausner@google.com
0374dc9b12
Reified metadata in the VM
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//16780008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23912 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-12 15:44:57 +00:00
asiva@google.com
7f8320e042
Make ImmutableArray a sub class of AllStatic.
...
This enables Array to be a FINAL_HEAP_OBJECT and the operators
'=' and '^=' would be a simpler implementation which does not
require a call to initializeHandle().
R=iposva@google.com
Review URL: https://codereview.chromium.org//16390002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23884 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-11 21:52:39 +00:00
asiva@google.com
703bad2d2a
Revert change 23636 as it is causing issues on dartium. Will resubmit after investigating the dartium failure.
...
Review URL: https://codereview.chromium.org//16378004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23641 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-05 17:28:01 +00:00
asiva@google.com
bd14296eb7
Fix for issue 1755.
...
Use 'new' in all the snapshot reallocation functions instead of realloc.
This would result in program termination when allocation fails and will
ensure that a NULL will not be returned.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//16271010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23636 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-05 16:21:04 +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
364a9b28a9
- Adjust parameter types for Dart_NewWeakReferenceSet implementation.
...
Review URL: https://codereview.chromium.org//16247002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23436 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-30 18:52:06 +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
asiva@google.com
e33c2d4254
Delay Class parsing until the class is actually used.
...
Prior to this change the initial heap sizes were as follows:
ia32:
Size of isolate snapshot = 1230921
New space (0k of 32768k) Old space (1446k of 1604k)
X64:
Size of isolate snapshot = 1223943
New space (0k of 32768k) Old space (2630k of 2692k)
After this change the initial heap sizes are as follows:
ia32:
Size of isolate snapshot = 686443
New space (0k of 32768k) Old space (677k of 836k)
X64:
Size of isolate snapshot = 684731
New space (0k of 32768k) Old space (1220k of 1412k)
R=hausner@google.com , iposva@google.com , regis@google.com
Review URL: https://codereview.chromium.org//14820028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23115 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-24 00:13:10 +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
srdjan@google.com
dd6ca671d7
Cleanups: addressed your comments from https://codereview.chromium.org/14962008/
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//14845021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22881 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-17 23:45:08 +00:00
iposva@google.com
ef48eb97ef
Fix dartbug.com/10674:
...
- Make sure that Dart_NewExternalTypedData returns a local handle.
R=asiva@google.com
Review URL: https://codereview.chromium.org//14676020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22806 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-16 18:33:30 +00:00
asiva@google.com
e5d6ee272a
Minor cleanup.
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//14828006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22488 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-08 00:44:50 +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
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
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
srdjan@google.com
9b53a42536
Add flag --check-function-fingerprints, it checks all function fingerprints of the intrinsifier and method recognizer. Added flag to a test so that the fingerprints will be tested during a regular test.
...
Review URL: https://codereview.chromium.org//14247005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21711 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-18 23:18:13 +00:00