asiva@google.com
a7baece639
Use Double::NewCanonical instead of creating a double object and then canonicalizing it.
...
Review URL: https://codereview.chromium.org//12038051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17510 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-23 22:50:25 +00:00
asiva@google.com
f4fe42c280
Added macros OBJECT_IMPLEMENTATION and FINAL_OBJECT_IMPLEMENTATION
...
which have different implementations of 'operator=' and 'operator^='.
In the case of FINAL_OBJECT_IMPLEMENTATION we do not do the vtable setting
in these methods (Note the |= operator functionality is now subsumed into
the new implementation of "operator^=")
Review URL: https://codereview.chromium.org//12052033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17491 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-23 20:01:31 +00:00
srdjan@google.com
d56766f251
More ^= to |=
...
Review URL: https://codereview.chromium.org//11941021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17308 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 19:43:19 +00:00
asiva@google.com
4c069867e4
- Make Boolean 'true' and 'false' singleton VM isolate objects.
...
- Change all uses of it
Review URL: https://codereview.chromium.org//11745022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16623 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-04 01:52:05 +00:00
asiva@google.com
7022b39e35
Convert all symbol accessors to return read only handles so that it is not necessary to create a new handle in the code that uses it.
...
Added a few more strings to the symbols list.
Review URL: https://codereview.chromium.org//11667012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16584 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-02 19:31:59 +00:00
regis@google.com
d273efd45f
Turn compile time errors related to missing getters and setters into invocation
...
of noSuchMethod or into throwing of NoSuchMethodError according to spec.
Return result of InvocationMirror.invokeOn to caller.
Fix various tests.
Review URL: https://codereview.chromium.org//11669015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16463 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-22 00:40:46 +00:00
asiva@google.com
7ea520f10f
Create read only handles for empty_array and sentinel objects
...
(trying out a basic framework and will extend it to others once this
works).
Review URL: https://codereview.chromium.org//11648006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16416 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 02:33:05 +00:00
asiva@google.com
2c6de68680
Changed the API in DartEntry for invoking dart code from C++ to make it more compatible with the requirements of the runtime.
...
Deleted all the code duplication that was added to circumvent the old DartEntry API requirements.
Review URL: https://codereview.chromium.org//11613009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16288 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 21:36:01 +00:00
hausner@google.com
be175c758e
Implement const expressions for local variables
...
Review URL: https://codereview.chromium.org//11265047
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14716 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-09 00:19:43 +00:00
hausner@google.com
29c1668cb9
Prevent mutation of final variables
...
Fixes issue 4328
Review URL: https://codereview.chromium.org//11363012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14366 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-31 19:43:44 +00:00
hausner@google.com
feff694279
More fixes for super[]
...
Extend the LoadIndexedNode to also handle super[] and super[]=
Make sure super []= returns the value.
Handle side effects in index expression correctly.
Defer operator function resolution to the flow graph build phase.
Review URL: https://codereview.chromium.org//11267027
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14157 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-26 22:31:49 +00:00
hausner@google.com
384115d235
Remove built-in identifier 'negate' from VM
...
Keep the token kNEGATE for the backend to distinguish between
unary and binary - operator.
Review URL: https://codereview.chromium.org//11199002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13700 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-16 20:19:06 +00:00
asiva@google.com
1bf642129d
- Get rid of RawClosure class and use RawInstance for closures.
...
- Simplify SetRaw to not require an access to the Current Isolate.
Review URL: https://codereview.chromium.org//11087070
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13581 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-11 20:34:08 +00:00
regis@google.com
1b8e614d7d
Change compile-time errors into dynamic errors in instance creation expression
...
(issue 3085).
Change compile-time errors into dynamic errors in static getter and setter
calls (issues 3088, 3094).
Fix a crash in flow graph builder for missing static getter (issue 4360).
Add support in VM for NoSuchMethodError.
Remove support in VM for StaticResolutionException.
Add, remove, update related language tests.
Triage related co19 tests.
Review URL: https://codereview.chromium.org//11049038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13208 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-04 00:15:38 +00:00
hausner@google.com
8f2c8c35fb
References to static functions are CT constants
...
A compile time constant expression may refer to top-level and
static closures.
Fix for issue 3406.
Review URL: https://chromiumcodereview.appspot.com//10823292
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10600 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 20:15:06 +00:00
hausner@google.com
45b76746b5
Fix super getter/setter
...
Fix handling of super getters and setters. In particular, parser
now correctly converts super getters into super setters for
compound assignment, and pre- and postfix increment operators.
co 19 tests still fail because super index operator is broken.
Will work on this next.
Review URL: https://chromiumcodereview.appspot.com//10849004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10413 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-08 18:02:51 +00:00
regis@google.com
bf7540da98
Store pointer instead of reference to LocalVariable in ast and flow graph.
...
Address comments of already committed r10203.
Review URL: https://chromiumcodereview.appspot.com//10832126
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10321 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-06 23:17:04 +00:00
hausner@google.com
741a12cfd6
Support const modifier in fields, variables
...
Issue 3551
This change adds const as a valid keyword to declare fields and
variables. The mandatory initializer has to be a compile time
const expression.
Static final variables still have to be initialized with
compile time constant expressions. I will add non-const static
finals (issue 3558) in another change.
Other small changes:
- allow null in some compile time constant expressions.
- allow only numbers, booleans, strings and null in compile time
constant string interpolation.
Review URL: https://chromiumcodereview.appspot.com//10828053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9992 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-27 20:49:24 +00:00
fschneider@google.com
7de785eaf4
Remove unused code for StringConcatNode from the AST and the graph builder.
...
Review URL: https://chromiumcodereview.appspot.com//10693092
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9405 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-04 13:07:22 +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
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
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
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
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
18d5cf7965
Fix two compile time const issues
...
- For equality expressions, the operands do not have to be of same
type. (Issue 1671)
- Truncating division is allowed for any numerical type, not just
integer. (Issue 1780) Spec has been updated accordingly and
co19 issue 106 filed to fix faulty test.
Review URL: https://chromiumcodereview.appspot.com//9969023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6059 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-30 18:45:17 +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
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
srdjan@google.com
9e77768c91
Fix for bug 1229: Unary operator plus is not allowed ... except for literals.
...
Add tests for incorrect literals, e.g. "+ 5".
Added a temporary token kTIGHTADD that represents an ADD not terminated by a whitespace. It is temporary and eliminated in the parser (code generator ot AST do not see it). It is used to recognize correct literals.
Review URL: https://chromiumcodereview.appspot.com//9264051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3745 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-31 20:05:24 +00:00
iposva@google.com
731616c7d3
- Remove support for ">>>" operator.
...
Review URL: http://codereview.chromium.org//9203004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3279 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-13 09:10:48 +00:00
srdjan@google.com
46748dc6b1
Allocate double temporaries in old space, because they belong there. Canonicalize more double literals.
...
Review URL: http://codereview.chromium.org//8921012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2351 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-12 18:59:20 +00:00
srdjan@google.com
49caedb014
Fix issue: 5427703 (compareTo), fix parsing of -0.0.
...
Review URL: http://codereview.chromium.org//8430037
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1156 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-03 18:03:39 +00:00
regis@google.com
db3a736c33
Support optional named arguments at the dart_entry level in the VM.
...
Fix bug 5422033: Const expressions don't work with named arguments.
Review URL: https://chromereviews.googleplex.com/3552015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@168 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-06 22:40:45 +00:00
dgrove@google.com
4c0f559d23
Initial checkin.
...
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-05 05:20:07 +00:00