turnidge@google.com
6a8c82db83
Implement spawnUri from dart:isolate. This function allows us to
...
launch an isolate running a different script. Finally.
Reviewers: This isn't as hard to review as it looks. Dive right in!
Siggi: Take a look at my test status file changes and make sure I'm
excluding the right stuff.
Much of the churn in the CL comes from moving ownership of the
import_map. It used to be set per-library and is now set per-isolate.
This caused a lot of superficial diffs.
DART EMBEDDING API CHANGES:
- Dart_IsolateCreateCallback now takes a script_uri and main argument
instead of a name_prefix argument. The script_uri argument allows
the callback to launch different scripts. The main argument is used
in creating the isolate debug name.
- Dart_CreateIsolate now takes script_uri and main arguments. These
are used to build the isolate's debug name.
- Dart_LibraryTagHandler, Dart_LoadScript, and Dart_LoadLibrary no
longer take an import_map.
- Added Dart_SetImportMap.
- Added Dart_RootLibrary to provide access to the root library for the
current isolate.
OTHER STUFF
Add a couple of tests for spawnUri -- the existing tests assume that
scripts end in a .js suffix which isn't going to work out for us.
Changed how the debug name for isolates get built a bit.
Refactored bin/main.cc a bit. Fixed some problems with error handling
while creating isolates.
Minor refactoring in builtin.dart to always pass is_windows rather
than relying on it being squirreled away.
Review URL: https://chromiumcodereview.appspot.com//10386107
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7756 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 18:22:10 +00:00
hausner@google.com
0bad95eaaa
Revert 7718
...
Review URL: https://chromiumcodereview.appspot.com//10377188
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7721 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-17 21:25:20 +00:00
hausner@google.com
757219f9ec
Disallow string plus operator
...
This is a test to see what (if anything) breaks on the buildbot when
the + operator on String is removed.
Will revert if necessary.
TBR=iposva
Review URL: https://chromiumcodereview.appspot.com//10408013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7718 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-17 21:14:33 +00:00
asiva@google.com
c71a8cc1ee
Change dart frame and stub frame layout to include the PC of the code executing on the frame. The stack frame layout is as follows:
...
ret PC
saved EBP <== EBP
PC (used to locate RawInstruction) <== ESP
Review URL: https://chromiumcodereview.appspot.com//10375059
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7675 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-16 00:47:05 +00:00
srdjan@google.com
54f73f0365
Remove TuckTemp, PickTemp, use temporary locals instead.
...
Review URL: https://chromiumcodereview.appspot.com//10310132
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7624 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-14 20:01:35 +00:00
regis@google.com
5d9dab620c
Implement latest rules prohibiting some self referencing typedefs.
...
Update tests.
Review URL: https://chromiumcodereview.appspot.com//10377095
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7524 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 23:03:36 +00:00
srdjan@google.com
92eb96c913
Fix issue 2939, revert previous change that accepted null as excpetion objects:
...
throw null throws NullPointerException as per latest spec.
Review URL: https://chromiumcodereview.appspot.com//10392016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7475 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-09 22:27:12 +00:00
srdjan@google.com
48f28eebdb
Fix bugs in expression temp allocation, Kevin's CL 10302007 (Remove temporaries using explicit names) and merge with other temp.
...
Review URL: https://chromiumcodereview.appspot.com//10389041
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7472 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-09 21:39:58 +00:00
srdjan@google.com
c8dd31e39b
Fix bug 2907: cannot instantiate Dynamic.
...
Review URL: https://chromiumcodereview.appspot.com//10389006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7397 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-07 19:49:54 +00:00
regis@google.com
5e99edcea7
Properly set the element type of literal lists.
...
Add test.
Keep element type consistent between growable array and backing array.
Fix snapshot reader to set the element type in growable array
Remove run time call checking rest argument.
Review URL: https://chromiumcodereview.appspot.com//10368004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7337 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 16:36:27 +00:00
srdjan@google.com
2c3cab0603
Removing all incr-op nodes.
...
Review URL: https://chromiumcodereview.appspot.com//10354019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7305 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-03 22:17:44 +00:00
srdjan@google.com
259d099c6d
Step toward eliminating increment nodes, starting with increment local. Fix a bug in evaluating side effect free nodes.
...
Review URL: https://chromiumcodereview.appspot.com//10350003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7300 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-03 20:27:37 +00:00
regis@google.com
7793191032
Check upper bounds of type arguments when allocating objects of a generic type
...
at run time when they cannot be checked at compile time.
Review URL: https://chromiumcodereview.appspot.com//10280007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7211 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-02 01:57:22 +00:00
srdjan@google.com
071e9240b9
- Fix another side effect issue: never add AstNode to sequence unless they are a statement. Added tests. LoadLocal has now an optional pseudo input.
...
Review URL: https://chromiumcodereview.appspot.com//10283003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7210 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-01 23:35:17 +00:00
srdjan@google.com
bfebc9cca3
Merge two functions that create side effect free compound load nodes.
...
Review URL: https://chromiumcodereview.appspot.com//10272031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7201 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-01 18:43:57 +00:00
srdjan@google.com
3eabbdd7dc
Fix wrong order of execution in compound assignment nodes (located by Kevin).
...
Review URL: https://chromiumcodereview.appspot.com//10270028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7173 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-01 00:38:02 +00:00
srdjan@google.com
dc17b7338f
Canonicalize type arguments lazily.
...
Review URL: https://chromiumcodereview.appspot.com//10161030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6973 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-25 20:32:45 +00:00
regis@google.com
efa92f5447
Mark types as instantiated or uninstantiated upon finalization.
...
Review URL: https://chromiumcodereview.appspot.com//10205006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6894 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-24 16:15:37 +00:00
regis@google.com
f955de9bc0
Throw a type error in production mode when the type of the type test is not
...
declared (issue 2571).
Add test.
Delete bad negative test now covered by new test.
Update status files of different compilers.
Review URL: https://chromiumcodereview.appspot.com//10035058
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6754 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 17:01:28 +00:00
srdjan@google.com
344aba1e75
Assign ids to incoming arguments (to be used in checked mode).
...
Review URL: https://chromiumcodereview.appspot.com//10115053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6718 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 00:04:47 +00:00
hausner@google.com
e74cd5fc3a
Static members are not visible in subclasses
...
Fix for issue 1598.
Lexical scope comes before inherited names. Also, Static members
are not inherited and are not visible in subclasses.
Code in the subclass (or any other code for that matter) has to
qualify the names of these members with the class name.
We had a few tests that were wrong and only passed in the VM because
this was not implemented correctly.
Also had to fix code in frog and dartdoc.
I hope I ran enough tests. I built an all.deps tree using tools/build.py from the root directory, which brought up the frog and dartdoc issues.
Tested:
tools/test.py --compiler=dart2js --runtime=drt
tools/test.py -c none -r drt
tools/test.py -c frog -r drt
tools/test.py -r vm
Review URL: https://chromiumcodereview.appspot.com//10115005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6698 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 16:09:22 +00:00
hausner@google.com
69d33b8d8d
Fix bug 1991, variable resolution in string interpolation
...
Check to make sure string interpolation expressions cannot
contain type parameter names.
Review URL: https://chromiumcodereview.appspot.com//10108020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6645 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 16:10:35 +00:00
hausner@google.com
02661e6905
Accept keyword abstract in front of a class declaration
...
We can just ignore it. The VM has nothing to do for abstract
classes.
Review URL: https://chromiumcodereview.appspot.com//10103014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6612 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 23:46:55 +00:00
hausner@google.com
b8d3cc0929
Fix bug 918
...
Don't choke to top-level native function declarations.
Review URL: https://chromiumcodereview.appspot.com//10086015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6541 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-13 22:02:31 +00:00
regis@google.com
fce1a7e45e
Fix lazy initialization of static fields (issue 2472).
...
Review URL: https://chromiumcodereview.appspot.com//10050022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6438 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 21:24:17 +00:00
hausner@google.com
2fc3bb679d
Introduce a flag to disable string operator +
...
If allow_string_plus is set to false, the compiler will report an error
when it finds a string literal followed by +. Invoking the + operator on a
string value throws a noSuchMethod exception.
This is temporary code that we'll eliminate once the + operator on
strings is completely removed.
Review URL: https://chromiumcodereview.appspot.com//9960084
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6423 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 18:23:22 +00:00
regis@google.com
3c063c8d4f
Eliminate type checks that can successfully be performed at compile time.
...
Review URL: https://chromiumcodereview.appspot.com//10051011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6420 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 17:42:39 +00:00
srdjan@google.com
b3452e74fb
Add a test to check correct references to a global variable that initially throws
...
a type error.
Review URL: https://chromiumcodereview.appspot.com//10006040
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6294 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-06 20:25:21 +00:00
turnidge@google.com
9731c1c254
Rename Api::NewLocalHandle -> Api::NewHandle.
...
Api::NewHandle now takes a RawObject* intead of an Object&.
- This makes the code shorter and easier to read.
- This allows us to drop the DARTSCOPE from Dart_GetNativeArgument.
(6% speedup on Benchmark_UseDartApi)
Review URL: https://chromiumcodereview.appspot.com//10014002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6283 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-06 17:05:50 +00:00
regis@google.com
9ff0afa50e
Do not require upper bounds to be resolved and finalized before comparing them
...
between the expected and actual factory class (issue 2431).
Add test.
Review URL: https://chromiumcodereview.appspot.com//10008017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6236 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-05 18:11:42 +00:00
turnidge@google.com
c0d7f96409
Remove many calls to Isolate::Current() in the dart embedding api by
...
passing the isolate explicitly.
Review URL: https://chromiumcodereview.appspot.com//9956133
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6193 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-04 20:31:49 +00:00
regis@google.com
ab0a25eb1d
Add missing type checks for top level static initializers (issue 1980 and
...
duplicates 1957, 2070, 2224).
Review URL: https://chromiumcodereview.appspot.com//9958091
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6145 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-03 20:23:30 +00:00
hausner@google.com
55a9a4831e
Fix issue 1569
...
Report proper error on illegal getter and setter syntax, and bad field declarations.
Review URL: https://chromiumcodereview.appspot.com//9958041
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6112 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-02 21:18:02 +00:00
regis@google.com
5282e44fb2
Use null type argument vector instead of vector of Dynamic for a generic raw
...
type when possible.
Fix type finalization of type parameters (always finalize in the context of the
class being parameterized and not in the enclosing class where the type
parameter is used).
Fix wrong generic optimization and added a test (a generic type instantiated
from a raw instantiator is not always raw).
Added printing of type argument vectors.
Review URL: https://chromiumcodereview.appspot.com//9939003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6068 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-30 22:16:52 +00:00
hausner@google.com
50433eb7a9
Report error on missing factory class
...
Fixes issue 974. If an interface declares a constructor, it must
declare a factory class. Report compile-time error if the factory
class is missing.
Review URL: https://chromiumcodereview.appspot.com//9958018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6046 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-30 16:53:55 +00:00
hausner@google.com
c91cbd26a7
Fix capturing of for-loop variables
...
It was broken when there were captured variables in inner blocks.
LocalFunctionTest had a test case that was expecting the wrong result.
Add a few more test cases to For2Test.dart
Fixes issue 2338 (http://code.google.com/p/dart/issues/detail?id=2338 )
Review URL: https://chromiumcodereview.appspot.com//9921030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6006 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-29 22:44:47 +00:00
regis@google.com
8ba77ffb83
Do not share local function between closurized and non-closurized enclosing
...
function.
Add test (thanks to Florian for reporting the issue).
Review URL: https://chromiumcodereview.appspot.com//9835070
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5843 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-26 16:59:37 +00:00
regis@google.com
bb20585e0f
Use a local variable to save/restore the context on entry/exit, instead of
...
explicitly pushing/popping.
Review URL: https://chromiumcodereview.appspot.com//9721004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5649 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-19 17:02:40 +00:00
hausner@google.com
feafdf0e06
Properly recognize closures when setting breakpoints
...
Local functions and function literals are unknown to the VM
until the enclosing function is compiled. This change introduces
a list of known closures per class, and a function to look up
the innermost closure at a given token index.
The debugger now checks whether there are newly discovered
closures when a function containing a pending breakpoint is
compiled. If necessary, the breakpoint is set to the inner
function.
Review URL: https://chromiumcodereview.appspot.com//9716004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5599 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-16 22:28:57 +00:00
hausner@google.com
ad939b2035
Remove warning for illegal parameter names
...
Review URL: https://chromiumcodereview.appspot.com//9704094
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5573 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-16 16:17:23 +00:00
hausner@google.com
6ac08888fe
Compiler warning on named optional params that start with '_'
...
Temporary change so Dartium can can fix their source. Then convert
the warning to an error message as in change 5444.
TBR=vsm
Review URL: https://chromiumcodereview.appspot.com//9702010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5450 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-14 00:41:40 +00:00
hausner@google.com
63b525bb0e
Revert change 5444
...
Review URL: https://chromiumcodereview.appspot.com//9703004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5448 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-14 00:35:16 +00:00
hausner@google.com
a995d60106
named optional parameters must not be private
...
Named optional parameters may not start with an underscore '_'.
Fix issue 434 (http://code.google.com/p/dart/issues/detail?id=434 )
Review URL: https://chromiumcodereview.appspot.com//9701001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5444 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-13 23:24:37 +00:00
regis@google.com
d74c2008be
Fix type check to perform a subtype test at top level instead of an
...
assignability test. This only makes a difference when assigning an instance of
a function type.
Fix a bad language test.
Disable a bad co19 test (issue 99 filed).
Change error message for dynamic type error.
Review URL: https://chromiumcodereview.appspot.com//9664029
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5413 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-13 16:16:12 +00:00
kmillikin@google.com
b05d117185
Support allocating and calling closures in the new non-optimizing compiler.
...
As part of this change, variable allocation is split out from the backend
code generator.
R=srdjan@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9664062
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5392 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-13 12:31:45 +00:00
iposva@google.com
9e93428d9e
- Allow string interpolation in constant strings.
...
- Add test for constant adjacent strings with and without interpolation.
- Update status files.
Review URL: https://chromiumcodereview.appspot.com//9694024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5377 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-13 00:59:17 +00:00
iposva@google.com
8e5b5a02e2
Fix issue 1950:
...
- enable-checked-mode forces --enable_type_checks and --enable_asserts.
Review URL: https://chromiumcodereview.appspot.com//9668034
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5269 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-09 23:21:09 +00:00
regis@google.com
33bd965e2a
Generate a dynamic type error when creating an instance with a bound error.
...
Review URL: https://chromiumcodereview.appspot.com//9665013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5250 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-09 21:15:11 +00:00
asiva@google.com
e4d024664e
Add a first class GrowableObjectArray type in the VM and use it internally in the VM at all spots were we use GrowableArray first and then copy the contents into an Array object.
...
Next step is to use this type in growable_array.dart
Review URL: https://chromiumcodereview.appspot.com//9594028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5109 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 19:14:02 +00:00
regis@google.com
f4ddc43cdf
Generate dynamic type errors according to spec.
...
Fix a few bad tests.
Turn a couple negative tests in multi-tests.
Triage a few co19 failing tests.
Still to do:
Check bounds of generic types at runtime in checked mode.
Stop reporting bounds error in new operator as a compile time error.
Review URL: https://chromiumcodereview.appspot.com//9615035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5064 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 02:23:12 +00:00