Commit Graph

286 Commits

Author SHA1 Message Date
jochen@chromium.org
56a486c322 Use full include paths everywhere
- this avoids using relative include paths which are forbidden by the style guide
- makes the code more readable since it's clear which header is meant
- allows for starting to use checkdeps

BUG=none
R=jkummerow@chromium.org, danno@chromium.org
LOG=n

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21625 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-03 08:12:43 +00:00
marja@chromium.org
048ee40e3d Minor cleanups & trivial refactoring related to Ast.
1) Literal::IsNull, IsTrue and IsFalse were dead code, and not needed.
2) No need to use the node type constants outside the Ast; there is IsSomeNodeType().
3) AsSomeNodeType() != NULL -> IsSomeNodeType().

R=rossberg@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21621 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-03 07:40:43 +00:00
mvstanton@chromium.org
287f65aec9 CallICStub with a "never patch" approach by default. Patching will
occur only when custom feedback needs to be gathered (future CLs).

Now rebased on https://codereview.chromium.org/254623002/, which moves the type feedback vector to the SharedFunctionInfo.

R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-30 14:33:35 +00:00
mvstanton@chromium.org
15dc39a86f Simplify feedback vector creation and store in SharedFunctionInfo.
LOG=N
BUG=v8:3212
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21085 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-30 10:51:01 +00:00
bmeurer@chromium.org
d4b533d41b Bulk update of Google copyright headers in source files.
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21035 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-29 06:42:26 +00:00
ishell@chromium.org
313844d842 Heap::AllocateStringFromOneByte() and major part of its callers handlified.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20846 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-17 13:27:02 +00:00
yangguo@chromium.org
a640707213 Implement handlified String::Equals and Name::Equals.
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20669 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-11 07:27:25 +00:00
yangguo@chromium.org
9ed8c39cac Return MaybeHandle from SetElement and DeleteElement.
R=ishell@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20560 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-08 07:04:13 +00:00
mvstanton@chromium.org
9e5757abee Revert "Reland of https://codereview.chromium.org/172523002/"
This reverts commit r20516 due to a Sunspider performance issue.

R=ishell@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20521 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-04 16:18:59 +00:00
mvstanton@chromium.org
f9a8425cd2 Reland of https://codereview.chromium.org/172523002/
Fixed
1) Missing line in x64 port.
2) GcStress found a logic error in the IC miss handler.

R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20516 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-04 13:57:53 +00:00
mvstanton@chromium.org
5c0d85163c Revert r20474
This reverts commit r20474 due to an x64 release issue.

R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20478 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-03 12:27:24 +00:00
mvstanton@chromium.org
c21cf2d334 Function calls are handled with a LoadIC and a FunctionCallStub. This works well, but we can create a platform to gather custom feedback by inventing a CallIC. CallIC takes a JSFunction as input, maintains UNINIT/MONO/MEGA state in a feedback slot, and engages in limited patching for the most efficient code.
The change creates a degrade in NBody tests, but a follow-on CL addresses it by using this custom feedback platform to give a 45% improvement.

R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20474 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-03 11:41:03 +00:00
rossberg@chromium.org
45118bfdfb Make invalid LHSs that are calls late errors
Necessary for web legacy compatibility.

Also fold in additional strict mode checks into LHS checks.
Minor constness clean-ups on the way.

R=marja@chromium.org
BUG=chromium:358346
LOG=Y

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20428 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-02 11:03:05 +00:00
ishell@chromium.org
0d7bdc0fd6 Callers of ElementsAccessor::SetCapacityAndLength() handlified.
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20229 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-25 09:51:13 +00:00
mvstanton@chromium.org
535f3427ca Pretenure call new support.
When FLAG_pretenure_call_new is on, we emit mementos on new object creation
in full code, and consume the feedback in crankshaft. A key difference in the
generated code for stubs is the allocation of an additional type vector slot for the
CallNew AST node, which simplifies the CallConstructStub and CallFunctionStub
considerably.

Some performance tuning still needs to be addressed, therefore the flag is off at
this moment, though fully functional. The goal is to remove the flag as soon as
possible, which allows much code deletion (yay).

