Commit graph

5744 commits

Author SHA1 Message Date
cshapiro@google.com
e964989681 Ensure objects emitted in code are allocated in old space.
BUG=3866

Review URL: https://chromiumcodereview.appspot.com//10786003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9649 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-13 23:23:45 +00:00
srdjan@google.com
f5b544c948 Equality compare should record two arguments in IC data. Inline double equality comparison.
Review URL: https://chromiumcodereview.appspot.com//10702195

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9644 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-13 20:17:42 +00:00
rmacnak@google.com
79e17e7cb0 Replaced simpleValue with more general reflectee. hasSimpleValue is retained internally for the sake of safe printing: mirrors should not assume their reflectees toString will return quickly and without error.
Review URL: https://chromiumcodereview.appspot.com//10702186

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9637 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-13 16:56:13 +00:00
podivilov@google.com
23cf5e33c2 Stop passing HtmlSystemShared around and move html renaming to IDLTypeInfo.
R=antonm@google.com,sra@google.com

Review URL: https://chromiumcodereview.appspot.com//10698108

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9636 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-13 16:28:43 +00:00
scheglov@google.com
894762c40a Cache model elements for compiler elements.
With this Editor Core tests run 2 times faster.
Indexing speed increased several times, something like 5-7.

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10692198

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9635 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-13 16:18:53 +00:00
podivilov@google.com
f7cc41b276 Introduce TypeRegistry class.
This is needed to optionally associate additional state like html renames
map with IDLTypeInfo instances.

R=antonm@google.com,sra@google.com

Review URL: https://chromiumcodereview.appspot.com//10702202

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9634 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-13 16:16:17 +00:00
antonm@google.com
0db7d72b36 Support references in serialization.
R=sammccall@google.com,vsm@google.com

Review URL: https://chromiumcodereview.appspot.com//10693174

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9632 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-13 15:44:38 +00:00
lrn@google.com
2d58755073 Revert "Allow patch files to add top-level declarations to the patched library."
This reverts r9629.

TBR: floitsch

Review URL: https://chromiumcodereview.appspot.com//10702204

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9630 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-13 13:59:54 +00:00
lrn@google.com
7621533549 Allow patch files to add top-level declarations to the patched library.
The patch library is loaded normally, and then non-patch methods and classes
are cloned and added to the patched library. To support methods from other
compilation units, all elements now has a scriptOverride field that lets
them report a different script than the one of their enclosing element.
(For top-level elements that's already possible, as that's what #source does,
but for fields inside a class, we can't easily wrap a compilation unit element
around them.)

TBR: floitsch
(to get in before vacation, with reversion rights).

Review URL: https://chromiumcodereview.appspot.com//10703188

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9629 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-13 13:46:21 +00:00
podivilov@google.com
d637d0dce8 Introduce CodeBuffer as StringBuffer replacement in compiler.
CodeBuffer stores source location markers along with emitted JavaScript code.
When CodeBuffer content is added to another CodeBuffer, the markers are added as well.

CodeBuffers will be used to propagate source mappings from inside ssa codegen to emitter,
see https://chromiumcodereview.appspot.com/10695174/ for details.

R=floitsch@google.com,kasperl@google.com

Review URL: https://chromiumcodereview.appspot.com//10696194

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9628 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-13 12:59:13 +00:00
ager@google.com
21a6eef938 Recognize simple numeric computations for field type recording.
R=floitsch@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10704205

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9627 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-13 12:32:39 +00:00
floitsch@google.com
1bada9731e Transform (x && y) && z into x && (y && z).
Review URL: https://chromiumcodereview.appspot.com//10696192

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9626 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-13 11:44:12 +00:00
smok@google.com
6cb768b4a2 Fix factory constructors unparse:
class A{
  A.fromFoo();
}
=>
class A{
  AfromFoo();
}

and also print out initializers.

Review URL: https://chromiumcodereview.appspot.com//10692186

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9623 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-13 08:34:56 +00:00
floitsch@google.com
e9b7aaeba3 Add test for bug in dart2js.
Review URL: https://chromiumcodereview.appspot.com//10695179

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9622 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-13 08:12:31 +00:00
sra@google.com
fc20e9356e Add template comments.
Lines starting with //$ are removed during preprocessing of the template.
This allows comments in the templates that are not copied to the generated text.

