Commit Graph

2925 Commits

Author SHA1 Message Date
rmacnak@google.com 62ad4b82ce Revert "Access to imports in the VM's runtime mirrors. Extend test coverage of the source mirrors."
Review URL: https://codereview.chromium.org//189293002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33402 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-06 22:45:29 +00:00
rmacnak@google.com 2d0e54a94d Access to imports in the VM's runtime mirrors. Extend test coverage of the source mirrors.
BUG=http://dartbug.com/10360
R=gbracha@google.com, hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33397 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-06 22:02:29 +00:00
srdjan@google.com 2e214c324b More performance fixes.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33389 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-06 19:00:11 +00:00
turnidge@google.com f89fa4cee7 Use HasResolvedTypeClass to avoid crash in Field::PrintToJSONStream.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33335 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-05 17:59:23 +00:00
srdjan@google.com 3ffe7579ce Minor VM performance improvements based on profiling.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33333 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-05 17:42:40 +00:00
srdjan@google.com 6e882f79e3 When running compile-all, clear code after compiling so that we do not out too much pressure on GC and measure the compilation instead.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33294 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-04 19:52:21 +00:00
iposva@google.com 762a05195b Fix dartbug.com/17261
- Make sure to preserve type arguments when morphing a growable
  array to a fixed sized array.
- Small performance optimization for getting the number of type
  parameters in a class.

R=asiva@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33286 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-04 18:20:03 +00:00
asiva@google.com e380b175f8 Pass in the isolate parameter to the weak persistent callback handler so that
there is no need to access the current isolate in the callback and delete
path (this code is run while a GC is in progress).

See https://codereview.chromium.org/185643003/ for corresponding changes
in dartium

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33282 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-04 18:11:19 +00:00
johnmccutchan@google.com e9e54f6af6 Cleanup native, collected, and stub code handling in profiler
R=iposva@google.com, turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33177 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-28 22:55:53 +00:00
asiva@google.com e20d4da102 Avoid creation of a handle when ssetting native fields for the first time.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33104 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-27 00:34:43 +00:00
regis@google.com 8d5dae7798 Allocate instance closures similarly to regular closures, i.e. without a
specific stub and runtime call.

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33074 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-26 18:38:47 +00:00
hausner@google.com 98cf9a7b64 Fix mixin of patched classes
When mixing in functions that were patched into the mixin class, set the “origin” to the patch class so we find the right source location to parse the function.

Fixes issue 16230

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32975 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-24 18:40:51 +00:00
fschneider@google.com 16857e0b13 Revert r32930 (Add more timing information in the VM to track time...)
It caused severe performance regressions that should be addressed.

TBR=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32959 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-24 12:15:55 +00:00
regis@google.com a72c2146ba Modify growth policy for table of canonical types in each class.
Modify growth policy for cache of type arguments instantiations.
Add language test for generic closure.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32940 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-21 23:09:02 +00:00
asiva@google.com 6d313d3797 Add more timing information in the VM to track time spent is dart code Vs native code.
R=johnmccutchan@google.com, turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32930 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-21 21:30:29 +00:00
johnmccutchan@google.com ed5894d0cf Unbox/Box Float64x2 and inline typed array loads and stores
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32869 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-20 20:41:54 +00:00
iposva@google.com f2a6f1b4b6 Another round of cleanups for http://www.dartbug.com/15922
- Address warnings about 64-bit to 32-bit conversions.

