Commit Graph

31 Commits

Author SHA1 Message Date
ager@chromium.org
cc619a34ef Remove list copy constructor (for which there was no corresponding
assignment operator) and add an AddAll method to lists instead.
Review URL: http://codereview.chromium.org/115705

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2033 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-22 11:52:24 +00:00
kmillikin@chromium.org
bcff796134 Size reduction of VirtualFrame objects. Remove the code generator and
macro assembler pointers and all derived state.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2011 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-20 11:14:18 +00:00
bak@chromium.org
34865c062b Introduced copy constructor for List<T, P> and changed constructor of VirtualFrame to use it.
Review URL: http://codereview.chromium.org/113582

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2000 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-19 13:26:02 +00:00
ager@chromium.org
ef85ba46b0 First round of size reduction for JumpTargets. Reduce their size by
two words: there is no reason to keep a pointer to the current code
generator and macro assembler in the JumpTarget.
Review URL: http://codereview.chromium.org/113458

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1987 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-18 12:26:59 +00:00
bak@chromium.org
cadd98f860 M src/jump-target.cc
M    src/parser.cc


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1975 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-15 14:58:02 +00:00
kasperl@chromium.org
d34f51df8d Revert r1969 because of test failures.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1973 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-15 14:40:50 +00:00
bak@chromium.org
3cded9c31f Reduced malloc/free operations in the parser.
Review URL: http://codereview.chromium.org/115402

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1969 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-15 13:47:35 +00:00
kmillikin@chromium.org
f579685469 Remove the redundant flags is_bound_ and is_linked_ from the
JumpTarget class in favor of using other internal state.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1966 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-15 11:17:29 +00:00
ager@chromium.org
af59c3d68f Reapply revision 1949. Stupid error.
Add virtual destructor to jump targets to make compiler happy.
Review URL: http://codereview.chromium.org/113396

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1951 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-14 12:18:25 +00:00
ager@chromium.org
c9eda02def Revert revision 1949.
Review URL: http://codereview.chromium.org/115350

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1950 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-14 11:55:18 +00:00
ager@chromium.org
f4778b007f Reduce the memory used by frame elements from two words to one by
encoding the values in one word and by using an indirection table for
handles.

This reduces compilation time by roughly 10% and we should be able to make the slow case equality checking of frame elements faster as well.
Review URL: http://codereview.chromium.org/115347

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1949 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-14 11:43:09 +00:00
bak@chromium.org
c70ec7a3d2 - Make VirtualFrame and JumpTarget zone allocated.
- Compacted the VirtualFrame representation.
-> Improved the compiler speed with 10%

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1947 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-14 11:03:55 +00:00
kmillikin@chromium.org
ebbaeb3655 Initial bypass of JumpTarget::ComputeEntryFrame for deferred code
entry labels where it is statically safe.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1943 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-14 07:38:44 +00:00
kmillikin@chromium.org
60c42717f3 Refactor JumpTarget::Combine.
Review URL: http://codereview.chromium.org/113329

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1930 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-13 10:29:49 +00:00
kmillikin@chromium.org
83f2c1968f Streamline JumpTarget::ComputeEntryFrame by removing the separate loop
that sets the static type on elements in the entry frame.  Instead set
the static type as early as possible when computing elements.

Because the elements are shared with the reaching frames, this has the
side effect of sometimes changing the static type of reaching frame
elements.  They will be changed anyway in VirtualFrame::PrepareMergeTo
immediately after, so this is safe.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1928 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-13 07:21:37 +00:00
kmillikin@chromium.org
fc6834c5ea Modify JumpTarget::ComputeEntryFrame to mark copied elements
immediately when putting a copy in the entry frame, rather than as
part of a separate pass after fully constructing the entry fraem.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1907 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-11 15:02:46 +00:00
kmillikin@chromium.org
bcab3697f6 Simplify JumpTarget::ComputeEntryFrame. Eliminate a separate pass
over the frame elements to find registers used (before allocating
undetermined elements) and another pass to set the frame's register
indices (after allocating all elements).
Review URL: http://codereview.chromium.org/114018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1906 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-11 13:57:19 +00:00
lrn@chromium.org
3e55df5a57 Tracks static type of strings in frame elements and results.
Uses static string type to optimize string additions.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-03 12:01:56 +00:00
kmillikin@chromium.org
8389e4f9f8 When computing pairwise merges of frame elements, we should allow
constants and copies below the watermark on backward jump targets
(that's the whole point!).
Review URL: http://codereview.chromium.org/60044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1670 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-02 12:23:49 +00:00
kmillikin@chromium.org
06860982a9 Clean up return statements in the code generator by explicitly
counting the reference to the return value and passing it to the
return label.  This requires threading it through try/catch and
try/finally.  The return value is loaded into eax more lazily than
before.

Also, perform some related refactoring of jump targets.
Review URL: http://codereview.chromium.org/56172

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1669 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-02 08:58:18 +00:00
whesse@chromium.org
36853c83d1 Remove register counts from VirtualFrame, use register indices instead.
Review URL: http://codereview.chromium.org/42565

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1605 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-25 10:00:52 +00:00
whesse@chromium.org
bbd21a59fd Add pointers to a VirtualFrame that keep track of the indexes of register
frame elements.
Review URL: http://codereview.chromium.org/53005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1593 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 11:52:33 +00:00
kmillikin@chromium.org
6565243504 Inline the Result::Unuse member function and change the Result
destructor to no longer invalidate the result.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1560 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 12:58:14 +00:00
kmillikin@chromium.org
9752bf90b5 Remove a bunch of unnecessary includes from header files in favor of
forward declarations.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1559 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 09:35:31 +00:00
kmillikin@chromium.org
cd296924b6 Add a copied flag to virtual frame elements that tells if a copy has
been made of the element.  Set it when copying an element, clear it
when writing to an element marked copied and discovering that it is
not copied.

The copied flags on entry frames are exact.  Preparing a frame for
merging set the copied flags to be exact (to increase the likelihood
of matching the entry frame or another frame).
Review URL: http://codereview.chromium.org/50005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1546 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 11:57:18 +00:00
kmillikin@chromium.org
d0e76971a6 Change the way we handle backward jumps in the code generator. Keep
the frame states of all the forward-entering frames that had merge
code generated.  At a backward branch, check if there is no merge code
or if we can reuse an existing merge block.
Review URL: http://codereview.chromium.org/40169

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1502 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-12 14:55:17 +00:00
kmillikin@chromium.org
c7f2458912 Tweak an assertion in the jump target destructor so that it only
applies to initialized jump targets, and not in the case of a stack
overflow.
Review URL: http://codereview.chromium.org/42118

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1498 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-12 12:30:45 +00:00
kmillikin@chromium.org
8d622ac4ac Fix formatting problem.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1483 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-11 06:31:21 +00:00
kmillikin@chromium.org
0e60cf38dc Fix issue 265 by handling extra statement state on the frame based on
the expectation at the break, continue, and return labels (including
shadowed ones) instead of based on the AST nodes.

See http://code.google.com/p/v8/issues/detail?id=265

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1482 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-11 06:17:19 +00:00
kmillikin@chromium.org
773843b62e Introduce a BreakTarget subclass of JumpTarget used to represent the
blocks labeled by "break", "continue", and "return".  BreakTargets are
the only jump targets that appear in the AST, the only ones that can
be uninitialized, and the only ones that can be shadowed.
Review URL: http://codereview.chromium.org/42008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1475 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 12:11:56 +00:00
kmillikin@chromium.org
f4735247cf Merge from experimental code generator branch to bleeding edge.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-27 13:00:32 +00:00