Commit Graph

3233 Commits

Author SHA1 Message Date
mvstanton
caeb9004f0 Don't MISS if you read the hole from certain FastHoley arrays.
If the array's map is the initial FastHoley array map, and the array prototype
chain is undisturbed and empty of elements, then keyed loads can convert the
load of a hole to undefined.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#28056}
2015-04-27 08:46:38 +00:00
conradw
ae7ce701ae [strong] Disallow implicit conversions for binary arithmetic operations
Implements the strong mode proposal's restrictions on
implicit conversions for binary arithmetic operations, not
including the + special case. Adds some infrastructure
for future implementation of the restrictions for other
operators.

BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28045}
2015-04-24 12:32:41 +00:00
svenpanne
4d3044e161 Removed src/{isolate,property-details,utils}-inl.h
Baby steps towards saner #includes...

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

Cr-Commit-Position: refs/heads/master@{#27958}
2015-04-21 10:21:37 +00:00
Ross McIlroy
063fc25122 Replace OVERRIDE->override and FINAL->final since we now require C++11.
R=jochen@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27937}
2015-04-20 13:08:14 +00:00
verwaest
8098253562 Reland "Add basic crankshaft support for slow-mode for-in to avoid disabling optimizations"
BUG=chromium:476592
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27898}
2015-04-16 17:32:00 +00:00
mvstanton
13459c1ae3 Array() in optimized code can create with wrong ElementsKind in corner cases.
Calling new Array(JSObject::kInitialMaxFastElementArray) in optimized code
makes a stub call that bails out due to the length. Currently, the bailout
code a) doesn't have the allocation site, and b) wouldn't use it if it did
because the length is perceived to be too high.

This CL passes the allocation site to the stub call (rather than undefined),
and alters the bailout code to utilize the feedback.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27857}
2015-04-15 21:02:13 +00:00
mstarzinger
b807d112d7 [turbofan] Fix ForInStatement that deopts during filter.
This adds a missing bailout id to a ForInStatement for when retrieving
and filtering a property name deoptimizes. This can happen with proxies
that have a getPropertyDescriptor trap.

R=jarin@chromium.org
TEST=mjsunit/for-in-opt

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

Cr-Commit-Position: refs/heads/master@{#27846}
2015-04-15 13:12:05 +00:00
mvstanton
776770c0e4 VectorICs: megamorphic keyed loads in crankshaft don't need a vector.
This needs "Pass load ic state through the Oracle"
(https://codereview.chromium.org/1083933002/) to land first.

BUG=
R=dcarney@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27827}
2015-04-15 02:35:34 +00:00
mvstanton
e0844a24d3 Remove unnecessary options from HTailCallThroughMegamorphicCache
These options were added for a hydrogen code stub version of
the VectorIC dispatcher, which was discontinued.

R=verwaest@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27793}
2015-04-13 16:23:23 +00:00
machenbach
dc65e62abd Revert of VectorICs: megamorphic keyed loads in crankshaft don't need a vector. (patchset #3 id:40001 of https://codereview.chromium.org/1067573003/)
Reason for revert:
[Sheriff] Speculative revert for windows failure... will reland if it doesn't help:
http://build.chromium.org/p/client.v8/builders/V8%20Win32%20-%20debug%20-%202/builds/2891

Original issue's description:
> VectorICs: megamorphic keyed loads in crankshaft don't need a vector.
>
> They are content with a dummy vector, as MISSES won't result in
> changing the real vector/slot at all.
>
> BUG=
>
> Committed: https://crrev.com/c8e4d57d3b3036a05902f5b916cb5d853a57393c
> Cr-Commit-Position: refs/heads/master@{#27788}

TBR=dcarney@chromium.org,mvstanton@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27790}
2015-04-13 16:19:29 +00:00
mvstanton
c8e4d57d3b VectorICs: megamorphic keyed loads in crankshaft don't need a vector.
They are content with a dummy vector, as MISSES won't result in
changing the real vector/slot at all.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27788}
2015-04-13 13:50:26 +00:00
bmeurer
e21f9ab42b [x86] Allow (v)divsd->(v)mulsd to execute in parallel.
This tweak was already present in CrankShaft for the non-AVX case. As it
turns out, it's also relevant even with AVX. Now the same optimization
is applied in case of TurboFan as well.