Update copyright in template file in anticipation of new uses.

Review URL: https://chromiumcodereview.appspot.com//10694169

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9616 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 21:45:22 +00:00
nweiz@google.com
223195ba79 Use environment variables to find the Dart SDK and the Pub cache directory.
Review URL: https://chromiumcodereview.appspot.com//10689169

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9615 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 21:44:17 +00:00
gram@google.com
2239d97f64 Wire up onTestResult callbacks.
Review URL: https://chromiumcodereview.appspot.com//10692176

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9614 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 21:03:16 +00:00
gram@google.com
dc00274a1f Fix the weird names that can occur in exceptions and logs when there is no
mock qualifier and due to the method names getting wrapped in quotes.

To help this work properly, we now assert that a Mock has a name if it is 
passed in a LogEntryList, as opposed to allocating its own. We already said
in the comments that this was a requirement but it wasn't enforced. 
Review URL: https://chromiumcodereview.appspot.com//10702177

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9613 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 21:02:44 +00:00
turnidge@google.com
e48dd76856 Some small changes to make the vm dart:mirrors somewhat closer to the
source mirror implementation by Johnni.

- Add the MirrorSystem interface
- Add a simple TypeMirror
Review URL: https://chromiumcodereview.appspot.com//10700149

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9612 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 20:40:06 +00:00
asiva@google.com
ac914d3b8a Don't create a Bigint object first for every integer while parsing the sources, instead first check to see if it can be represented as a Smi or Mint. This avoids unnecessary creation of Bigint objects.
Review URL: https://chromiumcodereview.appspot.com//10703150

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9607 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 19:22:33 +00:00
rmacnak@google.com
3cc8d2e0a0 Added a comment for Dart_LoadSource.
Review URL: https://chromiumcodereview.appspot.com//10694163

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9606 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 19:21:08 +00:00
srdjan@google.com
b9aed1cd3c Implement the remaining methods in intrinsifier_x64.cc
Review URL: https://chromiumcodereview.appspot.com//10704192

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9605 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 19:10:50 +00:00
nweiz@google.com
2c2583e304 Hook in the version solver to pub install.
Review URL: https://chromiumcodereview.appspot.com//10704172

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9604 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 18:47:31 +00:00
regis@google.com
a7b85ecff8 Provide better error message when passing wrong number of arguments.
Review URL: https://chromiumcodereview.appspot.com//10695137

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9602 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 17:46:55 +00:00
scheglov@google.com
4e76ba611a Optimize comments to nodes binding
R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10695166

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9600 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 16:36:44 +00:00
scheglov@google.com
376923affa Fix copyright year
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9599 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 16:35:22 +00:00
scheglov@google.com
bb13f021a4 Use 'int' instead of Position.
By doing so we get 5-7% of performance in running JUnit tests.

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10704180

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9596 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 16:10:10 +00:00
ager@google.com
ef7cbbbbe7 Simplify type handling for recompilation of field gets.
R=floitsch@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10696195

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9593 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 13:56:55 +00:00
ager@google.com
d0e409e89c Fix type annotation error in test.
R=floitsch@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10693163

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9592 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 13:22:58 +00:00
ager@google.com
a0a3931bcf Fix bug in recompilation handling.
The recompilation infrastructure would set the propagated type of
operations just before code generation (skipping type propagation and
check insertion). This fixes that by splitting the recompilation
handling into two parts. One that is used only to register
recompilation candidates and one that is used to propagate the field
types for recompilation candidates. The one that propagates types is
only used when directly followed by type-propagation and check
insertion.

Remove the graph.highTypeLikelyhood flag which forced the use of
speculative type assumptions for everything if there was a field with
a likely type. That seems too aggressive to me.

R=floitsch@google.com
BUG=
TEST=language/field_optimization3_test.dart

Review URL: https://chromiumcodereview.appspot.com//10702167

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9591 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 13:11:07 +00:00
johnniwinther@google.com
7403284e4e Frog removed from dartdoc.
Review URL: https://chromiumcodereview.appspot.com//10696191

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9590 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 11:12:53 +00:00
smok@google.com
13c270849a PrettyPrinter, some enhancements for FunctionExpression and Send.
Review URL: https://chromiumcodereview.appspot.com//10690164

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9589 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 10:33:00 +00:00
smok@google.com
e39f6ff5d6 Fix incorrect unparse of static/final fields in classes:
class A{
static final int a=5, b=4;
}
=>
class A{
static, final a=5, b=4;
}
(no type info, comma)

