- 30 Mar, 2010 2 commits
-
-
kmillikin@chromium.org authored
The stack check has been moved from the Accept function dispatching on the AST node type, earlier to the Visit function dispatching on the visitor type. This allows very simple non-recursive visitors (not taking extra arguments or returning values) via the convention of calling "Visit" if one wants the stack check and "Accept" if one does not. Recursive calls should all be via "Visit". Review URL: http://codereview.chromium.org/1567007 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4320 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
kmillikin@chromium.org authored
Cut down on the number of arguments passed to the various binary operation code generator functions by passing along the expression itself, rather than a subset of its fields. Review URL: http://codereview.chromium.org/1592001 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4319 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 29 Mar, 2010 1 commit
-
-
kmillikin@chromium.org authored
The flow graph has been simplified to remove the special branch, join, and exit nodes. All nodes are now basic blocks (possibly empty to preserve edge-split form) with a distinguished entry and exit block. Most trivial expressions are not added to the flow graph as instructions. The assigned variable analyzer has been changed to sometimes work right-to-left so that right subexpressions can be marked as trivial. The reaching definitions analysis has been temporarily removed, and the analyses that depended on it (primitivity analysis, dead code marking) as well. Review URL: http://codereview.chromium.org/1530003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4307 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 25 Mar, 2010 1 commit
-
-
whesse@chromium.org authored
Review URL: http://codereview.chromium.org/1233003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 24 Mar, 2010 2 commits
-
-
kmillikin@chromium.org authored
TBR=fschneider@chromium.org Review URL: http://codereview.chromium.org/1257002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4248 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
kmillikin@chromium.org authored
As part of aggressive dead code elimination, we initially assume all flow-graph instructions are not live. We mark those that are critical and recursively all their children. The children of variable references (VariableProxies occurring as rvalues) include all their reaching definitions. Review URL: http://codereview.chromium.org/1159005 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4246 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 23 Mar, 2010 3 commits
-
-
kmillikin@chromium.org authored
Previously we marked compare operations that occurred as for loop conditions so as to avoid inlining the floating-point code for them. Begin marking all expressions that occur as any loop condition (because they are never dead code). Review URL: http://codereview.chromium.org/1074009 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4227 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
fschneider@chromium.org authored
This change adds a data-flow pass to statically determine if a variable contains a primitive type. It requires building the flow graph and computing reaching definitions as pre-requisites. The analysis annotates all VariableProxy nodes with the result. Review URL: http://codereview.chromium.org/1132005 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4224 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
iposva@chromium.org authored
their place. - Add one field to the SharedFunctionInfo to remember the number of literals used in this function. Review URL: http://codereview.chromium.org/669240 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4211 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 22 Mar, 2010 1 commit
-
-
fschneider@chromium.org authored
This change adds the option to peel off the first iteration of inner loops. Loop peeling is off by default and can enabled by a flag. It also requires building a flow graph. As part of this I added the possibility to clone AST nodes. Review URL: http://codereview.chromium.org/998001 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4205 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 19 Mar, 2010 1 commit
-
-
fschneider@chromium.org authored
Also remove unused attributes related to it from the ast. Review URL: http://codereview.chromium.org/1117003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4194 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 16 Mar, 2010 2 commits
-
-
whesse@chromium.org authored
Review URL: http://codereview.chromium.org/975001 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4148 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
kmillikin@chromium.org authored
After computing RD_in for all flow graph nodes, push the reaching definitions through the basic blocks to annotate all variable references in the AST. Review URL: http://codereview.chromium.org/889003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4143 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 15 Mar, 2010 1 commit
-
-
whesse@chromium.org authored
Add static analysis to AST expressions that records whether a negative zero will be treated identically to a positive zero in the expression's context. Use this flag to avoid some tests in inlined smi code. Review URL: http://codereview.chromium.org/965001 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4130 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 12 Mar, 2010 1 commit
-
-
kmillikin@chromium.org authored
IsPrimitive reflects that an expression's value is known statically to be one of the ECMA-262-3 JS types other than Object (e.g., Undefined, Null, Boolean, String, or Number). The type conversions ToPrimitive, ToNumber, ToInteger, ToInt32, ToUInt32, ToUint16, ToString, or ToObject cannot invoke user code for primitive input values. ToObject throws a TypeError if its input is Undefined or Null. Review URL: http://codereview.chromium.org/912002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4116 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 11 Mar, 2010 3 commits
-
-
kmillikin@chromium.org authored
Reaching definitions in (RD_in) is initially empty for all nodes. Gen and kill sets are computed. AST node numbers are used for nodes to refer to their definition number. Also: two small changes to flow graph printing. Children of branch nodes are visited in right-to-left order when performing depth first search. Instructions are numbered locally within blocks so as to not destroy AST node number before printing (it's useful to print the definition). Review URL: http://codereview.chromium.org/876001 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4107 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
ager@chromium.org authored
object-literals with few elements but large element indices. We can decide at parse time whether the created object literal should have fast-case of slow-case elements. Remove unused runtime function. Review URL: http://codereview.chromium.org/805004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4100 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
fschneider@chromium.org authored
This change fixes a bug with the arguments object that occurred with r4087 and r4088. The fix is not marking the arguments variable as trivial since it can have side effects. Review URL: http://codereview.chromium.org/851002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4099 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 10 Mar, 2010 2 commits
-
-
whesse@chromium.org authored
Review URL: http://codereview.chromium.org/805005 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
fschneider@chromium.org authored
This change adds a pass over the AST that computes the set of assigned variables for locals and parameters for each expression. The result of this analysis is used to for two purposes: 1. Recognize variables that are trivial subexpressions. A left sub-expression of a binary operation is trivial if it is a local variable or a parameter and it is not assigned in the right sub-expression. In the case of a trivial left sub-expression we evaluate the right first. Currently only binary operations and compare operations are considered when finding trivial left sub-expressions. 2. Recogize certain simple for-loops with a constant trip count where the loop variable is always within smi range. If the loop count variable is not assigned in the body of the loop (except in the update expression the for-loop). This allows omitting smi checks on operation using the loop count variable. Review URL: http://codereview.chromium.org/669155 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4087 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 09 Mar, 2010 1 commit
-
-
kmillikin@chromium.org authored
Add a simple boolean helper function for Variables and Slots. Review URL: http://codereview.chromium.org/722001 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4065 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 08 Mar, 2010 4 commits
-
-
whesse@chromium.org authored
Review URL: http://codereview.chromium.org/668258 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4057 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
whesse@chromium.org authored
Simplify AST analysis of side-effect-free int32 expressions. Review URL: http://codereview.chromium.org/668256 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4056 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
kmillikin@chromium.org authored
A variable usage analysis pass was run on toplevel and lazily-compiled code but never used. Remove this pass and the data structures it builds. The representation of variable usage for Variables has been changed from a struct containing a (weighted) count of reads and writes to a simple flag. VariableProxies are always used, as before. The unused "object uses" is removed. Review URL: http://codereview.chromium.org/669270 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4052 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
kmillikin@chromium.org authored
The flow graph is built by walking the AST. Edges are labeled with instructions (AST nodes). Normal nodes have a single predecessor edge and a single (labeled) successor edge. Branch nodes are explicit, they have a single predecessor edge and a pair of (unlabeled) successor edges. Merge nodes are explicit, they have a pair of predecessor edges and a single (unlabeled) successor edge. There is a distinguished (normal) entry node and a distinguished (special) exit node with arbitrarily many predecessor edges and no successor edges. The graph is intended to support graph-based analysis and transformation. Review URL: http://codereview.chromium.org/660449 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4051 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 02 Mar, 2010 2 commits
-
-
whesse@chromium.org authored
Add syntax checker for side-effect-free expressions to AstOptimizer in rewriter.cc. Add bit fields for syntax checker results to Expression in ast.h. Review URL: http://codereview.chromium.org/660372 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3998 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
sgjesse@chromium.org authored
The reverts r3939 as it turned out not be the root cause for the regression http://crbug.com/36604. Review URL: http://codereview.chromium.org/661365 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3993 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 24 Feb, 2010 1 commit
-
-
sgjesse@chromium.org authored
This caused some regressions in Chromium. BUG=http://crbug.com/36604 Review URL: http://codereview.chromium.org/652228 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3939 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 19 Feb, 2010 1 commit
-
-
kmillikin@chromium.org authored
Add a (currently) syntactic predicate to AST expression nodes telling whether they are 'trivial'. Trivial expressions have no side effects, do not require storage to be allocated for them, and can be evaluated out of order (because their value does not change between when they are visited by the code generator as expressions in the AST and when it is consumed). Mark 'this' and literals as trivial. Allow them to be pushed on the virtual frame. Make use of them to push 'this' more lazily in this property assignments. Review URL: http://codereview.chromium.org/647018 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3906 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 12 Feb, 2010 1 commit
-
-
fschneider@chromium.org authored
This change add simple local live variable information to the fast code generator. It supports only AST nodes that are accepted by the syntax checker. Each variable use points to a variable definition structure which contains the last use of the definition. To determine whether a variable is live after a certain point we can check whether its last use occurs later in the evaluation order defined by the AST labeling number. The new information is currently only printed out together with the IR and not yet used for code generation. Review URL: http://codereview.chromium.org/603004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3839 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 09 Feb, 2010 1 commit
-
-
kmillikin@chromium.org authored
Support a binary operation (bitwise OR) so long as it's not nested in the left subexpression. This ensures that the expression stack never has height greater than two and so can be kept fully in registers. The bounded expression stack height and the absence of any side effects on the fast path allows us to still bailout out to the very beginning of the function if any of our fast-path checks fail. Review URL: http://codereview.chromium.org/594008 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3822 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 01 Feb, 2010 1 commit
-
-
lrn@chromium.org authored
Review URL: http://codereview.chromium.org/549207 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3752 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 29 Jan, 2010 2 commits
-
-
kmillikin@chromium.org authored
Use it to hold the possible shared function info, the possible receiver, and the compilation loop nesting depth. Remove loop nesting from FunctionLiteral AST nodes. Review URL: http://codereview.chromium.org/552232 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3744 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
fschneider@chromium.org authored
This change adds a post-order numbering to AST nodes that are relevant for the fast code generator. It is only invoked together with the fast compiler. Also changed the ast printer to print the numbering for testing purposes if it is present. Review URL: http://codereview.chromium.org/553134 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3738 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 27 Jan, 2010 1 commit
-
-
kmillikin@chromium.org authored
simpler backend for non-toplevel code. Review URL: http://codereview.chromium.org/549158 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3721 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 19 Jan, 2010 1 commit
-
-
kmillikin@chromium.org authored
generator. Contexts are no longer stored in the AST but in the code generator's state. This means that the running the code generator selector is not required to use the toplevel code generator (for instance, if we already know that we can and should use it). Review URL: http://codereview.chromium.org/546075 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3645 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 14 Jan, 2010 1 commit
-
-
fschneider@chromium.org authored
Replace runtime call to NumberAdd with call to binary op stub. Until now the top-level compiler always called a runtime function for count operations. In some places we expected in the JS builtins smis as arguments. If we perform a count operation before all smis would get converted into heap numbers by the runtime number add function and result in a runtime assert. Also: Add missing debugger information in the top-level compiler for do-while loops. Review URL: http://codereview.chromium.org/548029 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3610 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 13 Jan, 2010 2 commits
-
-
kmillikin@chromium.org authored
Review URL: http://codereview.chromium.org/549035 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3599 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
kmillikin@chromium.org authored
the code generators. These uses broke the rules of the class because it was safe to do so, but there was no real reason to do it that way. Review URL: http://codereview.chromium.org/543041 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3598 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 12 Jan, 2010 1 commit
-
-
kmillikin@chromium.org authored
* Rename the operation of filling a context with a value. Formerly it was 'Move', now it's 'Apply' so as to avoid confusion with various other Moves (eg, in the toplevel codegen, in the macro assemblers). * Use the abstraction Drop rather than math on the stack pointer. * Add a predicate on AST expression nodes to abstract a repeated test whether we should us a regular (named) IC or a keyed IC. Review URL: http://codereview.chromium.org/546006 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3580 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-