Commit Graph

5286 Commits

Author SHA1 Message Date
johnmccutchan@google.com 56867c3af2 Rationalize service method handler names
BUG=
R=koda@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43937 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-21 00:33:48 +00:00
koda@google.com c1008f15c0 Save top StackResource in entry frame.
This avoids relying on stack address order, which enables us to benefit from AddressSanitizer's detect_stack_use_after_return feature.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43927 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-20 20:46:31 +00:00
koda@google.com 9dff378e6c Work around race condition in MakeArray for ASSERTs and document assumptions.
BUG=dart:22501

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43898 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 22:55:50 +00:00
srdjan@google.com f062e0894f Mitigate windows crash & failure by disabling merging of sin & cos.
Review URL: https://codereview.chromium.org//937193005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43895 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 21:58:23 +00:00
srdjan@google.com b67d23747f - Fix sin-cos merge, add a flag to turn it on/off. Using fsincos is much slower than calling out to runtime.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43891 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 20:19:16 +00:00
regis@google.com 3caf1669dc Fix indentation of parser trace (several threads may compile at once).
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43885 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 18:54:24 +00:00
fschneider@google.com 2442d5e047 VM: Fix a bug with local variable values when breaking at a variable declaration.
This fixes the case When breaking at a declaration 'var a;'

BUG=dartbug.com/22353
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43882 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 17:11:07 +00:00
iposva@google.com 7d1785e760 - Allow any implementation of StackTrace to participate in async/
await exception handling.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43880 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 16:17:19 +00:00
vegorov@google.com e8b7f9cb06 Don't constant fold operation if result is incompatible with it.
For example we can't replace BinarySmiOp with Mint constant because we might have removed the checks based on the assumption that BinarySmiOp always returns a Smi.

BUG=http://dartbug.com/22480
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43875 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 13:48:48 +00:00
koda@google.com e8844b6f99 Fix ASAN build failure due to unused local.
TBR=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43872 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 13:25:07 +00:00
iposva@google.com 606687a6d2 Fixes http://dartbug.com/22305
- Increase the size of the preallocated stack trace to give
  more context in the case of stack overflow.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43867 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 05:16:15 +00:00
koda@google.com 4c74036e9b To satisfy ASAN, use stub instead of & operator to get C++ stack pointer.
Because of initialization order, this requires slightly different paths for VM isolate and others.

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43865 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 04:58:08 +00:00
iposva@google.com db9faebe98 - Simplify collection of stack traces. If we determine that a stack
trace is needed we collect the full stack trace instead of piecing
  it together as we walk up the stack.

R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43863 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 02:18:53 +00:00
koda@google.com 554f25b53c Verify/document assumption about stack resource addresses.
We assume that addresses of stack resources refer to the actual stack and are ordered accordingly.
Using the AddressSanitizer with detect_stack_use_after_return will break this assumption.

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43858 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-18 23:21:32 +00:00
fschneider@google.com aefdc04fa8 VM: Fix issue with local variable values reported by the debugger.
I added a function to test if a variable is visible or not to the
debugger tests.

BUG=dartbug.com/22353
TEST=standalone/debugger/local_variables_test
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43850 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-18 18:48:00 +00:00
koda@google.com 6666c2502b Fix use-after-free in MessageHandler.
BUG=dart:22474
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43847 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-18 16:43:07 +00:00
fschneider@google.com 5e4085db9c Fix another missing source location VM stacktrace with async code.
The transformed AST for await now uses the token position from the original await node.

BUG=dartbug.com/22009
R=hausner@google.com, iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43842 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-18 14:50:37 +00:00
koda@google.com 1d7ca12fdc Compact LinkedHashMap/Set implementation.
Add GC-friendly replacement for default Map/Set:
* open-addressing hash table, avoiding the overhead of chained entries
* index separate from the keys/values, allowing more of it to fit in the cache
* new keys are always appended, to allow insertion-order iteration
* spare bits in index entries are used to store hashes
* index is typed data, so can be ignored by GC

Enable it with --use_compact_hash (disabled by default).

Reduces Dart2JS compilation time for huge codebase (N=200) by ~30%, due to reduced time in GC. Slightly slower for small maps and maps with deletions: json benchmarks regress by ~5%.

R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43840 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-18 13:58:32 +00:00
regis@google.com 4d09e6a9dd Accept constant string concatenation and constant string length as constant
expressions (fix issue 22408).

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43831 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-18 00:38:40 +00:00
johnmccutchan@google.com 65bab52df5 Fix HTTP support in vm-service
- Add back Message.fromUri constructor.
- Fix 'root' isolateId alias.
- FATAL on missing source files when starting up the service isolate.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43814 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-17 16:36:36 +00:00
iposva@google.com 9846e42886 - Leave abstract class StackTrace be an abstract class and
implement its interface from within the VM instead of patching.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43803 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-16 23:49:05 +00:00
iposva@google.com 98e0500c87 - Remove obsolete stack trace functions.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43802 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-16 22:53:19 +00:00
rmacnak@google.com 511c997316 Implement DeclarationMirror.location for all but ParameterMirrors.
- Mark NativeFieldWrapper classes as synthetic.
- Mark ClassID fields as synthetic.

