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
cshapiro@google.com
00b6963338
Fix some warnings in the core library identified by the static analyzer.
...
This foray uncovered a latent bug in the byte array view constructor and
its use of default arguments. That bug has been corrected and new tests
have been added to the test suite.
BUG=2136
Review URL: https://chromiumcodereview.appspot.com//10653002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9013 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-22 04:27:57 +00:00
iposva@google.com
0fd25118b9
- Move the Timer interface to the dart:isolate library so that it
...
is accessible from both client and standalone program.
- Enable a way for the embedder to provide the implementation of
the Timer interface.
- Update tests.
Review URL: https://chromiumcodereview.appspot.com//10532123
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8987 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 16:17:21 +00:00
floitsch@google.com
a51dc25968
Make isUtc a getter, change some method names in Date. Weekday is now 1 based.
...
isUtc is now a getter.
Date.hours -> Date.hour
Date.minutes -> Date.minute
Date.seconds -> Date.second
Date.milliseconds -> Date.millisecond
Date.fromEpoch -> Date.fromMillisecondsSinceEpoch
Date.value -> Date.millisecondsSinceEpoch
Date.MON == 1 (up to Date.SUN == 7).
Fixes issue 3444, 1985.
Review URL: https://chromiumcodereview.appspot.com//10538105
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8899 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 11:43:46 +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
cshapiro@google.com
fdb1c60bf1
Document the ByteArray types and reconcile with the implementation.
...
BUG=1499
Review URL: https://chromiumcodereview.appspot.com//10535178
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8738 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-15 20:16:58 +00:00
floitsch@google.com
dd61a23829
Reapply "Refactor Date implementation in VM."
...
This reapplies fixed versions of commit 7542 and commit 8544.
Original review URLs:
https://chromiumcodereview.appspot.com//10533068
https://chromiumcodereview.appspot.com//10544109
Review URL: https://chromiumcodereview.appspot.com//10534114
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8655 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 13:05:22 +00:00
turnidge@google.com
312702a5ac
Second local mirrors CL.
...
Implement a few chunks of new mirror functionality. Many changes, notably:
- Added currentIsolateMirror() to provide non-async access to the
local isolate mirror.
- Added mirrorOf(o) to provide access to local instance mirrors.
- Fleshed out InstanceMirror, InterfaceMirror, and LibraryMirror to
various degrees.
- Added the MirroredError hierarchy, which lets the user handle Dart
errors of various sorts from invocation, etc.
- Introduce lazy resolvers for interface mirrors and library mirrors.
These allow us to build the self-referential library/interface
hierarchy without going mad.
- Added better toStrings all around.
- Extended the isolate_mirror_local_test to cover new functionality.
Other changes that were required or seemed prudent:
- Exposed the error hierarchy to the embedder. They need to be able
to distinguish different error types in some situations. Improved
the documetation around error handles and error propagation.
- Added new functions to the dart embedding api as required. Added
tests for all new dart api functions.
Review URL: https://chromiumcodereview.appspot.com//10538043
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8575 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 21:07:49 +00:00
floitsch@google.com
eb92af4080
Revert "Refactor Date implementation in VM."
...
Also revert "Round days-computation to get rid of daylight-savings differences."
This reverts commit 7542 and commit 8544.
Review URL: https://chromiumcodereview.appspot.com//10534111
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8547 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 13:44:45 +00:00
floitsch@google.com
17de58fbaf
Reapply "Refactor Date implementation in VM."
...
This reapplies a fixed version of commit 8533.
https://chromiumcodereview.appspot.com//10533068
Review URL: https://chromiumcodereview.appspot.com//10536116
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8542 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 12:04:36 +00:00
floitsch@google.com
02f39238ae
Revert "Refactor Date implementation in VM."
...
This reverts commit 8533.
Review URL: https://chromiumcodereview.appspot.com//10536114
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8535 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 10:33:36 +00:00
floitsch@google.com
0e297362a2
Refactor Date implementation in VM.
...
Less (and simpler) native functions. More precise semantics (for both the
native functions as well as for the Date class itself).
Fixes issue 3201.
Review URL: https://chromiumcodereview.appspot.com//10533068
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8533 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 10:24:58 +00:00
floitsch@google.com
cde1a8e09a
new Date.now() should be in local timezone.
...
This error probably slipped in during the refactoring.
Review URL: https://chromiumcodereview.appspot.com//10537086
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8483 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-11 08:35:31 +00:00
floitsch@google.com
a1e41b060b
Reapply "Remove deprecated classes and functions in Date."
...
This reapplies a fixed version of commit 8445.
Original CL: https://chromiumcodereview.appspot.com//10541050
Review URL: https://chromiumcodereview.appspot.com//10538061
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8455 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 17:32:18 +00:00
floitsch@google.com
c046c899a0
Revert "Remove deprecated classes and functions in Date."
...
This reverts commit 8445.
Review URL: https://chromiumcodereview.appspot.com//10532068
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8446 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 16:31:55 +00:00
floitsch@google.com
2c2ee2000f
Remove deprecated classes and functions in Date.
...
Review URL: https://chromiumcodereview.appspot.com//10541050
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8445 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 16:01:00 +00:00
turnidge@google.com
ede2df7949
Fix type-check failure...
...
Review URL: https://chromiumcodereview.appspot.com//10449072
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8118 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-30 17:28:28 +00:00
turnidge@google.com
ec36e02c28
Remove the partially completed code for remote IsolateMirrors and
...
replace it with the beginnings of a local (same isolate) IsolateMirror
implementation.
Removed old mirror tests and added two new mirror tests.
Even though mirrors.cc is part of the vm, I chose to implement most of
it using the dart embedding interface instead of our internal
interfaces because the embedding interface was more convenient.
mirrors.cc is basically all new in this CL -- don't pay any attention
to diffs for that file.
Added dart embedding functions required for the functionality in this
CL: Dart_DebugName, Dart_GetNativeInstanceFieldCount,
Dart_RootLibrary, Dart_RegisteredLibraryUrls, and Dart_LibraryName.
Extended or modified some existing dart api functions, primarily to
make them propagate error handles properly.
Added tests for new dart embedding api functionality.
Added the ability to determine if a port is local to the current isolate.
Extended NotImplementedException to accept an optional string
argument. I wanted to give more descriptive error messages.
Review URL: https://chromiumcodereview.appspot.com//10416050
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8117 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-30 17:07:19 +00:00
turnidge@google.com
830bf04de2
Finalize classes before calling the main for a new isolate.
...
This fixes bug 2235.
Review URL: https://chromiumcodereview.appspot.com//10444069
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8079 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-29 21:10:42 +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
floitsch@google.com
a88e304d29
Deprecate use of timezones.
...
Review URL: https://chromiumcodereview.appspot.com//10411057
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7911 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 16:07:35 +00:00
floitsch@google.com
cc15d26cf7
Reapply "Add support for timezone offset and timezone name."
...
This reapplies commit 7800.
Review URL: https://chromiumcodereview.appspot.com//10417009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7805 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-21 16:11:20 +00:00
floitsch@google.com
77ade89e4a
Revert "Add support for timezone offset and timezone name."
...
This reverts commit 7803.
Review URL: https://chromiumcodereview.appspot.com//10416008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7804 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-21 15:13:46 +00:00
floitsch@google.com
618c649c33
Reapply "Add support for timezone offset and timezone name."
...
This reapplies commit 7800.
Original CL: https://chromiumcodereview.appspot.com/10383218/
Don't write *foo += x.
Review URL: https://chromiumcodereview.appspot.com//10413031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7803 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-21 15:07:11 +00:00
floitsch@google.com
5b99866ecd
Revert "Add support for timezone offset and timezone name."
...
This reverts commit 7801..
Review URL: https://chromiumcodereview.appspot.com//10399106
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7802 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-21 14:40:27 +00:00
floitsch@google.com
36d9c69461
Add support for timezone offset and timezone name.
...
Review URL: https://chromiumcodereview.appspot.com//10383218
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7801 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-21 14:36:43 +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
6fece3e398
Fix tests in language suite: eliminate String +
...
The language suite runs clean without String + after this change.
string_concat_test.dart is obsolete, removed.
Review URL: https://chromiumcodereview.appspot.com//10383238
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7745 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 15:33:05 +00:00
floitsch@google.com
6eef3a6ed6
Migrate date.dart from old suffix_ to _prefix privacy.
...
Review URL: https://chromiumcodereview.appspot.com//10389145
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7656 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-15 14:40:43 +00:00
floitsch@google.com
7f06db21d2
Add comparison operators to Date class.
...
Review URL: https://chromiumcodereview.appspot.com//10399027
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7653 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-15 13:15:03 +00:00
floitsch@google.com
d89f228708
Make most arguments to Date constructor optional.
...
Fixes issue 2582.
Review URL: https://chromiumcodereview.appspot.com//10382171
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7652 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-15 12:50:15 +00:00
floitsch@google.com
fd81cf6ad5
Convert double to integer and update status file.
...
Review URL: https://chromiumcodereview.appspot.com//10382170
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7649 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-15 11:45:46 +00:00
floitsch@google.com
1805e79fcb
Support up to 6 digits after the decimal point in Date.fromString.
...
Fixes comment 10 of issue 1728.
Review URL: https://chromiumcodereview.appspot.com//10391111
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7648 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-15 10:59:53 +00:00
floitsch@google.com
86859d3324
Fix typo in Date.toString.
...
We emitted an extra 0 for Dates that had ms == 10.
Fixes issue 1386.
Review URL: https://chromiumcodereview.appspot.com//10310145
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7647 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-15 10:56:31 +00:00
floitsch@google.com
3ccf471f94
Add Hashable to Date interface.
...
Fixes issue 2400
Review URL: https://chromiumcodereview.appspot.com//10391109
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7646 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-15 10:52:51 +00:00
cshapiro@google.com
3c1eaa5277
Implement a getter for pattern to complete the Match interface.
...
BUG=3003
Review URL: https://chromiumcodereview.appspot.com//10386104
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7570 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-11 22:06:14 +00:00
iposva@google.com
3d4d4d71a7
- Typed arrays should implement all methods from Collection and List interfaces.
...
Review URL: https://chromiumcodereview.appspot.com//10391056
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7512 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 19:17:54 +00:00
ajohnsen@google.com
c815a502a7
Add indexOf to Int/Float-List's.
...
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10386039
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7439 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-09 07:13:00 +00:00
cshapiro@google.com
4ad6942ef1
Fix breakage in the JavaScript compilers.
...
This change adds a mock "Uint8List" to dart2js, suppresses the new byte
array test on Frog, and renames interface parameters for dartc.
Review URL: https://chromiumcodereview.appspot.com//10383023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7355 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-05 00:07:25 +00:00
cshapiro@google.com
1472427af8
Revert "Revert "Implement {Int,Uint}{8,16,32,64} and Float{32,64} typed arrays.""
...
This reverts commit 63480a81fccbde001494dd535cd06a8fa02ed261.
Review URL: https://chromiumcodereview.appspot.com//10379018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7352 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 23:16:09 +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
hausner@google.com
95be46105a
Beginnings of a debugger wire protocol
...
The debugger wire handler is implemented similarly to the io event handler.
A dedicated thread monitors the debugger port for incoming connection
requests. When a debugger is connected, the VM sends events messages
over the wire and handles debugger requests.
To start the VM with a debugger connection, use the option
--debug:<portnumber>. The VM pauses at the beginning of main()
and waits for a debugger to connect.
Subsequent changes will implement debugger commands one by one.
With this change, the VM only understands "resume" commands.
Review URL: https://chromiumcodereview.appspot.com//10357003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7330 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 15:25:49 +00:00
cshapiro@google.com
3a14326da4
Revert "Implement {Int,Uint}{8,16,32,64} and Float{32,64} typed arrays."
...
This reverts commit 747dbeaa8f9c0dc1f49d6d6a369c6a3fe2d8b7c9.
Review URL: https://chromiumcodereview.appspot.com//10375007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7313 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 05:28:10 +00:00
cshapiro@google.com
537010ea16
Implement {Int,Uint}{8,16,32,64} and Float{32,64} typed arrays.
...
Internal and external representations of each array are provided. A
single interface type implementing the ByteArray and List interfaces
is shared among the internal and external implementation type.
Review URL: https://chromiumcodereview.appspot.com//9958046
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7311 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 05:12:19 +00:00
floitsch@google.com
410e6bf600
Reapply "Set the TZ env to get the UTC-ms since epoch."
...
This reapplies a fixed version of commit 7285.
Review URL: https://chromiumcodereview.appspot.com//10359003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7288 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-03 15:40:40 +00:00
floitsch@google.com
a8e31e2a48
Revert "Set the TZ env to get the UTC-ms since epoch."
...
This reverts commit 7285.
Review URL: https://chromiumcodereview.appspot.com//10354011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7287 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-03 14:54:09 +00:00
floitsch@google.com
9cf8b9a36d
Set the TZ env to get the UTC-ms since epoch.
...
Previously we tried to simply subtract the timezone difference from
the local value. Apparently this doesn't work...
Fixes issue 1268.
Review URL: https://chromiumcodereview.appspot.com//9969098
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7285 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-03 14:46:21 +00:00
floitsch@google.com
1e61443c14
toRadixString returns lower case characters.
...
Fixes issue 2670.
Review URL: https://chromiumcodereview.appspot.com//10225003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6955 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-25 15:50:36 +00:00
srdjan@google.com
130ca2534f
A 'fix' for issue 2671, toRadixString.
...
Review URL: https://chromiumcodereview.appspot.com//10173014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6948 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-25 15:32:12 +00:00