Commit Graph

24789 Commits

Author SHA1 Message Date
Benedikt Meurer
2c5b69d851 Add more OWNERS for components.
R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30147}
2015-08-13 07:35:38 +00:00
bmeurer
6a58370c7f [strong] Simplify (and sortof optimize) string addition for strong mode.
In strong mode, whenever either operand to an addition is a string, both
must be strings, so we can just use a simple string map check instead of
the STRING_ADD_LEFT / STRING_ADD_RIGHT machinery, which tries to do sloppy
and strict mode conversions before giving up.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30146}
2015-08-13 07:05:18 +00:00
yangguo
3b18958be5 Revert of Group lexical context variables for faster look up. (patchset #2 id:20001 of https://codereview.chromium.org/1281883002/ )
Reason for revert:
This performance hack is no longer necessary.

Original issue's description:
> Group lexical context variables for faster look up.
>
> Currently, looking up a lexical context variable requires looking up
> the variable name and then checking its mode. This can be a bottleneck
> in Runtime_DeclareGlobals, even when no lexical context variables are
> declared.
>
> R=rossberg@chromium.org
> BUG=crbug:517778
> LOG=N
>
> Committed: https://crrev.com/a45ed17bb6aca02e940f13bbf456d660cccc86ae
> Cr-Commit-Position: refs/heads/master@{#30075}

TBR=rossberg@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=crbug:517778

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

Cr-Commit-Position: refs/heads/master@{#30145}
2015-08-13 06:56:41 +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
v8-autoroll
b2a8842dbb Update V8 DEPS.
Rolling v8/third_party/android_tools to 5722f90e94d02a8dc17b6edb93ead6839d5afcee

TBR=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30142}
2015-08-13 03:26:52 +00:00
littledan
9f9cb990a5 Stage sloppy classes
This patch puts --harmony-sloppy into staging. Now that let, lexically-scoped
functions and ES2015 sloppy mode const semantics have been split off into
separate flags, the change only enables classes in sloppy mode.

BUG=v8:3305
R=adamk
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#30141}
2015-08-12 23:42:14 +00:00
littledan
e261540b9e Add class to existing lexical scoping tests
This patch strengthens testing of classes by verifying that the binding
that they export externally follows block scoping, as opposed to var-style
scoping. The tests are based on existing tests for let and const.

R=adamk
LOG=N
BUG=v8:3305

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

Cr-Commit-Position: refs/heads/master@{#30140}
2015-08-12 18:43:06 +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
binji
60268ceecd [Atomics] Fix compile failure in clang/win build in runtime-atomics.cc
BUG=v8:4366
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30138}
2015-08-12 16:44:22 +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
yangguo
5df7d689eb Debugger: load debugger builtins as normal native JS.
R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30136}
2015-08-12 14:22:22 +00:00
bmeurer
88f90680fd [runtime] Remove useless %_IsUndetectableObject intrinsic.
Instead of using a sequence

  if (something == null && !IS_UNDETECTABLE(something))) { ... }

which will be true if something is either null or undefined, it is
way simpler and way more efficient to just write

  if (something === null || something === (void 0)) { ... }

instead, which allows the compiler(s) to generate pretty decent code
without any need to resort to type feedback from a CompareNil IC.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30135}
2015-08-12 13:44:16 +00:00
yangguo
abc12df33c Do not save script object on the class constructor.
We don't need it, as we can grab it from the shared function info.
Having it triggers an assertion if we define classes in native JS.

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

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

Cr-Commit-Position: refs/heads/master@{#30134}
2015-08-12 13:06:20 +00:00
yangguo
d81001cd3f Add to full-codegen/OWNERS.
TBR=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30133}
2015-08-12 12:26:49 +00:00
bmeurer
b62dbf1efd [compiler] Remove broken support for undetectable strings.
Support for undetectable strings was officially dropped in
https://codereview.chromium.org/916753002, but the compilers
weren't fixed properly.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30132}
2015-08-12 12:01:40 +00:00
mstarzinger
6690d47045 Remove grab-bag includes of v8.h from debugger.
R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30131}
2015-08-12 11:14:12 +00:00
mstarzinger
66667d0240 Remove grab-bag includes of v8.h from full codegen.
R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30130}
2015-08-12 11:13:09 +00:00
bmeurer
a7d22de460 [runtime] Simplify CHECK_OBJECT_COERCIBLE.
Don't use IS_NULL_OR_UNDEFINED() for CHECK_OBJECT_COERCIBLE() because it
will also return true for undetectable objects, but use IS_NULL() and
IS_UNDEFINED() directly, which will only return true for null or
undefined (which matches the semantics of the abstract operation
CheckObjectCoercible).

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30129}
2015-08-12 11:11:38 +00:00
yangguo
cd9dd53918 Add more OWNERS and set noparent for some sub-directories.
R=danno@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30128}
2015-08-12 10:56:08 +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
8ad1778b50 Make list constructor usable without list-inl.h header.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30126}
2015-08-12 08:00:18 +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
yangguo
c1d20f831b Debugger: correctly ensure debug info in Debug::Break.
R=bmeurer@chromium.org
BUG=chromium:517594
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30124}
2015-08-12 07:30:40 +00:00
thestig
52a2563e68 [turbofan] LoadGlobalParameters::slot_index() should just return an int.
Clang says: warning: 'const' type qualifier on return type has no effect
[-Wignored-qualifiers]

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

