Commit Graph

35 Commits

Author SHA1 Message Date
mstarzinger@chromium.org
2b7891c303 Unify deoptimizer for construct stub frames.
This unifies the translation of artificial construct stub frames. The
frame layout is almost the same on all architectures and only differs
in the presence of a slot holding the constructor function.

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13843 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-06 16:12:24 +00:00
svenpanne@chromium.org
e4edbb0535 Cleaned up CpuFeature scope handling.
First of all, it has nothing to do with Isolates, it is related to the assembler
at hand. Furthermore, the saving/restoring is platform-independent. Cleaned up
some platform-specific stuff on the way.

Note that there are some things which still need some cleanup, like e.g. using
EnumSet instead of uint64_t, making Probe() more uniform across platforms etc.,
but the CL is already big enough.

BUG=v8:2487

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13823 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-05 10:48:16 +00:00
palfia@homejinni.com
1c9542ebef MIPS: Compile FastCloneShallowObjectStub using Crankshaft.
Port r13732 (686b0a45)

Original commit message:
This changes FastCloneShallowObjectStub to be compiled independent of
the target architecture. It also adds tracing to the deoptimizer for
compiled stubs and contains some minor bugfixes.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13802 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-04 14:23:30 +00:00
mstarzinger@chromium.org
05f1be1bb3 Unify deoptimizer for accessor and arguments frames.
This unifies the translation of artificial accessor stub and arguments
adaptor frames. The frame layout is the same on all architectures and
the computation code can be shared.

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13784 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-01 12:23:24 +00:00
svenpanne@chromium.org
bfaf38d2fd Miscellaneous profile-driven Isolate plumbing.
While doing this, it became clear that quite a few functions should not be
static and should better live in various classes as instance methods, but I'll
leave this for a later CL.

BUG=v8:2487

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13765 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 14:45:59 +00:00
palfia@homejinni.com
a475fbb21e MIPS: Support pass-through of stub caller arguments
Port r13593 (ae4edde7)

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/12217079

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13657 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-13 14:35:05 +00:00
palfia@homejinni.com
eb573e1122 MIPS: Generate the TransitionElementsStub using Crankshaft
Port r13585 (4174b9d2)

Original commit message:
This includes:
* Adding support for saving callee-clobbered double registers in Crankshaft code.
* Adding a new "HTrapAllocationMemento" hydrogen instruction to handle AllocationSiteInfo data in crankshafted stubs.
* Adding a new "HAllocate" hydrogen instruction that can allocate raw memory from the GC in crankshafted code.
* Support for manipulation of the hole in HChange instructions for Crankshafted stubs.
* Utility routines to manually build loops and if statements containing hydrogen code.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/12212080

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13655 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-13 14:01:22 +00:00
palfia@homejinni.com
1d33c7721d MIPS: Add separate flag for --trace-stub-failures
Port r13598 (79a374cf)

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/12211088

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13654 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-13 13:45:26 +00:00
danno@chromium.org
c9be48a2b7 MIPS: Add StubFailureTrampolineFrames
Port r13533 (2f339757)

Original commit message:
In preparation of supporting stubs that deopt and then need to push their
register-based parameters to an arguments area on the stack that gets properly
collected, add StubFailureTrampolineFrames to hold those parameters.

BUG=
TEST=

Review URL: https://codereview.chromium.org/12087053
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13560 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-30 16:09:31 +00:00
danno@chromium.org
8e7f419fe2 MIPS: Generalize calling to C++ on stub deopt
Port r13320 (916d70a6)

Original commit message:
Remove code specific to KeyedLoadICs in DoCompiledStubFrame on all platforms, driving stub frame translation by the register parameter information found in a stub's CodeStubInterfaceDescriptor.

BUG=
TEST=

Review URL: https://codereview.chromium.org/11783046
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13336 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-09 08:43:36 +00:00
danno@chromium.org
b510dc58d3 MIPS: Re-land Crankshaft-generated KeyedLoad stubs.
Port r13236 (cd9236c5)

BUG=
TEST=

Review URL: https://codereview.chromium.org/11801002
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13322 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-07 10:18:25 +00:00
ulan@chromium.org
0606abbaab Rename RelocInfo::NONE to RelocInfo::NONE32.
This CL only does renaming, nothing else.

Followup to:
https://chromiumcodereview.appspot.com/11695006/

There are now NONE and NONE64 RelocInfo types, but only ARM uses them
both at the same time. They were added in:
https://chromiumcodereview.appspot.com/11191029/

R= ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/11744020
Patch from JF Bastien <jfb@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13311 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-04 10:56:24 +00:00
ulan@chromium.org
6e12a16aac Use a filter instead of a visitor to deoptimize selected functions in a context.
This makes the DeoptimizeAll function O(n) instead of O(n^2) where n in the number of optimized functions.

