wingo@igalia.com
4eddbacabf
Assign bailout and type feedback IDs in a post-pass
...
This will allow us to move expressions from one function to another, for
example when the parser determines that a given cover grammar instance
is actually the default value initializer for an arrow function.
This is a re-land of https://codereview.chromium.org/636403003/ with a
fix for the arm64 code generator.
R=svenpanne@chromium.org
BUG=
Review URL: https://codereview.chromium.org/663373003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24769 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-21 12:16:37 +00:00
svenpanne@chromium.org
d66d302b00
Revert "Assign bailout and type feedback IDs in a post-pass"
...
This reverts r24757, which breaks the ARM64 simulator build.
Simple repro:
out/arm64.debug/d8 -e 'eval("(function(){ const x; var x; })")'
TBR=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/652543006
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24762 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-21 10:55:12 +00:00
svenpanne@chromium.org
2b8d734037
Assign bailout and type feedback IDs in a post-pass
...
This will allow us to move expressions from one function to another, for
example when the parser determines that a given cover grammar instance
is actually the default value initializer for an arrow function.
R=svenpanne@chromium.org , marja@chromium.org
BUG=
Review URL: https://codereview.chromium.org/636403003
Patch from Andy Wingo <wingo@igalia.com>.
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24757 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-21 08:52:32 +00:00
dcarney@chromium.org
6c1e4f08d1
[turbofan] cleanup InstructionSequence
...
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/664123002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-21 06:59:50 +00:00
dcarney@chromium.org
32161089da
[turbofan] pass zone to InstructionSequence
...
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/663073002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-20 11:18:07 +00:00
dcarney@chromium.org
4e191e782e
[turbofan] remove schedule from InstructionSequence
...
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/669613002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24726 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-20 10:19:15 +00:00
bmeurer@chromium.org
a17289f4bc
[turbofan] Drop broken StaticParameterTraits.
...
The StaticParameterTraits are broken by design, and cause way too much
trouble. The compilers usually pick the wrong specialization (i.e. the
default specialization is picked for Load and Phi even tho there is a
specialization for MachineType), which is not only the reason why GVN is
ineffective and slow, but can also lead to correctness issues in some
rare cases.
Also clean up some minor bugs/inconsistencies on the way.
TEST=cctest,unittests
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/636893002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24437 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-07 13:30:28 +00:00
jarin@chromium.org
5b742b356d
Adding more missing deoptimization points in Turbofan.
...
BUG=
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/595863002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24289 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-29 13:37:58 +00:00
mstarzinger@chromium.org
4413d318a6
Unify use-sites of EnsureDeoptimizationSupport.
...
R=sigurds@chromium.org
Review URL: https://codereview.chromium.org/563123004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24024 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-18 09:02:36 +00:00
sigurds@chromium.org
68075b0a05
Reland "Add handling for argument adaptor frames to inlining."
...
Original: https://codereview.chromium.org/573703002/
Reland Fixes:
- Add deopt framestate to CollectStackTrace runtime call
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/544953006
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24023 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-18 08:56:52 +00:00
sigurds@chromium.org
b8dd74779c
Revert "Add handling for argument adaptor frames to inlining."
...
This reverts commit r24008.
TBR=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/581673002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24010 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-17 15:00:57 +00:00
sigurds@chromium.org
887b77aa83
Add handling for argument adaptor frames to inlining.
...
- Lazy deopt from inlined calls
- Lazy deopt from inlined calls with parameter mismatch
R=jarin@chromium.org , mstarzinger@chromium.org , mstarzinger@chromium
Review URL: https://codereview.chromium.org/573703002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24008 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-17 14:41:30 +00:00
titzer@chromium.org
cbf66711af
Minor compiler pipeline refactoring. Inline UpdateSharedFunctionInfo and make Parser::Parse responsible for setting the strict mode of the CompilationInfo.
...
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/555553003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24001 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-17 12:34:46 +00:00
jarin@chromium.org
b3b4e3eea5
Fix deoptimization of context.
...
We need to handle the case where the context was removed by dead code
elimination. In that case, we just use the context from the activation
(or from the inlined function if we are inlined).
For reference, here is the CL that introduced the bug: https://codereview.chromium.org/522873002
BUG=410566
LOG=N
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/542613002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23699 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-04 14:52:52 +00:00
mstarzinger@chromium.org
4539e9b936
Remove deprecated PrintableUnique.
...
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/543743002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23697 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-04 13:45:05 +00:00
sigurds@chromium.org
f7d5558a7a
Reland "Make FrameStates recursive (to be used for inlining).".
...
Reland fixes:
- Verifier is now aware of sentinel value for FrameState chains.
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/534573002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23662 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-03 14:10:20 +00:00
titzer@chromium.org
e1a948a6f8
Convert Linkage to use MachineSignature.
...
This simplifies the handling of MachineTypes for parameters and returns
used in tests, and overall improves the regularity with which they
are handled in both tests and in CallDescriptor.
R=bmeurer@chromium.org , jarin@chromium.org
BUG=
Review URL: https://codereview.chromium.org/530783002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23638 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-03 10:13:21 +00:00
jarin@chromium.org
a520e03442
Revert "Make FrameStates recursive (to be used for inlining)."
...
This reverts commit r23595.
TBR=sigurds@chromium.org
BUG=
Review URL: https://codereview.chromium.org/528963002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23598 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-02 11:28:40 +00:00
sigurds@chromium.org
7117cae25e
Make FrameStates recursive (to be used for inlining).
...
- Changes FrameState node to require a 5th input
(use undefined as sentinel).
- Adds outer_state pointer to FrameStateDescriptor.
- Instruction selection dumps dependencies of FrameState chain into the instruction.
- Code generator builds the translation for rec. FrameStates.
(will require further integration tests)
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/517323002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23595 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-02 10:49:27 +00:00
jarin@chromium.org
a668cd6fc8
Context deoptimization and removal of the deoptimization block in Turbofan
...
This adds context deoptimization to Turbofan and Crankshaft (also submitted separately as https://codereview.chromium.org/515723004/ ).
The second patchset removes the deoptimization/continuation block from calls.
BUG=
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/522873002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23547 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-01 09:31:14 +00:00
jarin@chromium.org
8eb5c1524d
Unit test of instruction selection for calls with deoptimization.
...
BUG=
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/505133002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23467 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-27 15:56:11 +00:00
jarin@chromium.org
d8295050d2
Fix deoptimization address patching in Turbofan to use safepoints.
...
Since the deopt patch address needs to be available during GC to
resolve safepoints, we need to move it to the code object (instead of
the deoptimization input data) - accessing a separate fixed array
is not safe during GC. This CL adds a deoptimization_pc field to
each safepoint. The fields points to the deoptimization block.
The CL also fixes wrong register allocator constraints for
frame states on calls. These should always live on the stack
because registers are not preserved during a call.
BUG=
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/504493002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23334 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-25 07:02:19 +00:00
sigurds@chromium.org
85058ce97d
Set ScopeInfo when compiling for unit tests.
...
This is required to correctly treat eval in unit tests.
BUG=
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/453953002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23193 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-19 11:24:24 +00:00
titzer@chromium.org
9803a72417
Unify MachineType and RepType.
...
MachineType now tracks both the representation and the value type of machine quantities and is used uniformly throughout TurboFan.
These types can now express uint8, int8, uint16, and int16, i.e. signed and unsigned smallish integers. Note that currently only uint8 and uint16 are implemented in the TF backends.
R=bmeurer@chromium.org , mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/470593002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23122 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-14 09:19:54 +00:00
titzer@chromium.org
6fa2cee262
Move MachineRepresentation to machine-type.h and rename to MachineType in preparation for merging it with RepType.
...
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/456333002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23051 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-11 15:55:28 +00:00
jarin@chromium.org
117945ec6e
Add deoptimization translations.
...
BUG=
R=bmeurer@chromium.org , mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/442253002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22924 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-06 11:49:02 +00:00
bmeurer@chromium.org
d07a2eb806
Rename ASSERT* to DCHECK*.
...
This way we don't clash with the ASSERT* macros
defined by GoogleTest, and we are one step closer
to being able to replace our homegrown base/ with
base/ from Chrome.
R=jochen@chromium.org , svenpanne@chromium.org
Review URL: https://codereview.chromium.org/430503007
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22812 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-04 11:34:54 +00:00
danno@chromium.org
218395ebaa
Fix MIPS build: use stubbed-out TF implementation
...
R=titzer@chromium.org
Review URL: https://codereview.chromium.org/426833005
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-31 11:59:49 +00:00
danno@chromium.org
a1383e2250
Land the Fan (disabled)
...
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/426233002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22709 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-30 13:54:45 +00:00