Commit Graph

4632 Commits

Author SHA1 Message Date
bmeurer
3d01d31fa9 [runtime] Remove useless DELETE builtin.
The DELETE builtin calls through to %DeleteProperty anyway, so we
can as well skip the builtin completely and always call into the
runtime directly.  Also add different entries depending on whether
calling code is in sloppy or strict/strong mode.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30148}
2015-08-13 09:41:50 +00:00
yangguo
67e4b3732a Move regexp implementation into its own folder.
Review URL: https://codereview.chromium.org/1285163003

Cr-Commit-Position: refs/heads/master@{#30144}
2015-08-13 06:55:36 +00:00
titzer
8525136bd3 Add tests for float32/float64 parameters/returns passed in float32/float64 registers.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30143}
2015-08-13 05:30:01 +00:00
jfb
a904b569a2 Security: disable nontemporals.
The operations were available on ARM64 and x86-32 but were unused.

It has been conjectured that nontemporals can be used for rowhammer-like bitflips more easily than regular load/store operations. It is therefore desirable to avoid generating these instructions in the future.

R= titzer, jochen, jln, Mark Seaborn, ruiq

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

Cr-Commit-Position: refs/heads/master@{#30139}
2015-08-12 16:58:06 +00:00
adamk
d746dbfed7 [api] Delete non-maybe version of CompileModule
Also add a bigger warning to the header comment for the Maybe version.

R=jochen@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30137}
2015-08-12 16:43:17 +00:00
mstarzinger
19a49abf02 Realize IWYU pattern for frames-inl.h header.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30127}
2015-08-12 10:28:47 +00:00
mstarzinger
00a07bc1b7 Remove inline header includes from non-inline headers (1).
This tries to remove includes of "-inl.h" headers from normal ".h"
headers, thereby reducing the chance of any cyclic dependencies and
decreasing the average size of our compilation units.

Note that this change still leaves 7 violations of that rule in the
code. However there now is the "tools/check-inline-includes.sh" tool
detecting such violations.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30125}
2015-08-12 07:32:54 +00:00
bmeurer
6c743b2b39 [runtime] Store constructor function index on primitive maps.
This way we can greatly simplify the different variants of ToObject in
our codebase and make them more uniform and robust.  Adding a new
primitive doesn't require finding and changing all those places again,
but it is sufficient to setup the constructor function index when
allocating the map.

We use the inobject properties field of Map, which is invalid primitive
maps anyway.

R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30119}
2015-08-11 19:36:14 +00:00
titzer
17f4c5bbaf Reland: [turbofan] Various fixes to allow unboxed doubles as arguments in registers and on the stack.
OCL: https://codereview.chromium.org/1263033004/

R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30115}
2015-08-11 15:23:17 +00:00
hpayer
debf58cd55 Respect old generation limit in large object space allocations.
Also remove unused max_capcity_ field in old spaces.

BUG=chromium:518028,chromium:504854
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30114}
2015-08-11 14:52:02 +00:00
bmeurer
f4c079d450 [simd.js] Single SIMD128_VALUE_TYPE for all Simd128Values.
There's no need to have one InstanceType per SIMD primitive type (this
will not scale long-term).  Also reduce the amount of code duplication
and make it more robust wrt adding new SIMD types.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30107}
2015-08-11 09:45:40 +00:00
saper
75e43a6681 Use static_cast<> for NULL (clang 3.7)
The following errors come up when compiling v8
 with clang 3.7 on FreeBSD/amd64:

src/runtime/runtime-i18n.cc:629:37: error: reinterpret_cast from
'nullptr_t' to 'v8::internal::Smi *' is not allowed
  local_object->SetInternalField(1, reinterpret_cast<Smi*>(NULL));
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

test/cctest/test-heap.cc:131:20: error: reinterpret_cast from
      'nullptr_t' to 'v8::internal::Object *' is not allowed
  Handle<Object> n(reinterpret_cast<Object*>(NULL), isolate);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/cctest/test-heap.cc:1989:18: error: reinterpret_cast from
      'nullptr_t' to 'Address' (aka 'unsigned char *') is not
      allowed
  Address base = reinterpret_cast<Address>(NULL);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+add myself to the AUTHORS file.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30103}
