asiva@google.com
caa37a2581
Fix issue-545 IsObjectStoreTypeId was not updated correctly after new types (StringInterface and ListInterface) were added.
...
Review URL: http://codereview.chromium.org//8623003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1723 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 23:16:32 +00:00
asiva@google.com
ce606eda7b
Library prefix should be an identifier
...
(we don't yet check that it is not a reserved keyword, that can be done only
after we are able to store the keyword table as a singleton in the vm isolate)
Review URL: http://codereview.chromium.org//8500006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1720 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 22:17:41 +00:00
asiva@google.com
4aacd28754
Make the implicit constructor private for zone, handlescope and nohandlescope classes.
...
Review URL: http://codereview.chromium.org//8562008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1718 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 21:07:40 +00:00
asiva@google.com
777bbbf277
Fix signature for external string API methods.
...
Review URL: http://codereview.chromium.org//8527027
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1716 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 19:47:32 +00:00
regis@google.com
42ac60faf3
null is an instance of Dynamic (fix issue 443).
...
Review URL: http://codereview.chromium.org//8592004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1715 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 19:35:53 +00:00
turnidge@google.com
a31b5a59f7
Start using UNWRAP_NONNULL to check inputs to dart api functions.
...
Improve a few error messages.
Lots of testing.
Review URL: http://codereview.chromium.org//8528018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1712 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 19:09:51 +00:00
regis@google.com
c0a9b76a67
Add missing argument to HANDLESCOPE().
...
Siva is investigating why this is only failing now and only on Win32.
Review URL: http://codereview.chromium.org//8547013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1711 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 17:47:49 +00:00
regis@google.com
314a89e16c
Update comments in core lib showing proper factory syntax.
...
Improve error messages reported from class finalizer.
Fix parser error reporting to be thread safe.
Reformat type error and failed assertion messages to be consistent.
Add one more new factory syntax test.
Review URL: http://codereview.chromium.org//8549033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1708 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 17:06:52 +00:00
ager@google.com
8b047a6544
Fix gclient runhooks on Windows for a full checkout.
...
The problem was incorrect setting of and use of the DEPTH gyp
variable.
R=whesse@google.com
BUG=496
TEST=
Review URL: http://codereview.chromium.org//8472007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1706 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 15:47:21 +00:00
cshapiro@google.com
1cff31c3d0
Implement external strings.
...
External strings refer to character data in memory located outside of
the managed heap. This memory is considered to be owned by the
embedding application. To help with the management of external
memory, the virtual machine allows the embedding application to
register for a "death notice" when an external string object is
garbage collected. A death notice takes the form of a callback
invoked by the garbage collector with the address of the external
memory. Death notices will be implemented in the garbage collector by
future commit.
Review URL: http://codereview.chromium.org//8383029
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1679 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-19 00:33:23 +00:00
srdjan@google.com
abbe12ab38
Print uninstantiated type with --trace_type_checks for instanceof (easier to identify what caused calls to runtime).
...
Review URL: http://codereview.chromium.org//8598023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1676 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 22:49:52 +00:00
srdjan@google.com
8b6dbe1b76
Do not allow allocation of FallThroughError and AssertionError by the user.
...
Review URL: http://codereview.chromium.org//8569013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1671 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 20:36:42 +00:00
hausner@google.com
8a6a9e645d
Better error handling when scanning library tags
...
Fixes Issue 516
http://code.google.com/p/dart/issues/detail?id=516
#!/dart_bin
##library("foo");
void main() {
print("goodbye");
}
Errors encountered while loading script: '/private/tmp/t.dart': Error: line 2 pos 2: Unrecognized library tag
##library("foo");
^
Review URL: http://codereview.chromium.org//8586052
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1664 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 17:50:32 +00:00
regis@google.com
a5dc8b60d1
Fix code generation issue with new factory syntax.
...
Convert VM core library to new factory syntax.
Review URL: http://codereview.chromium.org//8602004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1662 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 17:47:12 +00:00
asiva@google.com
5e6441a5cd
Change loaded_ flag in RawLibrary to load_state_ in order to register different
...
states of the load process.
This state can then be used to ensure we report errors on duplicate loads.
Review URL: http://codereview.chromium.org//8520030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1643 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 00:09:13 +00:00
regis@google.com
80d89cc93b
Fix parsing of factory calls (issue 500).
...
Add test.
Fix test.
Adjust co19 status file.
Review URL: http://codereview.chromium.org//8591025
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1633 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 21:42:55 +00:00
asiva@google.com
9f49e2bf74
Implement automatic loading of dart:core_native_fields library
...
with predefined classes having native fields.
Classes that need native fields in them can import this library and
extend these predefined classes.
Review URL: http://codereview.chromium.org//8537023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1629 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 21:04:43 +00:00
asiva@google.com
d15e57879e
Fix assertion during throwing an exception.
...
We could be throwing an exception from a stub frame and not have any dart frames at all, just treat the stack trace as empty in this case and go with an unhandled exception.
Review URL: http://codereview.chromium.org//8587041
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1626 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 20:53:35 +00:00
hausner@google.com
98ca000f01
Will be used by the debugger to find static calls in Dart code.
...
Review URL: http://codereview.chromium.org//8588014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1621 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 18:53:16 +00:00
iposva@google.com
d0ef98bc71
- Allocate instantiated type arguments in new gen.
...
Review URL: http://codereview.chromium.org//8588027
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1605 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 08:41:42 +00:00
ager@google.com
7124c5046b
Test for immutable Lists in ListSet API methods.
...
Using the file and socket API it was possible to modify immutable
arrays.
R=sgjesse@google.com ,turnidge@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8575004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1604 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 06:57:39 +00:00
cshapiro@google.com
1309ebd16e
Add an external array type to support typed arrays.
...
Review URL: http://codereview.chromium.org//8429027
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1601 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 03:18:52 +00:00
regis@google.com
3c64ffe9a3
Support correct factory syntax in the VM as decribed in the spec.
...
Change the default value of --silent_warnings from true to false, so that
warnings are visible when legacy factory syntax is used.
In order to facilitate transition of libraries and user programs, legacy factory
syntax is still supported by 2 workarounds, but warnings are printed.
The first workaround allows the factory clause to omit the type
parameter list, which otherwise has to match exactly with the list of
type parameters in the factory class declaration.
The second workaround allows a factory method to omit the type
parameter list. In that case, the type parameter list of the enclosing
class is used instead.
Workarounds will be removed to enforce correct factory syntax at a later time.
Review URL: http://codereview.chromium.org//8585004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1595 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-16 23:49:04 +00:00
srdjan@google.com
7397762688
Better tracing of deoptimization (added a reason id and printing of source). Fix a bug with excessive deoptimization for null receiver -- caused by (null).toString().
...
Review URL: http://codereview.chromium.org//8588002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1593 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-16 23:38:05 +00:00
srdjan@google.com
778e4bf21f
Fix integer's % operation; fix parsing of doubles; update co19 tests.
...
Review URL: http://codereview.chromium.org//8468025
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1589 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-16 22:52:56 +00:00
asiva@google.com
ac82be41eb
Report an error when Dart_ListGetAsBytes does not get an integer list.
...
Review URL: http://codereview.chromium.org//8523036
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1585 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-16 21:12:38 +00:00
asiva@google.com
aaffbd2561
Support command line parameters to specify a url to file name mapping. This is used during snapshot generation so that a URL is mapped to a physical file name.
...
Review URL: http://codereview.chromium.org//8439061
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1550 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-15 21:19:27 +00:00
srdjan@google.com
92f177896b
Fix throwing ObjectNotClosure instead of null exception if closure is null.
...
Fix integer compareTo if other is a double NaN.
Fix Expect.stringEqual to accept null as arguments.
Update co19 status file.
Review URL: http://codereview.chromium.org//8528050
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1539 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-15 18:02:12 +00:00
iposva@google.com
0c9902ca67
- Avoid allocating variable length arrays on the stack.
...
- Fix C++ warning about copying vtables.
- Use correct delete for PortMap entries.
Review URL: http://codereview.chromium.org//8555024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1538 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-15 17:47:21 +00:00
cshapiro@google.com
cce17823db
Wait on the monotonic clock to guard against changes to the system clock.
...
Review URL: http://codereview.chromium.org//8463032
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1522 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-14 22:25:07 +00:00
cshapiro@google.com
eccf8cdae6
Use a common subroutine for the snapshot reading and writing of strings.
...
Review URL: http://codereview.chromium.org//8340017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1517 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-14 18:03:02 +00:00
asiva@google.com
5cf3ad018a
Changes to pass the current isolate to all runtime and native calls.
...
Review URL: http://codereview.chromium.org//8528010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1499 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-12 05:55:22 +00:00
cshapiro@google.com
4ad48f74e5
Add methods for creating Bigint objects from unsigned 64-bit integers.
...
Review URL: http://codereview.chromium.org//8539034
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1495 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-12 01:54:18 +00:00
hausner@google.com
a17bea5481
More info in disassembled code
...
Print out first 5 elements of an array object, rather than
just 'Array'. This helps in particular in disassembled
method and stub calls which now print the content of the
IC cache and ArgumentsDescriptor arrays. E.g.:
0x7404a5 ff7508 push [ebp+0x8]
0x7404a8 ff750c push [ebp+0xc]
0x7404ab b9012f7000 mov ecx,0x702f01 Array[bitAndFromInteger, 1, null, null]
0x7404b0 bafd050003 mov edx,0x30005fd Array[2, 2, null]
0x7404b5 e8b6fcffff call 0x740170 [stub: InlineCache]
0x7404ba 83c408 add esp,0x8
Review URL: http://codereview.chromium.org//8491061
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1493 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-12 00:45:17 +00:00
hausner@google.com
87ba9c00b5
Nix obsolete function prototype
...
Review URL: http://codereview.chromium.org//8536038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1488 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-12 00:10:28 +00:00
srdjan@google.com
1ea6e2e0de
Stop building blind: report errors with factories and parametrized types.
...
Enable test. This CL expects the frog/leg changes to be submitted first.
Review URL: http://codereview.chromium.org//8511070
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1479 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-11 22:23:45 +00:00
regis@google.com
8b9ebb3528
Second attempt at finalizing all classes in the VM (fix issue 364).
...
Review URL: http://codereview.chromium.org//8491055
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1475 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-11 21:38:49 +00:00
turnidge@google.com
8c64adf13e
Deal with unhandled exceptions the same way in all Dart api functions.
...
--
Terminology change: invalid handles are now called error handles.
Unhandled exceptions used to be a kind of valid handle. Now they are
a kind of error handle.
For the Dart_Invoke* functions, this means that the standard
error-checking blob drops from two tests to one test and is
harder to mess up.
Many other Dart api functions (Dart_ToString, for example) previously
dealt with unhandled exceptions by turning them into terse error
messages. Now these functions preserve information about the
exceptions and generate better error messages.
Changed Dart_HandleMessage to return success/failure. It seemed to fit.
--
Details:
Dart_IsValid becomes Dart_IsError (negated sense).
Dart_GetError now knows how to print a stack trace semi-nicely.
Dart_ExceptionOccurred -> Dart_IsUnhandledException.
Renamed ApiFailure class to ApiError to fit better.
ApiError now has a "data" pointer that points to either an error
message string or to an unhandled exception object.
Documentation changes aplenty.
Review URL: http://codereview.chromium.org//8501034
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1470 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-11 19:31:04 +00:00
srdjan@google.com
81be68ae18
Giving up on the change to report errors with factories and generic types.
...
This means that you will continue to have crashes in Debug mode, but you will be able to "run" in Release mode. Best solution is to get rid of generic types in Link until factories and generic types have been fully implemented. Until then we do not know what can happen when running in release mode.
Still trying to figure out how to test frog and leg correctly.
Review URL: http://codereview.chromium.org//8540013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1469 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-11 18:52:53 +00:00
srdjan@google.com
6ff41ed334
Require legacy form of type parameters in factories and report errors if a factory class does not have a required parametrized type (fixes crashes in VM). Fix frog code, however, there are frogs problem with --compileall:
...
leg/util/link_implementation.dart:38:12: error: wrong number of arguments, expected 0 but found 2
return new Link<T>(element, this);
^^^^^^^^^^^^^^^^^^^^^^^^^^
Review URL: http://codereview.chromium.org//8515024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1464 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-11 17:04:00 +00:00
asiva@google.com
2d388b751f
Cache isolate in the StackTrace object to that we don't call
...
Isolate::Current in the destructor, HandleScope and Zone.
TBR=iposva (already reviewed change on other client).
Review URL: http://codereview.chromium.org//8523013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1427 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-10 21:08:18 +00:00
turnidge@google.com
309d4efee7
Windows produces different output for __FUNCTION__. Canonicalize.
...
Review URL: http://codereview.chromium.org//8524006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1423 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-10 19:48:55 +00:00
turnidge@google.com
ff7a5f4786
Try __func__ -> __FUNCTION__
...
Review URL: http://codereview.chromium.org//8515007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1420 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-10 19:34:54 +00:00
srdjan@google.com
dcdbc97919
Intrinsify StringBase.isEmpty and inline StringBase.get:length.
...
Review URL: http://codereview.chromium.org//8526005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1419 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-10 19:33:25 +00:00
turnidge@google.com
43e5bf131b
Give up on using va_copy for now and get the build working.
...
Review URL: http://codereview.chromium.org//8469004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1418 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-10 19:29:02 +00:00
turnidge@google.com
bd63578bb4
Include <stdarg.h>
...
Review URL: http://codereview.chromium.org//8524004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1416 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-10 19:18:25 +00:00
turnidge@google.com
47dff8904d
Here's a template for how I plan on doing error-checking on inputs for
...
dart api functions.
Any comments before I change everything?
Any way I could get away without creating the extra Object handle by
doing sneaky tricks?
Review URL: http://codereview.chromium.org//8507035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1415 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-10 19:10:53 +00:00
srdjan@google.com
da9092146b
Implement %= and assign a couple of tests.
...
Review URL: http://codereview.chromium.org//8509032
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1411 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-10 18:04:42 +00:00
srdjan@google.com
af451865ed
For instanceof inline check against right hand class id possible and interface String for OneByteString (positive checks only). Improves frog runtime by about 20%. Future work will be based on collecting types and using that data in optimized code. Add tracing of instance of type checks.
...
Review URL: http://codereview.chromium.org//8508035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1408 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-10 17:28:11 +00:00
regis@google.com
a6282231eb
Revert r1380 that is breaking frog.
...
Review URL: http://codereview.chromium.org//8509031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1382 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-10 01:39:06 +00:00