Review URL: https://chromiumcodereview.appspot.com//10689172

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9588 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 09:52:41 +00:00
smok@google.com
6f953c1d3d dart2dart fix "get" appearing before type in typed getter.
Example:
String get foo() {return smth;}
=>
get String foo() {return smth;}

Review URL: https://chromiumcodereview.appspot.com//10695171

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9587 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 09:36:58 +00:00
floitsch@google.com
90386bcbaf Move handleLogicalAndOr to the SsaBranchBuilder.
Review URL: https://chromiumcodereview.appspot.com//10695143

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9586 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 09:23:56 +00:00
johnniwinther@google.com
1274e083f5 Error produced for missing var, final, const or type on field declarations.
BUG=2997
TEST=tests/language/field_decl_missing_var_type_test

Review URL: https://chromiumcodereview.appspot.com//10690106

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9585 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 09:22:53 +00:00
johnniwinther@google.com
fdbabb995e Dartdoc and Apidoc updated to use dart2js through the mirror system.
BUG=3414

Review URL: https://chromiumcodereview.appspot.com//10701091

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9584 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 08:52:19 +00:00
ager@google.com
0d14ec42be Guard against integer overflow in process constructor.
I have set an arbitrary limit of around one million arguments. I
see no reasonable use of the Process API where that would be a
problem.

R=whesse@google.com,turnidge@google.com
BUG=dartbug.com/1751
TEST=None, can't happen right now but might in the future.

Review URL: https://chromiumcodereview.appspot.com//10690160

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9583 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 08:35:10 +00:00
smok@google.com
b79fd16adb dart2dart introduce "emitter" that that generates source code.
Review URL: https://chromiumcodereview.appspot.com//10694151

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9581 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 07:46:26 +00:00
antonm@google.com
663662028e Clean sort_helper.dart a bit: remove printing.
R=ngeoffrey@google.com

Review URL: https://chromiumcodereview.appspot.com//10692157

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9580 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 07:24:07 +00:00
sra@google.com
0e37190b18 Refresh dart:html
Review URL: https://chromiumcodereview.appspot.com//10701153

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9579 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 02:15:48 +00:00
srdjan@google.com
9b391ef9cf Add some missing x64 instruction variations.
Review URL: https://chromiumcodereview.appspot.com//10696183

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9578 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 00:41:45 +00:00
scheglov@google.com
c4327d6db5 Issue 3986. Class member cannot have the same name as the class
http://code.google.com/p/dart/issues/detail?id=3986

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10735039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9577 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 00:31:07 +00:00
gram@google.com
e75fb92bcb Added ability to disable logging in mocks, to avoid the memory overhead if you don't need behavior verification of the mock itself.
Changed exceptions to end with periods - seems more Darty.
Review URL: https://chromiumcodereview.appspot.com//10694146

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9575 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 23:32:23 +00:00
nweiz@google.com
a6466ffe20 Make VersionSolver actually return PackageIds.
Review URL: https://chromiumcodereview.appspot.com//10701146

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9574 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 22:57:44 +00:00
srdjan@google.com
e74f5a721b Implement more intrinisification for x64 (not as inlined code but as header of the target).
Review URL: https://chromiumcodereview.appspot.com//10701147

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9573 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 22:37:41 +00:00
gram@google.com
b0e10499c3 CallMatchers can now be null, or take null for a method name. This might be
useful if we want to do things like find all method calls that returned a 
certain value.
Review URL: https://chromiumcodereview.appspot.com//10689148

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9570 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 19:57:52 +00:00
floitsch@google.com
95847193aa Update status file.
Review URL: https://chromiumcodereview.appspot.com//10690141

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9568 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 19:28:49 +00:00
nweiz@google.com
b2ee421a78 Add support to the version solver for sources that only have a single version per package.
Review URL: https://chromiumcodereview.appspot.com//10690127

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9567 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 19:14:35 +00:00
floitsch@google.com
4ea98500ac Fix typo.
Review URL: https://chromiumcodereview.appspot.com//10696175

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9565 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 19:14:12 +00:00