Commit Graph

1129 Commits

Author SHA1 Message Date
podivilov@google.com a7f87440be Fix invalid location in inline super constructor.
R=ahe@google.com
BUG=5184

Review URL: https://codereview.chromium.org//10991035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12903 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-26 12:18:19 +00:00
lrn@google.com d5a4792d09 Don't detect runtime type information use except in the codegen queue.
TBR=ngeoffray@google.com

Review URL: https://codereview.chromium.org//10984042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12902 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-26 12:10:13 +00:00
lrn@google.com 8a58e3f1f3 Cleanup the core/object.dart file.
Move "Type" and "identical" into separate files.
Make runtimeType a getter.

Review URL: https://codereview.chromium.org//10977033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12899 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-26 10:46:22 +00:00
ager@google.com 7977b42215 Update all occurrences of raw strings.
R=hausner@google.com,kasperl@google.com
BUG=

Review URL: https://codereview.chromium.org//10977027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12893 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-26 06:01:23 +00:00
podivilov@google.com 9f5c839876 Revert "Fix invalid locations problem for inline super constructors."
TBR=ahe@google.com

Review URL: https://codereview.chromium.org//10982030

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12860 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 17:52:46 +00:00
podivilov@google.com 4df4a765e7 Fix invalid locations problem for inline super constructors.
This is a quick fix for issue 5184.

R=ahe@google.com
BUG=5184

Review URL: https://codereview.chromium.org//10989017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12853 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 17:15:07 +00:00
lrn@google.com a1faa6f135 Change IllegalArgumentException to ArgumentError.
Review URL: https://codereview.chromium.org//10989013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12841 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 12:27:52 +00:00
antonm@google.com 7b29e4f53a Resolve op when op= syntax is used.
Review URL: https://codereview.chromium.org//10942029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12839 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 11:58:55 +00:00
podivilov@google.com ba1b2670ca Variable use should not be mapped to its declaration.
R=floitsch@google.com
BUG=5331

Review URL: https://codereview.chromium.org//10958069

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12837 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 11:23:10 +00:00
ngeoffray@google.com dfdaec4442 Make sure we can use JavaScript properties on Object as classes.
Review URL: https://codereview.chromium.org//10978017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12829 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 09:05:22 +00:00
ahe@google.com 6412056747 Allow external top-level getters and setters.
Review URL: https://codereview.chromium.org//10968067

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12826 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 06:09:56 +00:00
dgrove@google.com 79ff4f313d Remove last references to frog from SDK.
Review URL: https://codereview.chromium.org//10970056

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12792 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 17:38:57 +00:00
ahe@google.com 06de3c8ee6 Fix bad diagnostic positions when inlining super constructors.
Review URL: https://codereview.chromium.org//10970070

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12787 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 16:57:09 +00:00
antonm@google.com b7cae637a7 Support Dynamic type with a prefix.
R=smok@google.com
BUG=5398

Review URL: https://codereview.chromium.org//10969070

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12786 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 16:20:41 +00:00
danrubel@google.com fea0ced904 Convert raw strings in compiler
Review URL: https://codereview.chromium.org//10970038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12783 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 15:22:07 +00:00
podivilov@google.com d1dec7ce67 Attach positions to methods with interceptors.
R=ahe@google.com
BUG=5331

Review URL: https://codereview.chromium.org//10969067

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12782 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 15:04:17 +00:00
ager@google.com 02b566ee62 Add documentation to the Object class in the core library.
R=lrn@google.com
BUG=

Review URL: https://codereview.chromium.org//10974004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12770 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 11:07:34 +00:00
antonm@google.com e71177f89d Properly process dart:core classes if dart:core is imported with prefix.
In this case we force prefix omission.  However, there is a twist: when
visit prefix.name form in send visitor later, we cannot tell it from
dynamic invocation and hence to play safe we add platform libs class name
to the set of forbidden names.

Also, most probably we need a proper support for top-level from dart:core.

R=smok@google.com
BUG=5345