2015-08-11 07:48:59 +00:00
yangguo
31a3f68da9 Revert of [turbofan] Various fixes to allow unboxed doubles as arguments in registers and on the stack. (patchset #7 id:120001 of https://codereview.chromium.org/1263033004/ )
Reason for revert:
This CL breaks MIPS (roll blocker).

https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20mipsel%20-%20sim/builds/2061/steps/Check/logs/Run_Int32_Select_1

Original issue's description:
> [turbofan] Various fixes to allow unboxed doubles as arguments in registers and on the stack.
>
> R=jarin@chromium.org
> BUG=
>
> Committed: https://crrev.com/71409be5395f867bbca0f6998bf6caa175cd8192
> Cr-Commit-Position: refs/heads/master@{#30091}

TBR=jarin@chromium.org,titzer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30101}
2015-08-11 06:48:46 +00:00
rmcilroy
cc74437ba7 [interpreter] Fix nosnap build for interpreter table generation.
Moves the creation of the interpreter table early on during initialization
to ensure that even on nosnap builds it still gets allocated in the
first page.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30096}
2015-08-10 18:22:20 +00:00
titzer
71409be539 [turbofan] Various fixes to allow unboxed doubles as arguments in registers and on the stack.
R=jarin@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30091}
2015-08-10 14:14:36 +00:00
rmcilroy
6447b78f8e [interpreter] Adds interpreter cctests.
BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30087}
2015-08-10 11:20:31 +00:00
bmeurer
0e5ec1b910 [runtime] Remove unused %ToBool runtime function.
R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30085}
2015-08-10 10:32:57 +00:00
bmeurer
6db78c8065 [turbofan] Drop V8_TURBOFAN_BACKEND and V8_TURBOFAN_TARGET defines.
TurboFan is now a requirement and supported by all backends, so we don't
need those macros (plus all the machinery on top) anymore.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30082}
2015-08-10 07:17:34 +00:00
jkummerow
1e65e20189 Fasterify JSObject::UnregisterPrototypeUser
When a (prototype) map registers as a user of its own prototype, it now remembers the index in that prototype's registry where it is listed.
This remembered index is used on un-registration to find the right slot to clear without walking the entire registry.
Compaction of the registry must update all entries' remembered indices.

BUG=chromium:517778,chromium:517406
LOG=n
R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30079}
2015-08-08 22:56:31 +00:00
Djordje.Pesic
46fafcd706 MIPS: Fix mina_maxa for proper NaN handling.
Also clean up variable naming in min_max and other tests. Fix class_fmt in mips64 assembler test for proper NaN checking

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

Cr-Commit-Position: refs/heads/master@{#30073}
2015-08-07 19:05:54 +00:00
mstarzinger
e8a399c0a0 Speed up tests for optimized code sharing.
Note that this tests performed unnecessary many iterations which led to
long runtimes in debug mode and also caused flaky GCs during that would
cause the optimized code map to be flushed and violated assumptions.

R=yangguo@chromium.org
BUG=v8:4363
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30070}
2015-08-07 13:39:01 +00:00
mstarzinger
fc77fb7bdd [heap] Rename IncrementalMarking::Abort to Stop.
R=hpayer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30061}
2015-08-07 09:36:59 +00:00
domenic
2dff84e66f Rename "extras exports" to "extras binding"
R=yangguo@chromium.org, jochen@chromium.org
BUG=507133
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#30053}
2015-08-06 23:52:54 +00:00
mstarzinger
d4ac509f3c Fix stale entries in optimized code map.
This fixes a corner-case where extending an optimized code map left
stale entries in the abandoned copy. This can cause havoc not only in
the heap verifier but also in the GC, because stale entries have not
been recorded when being trated weakly.