Before this change, DeoptimizeAll iterated over the optimized function list and called DeoptimizingVisitor for each function. The visitor iterated over the optimized function list again to remove the functions that share the same optimized code.

This change partitions the optimized function list into one or more lists of related functions in one pass over the optimized function list.

R=mstarzinger@chromium.org

Review URL: https://chromiumcodereview.appspot.com/11547015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13226 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-17 10:23:52 +00:00
svenpanne@chromium.org
17def81fc9 Use count-based profiling exclusively.
Review URL: https://codereview.chromium.org/11437016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13158 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-07 08:55:06 +00:00
ulan@chromium.org
18ff15ca8c Speed up function deoptimization by avoiding quadratic pass over optimized function list.
R=danno@chromium.org
BUG=155270

Review URL: https://chromiumcodereview.appspot.com/11189091

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12780 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-22 09:48:56 +00:00
svenpanne@chromium.org
7af6883098 Fixed deoptimization of inlined getters.
It is necessary to explicitly handle the internal frame lying between the caller
of the getter and the getter itself in the deoptimizer: When the getter is
inlined, leaving the internal frame restores the correct context.

BUG=http://crbug/134609
TEST=mjsunit/regress/regress-crbug-134609

Review URL: https://chromiumcodereview.appspot.com/10910110

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12470 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-07 09:01:54 +00:00
svenpanne@chromium.org
b10d5d7f08 Deoptimization support for accessors.
Highlights of this CL:

 * Introduced a new opcode in the deoptimizer for a setter stub frame.

 * Added a global setter stub for returning after deoptimizing a setter.

 * We do not need special deopt support for getters, although the getter stub creates an internal frame. The normal machinery works just right for this case, although we generate a stack that can never occur during normal fullcode execution. If this hurts us one day, we can parameterize and reuse the setter deopt machinery.

Review URL: https://chromiumcodereview.appspot.com/10855098

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-17 10:43:32 +00:00
rossberg@chromium.org
42552808ab Rename "global context" to "native context",
in anticipation of the upcoming lexical global scope.

Mostly automatised as:

for FILE in `egrep -ril "global[ _]?context" src test/cctest`
do
  echo $FILE
  sed "s/Global context/Native context/g" <$FILE >$FILE.0
  sed "s/global context/native context/g" <$FILE.0 >$FILE.1
  sed "s/global_context/native_context/g" <$FILE.1 >$FILE.2
  sed "s/GLOBAL_CONTEXT/NATIVE_CONTEXT/g" <$FILE.2 >$FILE.3
  sed "s/GlobalContext/NativeContext/g" <$FILE.3 >$FILE
  rm $FILE.[0-9]
done

R=mstarzinger@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10832342

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12325 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-17 09:03:08 +00:00
svenpanne@chromium.org
b5da7279b1 Introduced TypeFeedbackId and BailoutId types.
This is a refactoring-only CL which improves the typing of IDs associated with
AST nodes. The interesting parts are in utils.h and ast.h, the rest of the CL
basically follows mechanically.

Review URL: https://chromiumcodereview.appspot.com/10831172

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12263 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-06 14:13:09 +00:00
mstarzinger@chromium.org
b2f9dc54ed MIPS: Share optimized code for closures.
Port r11817 (616dfcf0)

Original commit message:
Each SharedFunctionInfo gets an optimized code map to store
one optimized code object per context. When allocating a new
closure we consult this map and check if there is optimized code
that can be shared.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10557002
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11848 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-18 12:54:10 +00:00
mstarzinger@chromium.org
21fc0fef6a Fix deopted construct stub frame to contain code object.
R=danno@chromium.org
BUG=chromium:124594
TEST=mjsunit/regress/regress-124594

Review URL: https://chromiumcodereview.appspot.com/10155024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11436 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-25 13:22:04 +00:00
jkummerow@chromium.org
d9936b4546 MIPS: Port count-based profiler
Port r11120 (548ba49bd).

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9835083
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11141 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-26 11:29:44 +00:00
danno@chromium.org
d0437e781d MIPS: Simplify the deopt entry method.
The t9 register will always hold the address of the current entry when deoptimizing,
so it can be used as the basis of calculation.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9546017
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10950 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-07 09:05:41 +00:00
mstarzinger@chromium.org
66a94223db MIPS: Implement inlining of constructor calls.
Port r10849 (b0fe79c).

Also included: Fixed a bug in GenerateRecordCallTarget.