R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20076 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-19 13:39:09 +00:00
rossberg@chromium.org
8e3f3cee9e Eliminate extended mode, and other modes clean-up
- Merge LanguageMode and StrictModeFlag enums
- Make harmony-scoping depend only on strict mode
- Free some bits on the way
- Plus additional clean-up and renaming

R=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19800 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-11 14:41:22 +00:00
rossberg@chromium.org
3f702d4bf9 Mode clean-up pt 1: rename classic/non-strict mode to sloppy mode
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19799 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-11 14:39:08 +00:00
mvstanton@chromium.org
516ed9fa90 Adding a type vector to replace type cells.
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19244 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-10 21:38:17 +00:00
marja@chromium.org
e6bc60c98d Revert "Unify paren handling in Parser and PreParser."
This reverts r19140.

Reason: Octane regression.

BUG=
TBR=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19147 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-06 11:59:16 +00:00
marja@chromium.org
76646e88ed Unify paren handling in Parser and PreParser.
It is only needed in (Pre)Parser::ParseExpressionOrLabelledStatement for not
recognizing parenthesized identifiers as labels and in
(Pre)Parser::ParseSourceElements for not recognizing a parenthesized string as
directive prologue.

Parser Expressions don't keep track of whether they're parenthesized, so
PreParser Expressions shouldn't either.

In addition, add helper funcs for checking if an Expression is identifier or a
given identifier. (PreParser Expressions can do this.)

BUG=3126
LOG=N
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-06 10:30:02 +00:00
verwaest@chromium.org
ae7a209e71 Remove CallICs
BUG=
R=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19001 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-31 16:52:17 +00:00
rossberg@chromium.org
0d906a8bdb Zonify types in compiler frontend
Clean up some zone/isolate handling in AST and its visitors on the way.

