Commit Graph

13143 Commits

Author SHA1 Message Date
regis@google.com 8dd26ba9f6 Finalize all classes (fix issue 364).
Review URL: http://codereview.chromium.org//8506001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1380 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-09 23:33:48 +00:00
srdjan@google.com acbaabe398 Update tests, fix printing of doubles.
Review URL: http://codereview.chromium.org//8505026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1373 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-09 22:27:43 +00:00
srdjan@google.com 6b6d16a41e Add type check tracing (--trace_type_checks). Inline type checks with class types that have only Dynamic type arguments (or none) and with List<Dynamic> interface.
Review URL: http://codereview.chromium.org//8503034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1372 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-09 21:36:32 +00:00
srdjan@google.com 44a79df7cb Fix crash when running with --report_invocation_count.
Review URL: http://codereview.chromium.org//8497032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1360 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-09 16:25:23 +00:00
srdjan@google.com 8237924b4a Runtime type checking should be skipped for Object as destination type.
Review URL: http://codereview.chromium.org//8503028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1329 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-08 21:36:31 +00:00
turnidge@google.com 03df87fe9a Turn off ObjectEquals test for x64.
Review URL: http://codereview.chromium.org//8497020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1327 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-08 19:38:58 +00:00
turnidge@google.com 04d38885a3 Renaming:
Dart_ObjectToString -> Dart_ToString
Dart_Objects_Equal -> Dart_ObjectEquals
Dart_IsInstanceOf -> Dart_ObjectIsType
Dart_ReThrowException -> Dart_RethrowException

Added:

Dart_IsSame: === operation

Added a couple of tests.
Review URL: http://codereview.chromium.org//8490016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1326 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-08 19:18:22 +00:00
antonm@google.com e280d98ea7 Bump stack size for pure Dart isolates.
Review URL: http://codereview.chromium.org//8495007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1285 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-08 07:00:44 +00:00
turnidge@google.com 0a0dc2a020 Fix the build.
Review URL: http://codereview.chromium.org//8495001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1278 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-08 01:11:23 +00:00
turnidge@google.com 9a3434cd17 Allow printf-style arguments for Dart_Error and Api::Error.
Convert one error message to use the new facility for testing
purposes.  The rest of the errors will be improved in follow-on
changes.

Add tests.

Minor comment fixes in dart_api_impl.h.
Review URL: http://codereview.chromium.org//8492015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1276 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-08 00:12:59 +00:00
hausner@google.com f59e679860 Capturing for loop variables correctly
Re-introduce a "fresh copy" of the for loop variable(s) in each iteration. Adding a minimal test to check that closures capture the value of the particular loop iteration. 
Review URL: http://codereview.chromium.org//8490019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1273 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-07 22:36:28 +00:00
turnidge@google.com 9a118fbb49 Add Dart_Null, Dart_True, and Dart_False.
Fix Dart_NewPersistentHandle so it won't break if passed one of these
persistent handles.

Reviewer: Should I document that these new functions return a
persistent handle?
Review URL: http://codereview.chromium.org//8446009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1230 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-05 00:09:36 +00:00
cshapiro@google.com 007e9c3cae Allow allocation of four byte strings through the Dart API.
Review URL: http://codereview.chromium.org//8474014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1229 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-04 23:41:58 +00:00
srdjan@google.com 1d4dffcaf2 Emit node id at every call to runtime.
Review URL: http://codereview.chromium.org//8475013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1226 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-04 22:51:19 +00:00
asiva@google.com 8743e1cc2a - Fix the snapshot generation python script to return an error code when snapshot generation fails and print the error message.
- Split isolate creation into CreateIsolate and InitializeIsolate so that we don't get SEGVs when there is a failure compiling the corelib dart sources during the bootstrap process
Review URL: http://codereview.chromium.org//8334031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1225 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-04 22:08:13 +00:00
srdjan@google.com 084c89a189 Fix pc descriptor emission for skipped unary oepration +. Eliminates last co19 crash.
Review URL: http://codereview.chromium.org//8479006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1220 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-04 20:10:23 +00:00
hausner@google.com b121e837d4 Address Regis' review feedback
TBR
Review URL: http://codereview.chromium.org//8475005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1208 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-04 17:04:40 +00:00
srdjan@google.com 59b79d8171 Fix more co19 crashes. Introduce GET_NATIVE_ARGUMENT that throws an illegal argument exception if the native argument is of incorrect type.
Review URL: http://codereview.chromium.org//8476002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1205 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-04 16:30:29 +00:00
hausner@google.com 504eea10ff Experimental version without native constructor support
The semantics of native constructors are not really clear. Instead of a native constructor, write a regular Dart constructor that calls a native function in the constructor body instead.
Review URL: http://codereview.chromium.org//8450016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1201 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-04 15:58:55 +00:00
ager@google.com 68166663f9 Renaming Array -> List in the VM API.
BUG=
TEST=

