Commit Graph

2339 Commits

Author SHA1 Message Date
fschneider@google.com d2e7dba0b5 Fix bug in assigning the positions of safepoints.
Safepoints are associated with the end of instructions so that
splitting a live range at a safe point position makes the safepoint
at that position belong to the correct live range.
Review URL: https://codereview.chromium.org//10963029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12708 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 14:07:46 +00:00
vegorov@google.com 149c119a01 Improve ShouldSpecializeForDouble to handle ICs with multiple checks.
R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12703 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 13:30:23 +00:00
ager@google.com 5c9f9ef74f Avoid needless int64_t to intptr_t conversion in eventhandler.
R=sgjesse@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12693 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 11:40:40 +00:00
ager@google.com 6236cd51a5 Use native fields for process pid and fix bug that allowed killing
a process before it was started.

We should make the change to make Process.start return a future that
does not complete unless the process is actually started. That would
have avoided this issue as well.

R=sgjesse@google.com
BUG=dartbug.com/5301

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12691 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 11:07:36 +00:00
sgjesse@google.com 4ecf9c3a19 Update documentation for HTTP response status code
R=ager@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12685 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 09:06:50 +00:00
ager@google.com c6aea6b1eb Use native wrapper fields to store socket ids.
This relies on landing the change to fix implicit super constructors
for subclasses of something that has native fields.

R=sgjesse@google.com
BUG=dartbug.com/5301

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12684 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 08:19:01 +00:00
ager@google.com b065e9cb29 Fix implicit super constructor calls for sub-classes of native field wrappers.
The current code does not add implicit super calls for any sub-classes
of native field wrappers. It should only omit them from the actual
native field wrappers.

I encountered this issue when looking into dartbug.com/5301.

The test in the parser is not pretty. However, since the native field
wrappers can be generated through the API a better solution was not
immediate. I wanted to check if the class was from the
dart:nativewrappers library, but through the API you can create
native wrappers in any other library as well.

R=hausner@google.com,asiva@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12679 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 05:40:33 +00:00
asiva@google.com 4140ed9d5b Fix for issue 5223 : Import 'dart:core' implicitly only if it has not been
already explicitly imported in the script.
Review URL: https://codereview.chromium.org//10949028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12673 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 00:43:08 +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
asiva@google.com 72f3a9c2ba Issue a more meaningful error message when we see duplicate definitions (ambiguous reference)
Review URL: https://codereview.chromium.org//10969002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12657 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 21:04:14 +00:00
iposva@google.com b9327e0236 - Make the VM understand the --checked flag to be aligned with dart2js.
- Adjust some of the checked mode tests to pass --checked and --enable-checked-mode.
Review URL: https://codereview.chromium.org//10962013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12651 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 18:19:06 +00:00
iposva@google.com e95e5160ce - Fix flag names.
Review URL: https://codereview.chromium.org//10958002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12649 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 17:38:01 +00:00
zerny@google.com 5d2c29fef7 Disable inlining by default.
Inlining deoptimizable code currently causes errors.

See Issue 5318.

R=fschneider@google.com
BUG=5318

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12645 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 15:36:26 +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
vegorov@google.com 5fdc89e84b Improve SminessPropagator to propagate sminess across cycles of phis.
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12630 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 12:05:02 +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
kmillikin@google.com 52af2225e9 Revert "A simpler scheme for garbage collection of ureachable phi inputs."
This reverts svn revision 12621.  It causes unexpected test timouts.

TBR=sgjesse@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12624 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 09:11:44 +00:00
kmillikin@google.com 13ef2a994e A simpler scheme for garbage collection of ureachable phi inputs.
Simplify the garbage collection of unreachable phi inputs.  Assign immutable
block ids to basic blocks and ensure that both predecessor blocks and phi
inputs are kept sorted by block id.

R=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12621 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 08:47:57 +00:00
kmillikin@google.com 67021511ca Make some static helpers into member functions.
Four helper functions that moved from lib/integers.cc to vm/object.cc so
they could be used during constant folding are more properly member
functions than static functions.

R=srdjan@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12620 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 08:38:33 +00:00
ager@google.com 45da470ddf Fixes to tests and updating status file to make buildbot green.
R=lrn@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12619 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 07:54:18 +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
vegorov@google.com cd578d9de7 Ensure that parser throws an error when parsing x is! T with malformed type T.
Otherwise VM crashes in the flow graph builder

R=regis@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12608 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 21:48:50 +00:00
regis@google.com 99818005d8 Control static type propagation with a flag in optimizing compiler.
Minor cleanup.
Review URL: https://codereview.chromium.org//10952009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12601 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 20:59:01 +00:00
hausner@google.com 38f8f3cbfa Add virtual method to Object to ease dictionary code
Add a virtual method at the root of the object hierarchy
that returns the name of the object that is used in the
namespace dictionary. Only object types that are kept in
the dictionary need to overwrite the default implementation. 
Review URL: https://codereview.chromium.org//10945020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12577 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 17:09:42 +00:00
kmillikin@google.com 76495c3a8a Fix a typo in an input index computation.
Bug was found by varying the order of predecessors.

R=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12570 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 16:05:58 +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
vegorov@google.com adf926862d Turn definitions that do not produce results (e.g. Checks) into instructions.
This allows more uniform iteration of IR for example when we are looking for all Smi values.

R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12563 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 14:38:31 +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
kmillikin@google.com be0492a8a8 Reapply "Initial implementation of sparse conditional constant propagation."
With a fix for compilation on Mac.  GrowableArray is DISALLOW_COPY_AND_ASSIGN,
so we can't create a temporary one to be ignored and have to pass one in to be
ignored.

