Count ArrayBuffer's backing_store memory in heap snapshot.

BUG=341741
LOG=N
R=dslomov@chromium.org, loislo@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@19356 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Introduce --job-based-sweeping flag and use individual jobs for sweeping if set

BUG=v8:3104
R=hpayer@chromium.org
LOG=y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@19357 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
A64: Fix some int32 accesses in lithium

This fixes mjsunit/sin-cos. There are further int32 accesses being investigated.

BUG=
R=jochen@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@19358 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Return on the polymorphic hard deopt case to ensure we don't polute phis with fake type information.

R=ishell@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@19359 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Improve positions tracking inside the HGraphBuilder.

Instead of tracking simple absolute offset from the start of the script like other places do, track a pair of (inlining id, offset from the start of inlined function).

This enables us to pinpoint with inlining path an instruction came from. Previously in multi-script environments we emitted positions that made very little sense because inside a single optimized function they would point to different scripts without a way to distinguish them.

Start dumping the source of every inlined function to make possible IR viewing tools with integrated source views as there was previously no way to acquire this information from IR dumps. We also dump source position at which each inlining occured.

Tracked positions are written into hydrogen.cfg as pos:<inlining-id>_<offset>.

Flag --emit-opt-code-positions is renamed by this change into --hydrogen-track-positions to better convey it's meaning.

In addition this change assigned global unique identifier to each optimization performed inside isolate. This allows to precisely match compilation artifacts (e.g. IR and disassembly) and deoptimizations.

BUG=
R=yangguo@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@19360 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
(Pre)Parser: Move FunctionState, BlockState and Scope handling to ParserBase.

Notes:
- This removes Parser::FunctionState and PreParser::FunctionState and adds
ParserBase::FunctionState etc.
- Also the scope stacks and function state stacks are moved to ParserBase.
- PreParser::FunctionState didn't add and subtract
JSFunction::kLiteralsPrefixSize (unlike Parser::FunctionState). Since the
actual value of NextMaterializedLiteralIndex is not used in the Preparser,
this change is valid.
- Traits no longer need functions like is_classic_mode(), since now there is a
 unified way of getting the information from the FunctionState / Scope.

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

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@19361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Fix A64 build: unwrap HSourcePosition into int before recording.

Remove unused position_ field in the LChunkBuilder.

R=ulan@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@19362 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Fix polymorphic inlining of accessors in a test-context.

R=ishell@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@19363 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
MIPS: Fix r19360 "Improve positions tracking inside the HGraphBuilder."

BUG=
R=vegorov@chromium.org

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

Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@19364 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Prepare push to trunk.  Now working on version 3.24.40.

R=jkummerow@chromium.org
TBR=jkummerow@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@19365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
A64: Prevent repeated restoring of root in gap resolver

BUG=
R=ulan@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@19368 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Fix typed array error message.

R=dslomov@chromium.org
BUG=v8:3159
LOG=N

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@19369 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Valgrind fix: always initialize HCheckTableEntry->is_stable_

BUG=chromium:343621
LOG=N
R=ishell@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@19371 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
(Pre)Parser: Move ParsePrimaryExpression to ParserBase.

Notes:
- To be able to move the recursive descent functions to ParserBase one at a
time, we temporarily need routing functions from traits to Parser/PreParser,
since the recursive descent functions form a cyclic structure.
- PreParser used to always allow intrinsic syntax. After this CL, it depends on
allow_natives_syntax() which was already in ParserBase.
- This CL also decouples (Pre)ParserTraits better from (Pre)Parser, passing more
information as parameters, so that the Traits don't need to get it from
(Pre)Parser.
R=ulan@chromium.org
BUG=v8:3126
LOG=N

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@19374 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Test and fix for polymorphic named call deoptimization.

The fix removes wrong simulates from the number branch of polymorphic
call/field access handling.

The change also fixes the same thing for polymorphic named field
access even thourgh the field access is probably safe in practice
(because it cannot deoptimize). It is better to keep all our simulates
in sync with full codegen.

R=jkummerow@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@19375 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Remove Parser::scanner(). There is already ParserBase::scanner().

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

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@19376 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
The sweeper thread should not write the page flags. Added a sweeping complete phase, where the main thread writes the given page flags.

BUG=
R=jarin@chromium.org, jochen@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@19377 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Handle the uninitialized oddball in Type::LubBitset().

R=rossberg@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@19378 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Fix assignment of function name constant.

If it's shadowed by a variable of the same name and both are forcibly
context-allocated, the function is assigned to the wrong context slot.

R=rossberg@chromium.org
BUG=v8:3138
LOG=Y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@19379 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
api accessor store ics should return passed value

R=verwaest@chromium.org

BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@19380 ce2b1a6d-e550-0410-aec6-3dcde31c8c00