asiva@google.com
2393f17f1a
Fix win32 Socket test errors
...
SocketInfoTest and SocketPortTest are failing on windows.
Review URL: https://chromiumcodereview.appspot.com//10014037
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6390 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-10 23:29:02 +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
ricow@google.com
4a4b4da476
Speculative fix for the windows compilation failure.
...
Review URL: https://chromiumcodereview.appspot.com//10032030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6363 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-10 15:47:59 +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
sgjesse@google.com
e727d8c8b3
Refactor the close and error handling of HTTP connections
...
* Unify the handling of connection close and connection error.
* The HttpConnection and HttpClientConnection now have separate
close/error handling
* The HTTP parser gets the connection close indication as it might
signal end of body for responses with no other length indication
R=ajohnsen@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9956062
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6355 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-10 12:54:54 +00:00
ajohnsen@google.com
a4c350c17f
Fix signature of GetRemotePeer declaration.
...
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9999022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6354 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-10 12:24:04 +00:00
ajohnsen@google.com
4ecf48b601
Add remoteHost to Socket.
...
This is merging the native calls into one, GetRemotePeer, thus
eliminating a potentiel extra call to getpeername.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10032027
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6353 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-10 12:18:12 +00:00
ajohnsen@google.com
358ba443f3
Actually close socket, on eviction timeout.
...
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10037003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6352 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-10 12:09:47 +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
861297e2a8
Fix build break.
...
Review URL: https://chromiumcodereview.appspot.com//9999009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6345 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-09 23:17:28 +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
3077bcfea8
Make test non vm-specific (cl 9969122 follow up).
...
Small edits in both vm-specific and non-vm specific versions of the same test.
Review URL: https://chromiumcodereview.appspot.com//9956116
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6149 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-03 21:48: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
regis@google.com
6e82698624
Copy vm-specific test to vm-specific location.
...
A follow-up cl will make the original test non vm-specific.
Review URL: https://chromiumcodereview.appspot.com//9969122
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6143 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-03 19:47:40 +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
ajohnsen@google.com
1dd508bd44
Add remotePort getter to Socket.
...
Review URL: https://chromiumcodereview.appspot.com//9963053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6090 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-02 13:54:03 +00:00
sgjesse@google.com
39ffbe20ae
Discard HTTP data written after a socket error
...
If any type of HTTP connection encounters an error writing additional
data is an error. However in many cases getting exceptions from writes
in this situation is inconvenient.
With this change any data written will be silently discarded after an
error have occoured. The onError will always be called and the user of
the library have the ability to stop generating output data as soon as
possible.
Currently this is default behaviour with no option for changing it.
R=ajohnsen@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9958059
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6089 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-02 13:51:36 +00:00
ajohnsen@google.com
809fca8714
Add a new attachTo method to HttpServer, for using an existing ServerSocket.
...
Review URL: https://chromiumcodereview.appspot.com//9965053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6082 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-02 08:24:37 +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