Review URL: http://codereview.chromium.org//8372094

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1195 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-04 12:25:53 +00:00
srdjan@google.com 0265e3f027 Fixes to co19 crashes:
- Null is a valid exception object.
- Throw exception in array copy.
Review URL: http://codereview.chromium.org//8437106

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1173 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-03 22:31:32 +00:00
hausner@google.com 35cc976b4b Separating constructor parsing from function parsing
Make parsing functions and constructors more readable by separating
the two into disjoint functions.
Review URL: http://codereview.chromium.org//8417056

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1172 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-03 22:29:57 +00:00
srdjan@google.com d052449ae8 Fix issue 5564152 (VM crash): stack at exit of method was incorrect. Smi equality with Mint was calling operator ==, the result was pushed instead of evaluated to either push a boolean object or to jump to a label.
Review URL: http://codereview.chromium.org//8451010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1167 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-03 21:45:00 +00:00
hausner@google.com a6b3f4f19c No returns allowed in constructors
Add compiler error message when a constructor explicitly returns a
value. Fixes bug/issue 224.
Review URL: http://codereview.chromium.org//8450009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1161 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-03 20:07:35 +00:00
srdjan@google.com cb82be7b44 Restructure instance setter and finish the last 1/3 of increment instance field optimization.
Review URL: http://codereview.chromium.org//8439059

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1159 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-03 18:37:44 +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
hausner@google.com f401476d02 Fix problem with named arguments in constructors
When generating the implicit super call to the body, the argument
names have to be duplicated from the implicit initializer call.
Review URL: http://codereview.chromium.org//8386065

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1130 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-03 00:36:27 +00:00
srdjan@google.com 67cee5e5d2 Intrinsify String.charCodeAt, String.length and String.hashCode. Improves frog performance by 2x.
Review URL: http://codereview.chromium.org//8440051

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1120 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-02 20:42:23 +00:00
hausner@google.com 7651034e9e Two-phase constructors
This CL fixes the initializer evaluation order and brings the VM fully up to spec.

Constructors are executed in two phases: the initializer phase and the constructor body phase. An additional implicit parameter tells the constructor code whether to execute the initializer list or the body (or both).

If the super initializer call is not at the end of the initializer list, the super constructor has to be called twice. The arguments to the super initializer have to be evaluated and stored in temporary local variables. At the beginning of the constructor block, a second implicit super call is inserted.

If the super initializer call happens to be at the end of the list, none of this madness has to happen, except for the extra implicit parameter to the constructor.

 
Review URL: http://codereview.chromium.org//8440014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1102 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-02 17:19:15 +00:00
mattsh@google.com 512a603600 use more distinctive pattern to mark where dart source goes
BUG=
TEST=

