asiva@google.com
08c662b1c0
Represent tokens as a compressed stream instead of an array.
...
On x86:
Original sizes:
Size of isolate snapshot = 925655
New space (0k of 32768k) Old space (1700k of 1792k) Code space (0k of 0k)
out/ReleaseIA32/run_vm_tests --benchmarks
CorelibCompileAll(RunTime): 80944
CorelibIsolateStartup(RunTime): 5636
UseDartApi(RunTime): 404620
Dart2JSCompileAll(RunTime): 1379683
FrameLookup(RunTime): 45
Size with the new TokenStream implementation:
Size of isolate snapshot = 851352
New space (0k of 32768k) Old space (1368k of 1536k) Code space (0k of 0k)
out/ReleaseIA32/run_vm_tests --benchmarks
CorelibCompileAll(RunTime): 76918
CorelibIsolateStartup(RunTime): 4056
UseDartApi(RunTime): 502111
Dart2JSCompileAll(RunTime): 1251646
FrameLookup(RunTime): 45
(saves about 332k out of the original TokenStream size of 410k)
On x64:
Original sizes:
Size of isolate snapshot = 924865
New space (0k of 32768k) Old space (3234k of 3444k) Code space (0k of 0k)
out/ReleaseX64/run_vm_tests --benchmarks
CorelibCompileAll(RunTime): 109660
CorelibIsolateStartup(RunTime): 3985
UseDartApi(RunTime): 463009
Dart2JSCompileAll(RunTime): 2170309
FrameLookup(RunTime): 35
Size with the new TokenStream implementation:
Size of isolate snapshot = 849675
New space (0k of 32768k) Old space (2436k of 2560k) Code space (0k of 0k)
out/ReleaseX64/run_vm_tests --benchmarks
CorelibCompileAll(RunTime): 98716
CorelibIsolateStartup(RunTime): 2938
UseDartApi(RunTime): 509149
Dart2JSCompileAll(RunTime): 2042273
FrameLookup(RunTime): 39
(saves about 798k out of the original TokenStream size of 810k)
Token stats:
Number of tokens: 101470
Literal tokens: 4550
Ident tokens: 33020
Review URL: https://chromiumcodereview.appspot.com//10697055
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9539 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 00:11:58 +00:00
regis@google.com
e6e70d7bb2
Allocate types in proper heap space.
...
Allow type finalization without canonicalization.
Review URL: https://chromiumcodereview.appspot.com//10696155
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9529 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-10 21:54:13 +00:00
srdjan@google.com
bfd52ec46a
Rename Script's source to Source. Trace parser (--trace-parser) only if source is available (thus skipping all the 'noise' of bootstrap methods).
...
Review URL: https://chromiumcodereview.appspot.com//10752017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9494 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-10 00:14:25 +00:00
regis@google.com
32c8564b0a
Add --trace_type_check_elimination flag for debugging purposes.
...
Review URL: https://chromiumcodereview.appspot.com//10689099
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9471 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-09 16:59:15 +00:00
regis@google.com
09d3ecf285
Compile an instance setter call when a static getter is declared, but no field
...
or static setter are declared (issue 3941).
Add test.
Review URL: https://chromiumcodereview.appspot.com//10689083
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9376 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 20:40:02 +00:00
regis@google.com
d95cbc8d7f
Use VM type cast and save handles.
...
Review URL: https://chromiumcodereview.appspot.com//10693071
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9317 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-02 21:42:53 +00:00
regis@google.com
1036a3888f
Consider upper bounds of type parameters in type checks.
...
Fix pointer visiting in TypeParameter.
Make TypeParameter::index() non-virtual.
Review URL: https://chromiumcodereview.appspot.com//10696013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9188 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 20:08:30 +00:00
regis@google.com
0532a90a2f
Implement type cast in the VM.
...
Review URL: https://chromiumcodereview.appspot.com//10659005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9070 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 17:23:11 +00:00
hausner@google.com
0b403430bf
Fix parent function of deeply nested closures
...
We got the parent of nested closures wrong if the nesting level
was > 2.
Fix for issue 3412.
Review URL: https://chromiumcodereview.appspot.com//10665009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9065 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 15:43:04 +00:00
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
asiva@google.com
517cd6e6bb
- Fix the type test failure for implicit native closures.
...
- Turn the test back on.
Review URL: https://chromiumcodereview.appspot.com//10572029
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8885 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 02:15:08 +00:00
hausner@google.com
5fb638b575
Support captured variables in debugger
...
- Add context level ranges to LocalVarDescriptors
- Add callee-saved context chain register to LocalVarDescriptors
- Add context level and context offset of captured variables
to LocalVarDescriptors
- Add context chain to ActivationFrame
- Add current context level to ActivationFrame
Review URL: https://chromiumcodereview.appspot.com//10579020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8863 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 18:52:34 +00:00
asiva@google.com
73bfbc5da4
Allow implicit 'close your eyes' of native methods. This will hopefully fix issue 3466.
...
- when resolving the native method which has been closurized account for the 'this' argument in the count of arguments.
- explicitly copy the 'this' parameter in the closure context as the first parameter before calling the native function. This is done by piggy backing on the CopyParameters code used for functions with optional parameters.
Review URL: https://chromiumcodereview.appspot.com//10535180
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8816 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 19:56:06 +00:00
hausner@google.com
a7f542becb
Remove obsolete String + code
...
Review URL: https://chromiumcodereview.appspot.com//10562038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8810 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 18:00:25 +00:00
hausner@google.com
f0ccfe83e0
Turn off support for String + operator in the VM
...
Review URL: https://chromiumcodereview.appspot.com//10568002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8764 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 00:56:03 +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
srdjan@google.com
bd0bda32f0
Inline setters, getters, various cleanups & restructuring.
...
TODO: cid, token_index and try_index are often passsed around. We should pack them in a data structure.
Review URL: https://chromiumcodereview.appspot.com//10540040
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8406 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-07 19:49:50 +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
regis@google.com
31180a540e
Check upper bounds of factory class type parameters when instantiating an
...
interface (issue 1380).
Review URL: https://chromiumcodereview.appspot.com//10441115
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8162 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-31 15:51:36 +00:00
hausner@google.com
a07ebcc268
Clarify error message when illegally accessing 'this'
...
Fix bug 3185
Review URL: https://chromiumcodereview.appspot.com//10447102
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8134 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-30 23:41:33 +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
regis@google.com
96ca3951e7
Address review comments missed in previous change.
...
Review URL: https://chromiumcodereview.appspot.com//10432010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7934 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 23:00:20 +00:00
regis@google.com
b0593c8af4
Disallow repeated formal parameters (issue 2240).
...
Review URL: https://chromiumcodereview.appspot.com//10434005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7925 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 21:47:05 +00:00
regis@google.com
5fe23d1497
Disallow repeated type parameters (issues 2239 & 2240).
...
Add test.
Review URL: https://chromiumcodereview.appspot.com//10426002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7922 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 20:05:40 +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
fschneider@google.com
13c3beec30
Make saving and restoring of the context around closure calls explicit.
...
This is a first step to refactor the codegen-templates to be reused
between optimizing and non-optimizing backend.
The context is now explicitly saved in a temporary local variable and
not passed as an argument to the ClosureCall instruction anymore.
Review URL: https://chromiumcodereview.appspot.com//10409043
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7811 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-21 17:59:02 +00:00
regis@google.com
6fb0a9b281
Default parameter values are now allowed in interface methods and in abstract
...
methods, but not in function type aliases.
Made a negative test positive.
Disabled erroneous co19 tests (new co19 issue 123).
Review URL: https://chromiumcodereview.appspot.com//10392175
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7782 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 23:59:59 +00:00
srdjan@google.com
d016f51e9c
Start porting fast typechecks to x64.
...
Review URL: https://chromiumcodereview.appspot.com//10407018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7760 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 20:10:29 +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
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