Commit Graph

11 Commits

Author SHA1 Message Date
jkummerow@chromium.org
0963c220b1 Revert "Implement simple effect typing for variables" and "Handle switch effects".
This reverts r15776 and r15777 due to compile failures on Chromium Mac bots.

TBR=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15786 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-19 19:55:09 +00:00
rossberg@chromium.org
02649f08bc Implement simple effect typing for variables
For that, we maintain an abstract store typing of all variables with LOCAL location (i.e., those that do not escape the function's own scope). We treat assignments as sequential effects that modify this store.

When control flow branches, we have to compute the disjunction of possible effects. To that end, we represent the store as a stack of effect sets, such that we can cheaply push and pop "local" effects when control flow has to branch.

In cases of non-local control transfer from an unknown source, we currently erase all knowledge about the store.

The 'switch' statement is still to come.

For a formulation of the typing rules, see:

https://docs.google.com/a/google.com/file/d/0B3wuXSv9YKuKeUNkVXZDemZ0Z1E

;)

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15776 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-19 12:54:27 +00:00
rossberg@chromium.org
b17713e405 Introduce type Bounds record
Refactoring in anticipation of handling variable bounds.

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15625 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 11:47:05 +00:00
rossberg@chromium.org
189c0782d3 Unrevert^2 "Derive synthetic type bounds for expressions""
Reenables https://codereview.chromium.org/17842004 (again).

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15571 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-09 11:48:47 +00:00
rossberg@chromium.org
65170b3b9e Revert^2 "Derive synthetic type bounds for expressions""
Reverts https://codereview.chromium.org/17842004 (again), due to SS regression.

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15559 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 15:38:39 +00:00
rossberg@chromium.org
1d51b7a760 Unrevert "Derive synthetic type bounds for expressions"
Reenables https://codereview.chromium.org/17842004

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15552 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 13:19:58 +00:00
rossberg@chromium.org
aa2ebf6da7 Revert "Derive synthetic type bounds for expressions"
TBR=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15443 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-02 11:50:56 +00:00
rossberg@chromium.org
fd484c9df9 Derive synthetic type bounds for expressions
Currently synthesizes Smi as the lower bound for numeric operations (except for +, which might result in a string). That would need to change in places where we want to track constants as type feedback.

Does not do anything about variables yet.

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15422 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 13:59:18 +00:00
rossberg@chromium.org
0977c60984 Use AST's type field and merge types for unary, binary & compare ICs
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15264 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-21 11:10:06 +00:00
rossberg@chromium.org
94f651bc1b Migrate Compare ICs to new type rep
(Does not yet use common AST expression type field.)

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-12 17:20:37 +00:00
rossberg@chromium.org
6fda4e4c28 Collect type feedback in separate pass and store it in AST
Notes:

- For now, just adds the missing type info fields to the AST nodes directly.
  I'd like to factor that out more nicely in a follow-up CL.

- All type feedback now is uniformly collected through AST nodes'
  RecordTypeFeedback functions. At some point, this logic should be moved
  out of ast.cc.

- The typing pass currently simulates the exact same conditions under
  which feedback was collected in Hydrogen before. That also should be
  made more generic in the future.

- Type information itself is unchanged. Making it more regular is
  yet more future work.

Some additional cleanups:

- Lifted out nested class ObjectLiteral::Property, to enable forward declaration.
- Moved around some auxiliary enums.

R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14825 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-27 13:59:20 +00:00