BUG=http://dartbug.com/22378
R=gbracha@google.com, hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43784 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-13 23:32:20 +00:00
turnidge@google.com ace003886c Implement function entry breakpoints in Observatory debugger.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43782 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-13 22:37:39 +00:00
asiva@google.com 62d6e2e0bc Fix crash that happens when we send an object whose type is in a defer
loaded a library that is loaded in the isolate that is sending the message but has not been loaded yet in the isolate which is receiving the message.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43774 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-13 19:17:01 +00:00
rmacnak@google.com 446137ff5e Add getCallSiteData to the VM service.
Review URL: https://codereview.chromium.org//920113002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43740 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-12 20:55:33 +00:00
koda@google.com d7a16ac8ec Assert MakeIterable is not called concurrently with mutator.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43738 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-12 20:01:18 +00:00
johnmccutchan@google.com 1761e8eb5f Refactor service code and service method parameters
- Move service isolate code into service_isolate.cc
- Reorganize service isolate code
- Unify isolate and root message handlers
- Add MethodParameter classes
- Add parameter list to service method table
- Use parameter list for getCpuProfile RPC
- Update service_test.cc to work with required isolateId parameter.

R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43735 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-12 19:10:55 +00:00
turnidge@google.com 596413dc93 Add 'break' and 'clear' commands to Observatory debugger.
break adds a breakpoint, clear removes it.

Formats:
  break                   - break at current position
  break 13                - break at line 13, current script
  break	13:20 	          - break at line 13, col 20, current script
  break	script.dart:13    - break at line 13, script.dart
  break	script.dart:13:20 - break at line 13, col 20, script.dart
  break	main              - break at function
  break	FormatException   - break at constructor
  break	_SHA1._updateHash - break at method

clear supports the same location specifiers.

TAB completion works for all of these formats.

The protocol does not yet support setting column-specific or
function/constructor/method breakpoints.  For now we just support
parsing these formats.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43733 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-12 18:49:06 +00:00
koda@google.com 4cac1a531a Increase verbosity of assertion failures in SizeFromClass.
Print the tag word for which the assertion fails.
This is specifically to help tracking down issue 22087.

TBR=iposva@google.com
BUG=dart:22087

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43732 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-12 18:08:55 +00:00
koda@google.com 7f09f42dc8 Fix flaky disassembler crashes: do not call FindOldObject while concurrently sweeping.
The ia32 and x64 disassemblers call FindOldObject when trying to interpret addresses in the code. It's not safe to walk a heap page while it's being swept.

BUG=dart:22087
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43729 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-12 17:18:23 +00:00
hausner@google.com 2f0d13af3b Fix yield statements in catch blocks
This is a partial fix for issue 22300. The VM no longer setfaults when
using yield in try statements. Yield in catch blocks work. What’s still
not working right is if a value is yielded before an exception is
propagated to the caller.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43707 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-12 00:12:07 +00:00
asiva@google.com ea16b41a0b Fix race condition an isolate is being added to the isolate list before the name for the isolate is setup, the service isolate starts registering the isolate and accesses the name which is NULL.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43706 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-11 23:39:43 +00:00
regis@google.com 163f1c2244 Improve _toInt64() and _toUint64() conversions in TypedData.
Add missing conversions of exponent and modulus in Bigint.modPow().
Fix typos in Bigint Classic reduction (modPow tests coming in later cl).
Address a few more TODOs.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43697 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-11 20:57:33 +00:00
fschneider@google.com f7a97fa4d4 VM: Fix slow-path deoptimization environment.
The number of pushed arguments needs to be accounted for.

BUG=dartbug.com/22331
R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43681 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-11 13:34:15 +00:00
rmacnak@google.com 4de5f89b99 Rename IsConstructor to IsGenerativeConstructor.
This matches the terminology in the spec, and it avoids confusion with the function kind kConstructor, which indicates either a generative constructor or a factory constructor.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43673 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-11 00:59:19 +00:00
asiva@google.com 58c14696fb Fix a windows build issue
../../dart/runtime/vm/flags.cc:58:26: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
        OS::Print("%s: %"Pu64" (%s)\n", name_, *this->uint64_ptr_, comment_);

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43669 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-10 21:30:28 +00:00
hausner@google.com 8e7752f56b Fix bug in processing of latent breakpoints
Debugger hangs when encountering a url that has no match
in any of the loaded libraries.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43662 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-10 19:11:56 +00:00
koda@google.com c2da2d9830 Make ASAN/MSAN ignore Dart frames.
Frames initialized by generated code are unknown to ASAN/MSAN, so we must explicitly mark it as initialized.

For some (unknown) reason, this only caused failures on the build bot.

TBR=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43661 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-10 18:43:27 +00:00
regis@google.com d50fe1db24 Make instruction counter in simulators 64-bit (issue 22302).
This requires supporting uint64_t flag values.

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43660 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-10 17:41:01 +00:00
johnmccutchan@google.com 20efd2f0c4 Add Log::VPrint and remove duplicated code.
BUG=
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43624 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 23:28:47 +00:00
johnmccutchan@google.com 420aa94c56 Split profiler.cc into profiler.cc and profiler_service.cc
BUG=
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43623 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 23:22:19 +00:00
srdjan@google.com 81d8099650 Redesign inlining interval computation.
Review URL: https://codereview.chromium.org//904763003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43622 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 23:11:05 +00:00
johnmccutchan@google.com 23763129a5 Fix missing new lines in disassembly
BUG=
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43621 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 22:58:16 +00:00
turnidge@google.com e1f31e1513 Add a working command line debugger to Observatory.
Try it!

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43618 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 22:03:31 +00:00
johnmccutchan@google.com 74469b2a9f Use printf("%s", str); to avoid glibc assertion
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43614 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 21:28:54 +00:00
johnmccutchan@google.com ddbefcab7e Fix disassembly comments
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43610 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 20:57:41 +00:00
johnmccutchan@google.com 635ba4bbd9 Port flow_graph*, disassembler to ISL_Print
BUG=
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43609 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 20:49:32 +00:00
johnmccutchan@google.com fee26a9bbb Fix Linux build
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43605 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 19:06:55 +00:00
johnmccutchan@google.com a6483aefd1 Per isolate Log with block support
BUG=
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43604 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 18:54:20 +00:00