R=ajohnsen@google.com, asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32831 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-19 23:35:55 +00:00
turnidge@google.com 21f92bfa63 Don't forget to subtract materialization instructions when computing the offset of the frame pointer after deoptimization.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32773 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-19 01:02:09 +00:00
turnidge@google.com 7d4b415fe3 Improved how closures are displayed by <instance-ref>.
Make <optimized out> look a bit nicer.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32760 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-18 19:45:36 +00:00
regis@google.com d599ea7d9b Simplify type argument instantiation cache lookup by introducing an array
of 1 zero Smi.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32756 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-18 19:30:03 +00:00
turnidge@google.com 174bc974bd Add expandable instances and lists to the vm service.
Review URL: https://codereview.chromium.org//164183003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32707 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-14 17:48:25 +00:00
regis@google.com 9b13508243 Avoid repeated resolution of types by marking them as resolved.
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32706 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-14 17:43:11 +00:00
regis@google.com 9380c54628 Make cycle checking of super interfaces linear instead of quadratic by marking
classes as checked (issue 16343).

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32636 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-13 00:14:36 +00:00
regis@google.com 2673ef210d Do not resolve type arguments when only a resolved type class is needed to
calculate number of type arguments during type finalization (issue 16640).
Add regression test.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32624 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-12 21:18:59 +00:00
fschneider@google.com 78fbacbd87 Fix flag to switch write protection of code pages on/off.
TBR=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32549 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-11 10:17:03 +00:00
hausner@google.com a64a32382b Small cleanup: move all library private key code to Library class
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32522 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-10 22:28:07 +00:00
iposva@google.com 056872727d - Zap the allocated object when allocating uninitialized memory in debug.
- Do not run any smart code when recreating type arguments from a snapshot.
- Adjust assertions.

R=asiva@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32510 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-10 18:40:20 +00:00
fschneider@google.com d6178535b2 Landing: Write protect executable pages in the VM.
Change executable pages to be read/execute but not writable by default.

All pages are made temporarily writable just before a full GC, because both
the mark and sweep phases write to the pages. When allocating in a page and
when patching code, the pages are made temporarily writable.

The order of allocation of Code and Instructions objects is changed so that
a GC will not occur after Instructions is allocated. (A full GC would
render the Instructions unwritable.) A scoped object is used to make memory
protection simpler.

Original CL: https://codereview.chromium.org/106593002/

I added a cc test that is expected to crash.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32493 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-10 12:18:06 +00:00
rmacnak@google.com d354d73609 Avoid printing the full token stream and doing line/column position calculations when extracting the source of a function where we don't have the original source.
Brings mirrors_reader_test from 2 minutes to 11 seconds on the standalone VM.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32461 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-08 01:18:18 +00:00
srdjan@google.com 2c37517875 Disable hoisting CheckClass due to excessive deoptimization (issue 16285). Detect that a deoptimization was caused by hoisted check class instruction and disable hoisting of CheckClassInstr for that function. This is a short-term solution to fix excessive deoptimization causing slow start-ups.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32460 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-08 00:02:22 +00:00
regis@google.com 7830430adf Implement eager instantiation and canonicalization of type arguments at run
time using a cache in uninstantiated type arguments.
Remove InstantiatedTypeArguments class.
Fix a bug in optimized code: do not update unused type test cache for Smi.
Fix a bug in optimized code on ARM and MIPS in type test cache lookup.

R=iposva@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32447 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-07 19:54:33 +00:00
johnmccutchan@google.com e1ba48aea0 Extend StoreInstanceFieldInstr and LoadFieldInstr to support reusable Float32x4 boxes on IA32, X64, and ARM.
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32429 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-07 15:30:25 +00:00
hausner@google.com ac559f643a Introduce cache of resolved names in library
A name that is not resolved in the local scope gets looked up
in the global scope of the library to which the code being compiled
belongs. The local name dictionary gets searched first, then the
dictionary of each imported library (and and their re-exported
libraries.) Each dictionary lookup includes the lookup of the
mangled getter and setter names, which means that we concatenate
the same name many times.

This change introduces a cache that stores the result of a previous
name lookup, including negative lookup results. The latter is important
to speed up the resolution of names that are not in the global name
space, e.g. class members like .length in lists.

