koda@google.com
3c6cb7e6f9
Fix unverified assignment to hash_.
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//726173002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41759 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-15 01:42:14 +00:00
koda@google.com
cf45ba7af3
Concurrent sweep on x64.
...
Analogous to the ia32 change: https://codereview.chromium.org/624473003/
Update header word atomically in generated code.
Also convert unused LockCmpxchgl to LockCmpxchgq.
R=iposva@google.com
Review URL: https://codereview.chromium.org//716403003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41756 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-15 01:29:49 +00:00
koda@google.com
01cfbe48d3
Wait for concurrent sweeper in vm/cc/PrintJSON.
...
The test uses Heap::IterateObjects, which may visit garbage; see https://code.google.com/p/dart/issues/detail?id=21620
BUG=dart:21620
R=iposva@google.com
Review URL: https://codereview.chromium.org//729603004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41755 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-15 00:44:36 +00:00
johnmccutchan@google.com
456bdc4ea3
Enable the profiler on the simulator
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//718393005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41752 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-14 23:15:00 +00:00
vegorov@google.com
2e8791fe38
Fix overflow check in the Smi::ShiftOp.
...
It did not work correctly for the corner case like -1 << 63.
BUG=
R=fschneider@google.com
Review URL: https://codereview.chromium.org//732573002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41740 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-14 13:19:56 +00:00
vegorov@google.com
8f7f26c0a4
Reland "Suppress canonicalization of Unbox() instruction that can deoptimize."
...
This relands commit r41693 with additional fixes in canonicalization pass.
R=fschneider@google.com
BUG=
Review URL: https://codereview.chromium.org//726593002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41736 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-14 11:19:42 +00:00
fschneider@google.com
278dd040fa
Don't print intrinsic flow graph with --print-flow-graph-optimized.
...
Only print them with --print-flow-graph.
Removed one unused method from intermediate_language.h.
R=vegorov@google.com
Review URL: https://codereview.chromium.org//725593003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41735 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-14 10:43:27 +00:00
regis@google.com
defc9a5c54
Specialize _toPow2String for bigint to make it linear instead of quadratic.
...
Remove some duplicated bigint corelib tests.
Cleanup corelib tests status file.
Partially fix issue 20879 (not closed).
R=zra@google.com
Review URL: https://codereview.chromium.org//723963006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41728 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-13 23:54:33 +00:00
fschneider@google.com
b26ff22adf
Allocation sinking for contexts.
...
Improved aliasing computation in presence of Redefinition and AssertAssignable.
Added possibility for inlining annotations via --enable-inlining-annotations flag.
R=vegorov@google.com
Review URL: https://codereview.chromium.org//184523002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41713 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-13 13:53:58 +00:00
lrn@google.com
e8ca26953e
Reduce foot-print of Error.safeToString on strings.
...
Use existing JSON encoding instead of a custom encoding.
This allows dart2js to use the system JSON stringifier directly.
R=sra@google.com
Review URL: https://codereview.chromium.org//718053003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41704 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-13 06:47:17 +00:00
koda@google.com
8479136580
Support verified heap pointer writes on ia32.
...
With --verified_mem, use VerifiedMemory to duplicate all pointer writes in the heap, and verify that no unaccounted writes occurred.
R=iposva@google.com
Review URL: https://codereview.chromium.org//711833002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41700 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-12 23:47:42 +00:00
vegorov@google.com
97c3268f51
Revert "Suppress canonicalization of Unbox() instruction that can deoptimize."
...
This reverts commit r41693 due to checked mode test failures.
TBR=fschneider@google.com
BUG=
Review URL: https://codereview.chromium.org//722793002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41695 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-12 18:57:31 +00:00
vegorov@google.com
94e896d963
Suppress canonicalization of Unbox() instruction that can deoptimize.
...
Suppress canonicalization of instructions that have unsatisfied input representations.
BUG=
R=fschneider@google.com
Review URL: https://codereview.chromium.org//721773003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41693 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-12 17:23:55 +00:00
regis@google.com
6fd6dd93d4
Fix build (gcc is happy, this must be clang complaining).
...
Review URL: https://codereview.chromium.org//721513002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41678 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 23:05:34 +00:00
zra@google.com
9c352e0898
Moves BUILD.gn config from root to runtime.
...
Cannot checkout a single file from svn through gclient.
Review URL: https://codereview.chromium.org//712313005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41677 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 22:59:00 +00:00
regis@google.com
250eda4a94
Implement bigint intrinsics on MIPS.
...
R=zra@google.com
Review URL: https://codereview.chromium.org//721483002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41675 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 22:46:17 +00:00
regis@google.com
eea98ee4df
Fix unsigned multiplication in MIPS simulator (add assembler regression test).
...
Fix breakpoint handling in MIPS simulator.
Fix potential overflow in Bigint_sqrAdd intrinsic on ARM.
R=zra@google.com
Review URL: https://codereview.chromium.org//713993002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41674 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 22:28:58 +00:00
zra@google.com
b4d3762221
Adds GN build files for building in GN based projects.
...
Review URL: https://codereview.chromium.org//690923003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41673 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 22:03:55 +00:00
vegorov@google.com
29f021439a
Infer range for BIT_XOR.
...
When selecting representations unbox integer phis that have Int32 range and have only constants or boxing operations flowing into them.
BUG=http://dartbug.com/13869
R=fschneider@google.com
Review URL: https://codereview.chromium.org//712993005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41667 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 14:51:10 +00:00
vegorov@google.com
0a8e45ae35
Improve precision of range analysis by allowing it to track ranges across all int typed phis.
...
Even when range of the integer definition is unknown we can optimistically assign full int64-range to it even though tagged integer definition can contain instance of the Bigint. This is based on the following observation: we only use ranges when working with unboxed arithmetic in the optimized code, but the widest possible unboxed arithmetic is 64-bit (mint) one and corresponding unboxing operations will deoptimize if they get Bigint as an input. This makes it safe to assume that any integer definition fits into 64-bit range *once unboxed*.
Additional small fixes:
- Fix ranges assigned to loads from Int32/Uint32 arrays on 64-bit platform - it was overly conservative;
- Add UnboxUint32 range inference to ensure that range is not lost when it passes through box-unbox pair;
- When canonicalizing Binary/Unary Integer operations ensure that we unwrap UnboxUint32(Constant(C)) -> C.
BUG=
R=fschneider@google.com
Review URL: https://codereview.chromium.org//682993008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41640 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-10 17:16:14 +00:00
fschneider@google.com
012709cfaf
Improve type propagation for AssertAssignable.
...
Updating the type of the incoming definition during
type propagation like we do for CheckClass, CheckSmi, etc.
This helps if the original definition is used instead of the
redefined value.
We also can get rid of storing back every local variable
at function start in unoptimized code in checked mode.
R=vegorov@google.com
Review URL: https://codereview.chromium.org//700843005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41638 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-10 16:25:48 +00:00
kustermann@google.com
53cc8c512d
Support for the ALPN extension of the TLS protocol for Client and Server
...
This CL uses the NSS support for the ALPN extension of the TLS protocol
(see RFC 7301).
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//625953002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41628 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-10 12:31:02 +00:00
koda@google.com
fe2d2d5c3d
Add more missing StorePointer/StoreSmi calls.
...
Also move these to RawObject (as privates), for when handles are unavailable.
R=iposva@google.com
Review URL: https://codereview.chromium.org//685583002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41609 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-07 17:24:47 +00:00
regis@google.com
6a2f5e6297
Implement bigint intrinsics on arm64.
...
Implement umaddl arm64 instruction (assembler, disassembler, simulator, tests).
Finish implementing cbz and cbnz arm64 instructions (assembler, tests).
R=zra@google.com
Review URL: https://codereview.chromium.org//701233003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41608 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-07 17:19:44 +00:00
koda@google.com
b9e374179e
Add missing StoreIntoObject calls in generated code.
...
Also add StoreIntoSmiField method (for verification purposes).
Only ia32 is implemented for now.
R=iposva@google.com
Review URL: https://codereview.chromium.org//685003002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41607 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-07 17:17:39 +00:00
fschneider@google.com
3dac489ab4
Simplify type propagation and IL declarations of TemplateInstruction.
...
Replace ComputeInitialType. It is not needed anymore.
AssertAssignable now properly uses the cid of the incoming value-type
in its compile-type.
ArgumentCount is has now a default implementation that returns 0 to avoid
defining it on all subclasses of TemplateInstruction (TemplateDefinition already
had it defined)
R=vegorov@google.com
Review URL: https://codereview.chromium.org//710653002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41602 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-07 13:06:56 +00:00
koda@google.com
dd2bbd3da9
Add missing StorePointer/StoreSmi in ContextScope.
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//673253002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41592 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-07 01:51:17 +00:00
vegorov@google.com
ddbe93418d
Work around GCC bug that results in incorrect simd128_value_t copying.
...
Under certain conditions GCC on x86 decides to copy simd128_value_t through FPU stack.
For example Int32x4::value getter would contain the following code:
212d5: d9 46 07 fld DWORD PTR [esi+0x7]
212d8: d9 46 0b fld DWORD PTR [esi+0xb]
212db: 8b 46 03 mov eax,DWORD PTR [esi+0x3]
212de: d9 46 0f fld DWORD PTR [esi+0xf]
212e1: d9 ca fxch st(2)
212e3: d9 5b 04 fstp DWORD PTR [ebx+0x4]
212e6: d9 5b 08 fstp DWORD PTR [ebx+0x8]
212e9: 89 03 mov DWORD PTR [ebx],eax
212eb: d9 5b 0c fstp DWORD PTR [ebx+0xc]
This code is incorrect. For example an attempt to copy an int32_t value that
looks like sNaN will result in it turning into a qNaN which changes
the value being copied.
GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58416
This was causing flakiness when people were running WebSocket related tests
locally on Dart VM binaries built with GCC as our WebSocket implementation uses
Int32x4 values to speed up payload masking/unmasking.
Bots were not affected because they are building with clang.
BUG=http://dartbug.com/21220
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//692703003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41581 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 20:16:34 +00:00
fschneider@google.com
f24c84ce28
VM: Normalize function result type void to null in the flow graph.
...
When computing the compile-type there should never be a value of
void type. The only value assignable to void is null, so the compiler
can use null-type as compile-type for such a value.
Before, the compiler would crash with an assertion-failure in checked
mode when running with the flag --no-eliminate-type-checks and assigning
the result of a static void function to a variable of some type.
This CL fixes the issue no matter how the flag is set. We could separately
consider removing this flag (it's default is true).
R=vegorov@google.com
Review URL: https://codereview.chromium.org//705063002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41563 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 15:40:49 +00:00
ricow@google.com
802c618118
Move test config files under tools/testing/dart
...
R=whesse@google.com
Review URL: https://codereview.chromium.org//708783002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41561 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 14:21:19 +00:00
vegorov@google.com
41bc926f6c
Suppress inlining of complex Bigint intrinsics.
...
R=fschneider@google.com
BUG=
Review URL: https://codereview.chromium.org//705063003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41558 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 13:56:19 +00:00
koda@google.com
d4cdb228f9
Add unit test for VirtualMemory::Commit.
...
Better late than never.
R=iposva@google.com
Review URL: https://codereview.chromium.org//684783010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41539 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 00:26:26 +00:00
koda@google.com
db32247d47
Fix old bug in VirtualMemory::Commit on Windows.
...
This was recently exposed by VerifiedMemory, which was the first time we commit something that's not the initial part of a reservation.
BUG=dart:21469
TBR=iposva@google.com
Review URL: https://codereview.chromium.org//701113004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41533 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-05 21:29:55 +00:00
koda@google.com
013cc72810
Add simpler unit tests for VerifiedMemory.
...
Also remember to free the reservation and the end of (non-negative) tests.
BUG=21469
TBR=whesse@google.com
Review URL: https://codereview.chromium.org//705713004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41528 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-05 18:26:36 +00:00
fschneider@google.com
16cbbda1ab
Landing bug fix in type propagation.
...
Original CL: https://codereview.chromium.org/684313003/
TBR=koda@google.com
Review URL: https://codereview.chromium.org//708493002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41523 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-05 16:09:52 +00:00
fschneider@google.com
26c2929073
VM: Load-forwarding of non-final field values at allocations.
...
Instead of ignoring escaping allocations, we now forward values
for all non-final fields and type arguments even if the object
escapes. For non-escaping objects we forward all fields.
R=vegorov@google.com
Review URL: https://codereview.chromium.org//701113003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41522 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-05 15:23:01 +00:00
johnniwinther@google.com
09fbe78e71
Move dart2js from sdk/lib/_internal/compiler to pkg/compiler
...
BUG=
Review URL: https://codereview.chromium.org//694353007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41514 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-05 08:51:01 +00:00
johnniwinther@google.com
8637cfd322
Revert "Move dart2js from sdk/lib/_internal/compiler to pkg/compiler"
...
This reverts commit r41512.
BUG=
Review URL: https://codereview.chromium.org//693183006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41513 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-05 08:15:26 +00:00
johnniwinther@google.com
2b336e17f0
Move dart2js from sdk/lib/_internal/compiler to pkg/compiler
...
BUG=
Review URL: https://codereview.chromium.org//690103004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41512 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-05 07:09:04 +00:00
zra@google.com
0219bdb81a
Regularize naming to make BUILD.gn files easier to write.
...
Review URL: https://codereview.chromium.org//703693002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41510 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-04 22:03:57 +00:00
lrn@google.com
e3d4226c63
Make JSON.fuse(UTF8) be more efficient by not creating intermediate string.
...
Adds JsonUtf8Encoder class that can be used directly, or through jsonEncoder.fuse(utf8Encoder) or jsonEncoder.startChunkedConversion(_Utf8EncoderSink).
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//689043002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41479 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-04 10:25:41 +00:00
regis@google.com
5c55e61647
Resubmit fix for Function::Clone() and Field::Clone() to adjust the class owner
...
of type parameters (issue 18630).
Make sure to clone the parameter type array as well.
Add regression tests.
R=iposva@google.com
Review URL: https://codereview.chromium.org//693693003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41474 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-03 23:16:33 +00:00
zerny@google.com
94a510176b
Copy irregexp related code from V8.
...
This "syntactic" change copies the irregexp code from V8 r24065 to Dart.
Compared to the V8 files the only changes are that the files have been
suitably renamed, headers and footers have been updated, and most of the
unneeded code has been replaced by a 'SNIP' marker. None of the files
are added to the build and they cannot compile. Integration with the
Dart VM is done in a follow-up CL [1].
[1]: https://codereview.chromium.org/683433003/
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//678193004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41455 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-03 10:00:31 +00:00
regis@google.com
30dce6a5d1
Fix issue 21474 in mirrors.
...
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//690413002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41453 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 23:16:11 +00:00
regis@google.com
1571d85271
Clarify comment explaining assert in Function::SetParameterTypeAt.
...
R=zra@google.com
Review URL: https://codereview.chromium.org//693613002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41447 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 20:14:56 +00:00
vegorov@google.com
e6847ac17c
IR refactoring: consolidate all boxing and unboxing instructions.
...
BUG=
R=fschneider@google.com
Review URL: https://codereview.chromium.org//670263007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41437 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 12:17:12 +00:00
sgjesse@google.com
65e1149f8c
Make stdout/stderr async
...
This makes stdout.write and stderr.write async.
This effectively reverts https://code.google.com/p/dart/source/detail?r=33645
Reapplies r41350 after the dart2js batch-runner have been changed to handle
async stdout/stderr.
R=ricow@google.com
BUG=
Review URL: https://codereview.chromium.org//693793002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41436 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 12:11:53 +00:00
fschneider@google.com
7bec3edaef
Remove saving/restoring of the context at function entry.
...
This is not needed anymore after I changed the current context
to always reside in a local variable.
Further simplifications and cleanup in the debugger.
This also fixes a bad memory retention problem with
non-capturing closures.
BUG=dartbug.com/18886
TEST=tests/language/vm/closure_memory_retention_test.dart
R=hausner@google.com
Review URL: https://codereview.chromium.org//695483003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41433 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 07:35:51 +00:00
regis@google.com
71c8b1b210
Revert mixin fix r41424 until mirrors issue 21474 is fixed.
...
Review URL: https://codereview.chromium.org//691053004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41425 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-30 19:04:02 +00:00
regis@google.com
5a09dee193
Fix Function::Clone() and Field::Clone() to adjust the class owner of type
...
parameters (issue 18630).
Add regression tests.
Commented out 3 lines in mirror test (issue 21474 filed).
R=srdjan@google.com
Review URL: https://codereview.chromium.org//646103005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41424 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-30 17:39:40 +00:00