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
srdjan@google.com
64226e65ac
Share intrinsification framework across architectures, started on instrinsification in the new compiler x64.
...
Review URL: https://chromiumcodereview.appspot.com//10035006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6661 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 22:44:41 +00:00
regis@google.com
cb6c1b27f3
Implement checked mode in new compiler.
...
The only remaining bailout is the boolean type check for conditions.
Review URL: https://chromiumcodereview.appspot.com//10080015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6542 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-13 22:16:59 +00:00
srdjan@google.com
d8ffeb2f8a
Fix performance issue with instanceof String checks on ia32. x64 in new compiler is coming in a following CL: use inlined type-test cache to compare against String interface and simplify test against bool. This CL addresses the issue 2530.
...
Review URL: https://chromiumcodereview.appspot.com//10056004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6445 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-12 00:14:49 +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
1125846660
When checking against non-parametrized types use a cache to hold result tuples (class, result). That cache is stored in the instruction stream. Currently implemented for instanceof, ia32 only. Should migrate to other type tests and architectures.
...
70x improvement on a benchmark (similar to what is seen in html _unwrap).
Review URL: https://chromiumcodereview.appspot.com//10010029
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6281 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-06 16:05:55 +00:00
srdjan@google.com
570fd35af9
Move HandlerList to shared ExceptionHandlerList.
...
Review URL: https://chromiumcodereview.appspot.com//9949020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6244 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-05 19:44:49 +00:00
srdjan@google.com
76df5fac83
Implement object allocation/construction as effect (no result), sequence labels and unchaining from context.
...
Review URL: https://chromiumcodereview.appspot.com//10005010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6226 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-05 16:23:22 +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
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
srdjan@google.com
f58f558e30
Minor cleanup in assembly code.
...
Review URL: https://chromiumcodereview.appspot.com//9963032
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6067 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-30 21:47:23 +00:00
srdjan@google.com
c446c19fb7
Intrinsify methods early. Fix some bugs in trinsified code, mark one precision-related bug as SKIP since sometimes it may pass sometimes not.
...
Review URL: https://chromiumcodereview.appspot.com//9921017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5985 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-29 17:05:00 +00:00
srdjan@google.com
0b265044c1
Factor out super-class and interface array subtype checks into a stub.
...
Inline more type checks.
Review URL: https://chromiumcodereview.appspot.com//9873014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5934 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-28 15:50:33 +00:00
srdjan@google.com
e117112c4d
More type checking performance improvements and a bug fix in intrinsifier.
...
With "frog --leg", type checked mdoe is now "only" 5x slower (used to be 10x).
Review URL: https://chromiumcodereview.appspot.com//9844003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5915 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-27 23:01:14 +00:00
srdjan@google.com
4110fcd0ab
Again, forgot to save before uploading/comitting (just added a comment)
...
Review URL: https://chromiumcodereview.appspot.com//9836128
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5899 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-27 19:48:04 +00:00
srdjan@google.com
a559ebbc68
Inline checks for super class and interfaces (checked mdoe improvements).
...
Review URL: https://chromiumcodereview.appspot.com//9863043
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5898 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-27 19:40:08 +00:00
srdjan@google.com
f1bad6571d
Improve checked mode a little (more to come in a different CL).
...
Review URL: https://chromiumcodereview.appspot.com//9854030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5847 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-26 18:23:37 +00:00
asiva@google.com
e360e4d1c9
Second set of changes for implementation of stack map support.
...
- Added functionality to be able to build stack maps in the compiler and register them into the Code object during Code finalization.
- Merged code_generator_ia32_test.cc and code_generator_x64_test.cc into code_generator_test.cc as the two files were identical.
Review URL: https://chromiumcodereview.appspot.com//9721006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5764 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-23 01:27:35 +00:00
regis@google.com
18bd10e96a
Implement StaticGetter and StaticSetter in new compiler.
...
Review URL: https://chromiumcodereview.appspot.com//9726011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5664 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-19 23:09:06 +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
srdjan@google.com
d4dcb9fee0
Clean-up CodeGenState: remove unused loop_level and move context_level to CodeGenerator (and add it to FlowGraphBuilder).
...
Review URL: https://chromiumcodereview.appspot.com//9706086
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5571 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-16 15:38:43 +00:00
regis@google.com
0e5fd9b99c
Do not chain the current context on entry in non-closure functions, but
...
save and restore it on the stack instead, and chain a null context (issue 1613).
Review URL: https://chromiumcodereview.appspot.com//9705004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5446 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-14 00:16:22 +00:00
srdjan@google.com
aca2d7ffe0
Optional arguments in new compiler.
...
Includes Issue 9664062: Support allocating and calling closures in the new non-optimizing compiler (with fixes)
Review URL: https://chromiumcodereview.appspot.com//9693020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5419 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-13 17:35:05 +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
regis@google.com
e05a6a04ba
Fix type checks that wrongly ignored malformed types.
...
Fix corresponding test.
Fix comment in gypi file.
Fix undeclared type in stream_util.dart.
Review URL: https://chromiumcodereview.appspot.com//9649010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5243 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-09 18: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
srdjan@google.com
d6abdfb6b8
Eliminate IncrOpStaticFieldNode, replace a set of nodes.
...
Review URL: https://chromiumcodereview.appspot.com//9592031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5063 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 00:40:48 +00:00
srdjan@google.com
923ed6eb53
It is the setter that can have a result, but not the StoreInstanceFieldNode.
...
Review URL: https://chromiumcodereview.appspot.com//9581016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4902 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 21:52:03 +00:00
srdjan@google.com
e2ab4d25fd
Added stack overflow checks at backward branches in order to allow interrupting endless loops. Better code will detect if the loop calready contains calls and therefore can omit the extra check (in next compiler).
...
Review URL: https://chromiumcodereview.appspot.com//9562045
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4889 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 17:53:28 +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
kmillikin@google.com
888a35df7f
Add a stubbed-out implementation of FlowGraphCompiler for ia32 and arm.
...
It bails out if FlowGraphCompiler::CompileGraph is called, all other public
API functions are UNIMPLEMENTED.
R=srdjan@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9479004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4685 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-28 14:17:17 +00:00
kmillikin@google.com
66d243ea7d
Allocate and finalize a code object on x64 if the new compiler succeeds.
...
If the new compiler completed, use the code that it produced.
R=srdjan@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9474001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4674 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-28 11:34:27 +00:00
hausner@google.com
6d9abc5e3b
StepOver, StepInto, StepOut
...
Implement single stepping in the debugger.
- Add PC descriptors for function return
- functions to set temporary breakpoints on all
locations in a function.
- patching/restoring of function return code pattern
- determine call target of instance calls
Review URL: https://chromiumcodereview.appspot.com//9484002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4639 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-27 22:00:28 +00:00
srdjan@google.com
a343a49338
Do not count invocations but usage of a function, i.e., increment a function's counter at IC calls and at return operations in unoptimized code. (TODO: increment count at static calls as well). There is no checking at method entry any more. The function counter reporting is not measuring the invocation count but much more how much time we spend in a method. Removed counter at backward branches.
...
Renamed flags to:
--optimization_counter_threshold (default 2000)
--report_usage_count
Review URL: https://chromiumcodereview.appspot.com//9460015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4583 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-25 00:33:25 +00:00
srdjan@google.com
1eaef108b9
Move CodeGenerator::DescriptorList into shared part.
...
Review URL: https://chromiumcodereview.appspot.com//9465028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4582 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-24 23:27:24 +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
srdjan@google.com
a54f33bf92
ICData is now a wrapper object that refers to the calling function, target name, ic data array, etc. The old ICData C++ class that wrapped around an Array is removed. The advantage is that the ICData object remains the same, only its ic_data array object is being modified as classes are added..
...
TODO: store ICData-s into function so that the type feedback can be easily extracted (currently must traverse the unoptimized code).
Review URL: https://chromiumcodereview.appspot.com//9395016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4417 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-22 00:40:03 +00:00
srdjan@google.com
edfe6db83f
Fix crash in assembler when tracing function (must be zone handle). Fixes bug 1709.
...
Review URL: https://chromiumcodereview.appspot.com//9415002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4302 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-16 08:42:00 +00:00
regis@google.com
5933826ae8
Fix context unchaining (issue 5991015).
...
Add test.
Review URL: https://chromiumcodereview.appspot.com//9392020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4201 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-14 00:58:56 +00:00
hausner@google.com
4d3a5f658a
Add PC descriptor for ret instruction
...
Adding a new kind of PcDescriptor to mark the location of
function returns in generated code. This will be needed to
put a single-step breakpoint just before the function return.
Also adding a NOP instruction after the ret, so that the
function return code pattern adds up to 5 bytes, which is needed
to patch in a breakpoint call.
Review URL: https://chromiumcodereview.appspot.com//9385022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4159 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-11 01:02:09 +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
980cbf9c74
Store resolved library prefix in unresolved class object in order not to repeat
...
unnecessary library prefix resolution.
Remove redundant Type::NewParameterizedType() helper.
Simplify parsing of qualified identifiers.
Cleanup parsing of factory methods.
Fix resolution of imported types (add tests).
Review URL: https://chromiumcodereview.appspot.com//9233039
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3703 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-31 00:07:07 +00:00
regis@google.com
f9e785eb29
Remove support for obsolete syntax of factory methods and default classes.
...
Review URL: https://chromiumcodereview.appspot.com//9285031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3578 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-24 22:37:45 +00:00
asiva@google.com
bf1b2bbeb9
Improve compile times for swarm application startup
...
- Avoid creation of getter/setter symbol when all we need to do is a lookup
- Add LookupGetterFunction/LookupSetterFunction to avoid having to create the getter name/setter name before doing a lookup
Review URL: https://chromiumcodereview.appspot.com//9265021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3453 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-20 00:55:39 +00:00
hausner@google.com
a9f221ebc2
Improve error message for some unresolved identifiers
...
Review URL: https://chromiumcodereview.appspot.com//9246001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3368 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-17 21:16:27 +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
srdjan@google.com
884228569f
More optimizations: in binary operations check sometimesnnn for two classes instead of one; call some target operators directly (checked call) instead of via inline cache call; allow smi/double binary operations to be inlined.
...
Review URL: http://codereview.chromium.org//8995019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2732 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-21 22:46:01 +00:00