R=fschneider@google.com,zerny@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12561 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 14:10:14 +00:00
zerny@google.com 58b3f8871c Remove check for stack overflow on entry to an inlined function.
R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12556 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 12:43:48 +00:00
zerny@google.com 8ca2c4e6e9 Replace start_env with initial_definitions in GraphEntryInstr.
The initial definitions do not have any deoptimization information and can be
represented as just a list of definitions. For easy access, the constant_null
getter remains but assumes that index 0 contains the constant.

R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12555 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 12:37:57 +00:00
kmillikin@google.com 5e449aea52 Revert "Initial implementation of sparse conditional constant propagation."
Revert due to compilation failures on Mac.

TBR=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12552 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 11:04:36 +00:00
kmillikin@google.com ae9efbfab0 Initial implementation of sparse conditional constant propagation.
Use the results of SCC to eliminate unreachable code.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12549 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 10:34:14 +00:00
ahe@google.com d0f3e48063 Work around for bug 4995 to unbreak VM build.
Review URL: https://codereview.chromium.org//10947026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12541 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 09:00:38 +00:00
fschneider@google.com 542c853d64 Delete code for the now unused IL instruction NumberNegate.
It was replaced by an unboxed double operation in a previous change.
Review URL: https://codereview.chromium.org//10938011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12539 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 08:33:07 +00:00
ahe@google.com 34c503ae73 Don't invoke user-defined code in NoSuchMethodError.toString.
Review URL: https://codereview.chromium.org//10939020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12533 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 07:55:50 +00:00
cshapiro@google.com 69e1aefb72 Constraint List length values to the Smi type.
This change also makes the fast path and slow path cases in some integer
handling functions explicit.  Values are asserted not to be a Smi in the
slow path as they should have been picked off in the fast path.

BUG=https://code.google.com/p/dart/issues/detail?id=1750

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12527 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 01:11:37 +00:00
cshapiro@google.com 40604757dc Lazy peer API.
This change provides getters and setters for a lazily allocated field
associated with every heap allocated object.  It is a generalization
of the peer field of external string instances, external byte array
instances, and the smrck field of closure instances.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12511 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-18 21:15:46 +00:00
jackpal@google.com c6920baa3b Improve dlsym() error-detection.
Avoid false-positive error detection by calling dlerror() once (and
ignoring the result) before calling dlsym().

See "man dlsym" on a Linux machine for more discussion of how to detect
errors when calling dlsym().

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12504 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-18 16:44:41 +00:00
regis@google.com 87c144334f Fix bad optimization of instance-of with uninstantiated types (issue 5216).
Fix bad assert when type check elimination is disabled (issue 5217).
Cleanup of type elimination code in optimizing compiler.
Add test.
Review URL: https://codereview.chromium.org//10942006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12502 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-18 15:12:43 +00:00
zerny@google.com aa5281c88a Reapply "Deoptimization support in inlined code."
This reapplies r12488 with a fix.

R=kmillikin@google.com,fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12499 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-18 13:41:20 +00:00
vegorov@google.com 7c0aae937d Prohibit inlining of functions containing throw. Inliner does not handle abnormal control flow.
In StrictCompareInstr::Canonicalize don't remove right_constant from the graph. It might leave the graph in the inconsistent state.

R=srdjan@google.com
BUG=dart:5136

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12497 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-18 13:27:21 +00:00
zerny@google.com e174be3f27 Revert "Deoptimization support in inlined code."
This reverts commit a78e33f178aae74a97f4231ca98183adf97fda71.

TBR=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12492 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-18 12:18:04 +00:00
zerny@google.com 64a9ca2b81 Deoptimization support in inlined code.
Review URL: https://codereview.chromium.org//10928232

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12488 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-18 11:53:59 +00:00
ager@google.com 1159462fc6 Switch from interfaces to abstract classes in dart:io.
Add a bunch of default argument values to the abstract classes
so they are picked up by dartdoc.

R=sgjesse@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12484 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-18 10:54:37 +00:00
sgjesse@google.com b0790fa96d Never send reserved status codes in a close frame
When receiving a close frame with no status code the reported status
code is 1005. If the close is echoed as part of the close handshake
the echoed close frame must also have no status code and NOT status
code 1005.

The description of status code 1005 from the spec:

1005 is a reserved value and MUST NOT be set as a status code in a
Close control frame by an endpoint.  It is designated for use in
applications expecting a status code to indicate that no status
code was actually present.

R=ajohnsen@google.com

BUG=dart:5209

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12482 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-18 10:27:47 +00:00
sgjesse@google.com ff654354be Make it possible to read a specific number of characters from a string input stream
R=ager@google.com

BUG=dart:4954
TEST=tests/standalone/io/string_stream_test.dart

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12474 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-18 08:25:26 +00:00
iposva@google.com 820d2b33d5 - Fix the implementation of Random.nextBool() and add test.
Review URL: https://codereview.chromium.org//10919323

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12458 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-17 21:33:39 +00:00
jackpal@google.com 5ef2b814bd Don't use TEMP_FAILURE_RETRY macro with inet_addr
inet_addr is not a syscall, therefore it should not be used with the
TEMP_FAILURE_RETRY macro.

This fixes a warning in the Android build.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12447 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-17 18:48:33 +00:00
fschneider@google.com aa3d3af639 Avoid using a temp register when unboxing a known smi.
Instead of saving into a temp, restore the input by re-tagging
it after the conversion.
Review URL: https://codereview.chromium.org//10909272

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12443 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-17 16:34:22 +00:00