Review URL: https://codereview.chromium.org//10966044

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12766 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 10:09:45 +00:00
podivilov@google.com b5a251f42c Throw an exception when invalid source file location is encountered.
Currently, compiler is crashed in SourceMapBuilder with unhelpful stack trace.
Throwing an exception in ssa builder will help us to fix crashes that
occur in the wild.

R=ahe@google.com,kasperl@google.com
BUG=5184

Review URL: https://codereview.chromium.org//10970015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12765 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 09:43:53 +00:00
antonm@google.com aa6bab7910 Rewrite blocks of single operator into just a single operator.
There is an imporant exception, although somewhat artificial: if block
consists of variable definitions, we shouldn't do that not to break
scoping rules and violations.

R=smok@google.com

Review URL: https://codereview.chromium.org//10962015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12764 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 09:42:47 +00:00
smok@google.com e6aedf40c2 [dart2js] if --output-type=dart make output file out.dart and print correct info message.
Review URL: https://codereview.chromium.org//10961019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12758 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 08:03:30 +00:00
sgjesse@google.com a2d32838da Add an internal flag to the dart2js compiler to enable/diable inlining
Use this to run the type inference tests both with and wihtout inlining.

R=ahe@google.com

BUG=

Review URL: https://codereview.chromium.org//10964013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12757 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 07:32:43 +00:00
ahe@google.com 970a4ee600 A library element should know its compilation units.
Review URL: https://codereview.chromium.org//10960033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12755 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 06:53:12 +00:00
ahe@google.com 915f60cc36 Remove >>> and >>>= from scanner.
Review URL: https://codereview.chromium.org//10945027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12713 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 14:41:20 +00:00
johnniwinther@google.com 2a82f822b9 Import scope rules updated.
BUG=2946

Review URL: https://codereview.chromium.org//10968010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12706 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 14:02:25 +00:00
ahe@google.com d71bc06273 Implement Object.hashCode()
Review URL: https://codereview.chromium.org//10965034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12704 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 13:34:57 +00:00
ngeoffray@google.com 701caab5de Correctly handle const constructors with type parameters.
Review URL: https://codereview.chromium.org//10970006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12697 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 12:45:51 +00:00
johnniwinther@google.com 608c199175 Stub implementation of patch invariants for the patch refactoring.
This is the first part of the patch refactoring which implements
a stub version of the invariants needed for the new patch implementation.

See the library comment in lib/compiler/patch_parser.dart for a detailed
description of the new patch system, the terminology and the invariants.

Review URL: https://codereview.chromium.org//10917285

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12687 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 09:31:08 +00:00
ahe@google.com fcc9f5f0ff Parse new library syntax.
Committed: https://code.google.com/p/dart/source/detail?r=12386
But reverted in: https://code.google.com/p/dart/source/detail?r=12387

Review URL: https://codereview.chromium.org//10911298

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12686 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 09:08:12 +00:00
ngeoffray@google.com 05a9eb44be Do not pass the name of the is check if it's not required (typically for primitive types).
Review URL: https://codereview.chromium.org//10969014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12683 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 07:45:54 +00:00
ngeoffray@google.com f3c7f44a0e Avoid generating duplicate stubs. Fixes issue 3184.
Review URL: https://codereview.chromium.org//10967013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12682 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 07:13:45 +00:00
iposva@google.com eee4bbc1ef - Add definition of "int hashCode()" to Object.
- Implement hashCode in the VM.
- Mark hashCode as unimplemented in dart2js.
- Update test using the identity hashcode.
Review URL: https://codereview.chromium.org//10956026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12669 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 00:32:58 +00:00
sgjesse@google.com 7f80587554 Fix checked mode failure when tracing SSA graph
R=ngeoffray@google.com

BUG=

Review URL: https://codereview.chromium.org//10968008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12637 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 13:46:24 +00:00
antonm@google.com 079b52d5d2 Force a space after empty list literal.
We can be more clever about it later like verifying next token.  And there is
a chance that will be correct Dart too.

R=smok@google.com