Review URL: http://codereview.chromium.org//8363018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1100 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-02 16:58:25 +00:00
srdjan@google.com aa4ec58426 Optimize 2/3 of instance field increment operation.
Review URL: http://codereview.chromium.org//8439023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1097 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-02 16:20:58 +00:00
regis@google.com 23552a0e14 Perform type canonicalization as part of type finalization.
Remove signature type cache from signature classes, since type canonicalization
has the same effect.
Review URL: http://codereview.chromium.org//8437028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1064 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-02 01:40:34 +00:00
asiva@google.com 5db460f310 Add command line options to specify the various heap size parameters.
Review URL: http://codereview.chromium.org//8423023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1059 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-02 00:48:33 +00:00
srdjan@google.com 4ebee97585 Print Bigints in decimal format.
Review URL: http://codereview.chromium.org//8351050

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1058 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-02 00:36:10 +00:00
regis@google.com 4bc0c5eecc Simplify canonicalization of constants and types.
Review URL: http://codereview.chromium.org//8442001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1053 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-01 23:38:09 +00:00
regis@google.com 3125475ef8 Canonicalize types.
Review URL: http://codereview.chromium.org//8372041

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1045 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-01 22:00:06 +00:00
turnidge@google.com d7c536d677 Reorganize dart_api.h and add a bunch of documentation.
Review URL: http://codereview.chromium.org//8343045

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1034 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-01 18:11:36 +00:00
srdjan@google.com 24b14c7e53 Fix for bug 5270133 by preventing wrong canonicalization. Fixes problem of sporadic Dart failures when running in checked mode. Fixed wrong tests.
Review URL: http://codereview.chromium.org//8432016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@983 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-01 00:12:12 +00:00
regis@google.com a8478d5312 Fix parsing of named parameters (issue 243).
Add corresponding test.
Review URL: http://codereview.chromium.org//8387046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@973 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-31 21:16:15 +00:00
asiva@google.com b94e5d20ad Enhance the array access API to deal with any objct that implements the list interface.
A future change will consider making the growable array a first class VM object so that access to growable array would be more efficient through the API.
Review URL: http://codereview.chromium.org//8417003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@972 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-31 21:08:39 +00:00
asiva@google.com 8e2f6361f1 When generating snapshots for a specified script don't include the builtin library by default. The DOM snap shot for instance does not want the builtin library. If the builtin library is needed it needs to be explicitly imported in the specified script.
Review URL: http://codereview.chromium.org//8343071

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@971 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-31 20:53:44 +00:00
turnidge@google.com 45ab0f6d65 DART_CHECK_VALID -- abort on an invalid handle.
EXPECT_VALID -- check handle validity in unit tests.
Review URL: http://codereview.chromium.org//8401010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@970 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-31 20:18:07 +00:00
antonm@google.com cf53ea78d7 Make DartVM build with clang.
Review URL: http://codereview.chromium.org//8381037

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@966 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-31 19:07:48 +00:00
regis@google.com f9cb997183 Verify that user classes do not extend any of Bool, Double, ObjectArray,
ImmutableArray, GrowableObjectArray, IntegerImplementation, Smi, Mint,
BigInt, OneByteString, TwoByteString, FourByteString.
Review URL: http://codereview.chromium.org//8429013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@963 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-31 18:45:16 +00:00
antonm@google.com f05150594a Proper reg for deoptiomization.
EAX may get overwritten by the operation.  Original value can be restored from ECX.

Review URL: http://codereview.chromium.org//8430007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@958 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-31 17:49:28 +00:00
srdjan@google.com db15f36789 Print also comments with --print_flags
Review URL: http://codereview.chromium.org//8413056

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@955 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-31 16:48:21 +00:00
olonho@google.com 8b39ed40eb Add missed size check for kTypeArray.
Review URL: http://codereview.chromium.org//8403041

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@944 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-31 12:53:54 +00:00
srdjan@google.com 002bb47821 Special code for equality comparison for Smi, allowing null on left or right without calling deoptimization. The full solution is to implement two arguments type feedback collection (maybe also collect null classes for
equality comparison?)
Review URL: http://codereview.chromium.org//8413047

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@923 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-28 22:25:05 +00:00
regis@google.com 78353be760 Verify that user classes/interfaces do not extend/implement any of bool, num,
int, double, String, Function, or Dynamic.
Review URL: http://codereview.chromium.org//8416052

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@922 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-28 22:24:18 +00:00
asiva@google.com b245c234f0 Report NullPointerException when we try to construct a regular expression
using a NULL pointer.
Report NullPointerException instead of ObjectNotClosureException when the
closure object is Null.
Review URL: http://codereview.chromium.org//8363034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@901 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-28 17:32:29 +00:00