asiva@google.com
5cbd276939
Make the parser agnostic to the TokenStream implementation. This is the first step towards compacting the token stream.
...
Pull the data stream writer/reader code out of snapshot into a generic file so that it can be reused into the token stream compaction implementation.
Review URL: https://chromiumcodereview.appspot.com//10632009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9043 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-22 20:37:01 +00:00
hausner@google.com
56bc7ca48a
Fix stuff
...
Fix for issue 3781: don't hang on to deleted breakpoints (manually tested).
Fix for issue 3390: allow function names in all string interpolation expressions.
Review URL: https://chromiumcodereview.appspot.com//10603003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8956 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 00:16:27 +00:00
regis@google.com
858b662c84
Fix super call invocation (issue 2028).
...
Review URL: https://chromiumcodereview.appspot.com//10513008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8633 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 23:06:23 +00:00
regis@google.com
395d3ba587
Insert closure calls in conditional expression of assert (issue 1584).
...
Review URL: https://chromiumcodereview.appspot.com//10446102
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8164 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-31 15:57:06 +00:00
srdjan@google.com
d8f4aa2fd0
Use temporary variable for StoreIndexed that returns a value.
...
Review URL: https://chromiumcodereview.appspot.com//10448059
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8109 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-30 15:55:46 +00:00
turnidge@google.com
05b5d44b0e
spawnUri. Take two. This time I'll wait for Anton before committing :-).
...
See original change 7756 for description.
Review URL: https://chromiumcodereview.appspot.com//10407042
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7917 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 18:32:51 +00:00
turnidge@google.com
76d4586dea
Revert my last change.
...
Review URL: https://chromiumcodereview.appspot.com//10332257
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7757 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 18:35:04 +00:00
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
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
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
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
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
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
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
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
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
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
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
hausner@google.com
5f72e92b4e
Re-introduce string concatenation
...
This change re-introduces concatenation of adjacent
string literals, i.e. the compiler concatenates "abc" "123"
into the literal "abc123" at compile time. If the literals
contain interpolations, the concatenation happens at
runtime.
The change also re-introduces interpolated compile-time
string literal constants, but the feature is disabled because
several tests need to be changed.
Review URL: https://chromiumcodereview.appspot.com//9582040
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4991 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-05 23:47:34 +00:00
srdjan@google.com
1d7321e3f2
Fix Issue 1846: Improve error reporting in presence of imports. With this CL:
...
'/Users/srdjan/bdartall/dart/runtime/bug3.dart': Error: line 2 pos 1: unexpected token 'abstract'
abstract class A { }
^
'/Users/srdjan/bdartall/dart/runtime/bug2.dart': Error: line 2 pos 1: library handler failed
#import("bug3.dart");
^
'/Users/srdjan/bdartall/dart/runtime/bug1.dart': Error: line 2 pos 1: library handler failed
#import("bug2.dart");
^
Review URL: https://chromiumcodereview.appspot.com//9559001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4773 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-29 23:53:07 +00:00
asiva@google.com
33d2e2fe26
Changes to shrink the token stream representation from two words to one word.
...
On standalone dartium which has about 50000 tokens in the libraries (core, coreimpl, builtin, io etc.) this reduces the heap size by about 180kb. The size of the standalone snapshot buffer reduces by about 72kb.
Also moved the keyword symbol table to the object store so that it does not have to repopulated on every script compilation. Should benefit regular user script load times.
Review URL: https://chromiumcodereview.appspot.com//9462003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4734 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-29 02:46:29 +00:00
regis@google.com
47724a8491
Add support for malformed types and postpone some related errors from compile
...
time to execution time.
Still to do (once spec is clarified):
- properly handle generic type bounds errors
- properly handle 'instance of' type checks involving malformed types
- fix bad tests
Review URL: https://chromiumcodereview.appspot.com//9515011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4732 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-29 02:14:18 +00:00
hausner@google.com
1ecc0a9e97
Fix handling of unresolved names
...
Fixes issue 1805 (http://code.google.com/p/dart/issues/detail?id=1805 )
The VM didn't turn unresolved identifiers into instance getter calls in all cases. Refactored the code that handles primary expressions.
Review URL: https://chromiumcodereview.appspot.com//9453020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4550 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-23 19:55:57 +00:00
iposva@google.com
f0c1954e9b
Fix issue 732:
...
- Add handling for #resource library tags: Ignore at runtime, they are only used
by the Dart Editor at the moment.
Review URL: https://chromiumcodereview.appspot.com//9431038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4493 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-22 21:40:07 +00:00
srdjan@google.com
acb395f713
Fix issue 979: operator arity must be verified.
...
Review URL: https://chromiumcodereview.appspot.com//9414005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4401 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-21 17:34:00 +00:00
asiva@google.com
3983c61041
Implement capability to use the same library prefix for multiple library imports (currently this is flagged as an error).
...
e.g:
#import("mylib101.dart", prefix:"mylib");
#import("mylib102.dart", prefix:"mylib");
#import("mylib103.dart", prefix:"mylib");
Review URL: https://chromiumcodereview.appspot.com//9363048
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4289 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-15 20:53:28 +00:00
regis@google.com
83e063f330
Simplify type resolution in parser.
...
Review URL: https://chromiumcodereview.appspot.com//9395017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4240 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-15 00:44:16 +00:00
asiva@google.com
d50bbba277
Implement support for specifying string interopolation style variable substitution in the import and source statements.
...
e.g:
sivamach[runtime]>more /workspace/asiva/expr/test1.dart
#library('test1.dart');
#import('${GOOGLE}$SRC/test2.dart');
#import('$DART/test3.dart');
test1() {
print("test1");
}
main() {
test1();
test2();
test3();
}
sivamach[runtime]>more /workspace/asiva/expr/src/test2.dart
#library('test2.dart');
#source('$GOOGLE$SRC/test2a.dart');
test2() {
print("test2");
test2a();
}
sivamach[runtime]>more /workspace/asiva/expr/src/test2a.dart
test2a() {
print("test2a");
}
sivamach[runtime]>more /workspace/asiva/expr/src/test3.dart
#library('test3.dart');
#source('test3a.dart');
test3() {
print("test3");
test3a();
}
sivamach[runtime]>more /workspace/asiva/expr/src/test3a.dart
test3a() {
print("test3a");
}
sivamach[runtime]>out/Debug_ia32/dart --import_map=GOOGLE,/workspace/asiva/expr --import_map=SRC,src --import_map=DART,/workspace/asiva/expr/src /workspace/asiva/expr/test1.dart
test1
test2
test2a
test3
test3a
Review URL: https://chromiumcodereview.appspot.com//9359009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4199 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-13 22:50:19 +00:00
iposva@google.com
242a784291
- Revert r4135: va_copy is not available everywhere.
...
Review URL: https://chromiumcodereview.appspot.com//9381009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4136 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-10 17:08:22 +00:00
iposva@google.com
431e8329bb
Fix http://dartbug.com/1133 :
...
- Incrementally concat error messages to avoid hitting
a maximum error message size.
Review URL: https://chromiumcodereview.appspot.com//9334007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4135 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-10 16:59:41 +00:00
regis@google.com
2edb4ae9c7
Add token index position to classes and types for more accurate error reporting.
...
Review URL: https://chromiumcodereview.appspot.com//9325047
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3965 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-06 19:52:02 +00:00
turnidge@google.com
0ddd4c04e9
Dart_PropagateError, take 2.
...
This change hopefully takes care of the non-mac build issues. The
checked mode failures are fixed in a separate cl.
Review URL: https://chromiumcodereview.appspot.com//9316071
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3863 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-02 19:05:06 +00:00
turnidge@google.com
ae88492093
Revert Dart_PropagateError until I can track down the problems in
...
checked mode tests.
Sorry for the hubbub.
Review URL: https://chromiumcodereview.appspot.com//9314053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3823 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-01 23:39:28 +00:00
turnidge@google.com
9da62c5fea
Add Dart_PropagateError.
...
This function can be used in native functions to properly pass all
errors up the stack.
Set the long jump base in the Compiler instead of outside of the
compiler. A bunch of errors that used to be propagated through the
sticky_error are now propagated through return values. This includes
all of the DartEntry and DartLibraryCall functions.
In particular, we no longer use the long jump to cross dart frames.
Instead errors are propagated across dart frames using the same
mechanism that we use for unhandled exceptions. I've added assertions
to make sure that we only use the long jump when it is "safe".
Review URL: https://chromiumcodereview.appspot.com//9169102
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3815 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-01 22:34:16 +00:00
regis@google.com
76a765b72f
Simplify parsing of 'new' operator.
...
Fix checking of default factory type parameters (add new tests).
Start cleanup of class resolution code in parser and finalizer.
Review URL: https://chromiumcodereview.appspot.com//9290065
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3632 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-26 23:50:29 +00:00
regis@google.com
ed9d7a399f
Optimize parsing of qualified identifiers.
...
Review URL: https://chromiumcodereview.appspot.com//9271023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3509 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-23 19:56:35 +00:00
regis@google.com
5b1da9fc27
Skip qualified identifiers that are part of ignored types.
...
Review URL: https://chromiumcodereview.appspot.com//9150036
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3441 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-19 18:31:55 +00:00
regis@google.com
366695d347
Ignore parsed types of local variables in unchecked mode and replace them with
...
the Dynamic type.
Review URL: https://chromiumcodereview.appspot.com//9232016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3404 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-18 18:08:04 +00:00
turnidge@google.com
53ba5c402e
Make the "sticky error" an Error instead of a String.
...
I do this in preparation for using the sticky error to implement
isolate unwinding.
Review URL: https://chromiumcodereview.appspot.com//9186058
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3367 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-17 19:54:02 +00:00
hausner@google.com
343dff6255
Proper handling of built-in identifiers
...
Allow pseudo-keywords (built-in identifiers) as regular identifiers for anything but class names, interface names, typedef names.
Still todo: Update blacklist of class/interface names, disallow pseudo-keywords as type parameter names.
Review URL: http://codereview.chromium.org//9107070
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3303 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-13 19:24:50 +00:00
srdjan@google.com
d07087ce77
Ongoing renaming of type classes:
...
TypeArguments -> AbstractTypeArguments
TypeArray -> TypeArguments
Review URL: http://codereview.chromium.org//8776020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2002 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 23:19:59 +00:00
srdjan@google.com
2ff4d8a207
Address Regis' comments, replace AbstractType with Type where possible.
...
Review URL: http://codereview.chromium.org//8772009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1992 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 21:14:48 +00:00
srdjan@google.com
17552e9a3c
Renaming type classes as discussed:
...
Type -> AbstractType
ParameterizedType -> Type
TODO:
TypeArguments -> AbstractTypeArguments
TypeArray -> TypeArguments
Review URL: http://codereview.chromium.org//8761011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1987 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 16:54:52 +00:00
regis@google.com
9f230a34c6
Implement type checking of list literals (issue 220).
...
Remove expose_core_impl flag.
Add tests.
Fix tests.
Cleanup type checking of map literals.
Review URL: http://codereview.chromium.org//8676001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1809 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-23 19:34:23 +00:00
regis@google.com
a2bb53c7af
Implement type checking of map literals (issue 221).
...
Support proper syntax for map literals (at most one type argument is allowed)
and give a warning when legacy syntax is used.
Add tests.
Fix tests.
Review URL: http://codereview.chromium.org//8637018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1764 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-22 21:42:07 +00:00
regis@google.com
314a89e16c
Update comments in core lib showing proper factory syntax.
...
Improve error messages reported from class finalizer.
Fix parser error reporting to be thread safe.
Reformat type error and failed assertion messages to be consistent.
Add one more new factory syntax test.
Review URL: http://codereview.chromium.org//8549033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1708 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 17:06:52 +00:00
regis@google.com
a5dc8b60d1
Fix code generation issue with new factory syntax.
...
Convert VM core library to new factory syntax.
Review URL: http://codereview.chromium.org//8602004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1662 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 17:47:12 +00:00
regis@google.com
3c64ffe9a3
Support correct factory syntax in the VM as decribed in the spec.
...
Change the default value of --silent_warnings from true to false, so that
warnings are visible when legacy factory syntax is used.
In order to facilitate transition of libraries and user programs, legacy factory
syntax is still supported by 2 workarounds, but warnings are printed.
The first workaround allows the factory clause to omit the type
parameter list, which otherwise has to match exactly with the list of
type parameters in the factory class declaration.
The second workaround allows a factory method to omit the type
parameter list. In that case, the type parameter list of the enclosing
class is used instead.
Workarounds will be removed to enforce correct factory syntax at a later time.
Review URL: http://codereview.chromium.org//8585004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1595 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-16 23:49:04 +00:00