Commit Graph

2690 Commits

Author SHA1 Message Date
dcarney@chromium.org
7d8cda6ea0 Allow Object::InternalFieldCount and Object::GetAlignedPointerFromInternalField to be called from Persistent classes
R=svenpanne@chromium.org

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19740 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-10 08:18:57 +00:00
jarin@chromium.org
b83b8b9ed4 Atomic ops: Sync with Chromium and add unit test.
R=jarin@chromium.org

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

Patch from Cosmin Truta <ctruta@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19738 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-10 06:43:21 +00:00
rafaelw@chromium.org
6503dfb72b Reland "Enable Object.observe by default"
Original Issue: https://codereview.chromium.org/183683022/

TBR=rossberg
BUG=v8:2409
LOG=Y

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19736 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-08 04:41:06 +00:00
rafaelw@chromium.org
0cc44c14e5 Revert "Enable Object.observe by default"
TBR=rossberg
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-08 03:54:42 +00:00
rafaelw@chromium.org
dcf9842e07 Enable Object.observe by default
R=rossberg@chromium.org, rossberg
BUG=v8:2409
LOG=Y

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-08 02:47:53 +00:00
yurys@chromium.org
e18b575c6e Fix compiler warning on Win64
BUG=None
LOG=N
TBR=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19731 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-07 17:20:03 +00:00
yurys@chromium.org
74546c03ad AllocationTracker now maintains a map from address range to stack trace that allocated the range. When snapshot is generated the map is used to find construction stack trace for an object using its address.
BUG=chromium:277984
LOG=Y
R=alph@chromium.org, mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-07 16:13:22 +00:00
alexandre.rames@arm.com
33a46be689 A64: Handle a few TODOs.
Notes about a few TODOs handled in this patch:

* In ProfileEntryHookStub::Generate:
    Stubs are always called with relocation.

* In CreateArrayDispatchOneArgument:
    The branches to registers can't be conditional. We could use a jump table, but
    there are only 6 different kinds so it is likely not worth it.

* In Builtins::Generate_StringConstructCode:
    Rename the argc register (x0) after its meaning changes.
    Remove a TODO: using a macro would not make the code clearer.

* In Generate_JSEntryTrampolineHelper:
    Remove the TODO and raise an internal issue to investigate this.

* In Disassembler::SubstituteBranchTargetField:
    Print the target address, but we don't have more info on the target.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19724 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-07 15:20:32 +00:00
yurys@chromium.org
49cd3d8a65 Allocation tracker: add separate entry for allocations via V8 API
When object is creating via native V8 API calls JS callstack is empty and the allocation is indistinguishable from say compiler allocations. This change adds a separate entry for such allocations.

Since FunctionInfo not necessarily corresponds to a heap object they are now referred to using their index in the list of all FunctionInfos.

BUG=chromium:277984
LOG=N
R=loislo@chromium.org, mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19718 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-07 11:32:01 +00:00
mvstanton@chromium.org
f19e15c388 Test FeedbackVectorPreservedAcrossRecompiles needs crankshaft
The new test didn't recognize that non-sse2 builds on ia32 would
disable crankshaft.

R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19716 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-07 11:01:03 +00:00
mvstanton@chromium.org
1812f63fd2 Moved type feedback vector to SharedFunctionInfo.
Type Vector followup: the type vector currently lives off the code object. This CL moves it to the SharedFunctionInfo, facilitating re-use and continued use in crankshafted code if desired.

R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19712 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-07 10:12:17 +00:00
mvstanton@chromium.org
1d3652ebe6 Symbols for type cells. We can make more efficient code to check against type cells in the future if we use symbols, guaranteed not to conflict with user code. Currently, the "symbols" are the hole and undefined. Undefined may come in from the outside.
BUG=
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19706 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-07 09:10:18 +00:00
marja@chromium.org
bd1fb97d5c Remove Script::SetData and the script_data parameter from Script::(Compile|New).
This feature makes it possible to associate data with a script and get it back
when the script is compiled or when an event is handled. It was historically
used by Chromium Dev Tools, but not any more. It is not used by node.js.

Note: this has nothing to do with the preparse data, despite the confusing name.
The preparse data is passed as ScriptData*.

