Commit Graph

35448 Commits

Author SHA1 Message Date
yangguo
08f09ed71b Compiling an array literal should be context-independent.
We are removing use of the debugger context. When the debugger triggers
compilation, we may not have a context from which to create a JSArray.

R=ishell@chromium.org
BUG=chromium:664577

Review-Url: https://codereview.chromium.org/2479123002
Cr-Commit-Position: refs/heads/master@{#40956}
2016-11-14 10:46:33 +00:00
Miran.Karic
6f556b3394 Add icu libraries to unittests dependencies
In component build, unittests did not link with icu libraries, which
caused errors. By adding icu libraries to dependencies unittests links
correctly.

BUG=
TEST=unittests/*

Review-Url: https://codereview.chromium.org/2479863002
Cr-Commit-Position: refs/heads/master@{#40955}
2016-11-14 10:01:21 +00:00
yangguo
b62e2284b1 [debugger] simplify compile for debugging.
R=mstarzinger@chromium.org

Review-Url: https://codereview.chromium.org/2497213002
Cr-Commit-Position: refs/heads/master@{#40954}
2016-11-14 09:58:51 +00:00
dusan.simicic
6d054f7658 MIPS: Optimize load/store with large offset
Currently, we are using the following sequence for load/store with large offset (offset > 16b):

    lui at, 0x1234
    ori at, at, 0x5678
    add at, s0, at
    lw  a0, 0(at)

This sequence can be optimized in the following way:

    lui at, 0x1234
    add at, s0, at
    lw  a0, 0x5678(at)

BUG=

Review-Url: https://codereview.chromium.org/2486283003
Cr-Commit-Position: refs/heads/master@{#40953}
2016-11-14 09:57:54 +00:00
ahaas
787e87a814 Use PRIuS as a placeholder for size_t in a formatter string
R=mlippautz@chromium.org

Review-Url: https://codereview.chromium.org/2498633002
Cr-Commit-Position: refs/heads/master@{#40952}
2016-11-14 09:51:21 +00:00
jarin
297a969aad [turbofan] Fix deoptimization of boolean bit constants.
BUG=chromium:664490

Review-Url: https://codereview.chromium.org/2495243002
Cr-Commit-Position: refs/heads/master@{#40951}
2016-11-14 09:30:19 +00:00
verwaest
942604dfb2 Add test for making private symbols non-enumerable
BUG=chromium:664411

Review-Url: https://codereview.chromium.org/2498963002
Cr-Commit-Position: refs/heads/master@{#40950}
2016-11-14 09:17:07 +00:00
yangguo
c759a3d847 [serializer] small fixes for blink snapshot.
Changes include:
 - Adding V8_EXPORT macro for SnapshotCreator
 - Removing outdated DCHECKs.
 - Allow nullptr as external reference. This required a...
 - Refactoring of hashmaps used by the serializer.
 - Remove external references for counters. These are not used
   anywhere for isolates that are being serialized.
 - Put template infos into the partial snapshot cache.
 - Remove unnecessary presubmit check for external references.
   mksnapshot crashes if external references are missing.

R=jochen@chromium.org, vogelheim@chromium.org
BUG=chromium:617892

Review-Url: https://codereview.chromium.org/2490783004
Cr-Commit-Position: refs/heads/master@{#40949}
2016-11-14 07:17:59 +00:00
bjaideep
a9f553bada PPC: Branch instruction missing condition register
TestBit sets cr0 therefore need to pass that to the
branch instruction.
This got exposed with testcase added in CL
https://codereview.chromium.org/2497573003/

R=joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2495853003
Cr-Commit-Position: refs/heads/master@{#40948}
2016-11-14 03:21:49 +00:00
bjaideep
b4ccb16a97 PPC/s390: [turbofan] Remove special JSForInStep and JSForInDone.
Port 1915762cc8

Original commit message:

    These JavaScript operators were special hacks to ensure that we always
    operate on Smis for the magic for-in index variable, but this never
    really worked in the OSR case, because the OsrValue for the index
    variable didn't have the proper information (that we have for the
    JSForInPrepare in the non-OSR case).

    Now that we have loop induction variable analysis and binary operation
    hints, we can just use JSLessThan and JSAdd instead with appropriate
    Smi hints, which handle the OSR case by inserting Smi checks (that are
    always true). Thanks to OSR deconstruction and loop peeling these Smi
    checks will be hoisted so they don't hurt the OSR case too much.

    Drive-by-change: Rename the ForInDone bytecode to ForInContinue, since
    we have to lower it to JSLessThan to get the loop induction variable
    goodness.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2502503002
Cr-Commit-Position: refs/heads/master@{#40947}
2016-11-14 03:19:21 +00:00
ishell
bcb3af59be [ic] Support data handlers that represent transitioning stores.
BUG=v8:5561

Review-Url: https://codereview.chromium.org/2488673004
Cr-Commit-Position: refs/heads/master@{#40946}
2016-11-13 09:38:15 +00:00
jbroman
5d3ce7ea4f Remove the deprecated ValueSerializer::ReadHeader overload with no context parameter.
Several weeks have now passed since it was deprecated; Chromium does not
call it.

BUG=chromium:148757

Review-Url: https://codereview.chromium.org/2478863002
Cr-Commit-Position: refs/heads/master@{#40945}
2016-11-13 03:10:24 +00:00
jochen
0421924132 Define a flag --future to enable the most probable future shipping config
That way we don't have to update the perf tests whenever the exact
configuration changes.

R=mvstanton@chromium.org,hablich@chromium.org,danno@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2420053002
Cr-Commit-Position: refs/heads/master@{#40944}
2016-11-12 21:51:27 +00:00
jbroman
94142ed8c9 ValueSerializer: Replace use of std::vector with a delegate-allocated buffer.
BUG=chromium:148757

Review-Url: https://codereview.chromium.org/2492943002
Cr-Commit-Position: refs/heads/master@{#40943}
2016-11-12 21:50:26 +00:00
jwolfe
87ca9283b0 Stage harmony trailing commas
BUG=v8:5051
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

Review-Url: https://codereview.chromium.org/2484223004
Cr-Commit-Position: refs/heads/master@{#40942}
2016-11-11 23:42:55 +00:00
gsathya
ec61e6b434 [promises] Remove one runtime call to create_resolving_functions
- Creates a new promise-utils.{h, cc} which refactors out the
logic to create resolving functions. This is shared between the
runtime functions and builtins.

- Changes PromiseResolveThenableJobInfo to store the context
since we no longer create the resolving functions in JS.

- Changes EnqueuPromiseResolveThenableJob to take in the promise and
  not the callbacks.

BUG=v8:5343

Review-Url: https://codereview.chromium.org/2487053002
Cr-Commit-Position: refs/heads/master@{#40941}
2016-11-11 20:59:46 +00:00
ynovikov
3b49b45756 Fix -Wshorten-64-to-32 errors on clang ARM64
Review-Url: https://codereview.chromium.org/2491373003
Cr-Commit-Position: refs/heads/master@{#40940}
2016-11-11 20:19:57 +00:00
bbudge
99c8144773 [Turbofan] CodeGenerator for ARM avoids moves from VFP to general regs.
- Adds VmovExtended, VswpExtended methods to MacroAssembler. These methods
use only VFP registers to perform s-register moves.

LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/2497483002
Cr-Commit-Position: refs/heads/master@{#40939}
2016-11-11 19:54:06 +00:00
yangguo
c76059cac4 [compiler] correctly attribute compile event for inner function.
Review-Url: https://codereview.chromium.org/2494993002
Cr-Commit-Position: refs/heads/master@{#40938}
2016-11-11 16:44:11 +00:00
leszeks
6ddcbb1a9a Reland [compiler] Enable shared function marking by default
Previous: https://codereview.chromium.org/2491773006

BUG=v8:5512

Review-Url: https://codereview.chromium.org/2498643002
Cr-Commit-Position: refs/heads/master@{#40937}
2016-11-11 16:20:46 +00:00
yangguo
389d0dd115 [debugger,compiler] do not recompile already compiled inner functions.
GetSharedFunctionInfo will compile inner functions if we get the
compile-eager hint, even if the shared function info already exists, and
the function already has been compiled. This breaks suspended generator
objects.

R=mstarzinger@chromium.org, neis@chromium.org
BUG=v8:5575

Review-Url: https://codereview.chromium.org/2494043002
Cr-Commit-Position: refs/heads/master@{#40936}
2016-11-11 15:53:33 +00:00
mlippautz
df5b86de4c [heap] Add basic infrastructure for Minor Mark-Compact collector
BUG=chromium:651354

Review-Url: https://codereview.chromium.org/2493803002
Cr-Commit-Position: refs/heads/master@{#40935}
2016-11-11 15:48:55 +00:00
yangguo
70bedcb1ef [debugger] do not use asm validator for debug code.
R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2492713005
Cr-Commit-Position: refs/heads/master@{#40934}
2016-11-11 15:13:31 +00:00
neis
7743e4993e [ast] Simplify FetchFreeVariables.
This CL removes the ParseInfo argument from FetchFreeVariables, since it seems
to have become unnecessary.

R=verwaest@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2491373004
Cr-Commit-Position: refs/heads/master@{#40933}
2016-11-11 15:09:32 +00:00
verwaest
135b9f9360 Make private symbols non-enumerable
Methods in the runtime that enumerate over properties should never deal with private symbols. Most commonly such methods only loop over enumerable properties. This fix avoids accidentally handling private symbols in methods that only deal with enumerable properties. Methods that need to look at non-enumerable properties as well still have to manually filter private symbols (e.g., the KeyAccumulator).

BUG=chromium:664411

Review-Url: https://codereview.chromium.org/2499593002
Cr-Commit-Position: refs/heads/master@{#40932}
2016-11-11 15:05:29 +00:00
ulan
f18d56d130 Fix more -Wsign-compare warnings in heap, mips, base, etc.
BUG=v8:5614

Review-Url: https://codereview.chromium.org/2496913002
Cr-Commit-Position: refs/heads/master@{#40931}
2016-11-11 14:56:10 +00:00
leszeks
f6701a8cbd Reland: [compiler] Fix flipped boolean checks in marked tier-up
Fixes incorrect checks for handle validity when checking the compiled
code, as well as incorrect uses of tst in arm and ppc flag checking
code. Also adds a test that the tier-up works correctly.

Reland of https://codereview.chromium.org/2448933002

BUG=v8:5512

Review-Url: https://codereview.chromium.org/2497573003
Cr-Commit-Position: refs/heads/master@{#40930}
2016-11-11 14:17:00 +00:00
ishell
f124edd97d [ic] Enable data handlers for all kinds of field stores.
BUG=v8:5561

Review-Url: https://codereview.chromium.org/2489433003
Cr-Commit-Position: refs/heads/master@{#40929}
2016-11-11 14:16:02 +00:00
hpayer
a9e6bbba26 [heap] Reland concurrent store buffer processing.
BUG=chromium:648973, chromium:648568

Review-Url: https://codereview.chromium.org/2493083003
Cr-Commit-Position: refs/heads/master@{#40928}
2016-11-11 14:01:29 +00:00
ulan
8ddc260d3b [parser, serializer] Fix more -Wsign-compare warnings.
BUG=v8:5614

Review-Url: https://codereview.chromium.org/2481013010
Cr-Commit-Position: refs/heads/master@{#40927}
2016-11-11 13:54:26 +00:00
rmcilroy
7b1a048407 Revert of [compiler] Enable shared function marking by default (patchset #1 id:1 of https://codereview.chromium.org/2491773006/ )
Reason for revert:
Revert because it depends on https://codereview.chromium.org/2478323002/ which has been reverted.

Original issue's description:
> [compiler] Enable shared function marking by default
>
> BUG=v8:5512

TBR=bmeurer@chromium.org,leszeks@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5512

Review-Url: https://codereview.chromium.org/2491643006
Cr-Commit-Position: refs/heads/master@{#40926}
2016-11-11 13:15:53 +00:00
mlippautz
ceda07d5b0 [heap] Remove unused CompactionMode flag
R=ulan@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2493173003
Cr-Commit-Position: refs/heads/master@{#40925}
2016-11-11 13:06:42 +00:00
franzih
6d84f2d9ed [turbofan] Optimize ToName conversion.
ToName conversion, i.e., ToPropertykey() is the
identify for strings and symbols.

BUG=v8:5623

Review-Url: https://codereview.chromium.org/2494073002
Cr-Commit-Position: refs/heads/master@{#40924}
2016-11-11 13:05:45 +00:00
bmeurer
7d24f1aefa [turbofan] Introduce an ExternalPointer type.
This adds a new ExternalPointer type, which is an Internal type that is
used for ExternalReferences and other pointer values, like the pointers
into the asm.js heap. It also adds a PointerConstant operator, which we
use to represents these raw constants (we can probably remove that
particular operator again once WebAssembly ships with the validator).

R=mvstanton@chromium.org
BUG=v8:5267,v8:5270

Review-Url: https://codereview.chromium.org/2494753003
Cr-Commit-Position: refs/heads/master@{#40923}
2016-11-11 13:04:47 +00:00
ahaas
e3c7324a2e [wasm] Check data segments for zero-sized memory.
According to the spec data segments are allowed even if the memory size
is zero. However, if one of the data segments has a length greater than
0, then module instantiation should fail.

I also changed the exception type in LoadDataSegments to TypeError,
because that's the exception type for all exceptions which can happen
during instantiation.

R=titzer@chromium.org, rossberg@chromium.org
TEST=cctest/test-run-wasm-module/EmptyMemoryEmptyDataSegment, cctest/test-run-wasm-module/EmptyMemoryNonEmptyDataSegment

Review-Url: https://codereview.chromium.org/2483053005
Cr-Commit-Position: refs/heads/master@{#40922}
2016-11-11 13:03:50 +00:00
jkummerow
567904f1a7 [ic] Fix elements conversion in KeyedStoreGeneric
A SmiUntag() was missing when loading the old backing store's length.

BUG=chromium:664469

Review-Url: https://codereview.chromium.org/2492783004
Cr-Commit-Position: refs/heads/master@{#40921}
2016-11-11 13:02:10 +00:00
leszeks
556217427d [compiler] Enable shared function marking by default
BUG=v8:5512

Review-Url: https://codereview.chromium.org/2491773006
Cr-Commit-Position: refs/heads/master@{#40920}
2016-11-11 13:01:11 +00:00
bmeurer
bad42b387f Revert of [compiler] Fix flipped boolean checks in marked tier-up (patchset #7 id:120001 of https://codereview.chromium.org/2478323002/ )
Reason for revert:
Breaks deopt fuzzer:
https://build.chromium.org/p/client.v8/builders/V8%20Deopt%20Fuzzer/builds/14872/steps/Deopt%20Fuzz%20on%20Ubuntu-12.04/logs/stdio

Original issue's description:
> [compiler] Fix flipped boolean checks in marked tier-up
>
> Fixes incorrect checks for handle validity when checking the compiled
> code, as well as incorrect uses of tst in arm and ppc flag checking
> code. Also adds a test that the tier-up works correctly.

TBR=rmcilroy@chromium.org,leszeks@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2492523007
Cr-Commit-Position: refs/heads/master@{#40919}
2016-11-11 12:40:17 +00:00
ulan
2bd1ee96a5 [ignition] Fix more -Wsign-compare warnings.
BUG=v8:5614

Review-Url: https://codereview.chromium.org/2493183002
Cr-Commit-Position: refs/heads/master@{#40918}
2016-11-11 12:13:12 +00:00
jgruber
b32ee40de8 [debug-wrapper] Conditional breaks, locals, evaluate, scopes
This CL adds support for:
* conditional breaks in setBreakpoint,
* locals in frame.local{Count,Name,Value},
* evaluation on a frame in frame.evaluate,
* and more detailed scope information in scopeObject.

Uses of several functions that are not covered by the
inspector protocol and are only used in tests have been removed.

Local handling has been modified to also include arguments as locals.
Inspector differs in this regard from our FrameDetails in that
arguments are always shown as locals. Argument-related functions
were removed.

BUG=v8:5530

Review-Url: https://codereview.chromium.org/2491543002
Cr-Commit-Position: refs/heads/master@{#40917}
2016-11-11 12:08:34 +00:00
ulan
758b317ce5 [turbofan] Fix more -Wsign-compare warnings.
BUG=v8:5614

Review-Url: https://codereview.chromium.org/2493173002
Cr-Commit-Position: refs/heads/master@{#40916}
2016-11-11 12:01:08 +00:00
leszeks
712a46cc3f [compiler] Fix flipped boolean checks in marked tier-up
Fixes incorrect checks for handle validity when checking the compiled
code, as well as incorrect uses of tst in arm and ppc flag checking
code. Also adds a test that the tier-up works correctly.

Review-Url: https://codereview.chromium.org/2478323002
Cr-Commit-Position: refs/heads/master@{#40915}
2016-11-11 11:57:54 +00:00
ulan
9c25d5dc6e [wasm] Fix more -Wsign-compare warnings.
BUG=v8:5614

Review-Url: https://codereview.chromium.org/2492793005
Cr-Commit-Position: refs/heads/master@{#40914}
2016-11-11 11:56:05 +00:00
titzer
fa9c25cebf [wasm] Move all heap-allocated WASM structures into wasm-objects.h.
This CL moves all heap-allocated WASM data structures, both ones
that are bonafide JSObjects and ones that are FixedArrays only, into a
consistent place with consistent layout. Note that not all accessors are complete, and I haven't fully spread the new static typing goodness
to all places in the code.

R=ahaas@chromium.org,rossberg@chromium.org
CC=gdeepti@chromium.org,mtrofin@chromium.org,clemensh@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2490663002
Cr-Commit-Position: refs/heads/master@{#40913}
2016-11-11 11:13:17 +00:00
jkummerow
fc97c638fa [cleanup] Replace ToBooleanICStub::Types with ToBooleanHints
And decouple hydrogen-instructions.h from code-stubs.h. This avoids
all of Crankshaft being recompiled when code-stub-assembler.h changes.

Review-Url: https://codereview.chromium.org/2498563002
Cr-Commit-Position: refs/heads/master@{#40912}
2016-11-11 10:50:34 +00:00
mstarzinger
0a94ef09d4 [interpreter] Enable OSR for Ignition by default.
This enables the on-stack replacement mechanism from Ignition bytecode
to TurboFan optimized code by default. The runtime profiler is now
allowed to arm OSR points in bytecode.

R=rmcilroy@chromium.org

Review-Url: https://codereview.chromium.org/2432413004
Cr-Commit-Position: refs/heads/master@{#40911}
2016-11-11 10:42:07 +00:00
mythria
be360af21a [Interpreter] Optimize for monomorphic case in Call and New bytecode handlers.
Fast case the monomorphic case, by marking the additional checks as deferred
blocks. This increases the code size by about 50 bytes, but the monmorphic
case requires one fewer jump and the all the code is contiguous, so may help
caching.

Also cleanup call and new bytecode handlers by changing some of the Branches
to GotoIf/Unless for better readability.

BUG=v8:4280

Review-Url: https://codereview.chromium.org/2487573005
Cr-Commit-Position: refs/heads/master@{#40910}
2016-11-11 09:16:36 +00:00
bmeurer
ddba89c433 [turbofan] Also utilize the string length protector.
Utilize the string length protector to deoptimize if the resulting
string length for string addition overflows. This way we generate
less code here and avoid holding on to the lazy frame state, and
thus potentially reduce the number live ranges.

BUG=v8:5267,v8:5404
R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2491943004
Cr-Commit-Position: refs/heads/master@{#40909}
2016-11-11 08:22:25 +00:00
bmeurer
4ee6fdf38b [turbofan] Fix a couple of invalid Uint32Constant/Int32Constant uses.
The contract for TurboFan is that we use NumberConstants for any kind
of number value until the representation selection picks concrete
representations, i.e. Int32Constant or Float64Constant. We will soon
be able to also guard this contract with DCHECKs.

BUG=v8:5267
R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2499573002
Cr-Commit-Position: refs/heads/master@{#40908}
2016-11-11 08:08:53 +00:00
jyan
c7ebb14c3c s390: fix overflowing offset in std and ld
use StoreDouble and LoadDouble function to avoid overflowing
offset used in std and ld

R=joransiu@ca.ibm.com, michael_dawson@ca.ibm.com, bjaideep@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/2492913002
Cr-Commit-Position: refs/heads/master@{#40907}
2016-11-10 21:56:09 +00:00