Experiments running dart2js (with VM option --compile_all) show
that this reduces the number of name mangling calls by a factor of 10
and speeds up compiling dart2js by 15%.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32385 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-06 21:32:31 +00:00
srdjan@google.com 8b7ebed54f Mark optimized code that used CHA for optimization so that lazy class 'finalization' does not invalidate that code.
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32335 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-05 20:31:57 +00:00
johnmccutchan@google.com adc89ab748 Fix disassembler crash with profiler
BUG=
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32322 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-05 15:30:40 +00:00
asiva@google.com 732d1a44de Add a UpdatedGuardedCidBit to Class object so that we don't have
to iterate over all the classes and it's fields to update the
GuardedCid value on each call to Dart_Allocate.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32271 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-04 01:12:55 +00:00
rmacnak@google.com 509556a094 Fix handling of CRLF line endings in Script::GetSnippet.
BUG=http://dartbug.com/16098
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32254 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-03 18:11:57 +00:00
johnmccutchan@google.com 15090664ba Refactor unboxed fields code in preparation of reusable SIMD boxes.
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32199 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-31 16:45:23 +00:00
johnmccutchan@google.com 9d80608b9c Add Float64x2, Float64x2List, etc... with runtime and dart2js implementations
R=sra@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32196 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-31 15:28:05 +00:00
fschneider@google.com 6ffa061fdf Fix stack height assertion code and free up a bit in the Function tag bits.
The bit has_finally was only used to skip the checking of the stack height
at return statements: There was an unused value floating on top of the
expression stack in unoptimized code if the finally block preceded a normal
return statement. Normallyi, that does not cause harm. Optimized code is not
affected since it has a fixed stack size for expression evaluation.

This CL fixes the stack height for functions with try-finally by introducing
a temporary local where the return value is saved before an inlined
finally-block.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32157 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-30 12:12:31 +00:00
turnidge@google.com b891e78325 Post-meetup feature extravaganza.
Remodel the top-level isolate summary page.

Add variables to stack frames in the stack trace.

Stop putting small integers and bools in the object id ring.

Rework how we pass down null references (and null-like references like
uninitialized values).

Collect all isolate timers by default.

Change the lifetime of IsolateSpawnState so that we can refer to it
later to know how an isolate started up.  Stop pretending that
IsolateSpawnState is a void*.  Clean up vestigial IsolateStartData.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32128 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-29 18:40:12 +00:00
hausner@google.com 682855e8cc Ensure the debugger keeps a reference to code objects
Keep the code object in a breakpoint object rather than the
function object. This ensures that the GC can’t collect the
code object while there are breakpoints for the function.

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32006 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-24 23:55:11 +00:00
johnmccutchan@google.com 9ca09b50e7 Track live instance and allocation counts for classes.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31978 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-22 19:21:22 +00:00
hausner@google.com 0c434b3073 Rename kDummyTokenIndex to kNoSourcePos
Addresses comment to previous change list.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31969 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-21 23:46:26 +00:00
regis@google.com 926315dba6 Relax assert in case a type is first canonicalized at run time (issue 16239).
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31965 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-21 20:54:21 +00:00
johnmccutchan@google.com 6b0e0df7ba Adds an empty PcDescriptors instance to the VM-isolate.
All newly created code objects point to the empty PcDescriptors instance.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31958 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-21 16:42:35 +00:00
lrn@google.com 3b3e87cabc Revert "Rename internal library dart:_collection-dev to dart:_internal."
Dartium needs updating too.

Committed: https://code.google.com/p/dart/source/detail?r=31827

R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31877 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-16 12:06:38 +00:00
regis@google.com 5fdae0d636 Leave uninitialized type arguments of a type being finalized as null instead of
temporarily setting them to dynamic for improved code robustness, since dealing
with a null type is less forgiving than dealing with dynamic.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31843 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-15 18:56:10 +00:00
lrn@google.com ead87f47e9 Revert "Rename internal library dart:_collection-dev to dart:_internal."
Dartium needs updating too.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31827 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-15 12:27:44 +00:00
lrn@google.com 0098710559 Rename internal library dart:_collection-dev to dart:_internal.
BUG= http://dartbug.com/14140
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31823 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-15 09:24:46 +00:00