Note that this also pre-tenures all optimized code maps into old-space
because their lifetime is coupled to the SharedFunctionInfo anyways.

R=hpayer@chromium.org
TEST=cctest/test-heap/Regress514122
BUG=chromium:514122
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30047}
2015-08-06 14:22:17 +00:00
mlippautz
d2bd9517fe [GC] Check for incremental marking when a GC is triggered on reaching the external allocation limit
We missed a check whether we can actually do incremental marking when starting
it on reaching the external allocation limit.

BUG=chromium:517195
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30043}
2015-08-06 11:49:58 +00:00
adamk
b7726c447a Delete --harmony-computed-property-names flag
It was shipped in V8 4.4.

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

Cr-Commit-Position: refs/heads/master@{#30038}
2015-08-05 21:32:38 +00:00
adamk
cd455055a0 Delete --harmony-unicode flag
It was shipped in V8 4.4.

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

Cr-Commit-Position: refs/heads/master@{#30035}
2015-08-05 19:08:42 +00:00
adamk
5c34bacb72 [es6] Remove Scanner and Parser flags for harmony_modules
These flags weren't doing any real work, since the decision of whether some
source code is a script or module is made outside the parser (currently,
by the V8 API).

The only behavior change in this patch is to always parse 'import' and
'export' as their Token values, which changes the error message from
"Unexpected reserved word" to "Unexpected token import" (which doesn't
seem particularly harmful).

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

Cr-Commit-Position: refs/heads/master@{#30034}
2015-08-05 17:59:57 +00:00
hpayer
af800bf6ad Retire StringTracker.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30031}
2015-08-05 15:13:46 +00:00
yangguo
0a1a714f7e Introduce object visitor to estimate the size of a native context.
This is only an estimate since it counts objects that could be shared,
for example strings, cow arrays, heap numbers, etc.

It however ignores objects that could be shared, but may only be used
by the context to be measured, for example shared function infos,
script objects, scope infos, etc.

R=jochen@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30029}
2015-08-05 14:07:33 +00:00
mstarzinger
bcad9b547d Introduce safe interface to "copy and grow" FixedArray.
This introduces a CopyFixedArrayAndGrow method on Factory that takes
the "grow amount" instead of the "new size" as an argument. The new
interface is safer because it allows for mutations by the GC that
potentially trim the source array.

This also fixes a bug in SharedFunctionInfo::AddToOptimizedCodeMap
where the aformentioned scenario led to unused entries within the
optimized code map.

Note that FixedArray::CopySize is hereby deprecated because it is
considered unsafe and should no longer be used.

R=hpayer@chromium.org
TEST=mjsunit/regress/regress-crbug-513507
BUG=chromium:513507
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30012}
2015-08-04 17:49:42 +00:00
rossberg
56bd11a11a [es6] Refactor FormalParameter
Store arity in FormalParameters; store name (instead of var) and is_rest flag in individual parameters. Ensure that the arity is always maintained consistently.

This is preparation for more parameter destructuring adjustments. In particular, a follow-up CL will separate parameter recording from declaring the variables.

R=adamk@chromium.org, littledan@chromium.org
BUG=v8:811
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30002}
2015-08-04 14:24:58 +00:00
titzer
6b63aa06d3 [turbofan] Handle void returns in instruction selector.
R=jarin@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#29999}
2015-08-04 13:14:16 +00:00
yangguo
4e036f3042 Debugger: refactor ScopeIterator, FrameInspector and DebugEvaluate.
This is a pure refactor and does not change functionality.

R=ulan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29995}
2015-08-04 12:10:13 +00:00
oth
d689c7a7be [Interpreter] Consistency fixes.
Change minimum BytecodeArray frame size to zero now return value is in
the accumulator.

Fix inconsistent checks in bytecode-array-builder.cc.