R=dcarney@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27774}
2015-04-13 08:25:24 +00:00
Weiliang Lin
38e764f7ac [x86] Introduce vandps/vandpd/vxorps/vxorpd.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27768}
2015-04-11 00:58:38 +00:00
verwaest
4bd9bdbb28 Reland "Merge cellspace into old pointer space"
This fixes the arm(64) and mips(64) write barriers

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27751}
2015-04-10 13:54:10 +00:00
caitpotter88
74c381221c [es6] implement spread calls
BUG=v8:3018
R=
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27714}
2015-04-09 19:37:19 +00:00
adamk
9e3e0aaa88 Revert of Merge cellspace into old pointer space (patchset #8 id:180001 of https://codereview.chromium.org/1010803012/)
Reason for revert:
Causes test failures on ARM bots related to cells and write barriers.

Original issue's description:
> Merge cellspace into old pointer space
>
> BUG=
>
> Committed: https://crrev.com/4e7163ce05f135918205c7855ae60a48e5d46cc5
> Cr-Commit-Position: refs/heads/master@{#27707}

TBR=hpayer@chromium.org,balazs.kilvady@imgtec.com,yangguo@chromium.org,verwaest@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27711}
2015-04-09 18:16:40 +00:00
verwaest
4e7163ce05 Merge cellspace into old pointer space
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27707}
2015-04-09 13:34:21 +00:00
jing.bao
dba47f6486 [ia32] Introduce BMI instructions.
BUG=v8:4015
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27683}
2015-04-09 06:50:58 +00:00
mstarzinger
d1bcfaf034 [ia32] Fix MacroAssembler::Move for int64 to float64 moves.
R=bmeurer@chromium.org
TEST=test262-es6/language/expressions/addition/S9.3_A4.1_T2

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

Cr-Commit-Position: refs/heads/master@{#27663}
2015-04-08 12:06:59 +00:00
mstarzinger
2d281e71ac Make --always-opt also optimize top-level code.
This enables eager optimization of top-level code with TurboFan and
extends test coverage by triggering it with the --always-opt flag.
Script contexts are now also properly allocated in TurboFan.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27633}
2015-04-07 15:44:23 +00:00
mvstanton
6a222b8ff0 Code cleanup in GenerateRecordCallTarget.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27630}
2015-04-07 13:39:40 +00:00
jkummerow
46f761e1f2 Fix missing SmiTag in failure path of r27614
BUG=chromium:469768
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27627}
2015-04-07 12:47:46 +00:00
hpayer
59be4ba7f4 Reland "Merge old data and pointer space."
This reverts commit cbfcee5575.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27623}
2015-04-07 11:32:10 +00:00
yangguo
c67cb287a9 Always update raw pointers when handling interrupts inside RegExp code.
R=mstarzinger@chromium.org
BUG=chromium:469480
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27615}
2015-04-07 09:44:57 +00:00
jkummerow
146598f44a JSEntryTrampoline: check for stack space before pushing arguments
Optimistically pushing a lot of arguments can run into the stack limit of the process, at least on operating systems where this limit is close to the limit that V8 sets for itself.

BUG=chromium:469768
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#27614}
2015-04-07 09:13:44 +00:00
adamk
909500aa1d Reimplement Maps and Sets in JS
Previously, the only optimized code path for Maps and Sets was for String keys.
This was achieved through an implementation of various complex operations
in Hydrogen. This approach was neither scalable nor forward-compatible.

This patch adds the necessary intrinsics to implement Maps and Sets almost entirely
in JS. The added intrinsics are:

  %_FixedArrayGet
  %_FixedArraySet
  %_TheHole
  %_JSCollectionGetTable
  %_StringGetRawHashField