Review URL: https://codereview.chromium.org//10945032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12636 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 13:39:02 +00:00
smok@google.com bd20cb3400 [dart2dart] Rename --cut-declaration-types flag to --force-cut-declaration-types
Review URL: https://codereview.chromium.org//10969008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12634 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 13:00:22 +00:00
lrn@google.com c0f42d2748 Made removeAt errors consistent between dart2js and VM.
Reneabled test for VM.

Review URL: https://codereview.chromium.org//10960011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12632 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 12:52:54 +00:00
lrn@google.com eeeab5f0ad Add list.removeAt method.
Review URL: https://codereview.chromium.org//10970009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12627 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 10:50:00 +00:00
ager@google.com 6f43aa828f Workaround VM issue with library tags in builtin libraries.
Get rid of lib/compiler/implementation/lib/scalarlist.dart which
should not be necessary.

R=lrn@google.com
BUG=

Review URL: https://codereview.chromium.org//10958012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12626 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 09:25:05 +00:00
ager@google.com 9ce441c90a Fix mini-parser to get Uint8List from scalarlist library.
R=ricow@google.com
BUG=

Review URL: https://codereview.chromium.org//10964009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12617 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 07:17:38 +00:00
ager@google.com e676e88f81 Introduce a VM-only dart:scalarlist library for byte arrays.
Include it in the SDK so users can use it. Create a dummy
implementation and patch file for the library for dart2js so it can be
documented. Johnni, can you think of a nicer way of making
documentation generation work for a VM only library? Also, it seems that
patching kills the documentation comments and they do not show up in
the generated docs.

R=iposva@google.com,johnniwinther@google.com
BUG=

Review URL: https://codereview.chromium.org//10919267

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12616 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 07:08:10 +00:00
antonm@google.com 1d4cc7be3b Fix stray line.
TBR=smok@google.com

Review URL: https://codereview.chromium.org//10944032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12572 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 16:19:31 +00:00
ahe@google.com 3f1932a563 Handle backslashes and newlines when escaping strings.
Review URL: https://codereview.chromium.org//10943027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12568 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 15:43:41 +00:00
antonm@google.com 8fb80f205d Remove asserts from minified program.
R=smok@google.com

Review URL: https://codereview.chromium.org//10918278

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12564 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 14:45:03 +00:00
ager@google.com 576532edcc Bug cleanup: unify on allowing radices from 2 to 36 in
num.toRadixString. Add test and documentation.

R=lrn@google.com,floitsch@google.com
BUG=dartbug.com/461

Review URL: https://codereview.chromium.org//10937011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12562 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 14:15:39 +00:00
smok@google.com 82afbccb2f [dart2dart] Cut declaration types by default if we check that it is safe to do so.
Review URL: https://codereview.chromium.org//10917298

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12560 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 13:46:33 +00:00
ahe@google.com 4908445bb4 Handle null in constructorNameFallback, and update dart2dart status file.
Should make dart2js and dart2dart builds green.

Review URL: https://codereview.chromium.org//10939032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12558 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 13:26:53 +00:00
antonm@google.com 41238825ed Register iterate-protocol helper if there is for-in.
Methods Iterable.iterator, Iterator.next and Iterator.hasNext
are invoked implicitly by for-in loops.

R=ahe@google.com,karlklose@google.com,smok@google.com

Review URL: https://codereview.chromium.org//10948036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12557 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 12:51:28 +00:00
ahe@google.com 5beb5a8185 Avoid calling user-defined code when reporting checked mode errors and cast errors.
Review URL: https://codereview.chromium.org//10947029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12553 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 12:11:33 +00:00
lrn@google.com ee569ce10a Reapply conversion of most core interfaces to abstract classes.
Previous commit was reverted due to hitting an unrelated error.

TBR=ahe@google.com

Review URL: https://codereview.chromium.org//10939030

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12551 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 10:48:14 +00:00
ngeoffray@google.com eb7d6c379d Fix algorithm to know whether we should emit an is check on a class: all interfaces/implemented classes must look at their extends clause.
Review URL: https://codereview.chromium.org//10951026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12548 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 10:29:10 +00:00