asiva@google.com
fe77f95469
Fix for Issue 2367
...
The '\r' character was included in the string literal when parsing integer or double literals. This was resulting in incorrect integer values being created.
Review URL: https://chromiumcodereview.appspot.com//10054027
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6442 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 22:07:47 +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
d1d3235013
Modify 'movq reg, reg' encoding in 64-bit code.
...
Use 0x89 encoding (instead of 0x8B encoding), which is expected by gdb64
older than 7.3.1-gg5 when disassembling a function's prolog (movq rbp, rsp)
for proper unwinding of Dart frames (use --generate_gdb_symbols and -O0).
Review URL: https://chromiumcodereview.appspot.com//10052013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6422 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 18:13:09 +00:00
regis@google.com
113c4b6626
Add missing calls to class finalizer in various tests.
...
Make 'sentinel' and 'transition_sentinel' instances of class Null.
Review URL: https://chromiumcodereview.appspot.com//10034019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6421 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 18:12:28 +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
3bf28e7d3f
Implement finally in new compiler.
...
Review URL: https://chromiumcodereview.appspot.com//9999045
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6419 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 17:35:06 +00:00
iposva@google.com
85b2b6f32a
- Use the free top of old-space pages when allocating.
...
Review URL: https://chromiumcodereview.appspot.com//10057001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6405 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 11:54:01 +00:00
srdjan@google.com
d154a7ffce
Try/catch in new compiler. Added try index to appropriate instructions. If any instruction throws an exception, the try index tells us which catch entry the exception belongs to.
...
Review URL: https://chromiumcodereview.appspot.com//10014006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6389 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-10 23:22:40 +00:00
asiva@google.com
a45c0b86be
Fix OS::VSNPrint to make it behave similar to linux and macos versions.
...
Mathias found this bug will using it in the JSON parser.
Review URL: https://chromiumcodereview.appspot.com//10037018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6380 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-10 20:42:35 +00:00
hausner@google.com
84d10e0561
Basic support for reading and writing JSON objects.
...
This is a minimal implementation that we can grow as needed
for debugger protocols and isolate communication.
Review URL: https://chromiumcodereview.appspot.com//9949054
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6362 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-10 15:28:07 +00:00
cshapiro@google.com
54837ce8eb
Process weak reference sets when a scavenge invokes the API callbacks.
...
BUG=2391
Review URL: https://chromiumcodereview.appspot.com//9956138
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6348 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-10 02:57:43 +00:00
asiva@google.com
8f208ad7ca
Wire GrowableArray to use the internal VM object.
...
This also fixes issue (5526318 : Make access to GrowableArray objects through the dart api more efficient)
Review URL: https://chromiumcodereview.appspot.com//10012042
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6341 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-09 21:50:53 +00:00
srdjan@google.com
fdc147509e
Fix a crash in graoh builder where a throw node is added in an expression tree by the parser: allow throws in expressions by not closing the fragment, instead return null as value.
...
Review URL: https://chromiumcodereview.appspot.com//10032009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6340 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-09 21:31:15 +00:00
asiva@google.com
2d3775a1b1
Resubmit change 6302 after fixing the compiler warning on older GCC compiler versions:
...
Change 6302 description:
- Wire the stack frame iterator to use stack maps for traversing objects if
there are stack maps in the code object. If there are no stack maps it still
does the old style stack frame traversal between fp and sp looking for tagged
pointers.
- Added a mechanism to be able to iterate over the code space and look for a
particular object.
Review URL: https://chromiumcodereview.appspot.com//10030001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6331 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-09 18:20:23 +00:00
asiva@google.com
c79da818cc
Revert change 6302 until the compiler warning is addressed.
...
Review URL: https://chromiumcodereview.appspot.com//10025003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6304 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-07 02:04:28 +00:00
asiva@google.com
c27cec5b6e
- Wire the stack frame iterator to use stack maps for traversing objects if there are stack maps in the code object. If there are no stack maps it still does the old style stack frame traversal between fp and sp looking for tagged pointers.
...
- Added a mechanism to be able to iterate over the code space and look for a particular object.
- Remove registration of code objects into the code index table.
Review URL: https://chromiumcodereview.appspot.com//9791048
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6302 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-07 01:44:48 +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
5f30febb45
Inline the StackResource constructor/destructor.
...
This yields a 29% improvement on the Benchmark_UseDartApi microbenchmark.
To do this, I had to split a few fields from Isolate into a
BaseIsolate class. Sort of yucky.
Review URL: https://chromiumcodereview.appspot.com//10008030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6288 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-06 18:00:51 +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
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
hausner@google.com
db3e0327a0
Fix static field inspection in debugger
...
- Handle static fields that have no getter (issue 2462).
- Get correct value of initialized fields (issue 2221).
- Add test case.
Review URL: https://chromiumcodereview.appspot.com//10009023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6251 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-05 22:42:45 +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
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
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
srdjan@google.com
74e2768550
Implement context cloning in new compiler.
...
Review URL: https://chromiumcodereview.appspot.com//9961019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6206 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-04 23:10:21 +00:00
srdjan@google.com
4c9fe5b040
Implement closure with type arguments.
...
Review URL: https://chromiumcodereview.appspot.com//9978014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6196 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-04 20:56:46 +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
turnidge@google.com
d2050dce39
Add a unit test Benchmark_UseDartApi to measure dart api overhead.
...
Sample output:
Benchmark_UseDartApi: 3.245700 us per iteration
Review URL: https://chromiumcodereview.appspot.com//9979016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6189 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-04 19:47:22 +00:00
hausner@google.com
5e7bc84013
Fix debugger crashes
...
Do not include captured variables in the list of local variables
until the debugger knows how to get their value from the context.
Fixes issue 2401 (http://code.google.com/p/dart/issues/detail?id=2401 )
Review URL: https://chromiumcodereview.appspot.com//9961012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6187 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-04 18:51:20 +00:00
srdjan@google.com
ea5a4fac30
New compiler: implement switch/case in graph builder.
...
Review URL: https://chromiumcodereview.appspot.com//9959127
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6180 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-04 17:56:53 +00:00
srdjan@google.com
87d8bb5039
Implement StringConcatNode in flow graph builder (it is ised on for "+" on strings, will be soon removed).
...
Review URL: https://chromiumcodereview.appspot.com//9959134
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6179 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-04 17:25:35 +00:00
floitsch@google.com
dd803f0c8f
Rename variables in Bigint file.
...
Addresses review comments from https://chromiumcodereview.appspot.com/9536016
Review URL: https://chromiumcodereview.appspot.com//9959095
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6163 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-04 09:41:10 +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
turnidge@google.com
e610ab662b
Revert my last change due to problems on other platforms.
...
Review URL: https://chromiumcodereview.appspot.com//9968088
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6129 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-03 17:51:20 +00:00
turnidge@google.com
11d29be5e1
Detect recursion during compilation of const constructors.
...
We now give a message like this:
Illegal recursion in const constructor 'A.'.
Review URL: https://chromiumcodereview.appspot.com//9965081
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6128 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-03 17:32:39 +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
srdjan@google.com
f51f25cd28
Implement JumpNode handling (continue, break) in Dowhile and While nodes.
...
Review URL: https://chromiumcodereview.appspot.com//9958070
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6098 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-02 18:08:35 +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
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
ac580abf42
Implement JumpNode for break/continue in for loops.
...
Review URL: https://chromiumcodereview.appspot.com//9907001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6050 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-30 17:18:34 +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
srdjan@google.com
5023823e5b
Fix trigonometric intrinsics: if allocation fails remember to release the loaded value on FPU stack.
...
Review URL: https://chromiumcodereview.appspot.com//9909024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6003 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-29 21:01:48 +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
iposva@google.com
de4e574ac3
- Make the URI resolution methods used by the tag handler private.
...
Review URL: https://chromiumcodereview.appspot.com//9845040
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5921 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-28 01:21:04 +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