With these additions, as well as a few changes to what's exposed as runtime functions,
most of the C++ code backing Maps and Sets is gone (including both runtime code in
objects.cc and Crankshaft in hydrogen.cc).

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

Cr-Commit-Position: refs/heads/master@{#27605}
2015-04-07 00:12:04 +00:00
mvstanton
b134ae74b5 v8:3539 - hold constructor feedback in weak cells
BUG=v8:3539
R=verwaest@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27581}
2015-04-02 09:39:35 +00:00
verwaest
16ee55097a Generate common StoreFastElementStubs ahead of time
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27536}
2015-03-31 12:25:25 +00:00
mvstanton
7c347c545e Ensure object literal element boilerplates aren't modified.
A bug allows JSObject literals with elements to have the elements in the
boilerplate modified.

BUG=466993
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27511}
2015-03-30 09:20:09 +00:00
bmeurer
8dad78cdbd [turbofan] Add backend support for float32 operations.
This adds the basics necessary to support float32 operations in TurboFan.
The actual functionality required to detect safe float32 operations will
be added based on this later. Therefore this does not affect production
code except for some cleanup/refactoring.

In detail, this patchset contains the following features:
- Add support for float32 operations to arm, arm64, ia32 and x64
  backends.
- Add float32 machine operators.
- Add support for float32 constants to simplified lowering.
- Handle float32 representation for phis in simplified lowering.

In addition, contains the following (related) cleanups:
- Fix/unify naming of backend instructions.
- Use AVX comparisons when available.
- Extend ArchOpcodeField to 9 bits (required for arm64).
- Refactor some code duplication in instruction selectors.

BUG=v8:3589
LOG=n
R=dcarney@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27509}
2015-03-30 07:34:04 +00:00
yangguo
019096f829 Serializer: move to a subfolder and clean up includes.
R=jochen@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27501}
2015-03-27 15:29:07 +00:00
mstarzinger
38a719f965 Switch full-codegen from StackHandlers to handler table.
This switches full-codegen to no longer push and pop StackHandler
markers onto the operand stack, but relies on a range-based handler
table instead. We only use StackHandlers in JSEntryStubs to mark the
transition from C to JS code.

Note that this makes deoptimization and OSR from within any try-block
work out of the box, makes the non-exception paths faster and should
overall be neutral on the memory footprint (pros).

On the other hand it makes the exception paths slower and actually
throwing and exception more expensive (cons).

R=yangguo@chromium.org
TEST=cctest/test-run-jsexceptions/DeoptTry

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

Cr-Commit-Position: refs/heads/master@{#27440}
2015-03-25 13:14:02 +00:00
mstarzinger
11fb202f96 Move CompilationInfo::this_has_uses to HGraph::this_has_uses.
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27378}
2015-03-23 19:11:29 +00:00
mvstanton
6689cc27eb VectorICs: keyed element loads were kicking out non-smi keys unnecessarily
Handlers should be in charge of this work. The change uncovered a bug in
vector-ics related to keyed loads into strings. It's important for
StringCharCodeAtGenerator, a helper used in full code and in
LoadIndexedStringStub (a handler) to protect the vector and slot registers
when it makes a runtime call to convert a HeapNumber to a Smi.

It's still possible for the handler to MISS after this call, perhaps due
to out of bounds access. In that case, the vector and slot registers need
to be delivered safely to the MISS handler.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27377}
2015-03-23 18:50:23 +00:00
balazs.kilvady
56d2ee0310 MIPS: Fix 'MIPS: Serializer: serialize internal references via object visitor.'
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27351}
2015-03-23 07:00:22 +00:00
caitpotter88
bef80fcfd7 [es6] generate rest parameters correctly for subclass constructors
BUG=v8:3977
R=dslomov@chromium.org, arv@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27344}
2015-03-20 14:07:16 +00:00
Benedikt Meurer
3aa206b865 [turbofan] Turn Math.clz32 into an inlinable builtin.
R=dcarney@chromium.org, yangguo@chromium.org
BUG=v8:3952
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27329}
2015-03-20 08:37:34 +00:00
hpayer
cbfcee5575 Revert "Merge old data and pointer space."
TBR=verwaest@chromium.org,ulan@chromium.org,ishell@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#27323}
2015-03-19 22:03:32 +00:00
caitpotter88
d21fd15467 [es6] implement Reflect.apply() & Reflect.construct()
BUG=v8:3900
LOG=N
R=dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27316}
2015-03-19 14:47:27 +00:00
bmeurer
e18e3cd4d8 [stubs] Add missing interface descriptor for the CompareIC.
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27305}
2015-03-19 13:09:37 +00:00
yangguo
7c149afb6c Serializer: serialize internal references via object visitor.
Review URL: https://codereview.chromium.org/1005183006