This bug prevented certain functions from being registered as Monomorphic
and thus prevented them from being inlined using the new system (b0fe79c).

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9511002
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10862 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-29 09:48:03 +00:00
fschneider@chromium.org
596a0fa73c MIPS: Re-worked the deopt entry table.
This method works around the Branch offset and relocinfo issues by emulating a pc-relative jump.
This allows us to generate larger entry tables. The theoretical limit is 2^16 (number of entries)
but even that can be extended by allowing a larger instruction count.

Also reverted the mips-specific constant (kNumberOfEntries) in deoptimizer.h

BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/9347016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10717 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-16 08:38:25 +00:00
vegorov@chromium.org
c712ecfdb0 MIPS: Support inlining at call-sites with mismatched number of arguments.
Port r10483 (8785a3ef)

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9271068
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10512 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-26 11:26:45 +00:00
erik.corry@gmail.com
b3e0761e38 Cosmetic changes ("set up" is a verb, "setup" is a noun).
Review URL: http://codereview.chromium.org/9139051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10399 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-13 13:09:52 +00:00
erik.corry@gmail.com
4bea3b5c54 Fix test-hashing after recent changes to string hashing.
Acriave test-hashing in SCons and buildbot runs.
Small cleanups in root register handling on ARM and MIPS.
Review URL: http://codereview.chromium.org/9110029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10351 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-06 11:33:20 +00:00
fschneider@chromium.org
aa3004d21f MIPS: Fix lazy deoptimization at HInvokeFunction and enable target-recording call-function stub.
Port r10006 (4b344a03).

Original commit message:

Changes the way we do lazy deoptimization:

1. For side-effect instructions, we insert the lazy-deopt call at
the following LLazyBailout instruction.

     CALL
     GAP
     LAZY-BAILOUT ==> lazy-deopt-call

2. For other instructions (StackCheck) we insert it right after the
instruction since the deopt targets an earlier deoptimization environment.

   STACK-CHECK
   GAP ==> lazy-deopt-call

The pc of the lazy-deopt call that will be patched in is recorded in the
deoptimization input data. Each Lithium instruction can have 0..n safepoints.
All safepoints get the deoptimization index of the associated LAZY-BAILOUT
instruction. On lazy deoptimization we use the return-pc to find the safepoint.
The safepoint tells us the deoptimization index, which in turn finds us the
PC where to insert the lazy-deopt-call.

Additional changes:
* RegExpLiteral marked it as having side-effects so that it
  gets an explicitlazy-bailout instruction (instead of
  treating it specially like stack-checks)
* Enable target recording CallFunctionStub to achieve
  more inlining on optimized code.

BUG=
TEST=
Review URL: http://codereview.chromium.org/8587008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10020 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-17 14:33:49 +00:00
kmillikin@chromium.org
f077a41b12 MIPS: crankshaft implementation
BUG=
TEST=

Review URL: http://codereview.chromium.org/7934002
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9828 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 08:14:46 +00:00
mstarzinger@chromium.org
acc0263755 MIPS: port Fix evaluation order of GT and LTE operators.
Port r9641 (2876c37)

Note that this port does not include crankshaft portions of this
commit. They have been included in today's update to
http://codereview.chromium.org/7934002/

Also, this fixes a changed function prototype for:
void Deoptimizer::RevertStackCheckCodeAt()

BUG=
TEST=

Review URL: http://codereview.chromium.org/8348028
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9700 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 11:44:38 +00:00
danno@chromium.org
4f7d11f963 MIPS: port Merge experimental/gc branch to the bleeding_edge.
Simplified based on Michael's change Refactor how embedded pointers are visited. (9597)

Ported r9328 (bdc13b7)

BUG=
TEST=

Review URL: http://codereview.chromium.org/8106002
Patch from Paul Lind <pling44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9600 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-13 07:35:38 +00:00
vitalyr@chromium.org
5b63bc1fe8 Static state cleanup: add more consts.
R=vegorov@chromium.org

Review URL: http://codereview.chromium.org/7491052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8843 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-05 11:32:46 +00:00
ager@chromium.org
47ca7358e6 MIPS: stub out Support debugger inspection of locals in optimized frames
Added Deoptimizer::FillInputFrame as UNIMPLEMENTED method.

Ported r8464 (34f38d1)

BUG=
TEST=

Review URL: http://codereview.chromium.org/7284026
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8480 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 09:25:29 +00:00
sgjesse@chromium.org
2531480d10 Re-establish mips basic infrastructure.
This commit adds current working versions of assembler, macro-assembler,
disassembler, and simulator.

All other mips arch files are replaced with stubbed-out versions that
will build.

Arch independent files are updated as needed to support building and
running mips.

The only test is cctest/test-assembler-mips, and this passes on the
simulator and on mips hardware.

TEST=none
BUG=none

Patch by Paul Lind from MIPS.

Review URL: http://codereview.chromium.org/6730029/


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7388 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-28 13:05:36 +00:00