(Based on https://codereview.chromium.org/103743004/)

R=jkummerow@chromium.org, titzer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18719 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-21 16:22:52 +00:00
mvstanton@chromium.org
04b1baa4c4 We no longer need to recover type cells from the oracle.
We only need the values within them. Function calls to Array from optimized code needed the cell in the past, but no longer.

R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18682 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-20 09:48:05 +00:00
mvstanton@chromium.org
431dcc9342 Moving logic to AstNode to determine how many type cells are required.
With this change, we'll be able to discover how many type cells we
need at parse time, enabling future optimizations.

R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18668 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-17 14:08:50 +00:00
verwaest@chromium.org
53f46c5214 Get rid of ContextualMode for call ICs.
BUG=
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18594 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-14 16:15:05 +00:00
verwaest@chromium.org
1257ba358c Remove CALL_AS_FUNCTION and CALL_AS_METHOD.
BUG=
R=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18590 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-14 14:36:24 +00:00
rossberg@chromium.org
cb28b7f837 Retry "Templatise type representation" after making clang happy
The only thing different now is line types.h:208/236, which had a static_cast<Type*> before.

R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18533 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-10 12:19:01 +00:00
machenbach@chromium.org
8ffcd2a281 [Sheriff] Revert "Templatise type representation" and "Fix Mac warnings".
This reverts commit r18521 and r18522 for breaking mac and win builders.

BUG=
TBR=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18524 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-09 19:52:15 +00:00
rossberg@chromium.org
1c33a2d840 Templatise type representation
This is to support both heap- and zone-allocated types in the future (the latter not yet implemented).

Also, handlify the type API some more.

R=titzer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18521 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-09 17:12:48 +00:00
mvstanton@chromium.org
7baadbfac1 FunctionLiteral has work to do in the typing phase.
In crankshaft, we searched un-optimized code for a SharedFunctionInfo
that matches the FunctionLiteral we are processing. Ideally, this
work should be done in the typing phase.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18508 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-09 09:00:19 +00:00
verwaest@chromium.org
fb7218dc3d Enable optimization of functions with generic switches.
R=jkummerow@chromium.org, titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18347 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-18 11:44:38 +00:00
jkummerow@chromium.org
48ff79a300 Fix polymorphic inlined calls with migrating prototypes
LOG=Y
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18307 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-12 14:57:00 +00:00
rossberg@chromium.org
bf3d84e3c8 Move more logic from AST to oracle, pt 3
Also eliminates remaining dependencies of type-info on AST.

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18194 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-02 13:49:32 +00:00
rossberg@chromium.org
b974978e41 Move more logic from AST to oracle, pt 2
(More to follow)

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18130 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-28 15:25:38 +00:00
rossberg@chromium.org
5532af4437 Move more type collection logic from AST to oracle.
(More to come in follow-up CL.)

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18119 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-28 13:16:51 +00:00
mvstanton@chromium.org
b90d87c382 MaterializedLiteral expressions need to cache expression depth.
A problem arises in recursive literal expressions due to recent
changes that defer allocation of constant literal properties
from parse time. We were calculating expression depth as a
side-effect of a lazy constant property build, but subsequent
calls for the depth always returned 1. Cache the correct depth
in the MaterializedLiteral instead.

(Related-to/very-partial-revert-of
https://codereview.chromium.org/61873003)

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17929 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 14:17:47 +00:00
verwaest@chromium.org
341d405301 Reland and fix "Add support for keyed-call on arrays of fast elements"
BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-15 10:52:05 +00:00
machenbach@chromium.org
eef8694a7e [Sheriff] Revert "Add support for keyed-call on arrays of fast elements"
This reverts commit r17746 for breaking layout tests.

TBR=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17751 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-14 15:00:13 +00:00
verwaest@chromium.org
607a175cbc Add support for keyed-call on arrays of fast elements
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17746 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-14 13:46:18 +00:00
mstarzinger@chromium.org
acac89008d Defer allocation of constant literal properties.
This moves building of constant properties and elements arrays for all
materialized literals into the compiler. The parser no longer allocates
while parsing ObjectLiteral and ArrayLiteral expressions.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17557 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-07 12:08:37 +00:00
danno@chromium.org
7339d45a9f Define DEBUG for v8_optimized_debug=2
Thereby ensuring there is only a minimal performance regression vs. NDEBUG (now it's only about 10% slower rather than ~2x).

R=jkummerow@chromium.org, mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17392 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-25 11:10:28 +00:00
hpayer@chromium.org
fbaf016b6d Add a soft-deopt in keyed element access when current IC is pre-monomorphic and no type feedback was collected.
BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17335 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-23 10:41:21 +00:00
bmeurer@chromium.org
ef12527b7c Revert "Add a soft-deopt in keyed element access when current IC is pre-monomorphic and no type feedback was collected."
This reverts commit r17288 for breaking the mjsunit/unbox-double-arrays
test on almost every platform.

TBR=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17289 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-21 12:32:38 +00:00
hpayer@chromium.org
9667e1b30f Add a soft-deopt in keyed element access when current IC is pre-monomorphic and no type feedback was collected.
BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17288 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-21 12:10:01 +00:00
rossberg@chromium.org
9fadd29544 Fix initial comparison combined_type
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17195 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-14 13:25:36 +00:00
rossberg@chromium.org
c806a2385d Unify handling of position info in AST, part 3
* Turn CaseClause into a proper AstNode

R=yangguo@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17187 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-14 11:06:15 +00:00
rossberg@chromium.org
19d716989e Unify handling of position info in AST, part 1
* AstNode now has a position info.
* Removed various ad-hoc position infos from subclasses (most of which had it).
* Position is always set with the constructor, instead of later.
* Take care to use kNoPosition in the right spots, to not crash the debugger.

Still to do:

* Eliminate Conditional::then/else_position and WhileStatement::condition_position.
* Make CaseClause a proper AstNode and eliminate its custom position.
* If possible, eliminate all uses of kNoPosition.

R=yangguo@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17183 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-14 09:24:58 +00:00
mstarzinger@chromium.org
6ab8977e73 Remove dead IsEqualString and IsEqualNumber method.
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17160 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-11 13:40:08 +00:00
mstarzinger@chromium.org
b9b528e030 Defer allocation of native function literals.
R=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17038 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-01 09:47:37 +00:00
jkummerow@chromium.org
85ae341b09 Revert "Defer allocation of native function literals."
This reverts r17017 for breaking LayoutTests.

R=mstarzinger@chromium.org
TBR=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17024 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-30 17:42:58 +00:00