Cr-Commit-Position: refs/heads/master@{#27275}
2015-03-18 13:38:45 +00:00
verwaest
16c8485a35 Remove PropertyCell space
Replaces StoreGlobalCell / LoadGlobalCell with NamedField variants that use write barriers.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27269}
2015-03-18 11:43:58 +00:00
loislo
9f91fde045 CodeCleanup: eliminate unnecessary base class and make the children unvirtual.
I found some strange split in deopt entry points generator.
The code for table entry generator had two classes.
It is safe to join these classes together and drop virtual.

BUG=
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27264}
2015-03-18 10:34:18 +00:00
mstarzinger
15f8213809 Remove kind field from StackHandler.
This relands commit 96f79568a9.

This makes the Isolate::Throw logic not depend on a prediction of
whether an exception is caught or uncaught. Such a prediction is
inherently undecidable because a finally block can decide between
consuming or re-throwing an exception depending on arbitray control
flow.

There still is a conservative prediction mechanism in place that
components like the debugger or tracing can use for reporting.

With this change we can get rid of the StackHandler::kind field, a
pre-requisite to do table-based lookups of exception handlers.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27263}
2015-03-18 10:19:16 +00:00
hpayer
257ff48931 Merge old data and pointer space.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27259}
2015-03-18 09:39:03 +00:00
loislo
7fef610d72 CpuProfiler: log pc offset for deopts.
This is the fifth part of https://codereview.chromium.org/1012633002
In this part we collect the offsets of deopt calls and save it into
an inlined function info.

On the Next:
Later when deopt happens we will get the offset of deopt call and
search it among inlined infos.

BUG=chromium:452067
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27258}
2015-03-18 09:30:36 +00:00
loislo
bcf51d25aa CpuProfiler: ia32. put right address to the stack, so the callee would be able to resolve it into the right deopt_info.
'from' is using for Code object lookup and will be used for
inline_id lookup. see https://codereview.chromium.org/1012633002
So we should be able to map it.

BUG=chromium:452067
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27252}
2015-03-18 08:09:46 +00:00
mstarzinger
86b391ecad Delegate throwing in RegExpExecStub to CEntryStub.
This ensures that there is only one stub that deals with unwinding the
stack. Having more than one place containing that logic is brittle and
error prone, especially when it is a corner case only for RangeErrors.

R=titzer@chromium.org
TEST=mjsunit/regress/regress-crbug-467047
BUG=chromium:467047
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27243}
2015-03-17 15:49:40 +00:00
mvstanton
34a1a76ddf Use platform specific stubs for vector-based Load/KeyedLoad.
A hydrogen code stub is not the best approach because it builds a frame
and doesn't have the technology to discard roots at tail call exits.
Platform-specific stubs provide much better performance at this point.

R=verwaest@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27235}
2015-03-17 11:28:21 +00:00
loislo
55d05404b7 CpuProfiler: extract DeoptInfo fill in code into a static function.
the third part of the patch https://codereview.chromium.org/1012633002

this patch
1) moves DeoptInfo builder code to platform independent file lithium-codegen.cc
2) adds inlining_id property to HEnterInlined so we can use it on lithium level.

BUG=chromium:452067
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27231}
2015-03-17 09:37:41 +00:00