Note 2: This is the same as r19616 ( https://codereview.chromium.org/184403002/ )
with a unused variable fix in bootstrapper.cc.

R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19702 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-07 08:43:54 +00:00
rossberg@chromium.org
758a688bb6 Add --es-staging flag
...and remove some obsolete ones.

R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19669 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-05 10:07:07 +00:00
mstarzinger@chromium.org
9ab32061ed Print properly signed displacement in disassembler.
R=titzer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19667 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-05 09:28:26 +00:00
ulan@chromium.org
b9e0b87a5a Clear optimized code cache in shared function info when code gets deoptimized.
This adds a pointer to the shared function info into deoptimization data of an optimized code. Whenever the code is deoptimized, it clears the cache in the shared function info.

This fixes the problem when the optimized function dies in new space GC before the code is deoptimized due to code dependency and before the optimized code cache is cleared in old space GC (see mjsunit/regress/regress-343609.js).

This partially reverts r19603 because we need to be able to evict specific code from the optimized code cache.

BUG=343609
LOG=Y
TEST=mjsunit/regress/regress-343609.js
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19635 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-03 11:11:39 +00:00
marja@chromium.org
40ffba58a4 Revert "Remove Script::SetData and the script_data parameter from Script::(Compile|New)."
This reverts revision 19616.

BUG=
TBR=marja@chromium.org,svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19618 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-28 14:09:52 +00:00
marja@chromium.org
55750b1c62 Remove Script::SetData and the script_data parameter from Script::(Compile|New).
This feature makes it possible to associate data with a script and get it back
when the script is compiled or when an event is handled. It was historically
used by Chromium Dev Tools, but not any more. It is not used by node.js.

Note: this has nothing to do with the preparse data, despite the confusing name.
The preparse data is passed as ScriptData*.

R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19616 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-28 13:54:14 +00:00
jochen@chromium.org
2aa5ac9311 A64: fix cctest/test-assembler-a64
The simulator now deletes its decoder in its dtor. Therefore, we must
always allocate the decoder on the heap.

BUG=none
R=ulan@chromium.org, jacob.bramley@arm.com
LOG=n

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19596 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-28 10:31:05 +00:00
dcarney@chromium.org
703536eba1 Revert "Better threaded fuzzing for TestFunctionCallOptimization"
This reverts commit 19567.

TBR=verwaest@chromium.org

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19569 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-27 09:48:56 +00:00
dcarney@chromium.org
44da745247 Better threaded fuzzing for TestFunctionCallOptimization
R=verwaest@chromium.org

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19567 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-27 09:18:37 +00:00
jochen@chromium.org
597a4b4dc1 A64: Make the Decoder a template
This will allow for replacing the dispatcher with a concrete decoder
visitor.

BUG=none
R=ulan@chromium.org, rodolph.perfetta@arm.com
LOG=n

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19562 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-26 12:01:05 +00:00
marja@chromium.org
94af17a845 Fix the bit massaging code in CompleteParserRecorder::WriteNumber.
The original code, added by
https://codereview.chromium.org/3384003/diff/7001/src/parser.cc 3.5 years ago,
failed to write numbers which contain a chunk of 7 zeroes in the middle. The
smallest such number is 2^14, so this is a problem if the source file to
preparse contains 16384 or more symbols (which happens in the wild).

This bug went unnoticed because the symbol data was not used by Parser (see
https://codereview.chromium.org/172753002/ for starting to use it again) and
there were no tests.

R=ulan@chromium.org
BUG=346221
LOG=y

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19538 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-25 11:51:02 +00:00
marja@chromium.org
3d85b86e23 Lazy preparsing vs. lazy parsing fix.
Preparsing is always maximally lazy (every function that can be lazy is preparsed
lazily), but Parser has more complicated laziness logic.

If we're going to parse eagerly, and we have preparse data from lazy preparsing,
we're gonna have a bad time. The symbol stream won't contain symbols inside lazy
functions, and when the Parser parses them eagerly, it will consume symbols from
the symbol stream, and everything will go wrong.

This bug was hidden because the symbol cache was not used for real (see
https://codereview.chromium.org/172753002/ ).

R=ulan@chromium.org
BUG=346207
LOG=Y

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19532 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-24 17:48:09 +00:00
m.m.capewell@googlemail.com
0468660b13 A64: Tidy up register use in TaggedToI
Fix bug where input register was potentially corrupted, tidy up register use in
TruncateDoubleToI and rename TryInlineTruncateDoubleToI.

BUG=
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19527 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-21 11:36:04 +00:00
marja@chromium.org
0a01afda76 Re-enable Parser::symbol_cache_ (after a long time!)
The Parser never used the symbol stream produced by the PreParser for anything
useful, due to a bug introduced 3.5 years ago by
https://codereview.chromium.org/3356010/diff/7001/src/parser.cc.

The bug is that calling Initialize on symbol_cache_ doesn't change its
length. So the length remains 0, and the "if" in Parser::LookupSymbol is always
true, and Parser::LookupCachedSymbol is never called and symbol_cache_ never
filled.

This bug also masked a bug that the symbol stream produced by PreParser doesn't
match what Parser wants to consume. The repro case is the following:

var myo = {if: 4}; print(myo.if);

PreParser doesn't log a symbol for the first "if", but in the corresponding
place, Parser consumes one symbol from the symbol stream. Since the consumed
symbols were never really used, this mismatch went unnoticed.

This CL also fixes that bug.

BUG=
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19505 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-20 11:35:37 +00:00
alexandre.rames@arm.com
7d64aab1a1 A64: Introduce 'branch types' that extend the architectural conditions.
The branch types include 'always' and 'never', and types like reg_zero (CBZ) and
reg_bit_clear (TBZ).
This will be used by incoming improvements to the code generated for
deoptimization exit points.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19497 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-19 16:13:09 +00:00
rossberg@chromium.org
0d34254f8d Upgrade Symbol implementation to match current ES6 behavior.
Refresh the implementation of Symbols to catch up with what the
specification now mandates:

* The global Symbol() function manufactures new Symbol values,
  optionally with a string description attached.

* Invoking Symbol() as a constructor will now throw.

* ToString() over Symbol values still throws, and
  Object.prototype.toString() stringifies like before.

* A Symbol value is wrapped in a Symbol object either implicitly if
  it is the receiver, or explicitly done via Object(symbolValue) or
  (new Object(symbolValue).)

* The Symbol.prototype.toString() method no longer throws on Symbol
  wrapper objects (nor Symbol values.) Ditto for Symbol.prototype.valueOf().

* Symbol.prototype.toString() stringifies as "Symbol("<description>"),
  valueOf() returns the wrapper's Symbol value.

* ToPrimitive() over Symbol wrapper objects now throws.

Overall, this provides a stricter separation between Symbol values and
wrapper objects than before, and the explicit fetching out of the
description (nee name) via the "name" property is no longer supported
(by the spec nor the implementation.)

Adjusted existing Symbol test files to fit current, adding some extra
tests for new/changed behavior.

LOG=N
R=arv@chromium.org, rossberg@chromium.org, arv, rossberg
BUG=v8:3053

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

Patch from Sigbjorn Finne <sigbjornf@opera.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19490 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-19 14:19:42 +00:00
mvstanton@chromium.org
73b679cbee Revert "Second attempt at introducing a premonomorphic state in the call"
This reverts commits r19463 and r19457 (includes MIPS port), there was a
Sunspider perf issue and on reflection we can achieve the necessary
result in a new way.

TBR=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19488 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-19 13:55:25 +00:00
jacob.bramley@arm.com
6d9fcf1198 A64: Tidy up Push and Pop TODOs.
This addresses several TODOs:
  - Push and Pop requests can be queued up so that arrays of Registers
    can be pushed efficiently, with just one PrepareForPush/Pop.
  - PushMultipleTimes now takes an Operand. This allows variable-length
    arguments arrays to be initialized, for example.
  - A NoUseRealAbortsScope has been added to Abort so that
    AssertStackConsistency can be called from PrepareForPush without
    introducing infinite recursion.

BUG=
R=rmcilroy@chromium.org, ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19474 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-19 09:43:45 +00:00
jarin@chromium.org
58d0682f8d Add filler at the new space top when forcing scavenge.
We only seem to force scavenge in our cctest test suite, so this is
expected to fix some flakiness in our tests, but it will not
improve stability of v8 itself.

R=hpayer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19460 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-18 16:34:52 +00:00
alph@chromium.org
b4354d6d88 DevTools: Drop kSinTable dependency off the heap profiler ArrayBuffer backing_store test
LOG=N
R=dslomov@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19458 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-18 15:57:44 +00:00
mvstanton@chromium.org
5224c3d0f0 Second attempt at introducing a premonomorphic state in the call
target caches.

This time we don't go through the premonomorphic state for
the Array call target caches to avoid losing information from
allocation sites that aren't only used once, but where the
resulting array is used heavily.

R=mvstanton@chromium.org

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

Patch from Kasper Lund <kasperl@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19457 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-18 15:33:34 +00:00
alph@chromium.org
1bace575f0 Allow self_size to be larger than 2GB in heap snapshots.
LOG=N
R=dslomov@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19445 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-18 13:22:07 +00:00
alexandre.rames@arm.com
62116e2c12 A64: Let the MacroAssembler resolve branches to distant targets.
Code generation would fail when assembling a branch to a label that is bound
outside the immediate range of the instruction. A64 is sensitive to this, as the
various branching instructions have different ranges, going down to +-32KB for
TBZ/TBNZ.  The MacroAssembler is augmented to handle branches to targets that
may exceed the immediate range of instructions.

When branching backward to a label exceeding the instruction range, the
MacroAssembler can simply tweak the generated code to use an unconditional
branch with a longer range. For example instead of
    B(cond, &label);
the MacroAssembler can generate:
    b(InvertCondition(cond), &done);
    b(&label);
    bind(&done);

Since the target is not known when the branch is emitted, forward branches uses
a different mechanism. The MacroAssembler keeps track of forward branches to
unbound labels. When the code generation approaches the end of the range of a
branch, a veneer is generated for the branch.

BUG=v8:3148
LOG=Y
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19444 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-18 13:15:32 +00:00
danno@chromium.org
000878d995 A64: fix cctest/test-code-stubs-a64/ConvertDToI.
R=danno@google.com

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

Patch from Ulan Degenbaev <ulan@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19420 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-17 17:37:55 +00:00
danno@chromium.org
bedf702bcb Revert r19403: "A64: Tidy up Push and Pop TODOs."
Causes a64 debug asserts

TBR=jacob.bramley@arm.com,ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19419 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-17 16:08:44 +00:00
dcarney@chromium.org
98d9db7ab3 build fix for 19415
TBR=jochen@chromium.org

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-17 15:46:29 +00:00
marja@chromium.org
73c4a61848 (Pre)Parser: Simplify NewExpression handling (fixed).
Notes:
- We use simple recursion to keep track of how many "new" operators we have seen
  and where.
- This makes the self-baked stack class PositionStack in parser.cc unnecessary.
- Now the logic is also unified between Parser and PreParser.
- This is a fixed version of r19386.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19417 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-17 15:40:51 +00:00
alph@chromium.org
429ce41f4b Make a single HeapEntry per single JSArrayBuffer data in heap snapshot.
It turned out that JSArrayBuffer's may share their backing_store so
the backing_store should go through hash map registration just like
other heap objects, so they won't be reported twice.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19416 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-17 15:24:39 +00:00
dcarney@chromium.org
44b1aa4ea8 make a64 compile on mavericks - part 1
R=jochen@chromium.org

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19415 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-17 15:20:54 +00:00
rmcilroy@chromium.org
f6e95dc928 A64 support for DoubleToIStub (truncating).
Added support for truncating DoubleToIStub and reorganize the macro-assembler
dToI operations to do the fast-path inline and the slow path by calling the
stub.

This a port essentially a port of https://codereview.chromium.org/23129003/.

R=jacob.bramley@arm.com, ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19414 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-17 15:09:46 +00:00
mvstanton@chromium.org
8bcdbc354f Revert "Add a premonomorphic state to the call target cache."
This reverts commit r19402

R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19412 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-17 14:22:18 +00:00
jacob.bramley@arm.com
1634631ae4 A64: Tidy up Push and Pop TODOs.
This addresses several TODOs:
  - Push and Pop requests can be queued up so that arrays of Registers
    can be pushed efficiently, with just one PrepareForPush/Pop.
  - PushMultipleTimes now takes an Operand. This allows variable-length
    arguments arrays to be initialized, for example.
  - A NoUseRealAbortsScope has been added to Abort so that
    AssertStackConsistency can be called from PrepareForPush without
    introducing infinite recursion.

BUG=
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19403 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-17 12:08:06 +00:00
mvstanton@chromium.org
be731e6c95 Add a premonomorphic state to the call target cache.
From a CL by kasperl: https://codereview.chromium.org/162903004/

R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19402 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-17 11:59:45 +00:00
marja@chromium.org
0323bf9cd7 Revert "(Pre)Parser: Simplify NewExpression handling."
This reverts revision 19386.

Reason: Mozilla failures.

BUG=
TBR=ulan@chromium.org,marja@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19388 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-14 16:08:14 +00:00
marja@chromium.org
c532977da3 (Pre)Parser: Simplify NewExpression handling.
Notes:
- We use simple recursion to keep track of how many "new" operators we have seen
  and where.
- This makes the self-baked stack class PositionStack in parser.cc unnecessary.
- Now the logic is also unified between Parser and PreParser.
- It might have been a copy-paste artifact (ParseLeftHandSideExpression ->
  ParseMemberWithNewPrefixesExpression) that the logic was so complicated
  before.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19386 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-14 15:33:10 +00:00
dcarney@chromium.org
0c844cc590 api accessor store ics should return passed value
R=verwaest@chromium.org

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19380 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-14 14:13:06 +00:00
marja@chromium.org
cd50687b41 (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: http://v8.googlecode.com/svn/branches/bleeding_edge@19374 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-14 11:24:26 +00:00
alph@chromium.org
4aabb8aeec 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: http://v8.googlecode.com/svn/branches/bleeding_edge@19356 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-13 15:31:39 +00:00
ulan@chromium.org
01b275d989 Enable test-api/SetFunctionEntryHook for a64. It was fixed in r19297.
BUG=v8:3153
LOG=N
R=jochen@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19352 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-13 10:56:10 +00:00
bmeurer@chromium.org
42c57ea94b Allow map check hoisting in GVN for stable maps.
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19351 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-13 10:47:00 +00:00
yangguo@chromium.org
fb22b7b05e Internalize string keys in Keyed{Store,Load}IC.
R=jkummerow@chromium.org
BUG=v8:3144
LOG=N

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19345 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-13 08:43:53 +00:00
rafaelw@chromium.org
6b5a4cdef2 V8 Microtask Queue & API
This patch generalizes Object.observe callbacks and promise resolution into a FIFO queue called a "microtask queue".

It also exposes new V8 API which exposes the microtask queue to the embedder. In particular, it allows the embedder to

-schedule a microtask (EnqueueExternalMicrotask)
-run the microtask queue (RunMicrotasks)
-control whether the microtask queue is run automatically within V8 when the last script exits (SetAutorunMicrotasks).

R=dcarney@chromium.org, rossberg@chromium.org, dcarney, rossberg, svenpanne
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19344 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-12 22:04:19 +00:00
verwaest@chromium.org
161b2f689a Reland: "Use stability to only conditionally flush information from the CheckMaps table."
BUG=
R=ishell@chromium.org

Original CL: https://codereview.chromium.org/153823003

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19342 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-12 18:48:12 +00:00
yangguo@chromium.org
6c4133a309 Fix test-heap/OptimizedPretenuringAllocationFolding wrt concurrent recompilation delay.
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19338 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-12 16:18:18 +00:00
alph@chromium.org
887bd2850d Stack trace string should use dynamic script sourceURL if present.
BUG=v8:2342
R=dcarney@chromium.org, yurys@chromium.org, yurys
LOG=N

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19333 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-12 15:50:23 +00:00
verwaest@chromium.org
75432b7696 Revert "Use stability to only conditionally flush information from the CheckMaps table."
R=ishell@chromium.org

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19331 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-12 15:38:42 +00:00
verwaest@chromium.org
2b7d33572a Use stability to only conditionally flush information from the CheckMaps table.
BUG=
R=ishell@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19330 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-12 15:07:41 +00:00
jochen@chromium.org
96a1886637 A64: Skip more known failures
TBR=ulan@chromium.org
BUG=none
LOG=n

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19318 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-12 11:57:50 +00:00
jochen@chromium.org
c2c9228c8a A64: Skip cctests failing in debug mode
TBR=ulan@chromium.org
BUG=none
LOG=n

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19314 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-12 10:29:18 +00:00
ulan@chromium.org
e95bc7eec8 Merge experimental/a64 to bleeding_edge.
BUG=v8:3113
LOG=Y
R=jochen@chromium.org, rmcilroy@chromium.org, rodolph.perfetta@arm.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19311 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-12 09:19:30 +00:00
marja@chromium.org
a4ea70009c Disable test-api/PreCompileInvalidPreparseDataError for NaCl.
More information: https://code.google.com/p/v8/issues/detail?id=3150

R=machenbach@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19306 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-12 08:20:07 +00:00
dcarney@chromium.org
ce789e8890 Add more test cases for api function inlining
R=verwaest@chromium.org

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19278 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-11 12:49:15 +00:00
marja@chromium.org
f59ac1cba5 Move ParseRegexpLiteral to ParserBase.
R=ulan@chromium.org
BUG=v8:3126
LOG=N

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-11 11:51:01 +00:00
yangguo@chromium.org
ab2aaac110 Disable concurrent osr for test-mark-compact/BootUpMemoryUse.
If --concurrent-osr is on, it will imply --concurrent-recompilation, even
though it's expected to be disabled.

R=machenbach@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19271 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-11 11:47:38 +00:00
marja@chromium.org
d74fd20fca Traitify ParserBase and move functions there.
(Second try, with fixes. First try: https://codereview.chromium.org/149913006/ )

The long-term goal is to move all recursive descent functions from Parser and
PreParser into ParserBase, but first they need to be unified.

Notes:
- The functions moved in this CL: ParseIdentifier, ParseIdentifierName,
ParseIdentifierNameOrGetOrSet, ParseIdentifierOrStrictReservedWord.
- IOW, this CL removes Parser::ParseIdentifier and PreParser::ParseIdentifier
and adds ParserBase::ParseIdentifier, etc.
- Error reporting used to require virtual funcs; now error reporting is moved to
the Traits too, and ParserBase no longer needs to be virtual.
- I had to move PreParser::Identifier out of the PreParser class, because
otherwise PreParserTraits cannot use it in a typedef.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-11 09:35:32 +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
plind44@gmail.com
8920f345c7 MIPS: Add NaN test to cctest/test-macro-assembler-mips.
NaN value is different on MIPS and x86 architectures, and TEST(NaNx)
tests checks the case where a x86 NaN value is serialized into the snapshot
on the simulator during cross compilation.

BUG=
R=plind44@gmail.com

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19241 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-10 19:46:34 +00:00
marja@chromium.org
d8b8628f39 Revert "Traitify ParserBase and move functions there."
This reverts commit r19230.

Reason: Build failures on NaCl.

BUG=
TBR=marja@chromium.org,mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19234 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-10 16:21:11 +00:00
marja@chromium.org
71a6d70d97 Traitify ParserBase and move functions there.
The long-term goal is to move all recursive descent functions from Parser and
PreParser into ParserBase, but first they need to be unified.

Notes:
- The functions moved in this CL: ParseIdentifier, ParseIdentifierName,
ParseIdentifierNameOrGetOrSet, ParseIdentifierOrStrictReservedWord.
- IOW, this CL removes Parser::ParseIdentifier and PreParser::ParseIdentifier
  and adds ParserBase::ParseIdentifier, etc.
- Error reporting used to require virtual funcs; now error reporting is moved to
  the Traits too, and ParserBase no longer needs to be virtual.
- I had to move PreParser::Identifier out of the PreParser class, because
otherwise PreParserTraits cannot use it in a typedef.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19230 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-10 15:35:39 +00:00
yangguo@chromium.org
b618d2a42a Fix inconsistencies wrt whitespaces.
This relands r19196 with fixes.

BUG=v8:3109
LOG=Y
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19222 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-10 12:43:10 +00:00
marja@chromium.org
ff1c294cf9 Unify (Pre)Parser::ParseTryStatement.
Notes:
- This makes Parser and PreParser produce the same errors with the added test
cases (this was not the case before).
- ParseBlock already does Expect(Token::LBRACE), so no need to check it twice.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19212 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-10 08:45:13 +00:00
rossberg@chromium.org
e8175a3e9f Revert "Make Function.length and Function.name configurable properties."
Plenty of test failures on test262, Mozilla, Webkit. Will have to investigate.

TBR=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19203 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-07 15:29:18 +00:00
rossberg@chromium.org
7317b71f02 Make Function.length and Function.name configurable properties.
ES6 makes the Function object properties "length" and "name"
configurable; switch the implementation over to follow that.

Doing so exposed a problem in the handling of non-writable, but
configurable properties backed by foreign callback accessors
internally. As an optimization, if such an accessor property is
re-defined with a new value, its setter was passed the new value
directly, keeping the property as an accessor property. However, this
is not correct should the property be non-writable, as its setter will
then simply ignore the updated value. Adjust the enabling logic for
this optimization accordingly, along with adding a test.

LOG=N
R=rossberg@chromium.org, rossberg
BUG=v8:3045

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19200 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-07 14:55:30 +00:00
yangguo@chromium.org
db1a685b8f Revert "Fix inconsistencies wrt whitespaces."
This reverts r19196.

TBR=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19199 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-07 14:13:00 +00:00
marja@chromium.org
caa727711f Unify function parameter checking in PreParser and Parser.
This also makes the "delayed strict mode violations" mechanism in PreParser
unnecessary.

The attached tests didn't pass before this CL but now they do.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19197 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-07 12:44:45 +00:00
yangguo@chromium.org
d0f57e1195 Fix inconsistencies wrt whitespaces.
\u0085 (NEL) is now considered a whitespace in accordance to http://www.unicode.org/Public/6.3.0/ucd/PropList.txt

R=mstarzinger@chromium.org
BUG=v8:3109
LOG=Y

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19196 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-07 12:34:45 +00:00
svenpanne@chromium.org
5f8105af3c Make LeakSanitizer happy, part 3.
Fixed a few more cctests and removed some which were broken for ages
and/or tested nothing useful anymore.

Note that cctests are now fully LeakSanitized (at least on x64)!

R=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19195 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-07 12:17:45 +00:00
marja@chromium.org
7a53841cd1 Add regression tests for PrePreparser.
These tests ensure that PreParser doesn't start producing less data when it's
getting refactored.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19192 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-07 10:28:00 +00:00
marja@chromium.org
5b890419f5 Unify PreParser::ParseIdentifierName and Parser::ParseIdentifierName.
No special handling for keywords is needed, since the literal ascii strings for
them work too (see how Parser did it).

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19184 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-07 08:45:28 +00:00
svenpanne@chromium.org
cb6e1b4536 Win64 fixes.
TBR=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19180 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-07 07:44:19 +00:00
svenpanne@chromium.org
bda84eaf23 Make LeakSanitizer happy, part 2. Fixed register usage on the way.
Note that according to the System V ABI for AMD64, rbx must be
preserved across calls. We actually crash with clang in the x64
assembler tests without that fix, we were lucky with GCC.

R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19178 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-07 07:06:13 +00:00
rafaelw@chromium.org
41039c4f13 Revert "Implement Microtask Delivery Queue"
TBR=adamk,rossberg
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19176 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-07 01:08:50 +00:00
marja@chromium.org
42ea494cd6 Redo r19140 with better efficiency.
Still relevant parts of the original commit message:

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.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19153 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-06 13:12:10 +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
dcarney@chromium.org
12039c97c6 swap in global proxy on accessors
R=verwaest@chromium.org

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19142 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-06 10:50:07 +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
dcarney@chromium.org
6df537d631 inline api setters in crankshaft
R=verwaest@chromium.org

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19129 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-06 07:31:08 +00:00
svenpanne@chromium.org
f0bf110448 Make LeakSanitizer happy, part 1.
Bumped an assembler buffer on the way, it is necessary for some combinations of debugging flags.

Note that the allocation profiler still leaks, this is handled in a separate CL.

R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19128 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-06 07:16:41 +00:00
dcarney@chromium.org
5028ebaa8b inline api getters in crankshaft
R=verwaest@chromium.org

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-05 15:52:31 +00:00
marja@chromium.org
14a90fcc57 Better tests for the Parser / Preparser unification.
We need a way to assert that for a given source code snippet, an error *is*
produced or *is not* produced. Otherwise we might accidentally create new
errors or start accepting code which was previously not accepted. Just checking
that Parser and PreParser produce the same result doesn't cut it.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19107 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-05 15:30:01 +00:00
yangguo@chromium.org
f6d1a4fef1 Allow externalizing strings in old pointer space.
This is what I think is a better solution to the "external strings in
old pointer space" problem. Basically, it is an issue because GC scans
all fields of objects in old pointer space and if the cached address
of the backing store is unaligned, it looks like a heap object, boom.

The solution here is to use short external strings when we externalize
a string in old pointer space, and when the address is unaligned.
Short external strings don't cache the address, so GC has no issues.

BUG=268686
LOG=Y
R=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-05 09:29:04 +00:00
marja@chromium.org
dd539775d7 Test for miscellaneous (pre)parse errors.
BUG=3126
LOG=N
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-05 08:38:26 +00:00
rafaelw@chromium.org
7de9fc0a12 Implement Microtask Delivery Queue
R=rossberg@chromium.org, rossberg
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19084 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-04 19:58:49 +00:00
marja@chromium.org
23cbf27e12 Tests for (pre)parse errors when "yield" is found in inappropriate places.
In addition:
- Fix: PreParser used to report an unexpected token one token too late when
ParsePrimaryExpression failed.
- Unified identifier handling (PreParser::GetIdentifier is now like Parser::GetIdentifier).
- Fix: PreParser used to produce "unexpected_token YIELD" errors when Parser
produced "unexpected_token_identifier"; fixed PreParser to match Parser.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19082 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-04 18:16:45 +00:00
marja@chromium.org
35354cb9b7 Tests and fixes for (pre)parse errors related to future reserved words.
This contains the following fixes:
- PreParser was using an error "reserved_word" which doesn't exist in
messages.js. Changed it to "unexpected_reserved".

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19076 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-04 16:38:47 +00:00
palfia@homejinni.com
5859e4d488 MIPS: Fix test-assembler-mips/MIPS10 test.
cvt_l_d() and cvt_d_l() instructions are replaced to cvt_w_d() and ctv_d_w() because kernel FPU emulator generates illegal instruction for double <-> long conversions.

BUG=
R=jkummerow@chromium.org, plind44@gmail.com

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19073 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-04 14:05:46 +00:00
svenpanne@chromium.org
c270bad71e Don't access stack-allocated variable when it is out of scope. Enable Isolate cleanup in cctests again.
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19068 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-04 12:23:30 +00:00
marja@chromium.org
443e645a2d Tests and fixes for (pre)parse errors related to strict reserved words.
This contains the following fixes:

- We had strict_reserved_word and unexpected_strict_reserved, which one to use
was totally mixed in Parser and PreParser. Removed strict_reserved_word.
- When we saw a strict future reserved word when expecting something completely
different (such as "(" in "function foo interface"), Parser reports unexpected
identifier, whereas PreParser used to report unexpected strict reserved
word. Fixed PreParser to report unexpected identifier too.
- Unified parser and preparser error locations when the name of a function is a
strict reserved word. Now both point to the name.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-04 12:19:53 +00:00
hpayer@chromium.org
e5c7f4eff1 Added a test which installs a poisonous memento right after the new space top pointer.
BUG=
R=bmeurer@chromium.org, mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19066 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-04 12:10:30 +00:00
alph@chromium.org
efee3b8608 Add Box object to heap profiler.
LOG=Y
R=ulan@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19063 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-04 11:43:19 +00:00
marja@chromium.org
2794955852 Tests for (pre)parse errors when "eval" and "arguments" are found in inappropriate places.
In addition:
- Fix a bug in parser discovered by the tests (prefix and postfix confused in an
error message); the preparser had it right.
- Unify the parser and preparser error locations when the name of a function is
"eval" or "arguments. Now both point to the name.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19062 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-04 11:26:19 +00:00
marja@chromium.org
f62ef25c08 Revert "Tests for (pre)parse errors when "eval" and "arguments" are found in inappropriate places."
Reason: The fixed error message broke some tests.

This reverts r19050.

BUG=
TBR=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19053 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-04 10:00:36 +00:00
jkummerow@chromium.org
a550a188e0 Add per-file OWNERS for MIPS-specific cctests
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19052 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-04 09:53:26 +00:00
marja@chromium.org
9aa05b0997 Tests for (pre)parse errors when "eval" and "arguments" are found in inappropriate places.
In addition:
- Fix a bug in parser discovered by the tests (prefix and postfix confused in an
  error message); the preparser had it right.
- Unify the parser and preparser error locations when the name of a function is
  "eval" or "arguments. Now both point to the name.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19050 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-04 09:47:30 +00:00
svenpanne@chromium.org
681289e0d6 Revert "Dispose Isolate at end of cctest."
Things work locally, only the waterfall is unhappy for some arcane reason.
Investigating...

TBR=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19049 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-04 09:41:21 +00:00
svenpanne@chromium.org
4a4e64d6c7 Dispose Isolate at end of cctest.
No measurable change in test running time, we clean up only trivial
known things at disposal time and do not walk the heap, run real
finalizers, etc.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19047 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-04 08:30:35 +00:00
yangguo@chromium.org
6f95c0b11b [x64] add disasm for two fp instructions
BUG=
R=yangguo@chromium.org

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

Patch from Weiliang Lin <weiliang.lin@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19022 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-03 08:13:12 +00:00
svenpanne@chromium.org
16bcd43187 More cctest fixes regarding lifetime/ownership.
* Avoid double-free in cctest/test-api/RegExpInterruption.

   * Avoid incorrect zone fiddling in cctest/test-strings.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19020 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-03 07:29:23 +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
svenpanne@chromium.org
2daf43ac13 Once again: Fixed some lifetime/ownership issues in cctest
* Fixed lifetime issue in cctest/test-heap-profiler/HeapSnapshotJSONSerialization.

   * Fixed ownership issue in cctest/test-api/ContainsOnlyOneByte.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18978 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-31 09:59:50 +00:00
svenpanne@chromium.org
39d1534d66 Fixed a few lifetime/ownership issues in cctest/test-api.
* Fixed CompileExternalTwoByteSource: Registered resources should
     better still be alive when they are accessed.

   * Fixed ownership in cctest/test-api/VisitExternalStrings.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18971 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-31 07:29:25 +00:00
dcarney@chromium.org
5c589640bf crankshaft support for api method calls
R=verwaest@chromium.org

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18946 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-30 13:18:41 +00:00
machenbach@chromium.org
c3c064360d Disable unsuitable tests in ASAN mode.
BUG=
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18944 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-30 12:52:22 +00:00
alph@chromium.org
9e3af5a4db Add global_context field to GlobalObject in heap profiler.
LOG=N
R=ulan@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18942 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-30 12:17:21 +00:00
svenpanne@chromium.org
0c2c9ece90 Make sure we delete[] what we got from new[], not one byte after it.
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18937 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-30 10:53:20 +00:00
machenbach@chromium.org
32f45eb7df Fix test expectations for cctest/test-debug.
BUG=v8:3125
R=bmeurer@chromium.org
TBR=verwaest@chromium.org
LOG=n

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18935 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-30 10:16:54 +00:00
alph@chromium.org
c911ec3322 Do not overwrite builtin code names in heap profiler
Make sure builtin code objects get their builtin tags
first. Otherwise a particular JSFunction object could set
its custom name to a generic builtin.

LOG=N
R=ulan@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18926 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-29 17:03:13 +00:00
machenbach@chromium.org
953470bdf8 [Sheriff] Mark test-debug/* as flaky on Mac.
Now including release mode.

BUG=v8:3125
LOG=n
TBR=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18925 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-29 16:59:50 +00:00
machenbach@chromium.org
1f346769c1 Don't parallelize tests that register extensions.
These tests register extensions on the isolate and the configuration of the extensions runs out of scope. If run in parallel, other tests access the isolate's state and read the registered extensions.

BUG=
R=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18921 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-29 15:29:58 +00:00
machenbach@chromium.org
2eb89824b5 [Sheriff] Mark test-debug/* as flaky on Mac.
BUG=v8:3125
LOG=n
TBR=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18920 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-29 15:15:37 +00:00
alph@chromium.org
5a2fe0a670 Mark next_code_link as weak in heap profiler.
LOG=N
R=ulan@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18907 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-29 13:45:41 +00:00
hpayer@chromium.org
9e462504fb Turn off global pretenuring when allocation site pretenuring is in use.
BUG=
R=mstarzinger@chromium.org, mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18868 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-28 09:47:03 +00:00
dcarney@chromium.org
d2a4bd32fb don't anger clang
R=svenpanne@chromium.org

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18848 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-27 10:06:37 +00:00
alph@chromium.org
89ffd30537 Allow arbitrary names for weak references in heap snapshots.
LOG=N
BUG=
R=ulan@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18846 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-27 09:37:02 +00:00
dcarney@chromium.org
1b30de8b55 Fix issue with context not being saved on x64 introduced in 144543004
TBR=verwaest@chromium.org

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18845 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-27 08:12:59 +00:00
bmeurer@chromium.org
361095d397 Revert "Allow arbitrary names for weak references in heap snapshots."
This reverts commit r18838 for breaking build with clang. Errors are:

../../src/heap-snapshot-generator.cc:1217:53: error: empty macro arguments were standardized in C99 [-Werror,-pedantic]
    EXTRACT_CONTEXT_FIELD(OPTIMIZED_FUNCTIONS_LIST, , optimized_functions_list);
../../src/heap-snapshot-generator.cc:1218:48: error: empty macro arguments were standardized in C99 [-Werror,-pedantic]
    EXTRACT_CONTEXT_FIELD(OPTIMIZED_CODE_LIST, , optimized_code_list);
../../src/heap-snapshot-generator.cc:1219:50: error: empty macro arguments were standardized in C99 [-Werror,-pedantic]
    EXTRACT_CONTEXT_FIELD(DEOPTIMIZED_CODE_LIST, , deoptimized_code_list);
../../src/heap-snapshot-generator.cc:1220:46: error: empty macro arguments were standardized in C99 [-Werror,-pedantic]
    EXTRACT_CONTEXT_FIELD(NEXT_CONTEXT_LINK, , next_context_link);

TBR=alph@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18844 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-27 06:47:42 +00:00
alph@chromium.org
f4a470d5bb Allow arbitrary names for weak references in heap snapshots.
LOG=N
R=ulan@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-24 17:18:34 +00:00
dslomov@chromium.org
1a67b7f86a External Array renaming and boilerplate scrapping
Replaced symbolic names with correct JS name (byte -> int8, unsigned int -> uint32 etc).
Using macros to scrap the boilerplate
BUG=
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18835 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-24 16:01:15 +00:00
alph@chromium.org
01a6c8ae35 Mark weak fields of JSArrayBuffer and JSArrayBufferView as weak in heap snapshot.
BUG=337144
LOG=N
R=ulan@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18830 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-24 15:10:09 +00:00
rossberg@chromium.org
fa0f929fee Use rand not random
Should make VS happier.

R=bmeurer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18817 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-24 11:58:11 +00:00
rossberg@chromium.org
2311b678ae Type representation converter
R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18813 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-24 11:47:47 +00:00
hpayer@chromium.org
83a1df2354 Remove Heap::MaxRegularSpaceAllocationSize and use Page::MaxRegularHeapObjectSize instead.
BUG=
R=mstarzinger@chromium.org, mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18776 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-23 13:02:27 +00:00
dslomov@chromium.org
2f005e1384 Fix clang build.
See http://blog.llvm.org/2009/12/dreaded-two-phase-name-lookup.html.

TBR=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18756 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-22 15:06:36 +00:00
verwaest@chromium.org
c478b6dc60 Ensure we don't overwrite transitions in SetPropertyIgnoreAttributes.
BUG=326155
LOG=y
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18754 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-22 14:02:00 +00:00
palfia@homejinni.com
787aa693e3 MIPS: Add missing cctests of DoubleToIStub (r16322).
BUG=
R=jkummerow@chromium.org, plind44@gmail.com

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18751 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-22 13:44:00 +00:00
hpayer@chromium.org
1474d0510f Increase the number of allocations in OptimizedPretenuringdoubleArrayLiterals test to make sure that pretenuring decisions are not flaky on the tests bots.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18746 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-22 12:59:25 +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
rossberg@chromium.org
80195df5d8 Silence another VS warning
R=titzer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18712 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-21 14:41:48 +00:00
rossberg@chromium.org
928d71f83b Retry landing "Implement zone-allocated types"
Works around apparent scoping bug in VS, the only change to before being a method rename in the test suite:

--- a/test/cctest/test-types.cc
+++ b/test/cctest/test-types.cc
@@ -153,7 +153,7 @@ struct ZoneRep {
     return reinterpret_cast<ZoneList<ZoneType*>*>(AsTagged(t));
   }

-  static Zone* Region(Zone* zone, Isolate* isolate) { return zone; }
+  static Zone* ToRegion(Zone* zone, Isolate* isolate) { return zone; }
 };

@@ -168,7 +168,7 @@ struct HeapRep {
   static Object* AsConstant(Handle<Type> t) { return Box::cast(*t)->value(); }
   static FixedArray* AsUnion(Handle<Type> t) { return FixedArray::cast(*t); }

-  static Isolate* Region(Zone* zone, Isolate* isolate) { return isolate; }
+  static Isolate* ToRegion(Zone* zone, Isolate* isolate) { return isolate; }
 };

@@ -183,7 +183,7 @@ struct Tests : Rep {
       isolate(CcTest::i_isolate()),
       scope(isolate),
       zone(isolate),
-      T(Rep::Region(&zone, isolate), isolate) {
+      T(Rep::ToRegion(&zone, isolate), isolate) {
   }

   static void CheckEqual(TypeHandle type1, TypeHandle type2) {

R=titzer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18711 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-21 14:14:12 +00:00
jochen@chromium.org
c970c1cb6f Update Isolate::RequestGarbageCollection after r18691
BUG=none
R=hpayer@chromium.org
LOG=n

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18695 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-20 15:44:03 +00:00
dcarney@chromium.org
f93f8ded96 String:WriteUtf8: Add REPLACE_INVALID_UTF8 option
This patch makes String::WriteUtf8 replace invalid code points (i.e. unmatched
surrogates) with the unicode replacement character when REPLACE_INVALID_UTF8 is
set.  This is done to avoid creating invalid UTF-8 output which can lead to
compatibility issues with software requiring valid UTF-8 inputs (e.g. the
WebSocket protocol requires valid UTF-8 and terminates connections when invalid
UTF-8 is encountered).

R=dcarney@chromium.org

BUG=

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

Patch from Felix Geisendörfer <haimuiba@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18683 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-20 09:52:54 +00:00
svenpanne@chromium.org
e8f935a630 Various extension-related cleanup and simplifications.
Removes the embarrassing "static"s, shuffles some code around, doing various cleanups on the way.

R=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18659 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-17 10:52:00 +00:00
dcarney@chromium.org
7cee52948f Fix stub-invoked setter callback handling.
When invoking a setter callback for a property using
JSObject::SetPropertyWithCallback(),the callback arguments includes
a correct pair of receiver and holder objects.

Such a pair of _possibly different_ arguments (receiver, holder) must
also be supplied when invoking the same setter callback from JITed
code, when the setter is invoked through the StoreCallbackProperty
stub.

An example where this matters are the accessor properties kept on the
global scope of Worker (i.e., properties kept on the global object
itself, and not on its prototype.) Conflating the receiver with the
holder leads to general confusion when attempting to fetch out the
wrapper object.

LOG=N
R=dcarney@chromium.org, dcarney
BUG=239669

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

Patch from Sigbjorn Finne <sigbjornf@opera.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18658 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-17 10:34:43 +00:00
dslomov@chromium.org
5da41be7b8 Implement in-heap backing store for typed arrays.
This adds a fixed array sub-type that will represent a backing store for
typed arrays allocated with TypedArray(length) construtor.

R=mvstanton@chromium.org, verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18651 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-16 17:08:45 +00:00
dslomov@chromium.org
34eeeb8953 Revert "Implement in-heap backing store for typed arrays."
This reverts commit r18649 for breaking Linux/nosnap and Win64 tests.

TBR=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18650 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-16 16:00:36 +00:00
dslomov@chromium.org
97040ce67b Implement in-heap backing store for typed arrays.
This adds a fixed array sub-type that will represent a backing store for
typed arrays allocated with TypedArray(length) construtor.

R=mvstanton@chromium.org, verwaest@chromium.org

Committed: https://code.google.com/p/v8/source/detail?r=18646

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18649 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-16 15:01:27 +00:00
dslomov@chromium.org
95f572389e Revert "Implement in-heap backing store for typed arrays."
This reverts commit r18646 for breaking Win32 build.

TBR=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18647 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-16 14:26:15 +00:00
dslomov@chromium.org
0c960c2e96 Implement in-heap backing store for typed arrays.
This adds a fixed array sub-type that will represent a backing store for
typed arrays allocated with TypedArray(length) construtor.

R=mvstanton@chromium.org, verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-16 14:18:37 +00:00
svenpanne@chromium.org
b25bb230cd Removed apiutils.h and related cleanup.
ExtensionConfiguration is just a simple container for extension names
(in a perfect world we would use vector<string> and range-based for
loops), and HandleScopeData was in the totally wrong place. Some
additional cleanup on the way, e.g. using the null pattern behind our
external API.

R=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18632 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-16 08:17:40 +00:00
ulan@chromium.org
2638dca48f Make cells pointing to JSObjects weak in optimized code.
This is done similar to weak embedded objects in optimized code (r17102). The
reference from optimized code to a cell is treated weakly in marking visitors
if the cell points to a JSObject. After marking we iterate over all cells
embedded in optimized code. If a cell is not marked but its value is marked,
then we revive the cell by marking it. Otherwise, the cell value is dead, so
we mark the code for deoptimization.

BUG=v8:2073
TEST=cctest/test-heap/CellsInOptimizedCodeAreWeak
LOG=Y
R=hpayer@chromium.org, mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18616 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-15 11:42:19 +00:00
machenbach@chromium.org
c598b0c059 [Sheriff] Mark cpu profiler test as flaky on arm.
BUG=v8:2999
TBR=jkummerow@chromium.org
LOG=n

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18605 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-15 08:06:02 +00:00
machenbach@chromium.org
5b2b13fc30 [Sheriff] Mark cpu profiler test as flaky on windows.
This is fails constantly on windows since the XP->Win7 bot upgrade.

BUG=v8:3055
R=jkummerow@chromium.org
TBR=jkummerow@chromium.org
LOG=n

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18602 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-14 19:26:39 +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
bmeurer@chromium.org
be986094a3 Use std:: on symbols declared in C++-style C headers.
Some libraries (e.g. Dinkumware) perform strict checks on whether
the symbols defined in classic C library headers (e.g. <stdio.h>),
or in C++-style C library headers (e.g. <cmath>) are used correctly
(respectively, in the global namespace, or in namespace std).

BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18578 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-14 09:57:05 +00:00
hpayer@chromium.org
dcf7f73ec0 Enable allocation site pretenuring.
Disable elements-kind.js unit test temporarily on gc stress builders.

BUG=
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18571 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-13 17:11:36 +00:00
marja@chromium.org
e9c8de04da Fix r18556; tests were missing handlescopes.
BUG=
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18560 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-13 11:15:06 +00:00
marja@chromium.org
21f1ca5850 Remove ScriptData::PreCompile which takes const char*.
The version taking a Handle should be used instead.

It's not used by Chromium and complicates the ongoing lexer work.

R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18556 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-13 10:51:40 +00:00
machenbach@chromium.org
eb8056f285 [Sheriff] Revert "Turn on allocation site pretenuring."
This reverts commit r18547 for breaking the GC stress builders.

BUG=
TBR=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18549 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-13 08:15:56 +00:00
hpayer@chromium.org
85b6164ef7 Turn on allocation site pretenuring.
BUG=
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18547 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-10 20:31:03 +00:00
rossberg@chromium.org
e232d6a691 [Sheriff] Revert "Turn on allocation site pretenuring."
This reverts commit d57b17889a300d0978f8ed104d1274c9838904a6.

TBR=mvstanton@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18546 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-10 15:35:19 +00:00
rossberg@chromium.org
99359d389c Revert "Implement zone-allocated types"
This reverts commit 4308974b16d1ee67d9f64d797c5ea64ffaab51df.

TBR=machenbach@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18545 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-10 15:33:37 +00:00
rossberg@chromium.org
d849dfa5d4 Implement zone-allocated types
More template magic FTW.

R=titzer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18543 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-10 14:43:48 +00:00
mvstanton@chromium.org
70436f1057 Turn on allocation site pretenuring.
BUG=
R=mvstanton@chromium.org

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

Patch from Hannes Payer <hpayer@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-10 14:35:58 +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
hpayer@chromium.org
4ef951cf43 Allocation site pretenuring.
Pretenuring decisions are made based on allocation site lifetime statistics.

BUG=
R=mstarzinger@chromium.org, mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18532 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-10 12:11:54 +00:00
machenbach@chromium.org
a660f31d68 [Sheriff] Make flaky cpu profiler test.
BUG=v8:2999
TBR=yurys@chromium.org
LOG=n

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18525 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-10 09:02:24 +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
rossberg@chromium.org
014a86ef8c ES6: Add Object.getOwnPropertySymbols
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.getownpropertysymbols

This allows you to get the symbols used as property keys for an object.

  var object = {};
  var sym = Symbol();
  object[sym] = 42;
  assert(Object.getOwnPropertySymbols(object)[0] === sym);

This is only available with --harmony-symbols

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

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

Patch from Erik Arvidsson <arv@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18520 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-09 15:57:30 +00:00
svenpanne@chromium.org
8f7720aa25 Add Isolate parameter to HandleScope::NumberOfHandles.
LOG=y
BUG=324225
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18510 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-09 10:37:15 +00:00
haitao.feng@intel.com
b712779479 Refactor loading a pointer into a register instruction for X64
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18479 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-08 07:02:02 +00:00
svenpanne@chromium.org
005c0d8178 Prepare removal of ObjectTemplate::New without Isolate parameter.
LOG=y
BUG=324225
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18478 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-08 06:53:31 +00:00
mvstanton@chromium.org
e3e7daf01c We need to know if a load, store or call IC is assumed
to be on the global object. Previously, this information
was stored in RelocInfo. A more logical place for this kind
of structural information is ExtraICState. Storing it there
makes it easier for us to gather type feedback from these
sites too.

R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18466 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-07 14:14:34 +00:00
verwaest@chromium.org
4615e9edac Reland v8:18458 "Load the global proxy from the context of the target function."
BUG=
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18462 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-07 10:46:39 +00:00
rossberg@chromium.org
2879f2104c Revert "Load the global proxy from the context of the target function."
This reverts commit https://code.google.com/p/v8/source/detail?r=18458, since it exhibits a bug that breaks some tests.

TBR=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18461 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-07 09:55:25 +00:00
verwaest@chromium.org
5b40c38679 Load the global proxy from the context of the target function.
BUG=
R=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18458 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-07 08:21:17 +00:00
ulan@chromium.org
343813c59e Revert r18451 "Revert r18449 "Reland r18383: More API cleanup." and r18450 "Unbreak build."" since necessary WebKit changes are rolled in Chromium.
TBR=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18452 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-03 14:31:17 +00:00
ulan@chromium.org
163386c700 Revert r18449 "Reland r18383: More API cleanup." and r18450 "Unbreak build."
because of broken WebKit bots.

TBR=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18451 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-03 14:13:21 +00:00
svenpanne@chromium.org
08354f8f07 Unbreak build.
Test/update/commit race condition... >:-(

TBR=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18450 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-03 12:21:48 +00:00
svenpanne@chromium.org
1143ab132e Reland r18383: More API cleanup.
* Removed String::Empty, Number::New, Integer::New, Integer::NewFromUnsigned, FunctionTemplate::New and Object::New without Isolate* parameter.

* Removed Integer::New and Integer::NewUnsigned with weird argument order.

Chrome CLs matching this change have been landed.

TBR=dcarney@chromium.org
LOG=y
BUG=324225

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18449 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-03 11:56:33 +00:00
jochen@chromium.org
e3fa6d67ca Avoid duplication of a hidden & inherited prototype's properties.
In Runtime_GetLocalPropertyNames(), the hidden prototypes of an object
are also consulted when deriving the property name set. However, if
given a function object and its template was inherited from the
template of one of its hidden prototypes, that hidden prototype's
property accessors will be present on the object already. Unwanted
duplicates will therefore appear.

Hence, go through the property names that the hidden prototypes
contribute and remove any already occurring ones.

Assumed to be a rare constellation, so the cost of this extra pass is
considered acceptable.

LOG=N
R=dcarney@chromium.org, jochen@chromium.org, rossberg@chromium.org
BUG=269562

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

Patch from Sigbjorn Finne <sof@opera.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18448 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-03 11:19:13 +00:00
m.m.capewell@googlemail.com
d6aabbdcc7 ARM: Optimize truncating division and fix sim
Optimize code generated for DivI Lithium instruction when handling division
where the result is int32. Also, fix the ARM simulator to give the correct
answer for kMinInt / -1.

TEST=Division tests added to test-assembler-arm.cc
BUG=
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18445 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-02 16:36:21 +00:00
bmeurer@chromium.org
0899da3697 Add support for the QNX operating system.
This patch contains contributions from the following members of the
BlackBerry Web Technologies team:

Eli Fidler <efidler@blackberry.com>
Konrad Piascik <kpiascik@blackberry.com>
Jeff Rogers <jrogers@blackberry.com>
Cosmin Truta <ctruta@blackberry.com>
Peter Wang <peter.wang@torchmobile.com.cn>
Xiaobo Wang <xiaobwang@blackberry.com>
Ming Xie <mxie@blackberry.com>
Leo Yang <leoyang@blackberry.com>

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

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

Patch from Cosmin Truta <ctruta@blackberry.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-02 07:04:05 +00:00
yangguo@chromium.org
2a4be7067c Refactor the compiling pipeline.
Goals:
 - easier to read, more suitable identifiers.
 - better distinction between compiling optimized/unoptimized code
 - compiler does not install code on the function.
 - easier to add features (e.g. caching optimized code for osr).
 - remove unnecessary code.

R=titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18409 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-23 14:30:35 +00:00
yangguo@chromium.org
f7929d2a87 Reland "Handlify concat string and substring."
This relands commit r17490.

BUG=
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18408 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-23 12:37:56 +00:00
yurys@chromium.org
18e865d4fa Delete v8::HeapGraphNode::GetHeapValue
BUG=chromium:324769
LOG=N
R=hpayer@chromium.org, mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18404 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-23 09:33:16 +00:00
yurys@chromium.org
61c1692c9b This adds functionality for getting original functions from bound functions.
It's of much use when information about function calls is shown on the Events timeline in DevTools: instead of referencing to v8natives.js where bound functions are created, we'll be able to show real function data (name, resource, script line and column numbers) retrieved from original functions.

BUG=None
LOG=Y
R=yangguo@chromium.org, yurys@chromium.org

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

Patch from Alexandra Mikhaylova <amikhaylova@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18401 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-23 08:04:54 +00:00
machenbach@chromium.org
4692a3a7d5 Mark cpu profiler test as flaky on windows.
TBR=yurys@chromium.org
BUG=v8:2999
LOG=no

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18400 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-22 14:14:27 +00:00
vegorov@chromium.org
79ad8bf2e0 Fix sporadic crash in the RequestInterruptTestWithNativeAccessor.
The test was broken. V8 currently does not correctly lookup NativeDataProperty accessors attached to the PrototypeTemplate of FunctionTemplate (Issue 3066). As the result while(obj.shouldContinue) loop was immediately exiting and the test would terminate while RequestInterruptTestBase::InterruptThread would be still starting up. As the result later InterruptThread would try to access members of the test object which was destroyed.

The test was fixed:

- instead of attaching accessor to PrototypeTemplate we attach it to  InstanceTemplate;
- an assertion was added to verify that we completed the test successfully due to interruptor firing not due to sporadic loop termination due to some unrelated bug.

R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-20 14:07:19 +00:00
svenpanne@chromium.org
e595dc0368 Revert "More API cleanup."
This reverts r18383. The CL in itself is OK, we just have to wait until Chrome's commit queue lands the final corresponding change and re-land this CL. :-/

TBR=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18384 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-20 11:35:53 +00:00
svenpanne@chromium.org
d54a4e6d40 More API cleanup.
* Removed String::Empty, Number::New, Integer::New, Integer::NewFromUnsigned, FunctionTemplate::New and Object::New without Isolate* parameter.

* Removed Integer::New and Integer::NewUnsigned with weird argument order.

Chrome CLs matching this change are prepared, BTW.

LOG=y
BUG=324225
R=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18383 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-20 10:49:27 +00:00
jochen@chromium.org
e6ef64c590 [platform] Implement a worker pool
We don't use the worker pool yet, however, there are tests. Yay. The
next step is to use the worker pool for parallel sweeping.

I've also started to move the platform related files into a sub
directory. The goal is to eventually build all the platform stuff as
a separate library which is used by d8 and cctest (and other embedders
that wish to use the default implementation) but not by chromium.

BUG=v8:3015
R=hpayer@chromium.org, svenpanne@chromium.org
LOG=n

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18380 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-20 07:52:58 +00:00
vegorov@chromium.org
bc77d4d60a Reland r18363.
Introduce API to temporarily interrupt long running JavaScript code.

It is different from termination API as interrupted JavaScript will continue to execute normally when registered InterruptCallback returns.

  /**
   * Request V8 to interrupt long running JavaScript code and invoke
   * the given |callback| passing the given |data| to it. After |callback|
   * returns control will be returned to the JavaScript code.
   * At any given moment V8 can remember only a single callback for the very
   * last interrupt request.
   * Can be called from another thread without acquiring a |Locker|.
   * Registered |callback| must not reenter interrupted Isolate.
   */
  void RequestInterrupt(InterruptCallback callback, void* data);

  /**
   * Clear interrupt request created by |RequestInterrupt|.
   * Can be called from another thread without acquiring a |Locker|.
   */
  void ClearInterrupt();

Fix Hydrogen SCE pass to avoid eliminating stack guards too aggressively. Only normal JavaScript functions are guaranteed to have stack guard in the prologue. If function is a builtin or has a custom call IC it will lack one.

Changes from r18363:

- includes r18364 to fix compilation errors: removes debugging only code;

- makes interrupiton related tests not threaded, because they rely on having exclusive access to the V8 instance and the fact that they can only interrupt themselves, if they are interrupted from the outside they break;

- changes HasStackCheck predicate used during SCE pass to avoid handles dereference to make SCE compatible with parallel recompilation.

R=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18375 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-19 16:45:58 +00:00
vegorov@chromium.org
dd8a793962 Revert "Introduce API to temporarily interrupt long running JavaScript code."
This reverts commit r18363.

Revert "Fix compilation error introduced by r18363."

This reverts commit r18364.

Changes in SCE pass are incompatible with parallel compilation

TBR=dcarney@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-18 19:21:27 +00:00
vegorov@chromium.org
cd045f473e Fix compilation error introduced by r18363.
Remove debugging related code.

TBR=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18364 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-18 19:01:02 +00:00
vegorov@chromium.org
64d2dfa232 Introduce API to temporarily interrupt long running JavaScript code.
It is different from termination API as interrupted JavaScript will continue to execute normally when registered InterruptCallback returns.

  /**
   * Request V8 to interrupt long running JavaScript code and invoke
   * the given |callback| passing the given |data| to it. After |callback|
   * returns control will be returned to the JavaScript code.
   * At any given moment V8 can remember only a single callback for the very
   * last interrupt request.
   * Can be called from another thread without acquiring a |Locker|.
   * Registered |callback| must not reenter interrupted Isolate.
   */
  void RequestInterrupt(InterruptCallback callback, void* data);

  /**
   * Clear interrupt request created by |RequestInterrupt|.
   * Can be called from another thread without acquiring a |Locker|.
   */
  void ClearInterrupt();

Fix Hydrogen SCE pass to avoid eliminating stack guards too aggressively. Only normal JavaScript functions are guaranteed to have stack guard in the prologue. If function is a builtin or has a custom call IC it will lack one.

BUG=
R=danno@chromium.org, dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18363 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-18 18:38:35 +00:00
svenpanne@chromium.org
389ee8d59b Removed internal uses of (almost) deprecated FunctionTemplate::New version.
LOG=y
R=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18342 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-18 10:31:42 +00:00
yurys@chromium.org
bdb77d24a1 Fix Linux shared compilation after r18337
BUG=chromium:327298
LOG=N
TBR=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18340 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-18 09:52:37 +00:00