Simplify bytecode disassembly by adding Bytecodes::Decode to
disassemble one bytecode and operands.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29988}
2015-08-03 20:39:36 +00:00
yangguo
4a2e4420b8 Remove JSFunctionResultCache.
There is only one use case for it: String.prototype.search converts a
string argument into a RegExp. The cache is used to avoid repeating that
conversion. However, this does not make the added complexity worthwhile.

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

Cr-Commit-Position: refs/heads/master@{#29985}
2015-08-03 18:14:17 +00:00
bbudge
7b9670b63b SIMD.js Add the other SIMD Phase 1 types.
Adds Int32x4, Bool32x4, Int16x8, Bool16x8, Int8x16, Bool8x16.
Adds Simd128Value base heap object class.
Changes heap/factory construction pattern to use arrays.
Adds replaceLane functions to facilitate testing.

NOPRESUBMIT=true
(presubmit checks erroneously interpret array declaration in macro definition as variable size array.)

LOG=Y
BUG=v8:4124

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

Cr-Commit-Position: refs/heads/master@{#29974}
2015-08-03 13:02:56 +00:00
machenbach
53fbbf0296 [Sheriff] Mark test as flaky.
BUG=v8:4141
LOG=n
NOTRY=true
TBR=yangguo@chromium.org, vogelheim@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29972}
2015-08-03 11:42:10 +00:00
oth
6ab1f70e12 [Intepreter] BytecodeArrayBuilder and accumulator based bytecodes.
The BytecodeArrayBuilder has responsibility for emitting the BytecodeArray. It will be used by the AST walker.

Bytecode now uses an accumulator plus registers rather being pure register based.

Update BytecodeArray::Disassemble to print operand information.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29970}
2015-08-03 10:42:30 +00:00
titzer
44bfb4b57e [turbofan] Simplifying handling of callee-cleanup stack area.
R=danno@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#29957}
2015-07-31 15:18:52 +00:00
mvstanton
1a5751f9b3 VectorICs: refactoring to eliminate "for queries only" vector ic mode.
Since we need the notion of a dummy vector ic, we can use that to avoid
a special case of the IC constructor. Also, consolidate the two dummy
ICs into one.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#29956}
2015-07-31 14:04:13 +00:00
yangguo
1667c15e37 Debugger: move implementation to a separate folder.
R=cbruni@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29951}
2015-07-31 11:08:15 +00:00
titzer
8d2f455352 [turbofan] GraphBuilderTester uses --print-opt-code.
R=bmeurer@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#29948}
2015-07-31 09:12:41 +00:00
mvstanton
04a7123ae8 Bugfix: CCTest test-func-name-inference/InConstructor is broken
BUG=v8:4331
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29927}
2015-07-30 10:43:16 +00:00
ulan
3c9e8de5e4 Fix idle notification for background tab.
The idle time handler should never return DONE or DO_SCAVENGE for
background tabs. Upon receiving DONE chrome will stop sending idle notifications.

BUG=chromium:515174
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#29926}
2015-07-30 10:38:28 +00:00
mvstanton
f469b21143 Stop overallocating feedback vector slots.
When a Property or a VariableProxy is used as the left hand side of an
assignment statement, there is no need to allocate a LOAD_IC feedback
vector slot for it. Alter the numbering phase to support this.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#29924}
2015-07-30 10:38:04 +00:00
yangguo
67efca8be6 Add test for referring function name for classes.
R=mvstanton@chromium.org
BUG=v8:4333
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29922}
2015-07-30 09:21:20 +00:00
yangguo
a67f31c48c Speed up cctest/test-debug/DebugBreakLoop.
R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29918}
2015-07-30 09:11:46 +00:00
mbrandy
e2487b805d PPC: Support for conditional return instruction.
R=dstence@us.ibm.com, michael_dawson@ca.ibm.com
BUG=
NOTREECHECKS=true

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

Cr-Commit-Position: refs/heads/master@{#29907}
2015-07-30 07:30:40 +00:00
mbrandy
aabb08d8cc Add per-file OWNERS for PPC-specific cctests
BUG=
R=jkummerow@chromium.org
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#29901}
2015-07-29 08:12:09 +00:00