Ryan Macnak
ba608694b7
Ensure deoptimizing frames have a valid pc marker before deferred materialization.
...
BUG=http://dartbug.com/26131
R=fschneider@google.com
Review URL: https://codereview.chromium.org/1847623002 .
2016-03-30 13:11:14 -07:00
Siva Annamalai
56e888d4cd
- Move
...
stack_limit_,
stack_overflow_flags_,
saved_stack_limit_,
stack_overflow_count_ and
other interrupts mask fields from Isolate structure to Thread structure
- Change the stack overflow check in the prolog to load the stack limit
from the THR register, this removes the back to back dependent loads to
load the stack limit from the Isolate structure
R=johnmccutchan@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org/1812753002 .
2016-03-17 12:57:36 -07:00
Srdjan Mitrovic
abd32a39e5
Enable background compilation of regexp methods. Regexp functions may use indirect goto instruction. On ia32, this instruction looks up the entry point of code object in order to find its own entry point. This does not work if we disable code while the code is running. Instead we get the entry point from code's saved instruction.
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1791613002 .
2016-03-11 14:33:31 -08:00
Regis Crelier
ba69c8a898
Enumerate URIs of all types in type errors in order to help the user diagnose
...
the error (it was previously only printed for types with identical names).
Cleanup and simplify construction of type errors.
R=hausner@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org/1778133002 .
2016-03-09 15:16:47 -08:00
Srdjan Mitrovic
5d4b7b69bb
Turn on background compilation
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1760763002 .
2016-03-02 17:32:27 -08:00
Florian Schneider
48b0183926
Make precompiler work with product mode.
...
For now, change compilation-related flags to be regular
command line options. They won't affect the size of the
precompiled runtime anyway since the compiler is not included
there.
Also introduce a separate switch for precompiled runtime. This can be
used instead of the macro since it is a compile-time constant in the
precompiled runtime.
BUG=
Review URL: https://codereview.chromium.org/1759913002 .
2016-03-02 13:59:54 -08:00
Srdjan Mitrovic
3deae0d887
Allow regexp functions to be optimized in background
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1751173002 .
2016-03-01 14:37:49 -08:00
Florian Schneider
248b70a40f
Exclude deoptimization-related runtime functions from precompiled runtime.
...
Deopt instructions and deferred object classes are not needed there.
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1749973002 .
2016-02-29 13:34:48 -08:00
Regis Crelier
a8d71a461d
Stop prefixing the library name to type names when reporting a type error with
...
identical names. The library name is not always helpful, and the prefix confuses
users when the types are function types.
Instead, enumerate all appearing types with their URIs.
This should help debug issue #27229258 .
R=srdjan@google.com
Review URL: https://codereview.chromium.org/1743653002 .
2016-02-26 15:11:50 -08:00
Florian Schneider
944aed203a
Remove left-over compiler-code from precompiled runtime.
...
Only instantiate IR classes in compiled regexp mode.
Remove remaining stub generation code.
BUG=
R=vegorov@google.com
Review URL: https://codereview.chromium.org/1739173002 .
2016-02-26 06:59:36 -08:00
Ivan Posva
8d18298fed
- Remove Isolate::Flags structure and store flags directly in isolate.
...
- Make enable_asserts, enable_type_checks, error_on_bad_override and
error_on_bad_type release mode flags only.
BUG=
R=fschneider@google.com
Review URL: https://codereview.chromium.org/1737693003 .
2016-02-25 18:06:56 -08:00
Florian Schneider
d8677964a3
Move precompilation-related flags to flags list.
...
They become compile-time constants in the precompiled runtime, and in product mode.
In precompiled product mode, the precompiled value has precedence.
BUG=
R=rmacnak@google.com
Committed: https://github.com/dart-lang/sdk/commit/5c9f18c6c87284395564051a052cc4acc9b6f59a
Review URL: https://codereview.chromium.org/1731743003 .
2016-02-25 07:53:39 -08:00
Ryan Macnak
bd85deaf4e
Revert "Move precompilation-related flags to flags list."
...
The default value of print_stop_message was architecture specific.
TBR=fschneider@google.com
Review URL: https://codereview.chromium.org/1739593002 .
2016-02-24 18:08:01 -08:00
Florian Schneider
5c9f18c6c8
Move precompilation-related flags to flags list.
...
They become compile-time constants in the precompiled runtime, and in product mode.
In precompiled product mode, the precompiled value has precedence.
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1731743003 .
2016-02-24 17:31:08 -08:00
Ryan Macnak
04e8382cec
VM: Share object pool entries for optimized static calls.
...
Independently patchable entries are not required for debugging because breakpoints are only added to unoptimized code, nor for deopt because deopt patches the instruction stream and not the object pool.
Future work: Reduce the static call table from (pc offset, function, code) triples to (pc offset, function or allocation stub) pairs.
precompiled dart2js arm 20747140 -> 20674954 (-0.34%)
R=fschneider@google.com
Review URL: https://codereview.chromium.org/1713853003 .
2016-02-24 13:57:19 -08:00
Florian Schneider
b870dafa4f
VM: Separate precompilation-specific code, make flags const.
...
Move optimizations for precompilation into separate file.
Remove precompilation-specific code from flow_graph_optimizer.cc.
Add precompilation-flags: They are const in the precompiled runtime. Started moving flags to use the new flag-definition macros.
Add libdart_lib_precompiled target.
Define PRECOMPILED_RUNTIME_MACRO in more places (dart_precompiled_runtime)
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1714743002 .
2016-02-23 08:48:08 -08:00
John McCutchan
fda3a9bc2b
Remove more things
...
(stripped) dart_product before: 5307888
(stripped) dart_product after: 5275088
Reduction in size: 32800 bytes.
Removed entirely:
- debuginfo*
- elfgen*
- gdbjit*
- TraceBuffer
- vtune support
Removed in product:
- Compiler stats
- Code observers
R=asiva@google.com
Review URL: https://codereview.chromium.org/1711163002 .
2016-02-22 08:53:11 -08:00
Srdjan Mitrovic
72528aba85
Fix background compilation crashes due to allocation of types in new space. Remove default arguments of InstantiateFrom and others where space argument is being passed, in order to preemptively fix crashes and prevent future problems (always be explicit where the type is allocated, make sure the 'space' argument is propagated).
...
BUG=
R=regis@google.com
Review URL: https://codereview.chromium.org/1691163002 .
2016-02-12 09:05:08 -08:00
Regis Crelier
bb649318e4
Remove support for Javascript warnings in the VM.
...
This cl is a clone of cl https://codereview.chromium.org/1683363002/ deleted by
accident. Already LGTM'ed.
Review URL: https://codereview.chromium.org/1690903003 .
2016-02-11 09:16:06 -08:00
Srdjan Mitrovic
d26980f6fc
Pass field to mutator thread so that it can be marked as boxed and all dependent code deoptimized (background compilation only).
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1685963002 .
2016-02-10 12:33:47 -08:00
Srdjan Mitrovic
c5ea105261
Disable reg-exp compilation in background via a flag; abort background compilation if deoptimization needs to be triggered while compiling; Both issues will be fixed later
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1679373002 .
2016-02-09 12:48:31 -08:00
Regis Crelier
7ab578d21f
Keep a trail while checking upper bounds in the VM in order to properly handle
...
cycles via bounds (fixes #25568 ).
Add a regression test.
Improve handling of recursive types with trails.
Make sure we do not modify already canonicalized types.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1674383002 .
2016-02-09 10:49:43 -08:00
John McCutchan
e2e7af1229
Remove more feature in product mode
...
- Remove Timeline.
- Remove more vmservice code.
- Remove AST printing.
- Remove IL printing.
- Remove profiler.
- Remove thread interrupter.
- Remove disassembler.
- Remove Library::CheckFunctionFingerprints.
- Update test status files for product mode.
Size of dart_bootstrap before: 5287631
Size of dart_bootstrap after: 5112783
Reduction in size: 174848 bytes.
Total reduction in size (382734 + 174848): 557582 bytes.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1678203002 .
2016-02-09 08:45:32 -08:00
Ryan Macnak
a9428e26bc
Fix product build on Linux clang.
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1676363002 .
2016-02-08 11:06:37 -08:00
John McCutchan
d295b9c311
Remove many features when building product mode
...
Move all JSON printing code from object.cc to object_service.cc.
Not compiled in:
- Service protocol
- Debugger
- Debugger API
- JSONStream
- ObjectIdRing
- Profiler service
- Object JSON printing
Size of dart_bootstrap before: 5670365 bytes
Size of dart_bootstrap after: 5287631 bytes
Reduction in size: 382734 bytes.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1660063002 .
2016-02-05 09:55:51 -08:00
Srdjan Mitrovic
61eb81b9d6
Disable background compilation because of issues. Debugging.
...
BUG=
Review URL: https://codereview.chromium.org/1665373002 .
2016-02-04 14:39:04 -08:00
Srdjan Mitrovic
e200a11a31
Make background optimized compilation default true
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1669903002 .
2016-02-04 14:12:01 -08:00
John McCutchan
d77d376124
Replace intptr_t with TokenDescriptor
...
- Use TokenDescriptor instead of intptr_t for all token positions.
- Use TokenDescriptor in raw_object instead of int32_t.
- TokenDescriptor is a POD with an int32_t (this shrinks the size of AST and IR nodes by 32-bits on 64-bit architectures).
There are some cleanups I plan on doing as a follow up CL:
- Replace TokenDescriptor::value() with TokenDescriptor::TokenPos()
R=iposva@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org/1644793002 .
2016-02-02 10:15:44 -08:00
Florian Schneider
d76fe1eacd
Clean up global variables related to precompilation.
...
Replace always_optimize_ and allow_recompilation_ with
FLAG_precompilation and !FLAG_precompilation.
They are equivalent and set only once according to the
--precompilation flag
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1657153002 .
2016-02-01 19:11:42 -08:00
Regis Crelier
7f57ebcfa1
Remove signature classes from the VM.
...
They were used as the class of closure instances and as the type class of
function types.
All closure instances now have class _Closure and function types are represented
by a new class FunctionType extending AbstractType.
Fix issue 24567 and add regression test.
R=asiva@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org/1584223006 .
2016-01-19 16:32:59 -08:00
Srdjan Mitrovic
1595117898
Investigate & fix issues around usage_count and deoptimization_count
...
BUG=
R=fschneider@google.com
Review URL: https://codereview.chromium.org/1559653002 .
2016-01-05 09:40:23 -08:00
Srdjan Mitrovic
6d0be9b1ec
Eliminate excessive increment of deoptimization counters (e.g., with deep recursion of deoptimized function). Instead increment deoptimization_count for all (inlined) functions at deoptimization point if deoptimization was triggered from function's optimized code. Cases where that is not the case are OSR codes, lazy-deopts and code disabling due to loading/finalizing classes or guard invalidation.
...
Rename deoptimization_counter_threshold to max_deoptimization_counter_threshold.
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1557533002 .
2015-12-29 15:48:51 -08:00
Srdjan Mitrovic
6f867815d8
Incremental changes from background compilation work
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1541133003 .
2015-12-22 12:24:01 -08:00
Regis Crelier
48bc8bbf33
Remove instantiator argument in generated code for type tests.
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org/1533383003 .
2015-12-21 13:07:32 -08:00
Florian Schneider
f0a35b3260
VM: Add dart_precompiled build target, a standalone VM without the JIT compiler.
...
This removes most of the compiler-related code from dart_precompiled:
x64 stripped binary size 13M -> 9.1M
ARM stripped binary size 12M -> 8.3M
The precompiled build defines the DART_PRECOMPILED macro. This
stubs out the public interface to the compiler/parser with empty
function bodies.
Use gcc options -ffunction-sections and --gc-sections to make the linker remove
unused functions/symbols.
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1459443002 .
2015-11-19 10:13:16 +01:00
Srdjan Mitrovic
1b17e78f38
Create code and instruction object, and install them in the background compilation thread while bringing mutator thread to a saferpoint.
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1454553004 .
2015-11-18 11:32:17 -08:00
Srdjan Mitrovic
4600d37dc1
Background compilation work:
...
- Defer deoptimization from optimizing compiler to code installation in mutator thread.
- Defer registration of field and leaf class dependency until code is installed in mutator thread.
- Cleanup.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1433243003 .
2015-11-12 11:25:58 -08:00
Ryan Macnak
830bfe61b7
Precompilation: Generate instance calls as IC calls that can switch to Megamoprhic calls.
...
dart2js ARM -10.3% size
R=fschneider@google.com
Review URL: https://codereview.chromium.org/1418863003 .
2015-11-04 09:31:19 -08:00
Srdjan Mitrovic
cd98aff665
Getting rid of Isolate::current_zone() usage. Pass thread instead of isolate where it makes sense.
...
BUG=
R=hausner@google.com , johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1424703004 .
2015-10-26 15:31:50 -07:00
Srdjan Mitrovic
772ee329c4
Make ICData changes thread safe (first compute array, then set it). Install code in the main thread instead of in the background compilation thread.
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1410363005 .
2015-10-26 15:12:29 -07:00
Srdjan Mitrovic
c9a7080f47
nt # Enter a description of the change.
...
Set invocation counter to INT_MIN once a function is entered into the optimization queue, so that it does not get repeatedly triggered. Mutex on megamorphic cache lookup. Make AttachCode thread safe. Cleanups.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1413233004 .
2015-10-21 11:00:08 -07:00
Srdjan Mitrovic
465cf10a7c
Remove some Isolate::current_zone() calls, as it gets the zone from mutator thread not the current thread
...
BUG=
R=zra@google.com
Review URL: https://codereview.chromium.org/1414493003 .
2015-10-19 10:27:36 -07:00
Srdjan Mitrovic
6f53350611
Move deopt_id and related helpers/definitions from Isolate to Thread
...
BUG=
R=zra@google.com
Review URL: https://codereview.chromium.org/1390153004 .
2015-10-13 10:08:14 -07:00
Srdjan Mitrovic
e520dd567f
Remove isolate argument from handle allocation: Part I
...
BUG=
R=hausner@google.com
Review URL: https://codereview.chromium.org/1393373003 .
2015-10-12 11:32:08 -07:00
Srdjan Mitrovic
193eadbc10
Initial design for background compilation
...
BUG=
R=koda@google.com
Review URL: https://codereview.chromium.org//1386503002 .
2015-10-05 12:29:22 -07:00
Srdjan Mitrovic
edccf3af0a
Cleanup: we are not patching entries any longer
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1376963002 .
2015-09-30 10:22:59 -07:00
Florian Schneider
fe8bda5c4d
VM: Handle null-case when running with --trace-ic.
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1369703003 .
2015-09-28 11:09:36 +02:00
Ryan Macnak
fcdd855859
Precompile invoke-field-dispatchers for closures.
...
Improves precompiled DeltaBlueClosures by 8.6x and increases
instructions size by 0.05% (0.0005) on ARM.
R=fschneider@google.com
Review URL: https://codereview.chromium.org//1371453002 .
2015-09-24 17:19:37 -07:00
Todd Turnidge
66f9abc7e3
Refactor isolate interrupts to use OOB messages instead of interrupt bits.
...
Closes #24349
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//1344993002 .
2015-09-23 12:13:25 -07:00
Florian Schneider
bac82e2592
VM: New calling convention for generated code.
...
Instead of calling code object directly, call indirectly and
pass the code object in a register. The object pool is then loaded from
the code object. This is another preparation step for making generated code
relocatable.
All non-ia32 platforms:
No entry patching.
ARM:
PC marker (now code object) moves to the same place as on x64 (below saved PP, above saved FP).
R9 is now used as PP, R10 as CODE_REG.
BUG=
R=koda@google.com , rmacnak@google.com
Committed: https://github.com/dart-lang/sdk/commit/1d343e5a7b75168fb6c9f86b64c55173cdbdc9b2
Review URL: https://codereview.chromium.org//1192103004 .
2015-09-19 13:21:09 +02:00