Commit Graph

30790 Commits

Author SHA1 Message Date
zhengxing.li
8d77d42e9d X87: [stubs]: Implement ArrayNoArgumentConstructor as a TF stub.
port fa570e55b6 (r35963)

  original commit message:

BUG=

Review-Url: https://codereview.chromium.org/1952583002
Cr-Commit-Position: refs/heads/master@{#36048}
2016-05-05 02:59:42 +00:00
adamk
40b3626e45 Disallow yield in computed property names of class expressions in params
R=littledan@chromium.org
BUG=v8:4974
LOG=n

Review-Url: https://codereview.chromium.org/1949223002
Cr-Commit-Position: refs/heads/master@{#36047}
2016-05-04 23:25:25 +00:00
adamk
75f2d65f00 Don't treat catch scopes as possibly-shadowing for sloppy eval
Scope analysis is over-conservative when treating variable resolutions
as possibly-shadowed by a sloppy eval. In the attached bug, this comes
into play since catch scopes have different behavior with respect to
the "calls eval" in eager vs lazy compilation (in the latter, they
are never marked as "calls eval" because CatchContexts don't have
an associated ScopeInfo).

This patch changes the scope-type check to also eliminate a few other
cases where shadowing isn't possible, such as non-declaration block scopes.

BUG=chromium:608279
LOG=n

Review-Url: https://codereview.chromium.org/1950803002
Cr-Commit-Position: refs/heads/master@{#36046}
2016-05-04 21:36:13 +00:00
mike
915ec67cc6 Convert negative zero in ArraySpeciesCreate
As per the ES2015 spec, the value `-0` should be converted to `+0` prior
to invocation of the species constructor.

BUG=v8:4988
LOG=N
R=littledan@chromium.org

Review-Url: https://codereview.chromium.org/1950073002
Cr-Commit-Position: refs/heads/master@{#36045}
2016-05-04 21:33:51 +00:00
gdeepti
117a56b7c2 Add new relocation type WASM_MEMORY_SIZE_REFERENCE, use relocatable pointers to update wasm memory size references in generated code.
- Add new RelocInfo mode WASM_MEMORY_SIZE_REFERENCE in the assembler and add relocation information to immediates in compare instructions.
 - Use relocatable constants for MemSize/BoundsCheck in the wasm compiler

R=titzer@chromium.org, yangguo@chromium.org, bradnelson@chromium.org

Review-Url: https://codereview.chromium.org/1921203002
Cr-Commit-Position: refs/heads/master@{#36044}
2016-05-04 20:20:50 +00:00
mbrandy
9f2147874a PPC: Handle large offsets in LoadPU/StorePU.
TEST=mjsunit/array-constructor
R=joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, bjaideep@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/1947233002
Cr-Commit-Position: refs/heads/master@{#36043}
2016-05-04 19:56:26 +00:00
alph
0a8cd4dc02 Sampling heap profiler: Force Full GC before retrieving the profile.
BUG=v8:4959
LOG=N

Review-Url: https://codereview.chromium.org/1949693003
Cr-Commit-Position: refs/heads/master@{#36042}
2016-05-04 19:16:27 +00:00
jyan
8c55885fe7 S390: Fix printf format mismatch for icount
R=joransiu@ca.ibm.com, cornacch@ca.ibm.com, mbrandy@us.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/1948113002
Cr-Commit-Position: refs/heads/master@{#36041}
2016-05-04 19:03:09 +00:00
jyan
e23471eed2 S390: [stubs] Convert InternalArrayNoArgumentsConstructor to a TurboFan stub
Port d2efbf2538

R=danno@chromium.org, joransiu@ca.ibm.com, bjaideep@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=chromium:608675
LOG=N

Review-Url: https://codereview.chromium.org/1946193004
Cr-Commit-Position: refs/heads/master@{#36040}
2016-05-04 19:00:30 +00:00
jyan
a6d9f42327 S390: [Atomics] Make Atomics.store a builtin using TF
Port 81cb841170

R=binji@chromium.org, joransiu@ca.ibm.com, bjaideep@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=v8:4614
LOG=N

Review-Url: https://codereview.chromium.org/1948043002
Cr-Commit-Position: refs/heads/master@{#36039}
2016-05-04 18:40:41 +00:00
pierre.langlois
f07d2cdd6a ARM64: [turbofan] Avoid zero-extension after a 32-bit load
A load instruction will implicitely clear the top 32 bits when writing to a W
register. This patch avoids generating a `mov` instruction to zero-extend the
result in this case.

For example, this occurs in the generated code for dispatching to the next
bytecode in the interpreter:

  kind = BYTECODE_HANDLER
  name = LdaZero
  compiler = turbofan
  Instructions (size = 36)
  0x32e64c60     0  add x19, x19, #0x1 (1)
  0x32e64c64     4  ldrb w0, [x20, x19]
  0x32e64c68     8  mov w0, w0
                    ^^^^^^^^^^
  0x32e64c6c    12  lsl x0, x0, #3
  0x32e64c70    16  ldr x1, [x21, x0]
  0x32e64c74    20  movz x0, #0x0
  0x32e64c78    24  br x1

BUG=

Review-Url: https://codereview.chromium.org/1950013003
Cr-Commit-Position: refs/heads/master@{#36038}
2016-05-04 18:35:56 +00:00
jyan
e9b244c58a S390: Add HasProperty code stub that tries simple lookups or jumps to runtime otherwise.
Code common with ObjectHasOwnProperty builtin was moved to CodeStubAssembler.

R=ishell@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com
BUG=v8:2743
LOG=Y

Review-Url: https://codereview.chromium.org/1946303002
Cr-Commit-Position: refs/heads/master@{#36037}
2016-05-04 18:35:55 +00:00
bryleun
634e5bbab0 S390: [stubs]: Implement ArrayNoArgumentConstructor as a TF stub
Port fa570e55b6

R=joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=

Review-Url: https://codereview.chromium.org/1952433002
Cr-Commit-Position: refs/heads/master@{#36036}
2016-05-04 17:29:00 +00:00
nikolaos
0d1687b9df Add support for disabling the preparser when testing modules
R=adamk@chromium.org
BUG=
LOG=N

Review-Url: https://codereview.chromium.org/1952473003
Cr-Commit-Position: refs/heads/master@{#36035}
2016-05-04 17:22:20 +00:00
jyan
60c0389b29 S390: Fix Macro-Asm DCHECK
Move DCHECK to only check for necessary path.

R=joransiu@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/1946003003
Cr-Commit-Position: refs/heads/master@{#36034}
2016-05-04 16:51:05 +00:00
littledan
04c8c11ee5 Make array __proto__ manipulations not disturb the species protector
Previously, the species protector was invalidated whenever the __proto__ of
an Array instance was manipulated. Then, if the map's new_target_is_base field
remained set, it was correct to conclude that GetPrototypeOf(array) was
%ArrayPrototype%. However, this choice caused the popular D3 framework to
invalidate the species protector, causing many functions to become slower.

This patch eliminates that aspect of the species protector. Instead, the check
is to look at the instance->map()->prototype(). It is valid to look directly
at the map's prototype slot, ignoring hidden prototypes and proxies, because
- This is only called on Array instances, so the receiver cannot be a Proxy.
- For hidden prototypes, any inaccuracy would only result in conservatively
  taking the slow path.

Theoretically, this patch could make methods applied to arrays from other
contexts slower. However, the slowdown would only affect a particular array
instance and not have a global spill-over effect. Further, the slowdown could
be addressed by tracking, either in the instance's map or in the actual
prototype object, whether it is a %ArrayPrototype% from any context, in a way
which is cheap to query, and use that rather than comparing to the currently
executing native context.

In interactive testing, this patch led the OnShape CAD system to experience
faster load times (110+s -> 40s).

BUG=chromium:606207
LOG=Y

Review-Url: https://codereview.chromium.org/1936393002
Cr-Commit-Position: refs/heads/master@{#36033}
2016-05-04 16:48:50 +00:00
jyan
25c0ee5d8b S390: [turbofan] Properly initialize OutOfLineRecordWrite.
TEST=cctest/test-api/Regress470113 --ignition
R=joransiu@ca.ibm.com, mbrandy@us.ibm.com, michael_dawson@ca.ibm.com, bjaideep@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/1944333002
Cr-Commit-Position: refs/heads/master@{#36032}
2016-05-04 16:24:18 +00:00
kozyatinskiy
f0d27360a6 Add v8::Object::GetOwnPropertyNames(context, filter) method
This method provides ability to get all properties of the object with passed filter in addition to existing GetOwnPropertyNames(context) method that returns only enumerable properties.

BUG=v8:3861,chromium:581495
R=yangguo@chromium.org
LOG=Y

Review-Url: https://codereview.chromium.org/1943773002
Cr-Commit-Position: refs/heads/master@{#36031}
2016-05-04 16:15:36 +00:00
mstarzinger
068791e2ca [compiler] Remove is_native and is_eval accessors.
This removes some low-level accessors from the CompilationInfo which
only delegate to the ParseInfo. Instead we add a helper that computes
the flags passed to DeclareGlobals for all backends.

R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/1952623002
Cr-Commit-Position: refs/heads/master@{#36030}
2016-05-04 16:00:00 +00:00
neis
ca5aa3c86a [interpreter] Always 'continue' loops by jumping forward to end of body.
We sometimes used to continue by jumping _back_ to the condition check at the
top of the loop. After my recent generator-related changes, that check is no
longer at the loop header, so a continue could create an additional loop. In
order to avoid this, we now always set the continue target to be the first
instruction following the loop body.

BUG=

Review-Url: https://codereview.chromium.org/1943383003
Cr-Commit-Position: refs/heads/master@{#36029}
2016-05-04 15:57:40 +00:00
mbrandy
88877e5519 Fix IterateCompiledFrame for embedded constant pools.
Do not visit the constant pool pointer frame slot.

TEST=cctest/test-api/Regress137496 --ignition
R=danno@chromium.org, mcilroy@chromium.org, bjaideep@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/1950623002
Cr-Commit-Position: refs/heads/master@{#36028}
2016-05-04 15:46:30 +00:00
alph
e8e9c07e54 Make sure the heap is in consistent state when calling allocation observers.
The observer might want to lookup something in the heap, e.g. code objects
it has in the call stack.

BUG=v8:4959
LOG=N

Review-Url: https://codereview.chromium.org/1948893002
Cr-Commit-Position: refs/heads/master@{#36027}
2016-05-04 14:40:18 +00:00
neis
9ae91f8d77 [full-codegen] Remove superfluous NestedStatement use in VisitDoExpression
BUG=

Review-Url: https://codereview.chromium.org/1943893003
Cr-Commit-Position: refs/heads/master@{#36026}
2016-05-04 14:29:14 +00:00
jochen
e5baec22d3 Make it possible to set a getter and a setter at the same time
BUG=chromium:588893, chromium:325923
LOG=n
R=verwaest@chromium.org

Review-Url: https://codereview.chromium.org/1943303002
Cr-Commit-Position: refs/heads/master@{#36025}
2016-05-04 14:15:39 +00:00
ishell
1350eb3dc9 [es8] More spec compliant syntactic tail calls implementation.
Unlike previous implementation where the 'continue' keyword was a feature of a return statement the keyword is now recognized as a part of expression. Error reporting was significantly improved.

--harmony-explicit-tailcalls option is now orthogonal to --harmony-tailcalls so we can test both modes at the same time.

This CL also adds %GetExceptionDetails(exception) that fetches hidden |start_pos| and |end_pos| values from the exception object.

BUG=v8:4915
LOG=N

Review-Url: https://codereview.chromium.org/1928203002
Cr-Commit-Position: refs/heads/master@{#36024}
2016-05-04 13:44:42 +00:00
epertoso
46907cbbab [stubs] Fix Allocate macro in the CodeStubAssembler.
The macro was Using SmiTag(Int32Constant()) was causing some unnecessary shifts to be emitted in the deferred code.

Also, when allocating in new space, the macro now uses Runtime::kAllocateInNewSpace.

Review-Url: https://codereview.chromium.org/1945263002
Cr-Commit-Position: refs/heads/master@{#36023}
2016-05-04 12:48:53 +00:00
bmeurer
ce38a8a92a [turbofan] Inline the allocation fast path.
Now that everything is properly wired to the effect chain when we get to
ChangeLowering, we can safely inline the allocation fast path and only
need to consule the slow path stub fallback when bump pointer allocation
fails.

R=jarin@chromium.org
BUG=v8:4931
LOG=n

Review-Url: https://codereview.chromium.org/1951853002
Cr-Commit-Position: refs/heads/master@{#36022}
2016-05-04 12:44:32 +00:00
neis
06c5127f5b [full-codegen] Introduce NestedStatement subclass for class literals.
This fixes a bug where returning from a class literal inside
a try-finally didn't restore the context properly when
entering the finally clause.

BUG=v8:4965
LOG=n

Review-Url: https://codereview.chromium.org/1952633002
Cr-Commit-Position: refs/heads/master@{#36021}
2016-05-04 12:42:04 +00:00
jochen
d3b50cbb5c Use Null as "no accessor" in AccessorPair instead of TheHole
R=verwaest@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/1949493004
Cr-Commit-Position: refs/heads/master@{#36020}
2016-05-04 12:37:41 +00:00
ulan
566c825d4a Fix MakeWeak and IsWeakRetainer for global handles with finalizers.
BUG=

Review-Url: https://codereview.chromium.org/1944813002
Cr-Commit-Position: refs/heads/master@{#36019}
2016-05-04 11:58:37 +00:00
ulan
d441100b70 Deprecate PersistentBase::MarkPartiallyDependent.
It is already effectively disabled by --scavenge_reclaim_unmodified_objects.

BUG=

Review-Url: https://codereview.chromium.org/1944793002
Cr-Commit-Position: refs/heads/master@{#36018}
2016-05-04 11:56:20 +00:00
balazs.kilvady
7551eca981 MIPS64: Fix [turbofan] Length and index2 are unsigned in CheckedLoad/CheckedStore.
Port b994ad45b0

Original commit message:
Also factor out test cases from test-run-machops.cc into test-run-load-store.cc

TEST=cctest/test-run-load-store/RunLoadStoreZeroExtend64, cctest/test-run-load-store/RunOobCheckedLoadT_pseudo7, cctest/test-run-load-store/RunOobCheckedLoad_pseudo7
BUG=chromium:599717
LOG=Y

Review-Url: https://codereview.chromium.org/1907363002
Cr-Commit-Position: refs/heads/master@{#36017}
2016-05-04 11:43:07 +00:00
bmeurer
e93f06ad87 [turbofan] Don't need any write barrier when storing maps from the root set.
Maps that are immortal immovable (i.e. the one pointer filler map) don't
need write barriers.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/1945023003
Cr-Commit-Position: refs/heads/master@{#36016}
2016-05-04 11:43:06 +00:00
ssanfilippo
4b3953df59 [Interpreter] Do not write Ignition dispatch counters to file by default.
Since Ignition dispatch counters have been made accessible from
JavaScript via getIgnitionDispatchCounters() in [1], writing
them to a file at the end of the execution does not seem the best
default anymore.

Following this commit, a file is written only if d8 is invoked
with --trace-ignition-dispatches-output-file.

[1] https://crrev.com/905becd13b8696e126255decf130fdb9e1d9aa30

LOG=N
BUG=v8:4899

Review-Url: https://codereview.chromium.org/1943923002
Cr-Commit-Position: refs/heads/master@{#36015}
2016-05-04 11:23:17 +00:00
mstarzinger
22b4db544c [compiler] Allow optimization of top-level eval code.
This allows for top-level eval code to be parsed properly before doing
optimization. It uses the same kind of re-parsing we already perform
when compiling code for debugging.

R=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/1884143003
Cr-Commit-Position: refs/heads/master@{#36014}
2016-05-04 10:59:07 +00:00
martyn.capewell
0322c20d17 [turbofan] ARM64: Use zr to store immediate zero
When storing an immediate integer or floating point zero, use the zero register
as the source value. This avoids the need to sometimes allocate a new register.

BUG=

Review-Url: https://codereview.chromium.org/1945783002
Cr-Commit-Position: refs/heads/master@{#36013}
2016-05-04 10:19:48 +00:00
ofrobots
9622696b5e [profiler] sampled allocations should be marked as independent
Sampling heap profiler keeps weak references. These should be marked
independent so that the weak callback can be dispatched on new space
collections.

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

Review-Url: https://codereview.chromium.org/1945193002
Cr-Commit-Position: refs/heads/master@{#36012}
2016-05-04 09:59:41 +00:00
mlippautz
07c72af0d7 [heap] Add regression test for chromium:598319
BUG=chromium:598319
LOG=N

Review-Url: https://codereview.chromium.org/1948573003
Cr-Commit-Position: refs/heads/master@{#36011}
2016-05-04 09:33:23 +00:00
mstarzinger
db1b27e8f0 [compiler] Remove dangerous language mode accessors.
The language mode is no longer constant accross a compilation unit. For
example the extends clause of a class literal can be in strict mode even
though the surrounding function is in sloppy mode. This makes any global
language mode predicate that reasons over an entire function inherently
dangerous. Instead one should use the appropriate predicate on scopes or
literals directly.

R=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/1949013002
Cr-Commit-Position: refs/heads/master@{#36010}
2016-05-04 09:28:54 +00:00
epertoso
a0543313db [turbofan] Take the immediate size in account when narrowing ia32/x64 word comparison operators.
Before this patch, we would emit a cmp or test with a memory operand only if both of the operands in the IR were loads. Now if either of them is a load and the other one is an immediate, we can use a memory operand if the load representation machine size is wide enough to represent the latter.

Review-Url: https://codereview.chromium.org/1948453002
Cr-Commit-Position: refs/heads/master@{#36009}
2016-05-04 09:22:04 +00:00
titzer
f82b33781d [wasm] Fix for 608630: allow proxies as FFI.
R=ahaas@chromium.org,bradnelson@chromium.org
BUG=chromium:608630
LOG=Y

Review-Url: https://codereview.chromium.org/1943313002
Cr-Commit-Position: refs/heads/master@{#36008}
2016-05-04 08:54:00 +00:00
mstarzinger
30f6dfb7aa [interpreter] Remove SharedFunctionInfo::IsInterpreted.
The predicate in question was a workaround for when the compilation
pipeline still kept bytecode and baseline code on the same shared
function info. It is not longer needed. In the long run we want a
predicate which can determine the exact tier for each function.

R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/1940913002
Cr-Commit-Position: refs/heads/master@{#36007}
2016-05-04 08:32:11 +00:00
bmeurer
c3218375c1 [turbofan] Implement %_NewObject using FastNewObjectStub.
The inline allocation sequence in the optimizing compilers cannot deal
well with funky types like JSRegExp, which have some magic fields in
addition to the inobject properties. In Crankshaft we already use the
FastNewObjectStub for %_NewObject in general, so fix TurboFan to the same.
Hopefully one day we can kill %_NewObject completely.

R=jarin@chromium.org
BUG=chromium:609029
LOG=n

Review-Url: https://codereview.chromium.org/1943403004
Cr-Commit-Position: refs/heads/master@{#36006}
2016-05-04 07:35:22 +00:00
jarin
b84b01e6d2 Ship Turbofan optimization for try-catch and try-finally.
Review-Url: https://codereview.chromium.org/1946883003
Cr-Commit-Position: refs/heads/master@{#36005}
2016-05-04 06:43:40 +00:00
bjaideep
df4125c579 PPC: [Atomics] Make Atomics.store a builtin using TF
Port 81cb841170

R=binji@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=v8:4614
LOG=N

Review-Url: https://codereview.chromium.org/1951643002
Cr-Commit-Position: refs/heads/master@{#36004}
2016-05-04 04:49:00 +00:00
bjaideep
5840dd1fe0 PPC: [stubs] Convert InternalArrayNoArgumentsConstructor to a TurboFan stub
Port d2efbf2538

R=danno@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=chromium:608675
LOG=N

Review-Url: https://codereview.chromium.org/1952503002
Cr-Commit-Position: refs/heads/master@{#36003}
2016-05-04 04:46:43 +00:00
v8-autoroll
01eb1ecc69 Update V8 DEPS.
Rolling v8/build to bbe88f49be848cde9fcf4e1f470506cd560ec5f6

TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org

Review-Url: https://codereview.chromium.org/1944243002
Cr-Commit-Position: refs/heads/master@{#36002}
2016-05-04 03:22:29 +00:00
adamk
c8a342a582 Fix 'eval' in class extends clauses to be always-strict
Compiler backends get their language mode from the current
function, but should instead be deriving it from the current scope.
This allows proper handling of the always-strictness of class declarations
and expressions, and in particular the treatment of 'eval' calls in an
extends clause as a strict eval.

Also fix the parser's RecordEvalCall logic to only reach out to the
DeclarationScope in sloppy mode, which fixes the strange case of a
sloppy function thinking it contains a sloppy eval when in fact
it contains only a strict eval.

BUG=v8:4970
LOG=n

Review-Url: https://codereview.chromium.org/1931003003
Cr-Commit-Position: refs/heads/master@{#36001}
2016-05-03 22:36:29 +00:00
danno
d2efbf2538 [stubs] Convert InternalArrayNoArgumentsConstructor to a TurboFan stub
BUG=chromium:608675
LOG=N

Review-Url: https://codereview.chromium.org/1948433002
Cr-Commit-Position: refs/heads/master@{#36000}
2016-05-03 21:36:38 +00:00
mbrandy
e69bc6ed8b PPC: [turbofan] Properly initialize OutOfLineRecordWrite.
TEST=cctest/test-api/Regress470113 --ignition
R=joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, bjaideep@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/1946733002
Cr-Commit-Position: refs/heads/master@{#35999}
2016-05-03 20:20:08 +00:00