Cr-Commit-Position: refs/heads/master@{#30123}
2015-08-12 04:40:30 +00:00
littledan
1ebf0d7c5d Split function block scoping into a separate flag
In an initial attempt to implement sloppy mode lexical bindings,
functions were made lexically scoped in sloppy mode. However, the
ES2015 spec says that they need an additional hoisted var binding,
and further, it's not clear when we'll implement that behavior
or whether it's web-compatible.

This patch splits off function block scoping into a new, separate
flag called --harmony_sloppy_function. This change will enable the
possibility of testing and shipping this feature separately from
other block scoping-related features which don't have the same risks.

BUG=v8:4285
R=adamk
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30122}
2015-08-12 00:00:01 +00:00
domenic
43655380bd Stage --harmony-array-includes
BUG=v8:3575
R=adamk@chromium.org, rossberg@chromium.org
LOG=Y
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#30121}
2015-08-11 22:00:53 +00:00
littledan
d03191beb1 Use a new lexical context for sloppy-mode eval
In ES6, direct eval() in sloppy mode uses the enclosing function-level
("var") scope for var-style bindings and a new lexical scope for lexical
bindings like let and class. This patch implements that feature by making
lexical bindings that are directly within an EVAL_SCOPE be on the local
scope rather than the enclosing one.

BUG=v8:4288
LOG=Y
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#30120}
2015-08-11 21:30:40 +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
littledan
8f733867ac Delete outdated comment about a bug which was fixed three years ago
R=adamk
BUG=chromium:135066
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30118}
2015-08-11 18:43:42 +00:00
domenic
8934b9eae7 Add includes method to typed arrays
R=littledan@chromium.org, adamk@chromium.org
BUG=v8:3575
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#30117}
2015-08-11 17:55:24 +00:00
adamk
7a823598f8 run-tests.py: warn when no tests were run
The previous approach to this (in 1b1de2d22) did not work well with
bots that intentionally run no tests. But I think this warning message
is still useful for developers.

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

Cr-Commit-Position: refs/heads/master@{#30116}
2015-08-11 17:03:29 +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
binji
bd873709e2 Use TimeTicks instead of Time in FutexEmulation::Wait.
BUG=v8:4357
R=machenbach@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30113}
2015-08-11 14:28:24 +00:00
vogelheim
aa97b06505 Revert of Debugger: clear shared function info list when recompiling for liveedit. (patchset #1 id:1 of https://codereview.chromium.org/1270313003/ )
Reason for revert:
Sorry for revert, but this change breaks one of the webkit-unit-tests.

Example here: https://storage.googleapis.com/chromium-layout-test-archives/V8-Blink_Win/1178/layout-test-results/inspector/sources/debugger/live-edit-no-reveal-diff.txt

Not sure if the old expectations were right, or the new ones are. :)

Original issue's description:
> Debugger: clear shared function info list when recompiling for liveedit.
>
> R=bmeurer@chromium.org
> BUG=chromium:517594
> LOG=N
>
> Committed: https://crrev.com/9eea3ef5147a5e15256093fb4c36a7598d60d128
> Cr-Commit-Position: refs/heads/master@{#30111}

TBR=bmeurer@chromium.org,yangguo@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:517594

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

Cr-Commit-Position: refs/heads/master@{#30112}
2015-08-11 13:56:26 +00:00
yangguo
9eea3ef514 Debugger: clear shared function info list when recompiling for liveedit.
R=bmeurer@chromium.org
BUG=chromium:517594
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30111}
2015-08-11 12:00:44 +00:00
mstarzinger
a8fba0f62e Realize IWYU pattern for handles.h header.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30110}
2015-08-11 12:00:21 +00:00
mstarzinger
02495d5459 [heap] Avoid inclusion of objects-visiting-inl.h header.
R=hpayer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30109}
2015-08-11 11:30:14 +00:00
bmeurer
a0364972fc [stubs] Store typeof string on Oddballs.
First step to simplify the TypeofStub. This is similar to the
optimization that we use for ToNumber and ToString on Oddballs already.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30108}
2015-08-11 10:47:42 +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
yangguo
ce51974943 Remove redundant handle in ScopeIterator constructor.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30106}
2015-08-11 09:32:45 +00:00
yangguo
2e2765a6eb Rewrite Error.prototype.toString in C++.
This avoids many back-and-forth calls to the runtime.

This also slightly changes the way we avoid getters. Previously, we circumvent getting the name property of ReferenceError, SyntaxError and TypeError due to crbug/69187 (in order to avoid leaking information from those errors through a 'name' getter installed on their prototypes). Now we do that for all errors created by V8.

R=jkummerow@chromium.org, rossberg@chromium.org
BUG=crbug:513472, crbug:69187
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30105}
2015-08-11 09:15:41 +00:00
yangguo
a68ad56c50 Debugger: correctly find closure to recompile eval for debugging.
R=mstarzinger@chromium.org
BUG=chromium:517592
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30104}
2015-08-11 08:20: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
mstarzinger
58109a2c50 Remove several grab-bag includes from the v8.h header.
This is the first step of turning the v8.h file into a normal header
instead of an include-the-world header. The new rule is that no other
header files are allowed to include v8.h, which is enforced by DEPS.

Also the number of includes inside the v8.h file has been drastically
reduced. Basically the last missing piece is the inclusion of the big
objects-inl.h file.

This in turn makes many headers follow the IWYU principle.

R=bmeurer@chromium.org,hpayer@chromium.org,titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30102}
2015-08-11 07:34:17 +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
v8-autoroll
a946401a7d Update V8 DEPS.
Rolling v8/tools/clang to b66ad18bb147f02b74b207358140371382b0ef35

TBR=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30100}
2015-08-11 03:25:15 +00:00
binji
cd9293445e [d8 Workers] Make Worker prototype read-only
BUG=chromium:518747
R=mstarzinger@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30099}
2015-08-11 00:17:13 +00:00
adamk
f2acba0e8c [es6] Add appropriate ToString call to String.prototype.normalize
R=littledan@chromium.org
BUG=v8:4304
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30098}
2015-08-11 00:12:12 +00:00