Commit Graph

8390 Commits

Author SHA1 Message Date
Djordje.Pesic
2a6a87d71a MIPS: Add float instructions and test coverage, part one
Implement assembler, disassembler tests for all instructions for mips32 and mips64. Additionally, add missing single precision float instructions for r2 and r6 architecture variants in assembler, simulator and disassembler with corresponding tests.

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

Cr-Commit-Position: refs/heads/master@{#28402}
2015-05-14 14:02:36 +00:00
rossberg
9be59492f9 [strong] Introduce strong bit
Only set on strong functions so far to test basic operation.

R=dslomov@chromium.org
BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28396}
2015-05-13 13:31:12 +00:00
yangguo
e24b31f003 Revert "Resolve references to "this" the same way as normal variables"
... and the following two
"PPC: Resolve references to "this" the same way as normal variables"
"Remove Scope::scope_uses_this_ flag"

R=hablich@chromium.org
BUG=chromium:487289
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28395}
2015-05-13 13:30:01 +00:00
titzer
29e15dad16 [turbofan] Add FrameStates before all property accesses.
R=jarin@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28392}
2015-05-13 12:29:32 +00:00
wingo
e73594c7fb Use ExpressionClassifier to identify valid arrow function formals
R=dslomov@chromium.org
LOG=N
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28391}
2015-05-13 11:45:02 +00:00
bmeurer
5494920a18 [turbofan] Use frame state before for shift operations as well.
This was already done for other binary operations, so it's basically
copying the existing functionality to shift left and shift right
logical/arithmetic.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28389}
2015-05-13 11:17:28 +00:00
yangguo
36b4a498d6 Prevent stack overflow in the serializer/deserializer.
We keep an eye on the recursion depth. Once it exceeds a limit, we serialize
only the object header and size, but defer serializing the object body for
after we have unwound the stack.

R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28385}
2015-05-13 10:18:26 +00:00
bmeurer
2111d18dba [turbofan] Add frame state before JavaScript comparisons.
Use these check points to optimize comparisons where we already know
that one side cannot be a String (or turn into a string via
ToPrimitive).

Also remove bunch of useless DoNotCrash tests for the scheduler that are
painful to maintain and add almost no value.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28383}
2015-05-13 07:38:35 +00:00
dehrenberg
b57428e9ef Implement %TypedArray%.{fill,find,findIndex}
This patch adds three methods to TypedArrays which are already
implemented for arrays. The implementations are made by calling
out to the underlying code used by Arrays.

R=adamk@chromium.org
BUG=v8:3578
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#28382}
2015-05-13 04:32:08 +00:00
dehrenberg
a863c4d3d8 TypedArray.prototype.copyWithin method
This patch adds the copyWithin method to TypedArrays. For the first
pass, the internals of Array.copyWithin are used. Eventually, a more
efficient form based on memcpy could be used instead.

BUG=v8:3578
LOG=Y
R=adamk@chromium.org, arv@chromium.org, caitpotter88@gmail.com

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

Cr-Commit-Position: refs/heads/master@{#28381}
2015-05-12 19:20:56 +00:00
dslomov
0b620ad5e5 Fix test formatting
TBR=arv@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28380}
2015-05-12 18:12:54 +00:00
arv
547a641e2c [strong] Add more function arity tests
This is a follow up to https://codereview.chromium.org/1115263004/

BUG=v8:3956
LOG=N
R=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28379}
2015-05-12 17:37:25 +00:00
ulan
bbca83c398 Make transition to reduce memory mode more conservative in idle time handler.
BUG=chromium:486005
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#28378}
2015-05-12 17:24:58 +00:00
dslomov
30b771a662 Fix the behavior of 'super.foo' assignment when receiver is not an object.
R=arv@chromium.org,verwaest@chromium.org
BUG=v8:4097
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28377}
2015-05-12 17:13:07 +00:00
conradw
03ef40b46c [strong] Disallow implicit conversions for comparison
Implements the strong mode proposal's restrictions on implicit conversions
for the binary >, >=, <, and <= operators.

BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28370}
2015-05-12 15:23:50 +00:00
verwaest
188297160d Mark internal AccessorInfo properties as "special data properties" to ensure correct strict-mode handling.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28369}
2015-05-12 15:11:13 +00:00
yangguo
46f992ddd0 Reland "Use function wrapper argument to expose internal arrays to native scripts."
Review URL: https://codereview.chromium.org/1138173002

Cr-Commit-Position: refs/heads/master@{#28367}
2015-05-12 14:00:45 +00:00
yangguo
0bbe787448 Migrate error messages, part 10.
R=mvstanton@chromium.org

Committed: https://crrev.com/8608e619afe2b4514b0577bfb73a153b1550d41f
Cr-Commit-Position: refs/heads/master@{#28357}

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

Cr-Commit-Position: refs/heads/master@{#28366}
2015-05-12 13:52:23 +00:00
titzer
e5d5cac7d9 [turbofan] Add AdvancedReducer::ReplaceWithValue() method and convert JSInlining to an AdvancedReducer.
Note that this is just a duplication for now. We'll want to get rid of the
NodeProperties::ReplaceWithValue() method in the long run.

R=bmeurer@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28363}
2015-05-12 12:41:36 +00:00
yangguo
26cb29b891 Revert of Migrate error messages, part 10. (patchset #2 id:20001 of https://codereview.chromium.org/1126043004/)
Reason for revert:
patch didn't apply correctly.

Original issue's description:
> Migrate error messages, part 10.
>
> R=mvstanton@chromium.org
>
> Committed: https://crrev.com/8608e619afe2b4514b0577bfb73a153b1550d41f
> Cr-Commit-Position: refs/heads/master@{#28357}

TBR=mvstanton@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28358}
2015-05-12 08:33:28 +00:00
yangguo
8608e619af Migrate error messages, part 10.
R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28357}
2015-05-12 08:16:57 +00:00
yurys
cf07add227 Don't create debug context if debug listener is not set
If there had been no debug listener v8::Debug::GetDebugContext would have created new context and wouln't have kept reference to it. This way we may well end up with several debug contexts and disabled debugger.

As a side effect this change allows to efficiently distinguish debug context from blink contexts by simply comparing handles.

BUG=chromium:482290
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#28356}
2015-05-12 07:33:18 +00:00
yangguo
c39a0a75ad Revert of Use function wrapper argument to expose internal arrays to native scripts. (patchset #2 id:20001 of https://codereview.chromium.org/1127983003/)
Reason for revert:
custom snapshot builder failing.

Original issue's description:
> Use function wrapper argument to expose internal arrays to native scripts.
>
> R=jkummerow@chromium.org
>
> Committed: https://crrev.com/a9b5a1795449d94387218d25baed2c2b3c4fbadc
> Cr-Commit-Position: refs/heads/master@{#28354}

TBR=jkummerow@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28355}
2015-05-12 07:26:01 +00:00
yangguo
a9b5a17954 Use function wrapper argument to expose internal arrays to native scripts.
R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28354}
2015-05-12 06:14:18 +00:00
dehrenberg
1ebbaaa036 Factor out core of Array.forEach and .every, for use in TypedArrays
The idea is to make this the model for future TypedArray methods.
A possible downside could be lower array method performance
if everything gets polymorhpic (but if enough inlining happens, it
should still be fast), but on the upside, this change means that
the TypedArray methods won't create as much code size bloat.

BUG=v8:3578
LOG=Y
R=adamk@chromium.org
CC=arv@chromium.org, caitpotter88@gmail.com

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

Cr-Commit-Position: refs/heads/master@{#28351}
2015-05-12 01:32:20 +00:00
arv
3226e98020 [strong] Check arity of functions
In strong mode it is an error to call a function with too few
arguments.

This is enforced inside the ArgumentsAdaptorTrampoline.

This does not yet handle rest parameters

BUG=v8:3956
LOG=N
R=rossberg@chromium.org, dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28346}
2015-05-11 17:20:45 +00:00
dslomov
5bbe7992db [destructuring] Implement basic binding destructuring infrastructure
This patch:
  - Refactors Parser::ParseVariableDeclarations
  - Introduces Parser::PatternMatcher class
  - Implements matching a single variable pattern
  - Implements rudimentary matching against object literal pattern
    as a proof of concept

R=arv@chromium.org,rossberg@chromium.org
BUG=v8:811
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28345}
2015-05-11 16:28:22 +00:00
wingo
aefba70586 Remove Scope::scope_uses_this_ flag
R=rossberg@chromium.org
LOG=N
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28343}
2015-05-11 15:42:13 +00:00
wingo
bd56d279b6 Resolve references to "this" the same way as normal variables
Make the parser handle references to "this" as unresolved variables, so the
same logic as for the rest of function parameters is used for the receiver.
Minor additions to the code generation handle copying the receiver to the
context, along with the rest of the function parameters.

Based on work by Adrian Perez de Castro <aperez@igalia.com>.

This is a reapplication of https://codereview.chromium.org/1130733003.

R=rossberg@chromium.org
BUG=v8:2700
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28340}
2015-05-11 11:49:46 +00:00
danno
abc35080b3 Add a MathFloor stub generated with TurboFan
This stub will be used as the basis of a Math.floor-specific CallIC to
detect and track calls to floor that return -0.

Along the way:
- Create a TurboFanCodeStub super class from which the StringLength and
MathRound TF stubs derive.
- Fix the ugly hack that passes the first stub parameter as the "this"
pointer in the the TF-compiled JS function.
- Fix bugs in the ia32/x64 disassembler.

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

Cr-Commit-Position: refs/heads/master@{#28339}
2015-05-11 11:45:02 +00:00
titzer
f750cc09be Add %GetUndetectable() test intrinsic and add tests for undetectables.
R=verwaest@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28338}
2015-05-11 11:28:56 +00:00
wingo
004bb77ec5 Fix more -Werror=sign-compare bugs with GCC 4.9.2
R=svenpanne@chromium.org
LOG=N
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28337}
2015-05-11 11:07:15 +00:00
erikcorry
5bc51bb454 Postpone counters triggered during GC, and use a HandleScope when calling back.
R=jkummerow@chromium.org,hpayer@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28335}
2015-05-11 10:57:53 +00:00
machenbach
19a28dcefd Revert of Add the concept of a V8 extras exports object (patchset #5 id:80001 of https://codereview.chromium.org/1128113006/)
Reason for revert:
[Sheriff] Causes gc stress failures:
http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20gc%20stress/builds/2167

Original issue's description:
> Add the concept of a V8 extras exports object
>
> Exposed to the extras as extrasExports (on the builtins object), on
> which they can put things that should be accessible from C++. Exposed
> to C++ through the V8 API as v8::Context::GetExtrasExportsObject().
>
> Adding a test (in test-api.cc) required adding a simple extra,
> test-extra.js, which we build into the standalone builds.
>
> R=yangguo@chromium.org, jochen@chromium.org
> BUG=
>
> Committed: https://crrev.com/ad547cea05f3e02c67243b682e933fc53ac763d9
> Cr-Commit-Position: refs/heads/master@{#28317}

TBR=jochen@chromium.org,yangguo@chromium.org,domenic@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28332}
2015-05-11 08:19:58 +00:00
yangguo
7f4fa3b8f1 Call builtin code wrapped in functions from the bootstrapper.
For the moment, we only pass the global object (the one we are setting up).
A few smaller changes were necessary to avoid failures in
test-object-observe/DontLeakContextOnObserve. Otherwise the global object
would be retained by being context allocated, leading to test failure.

R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28331}
2015-05-11 08:14:50 +00:00
jkummerow
f10b992dab Let Runtime_GrowArrayElements accept non-Smi numbers as |key|.
BUG=chromium:485410
LOG=y
R=mvstanton@chromium.org,danno@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28327}
2015-05-09 10:30:49 +00:00
dehrenberg
ca9d499f75 Make one copy for all TypedArray methods
This is the first step of converting TypedArrays to the proper
proto chain. There is one copy for each of the Harmony TypedArray
methods, rather than a version for each TypedArray type. This
form prevents accidentally baking in knowledge about a particular
array type into the method definition.

R=adamk@chromium.org, arv@chromium.org, caitpotter88@gmail.com, dslomov@chromium.org, jochen@chromium.org
BUG=v8:4085
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#28325}
2015-05-09 01:20:07 +00:00
titzer
318c1f770c [turbofan] Fix handling of OsrLoopEntry in ControlReducer::ConnectNTL()
R=jarin@chromium.org
LOG=Y
BUG=chromium:485908

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

Cr-Commit-Position: refs/heads/master@{#28323}
2015-05-08 15:44:27 +00:00
martyn.capewell
6e6d956e11 [turbofan] Use sbfx in ARM64 instruction selector
Select sbfx for ((x << k) >> k) in ARM64 instruction selector, and similarly
for ubfx. This is a more generic version of the previous sxtb/h selector.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#28318}
2015-05-08 12:51:43 +00:00
domenic
ad547cea05 Add the concept of a V8 extras exports object
Exposed to the extras as extrasExports (on the builtins object), on
which they can put things that should be accessible from C++. Exposed
to C++ through the V8 API as v8::Context::GetExtrasExportsObject().

Adding a test (in test-api.cc) required adding a simple extra,
test-extra.js, which we build into the standalone builds.

R=yangguo@chromium.org, jochen@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28317}
2015-05-08 12:06:35 +00:00
hpayer
c80d730c71 Initialize sub-array literals first before pointing to it.
BUG=484544
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#28313}
2015-05-08 09:24:31 +00:00
bmeurer
189609e197 [turbofan] Float32Abs and Float64Abs are supported by all backends.
The Float32Abs and Float64Abs operators are supported by all TurboFan
backends, so we no longer need the flags for them.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28310}
2015-05-08 08:25:05 +00:00
dehrenberg
60e674c11e TypedArray.prototype.every method
BUG=v8:3578
LOG=Y
R=adamk@chromium.org, dslomov@chromium.org, svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28301}
2015-05-07 15:54:19 +00:00
ulan
ae6a0b8075 Add mode to reduce memory usage in idle notification.
While the mutator is active, the idle time handler optimizes for latency by doing only incremental steps and scavenges.

When the mutator becomes inactive, the idle time handler forces few incremental GCs to reclaim memory and then stops until mutator is active again.

BUG=460090
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28300}
2015-05-07 14:41:54 +00:00
kozyatinskiy
112f8dc97a [V8] Reland https://codereview.chromium.org/1121833003/
Chromium tests were prepared in https://codereview.chromium.org/1118743003/ and https://codereview.chromium.org/1135493002/.
Blink tests in https://codereview.chromium.org/1115193002/

LOG=Y
BUG=chromium:480652
R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28295}
2015-05-07 11:49:09 +00:00
yangguo
976b6b2ce5 Skip test-heap/NoWeakHashTableLeakWithIncrementalMarking for no-snap builds.
TBR=machenbach@chromium.org
NOTREECHECKS=true

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

Cr-Commit-Position: refs/heads/master@{#28293}
2015-05-07 10:25:41 +00:00
ulan
d77839fd01 Add aggregated memory histograms.
This introduces V8.MemoryHeapCommitted and V8.MemoryHeapUsed histograms.

In contrast to the existing memory histograms, the new histograms are uniform in time, i.e. their samples happen at regular time intervals. The --histogram-interval specifies the length of the interval.

We implement this by linearly interpolating memory stats between GC and idle notification events.

BUG=chromium:485472
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#28292}
2015-05-07 10:03:41 +00:00
yangguo
f8db4327ad Migrate error messages, part 9.
R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28291}
2015-05-07 10:00:23 +00:00
yangguo
2f9411df89 Revert of Revert of Wrap runtime.js in a function. (patchset #1 id:1 of https://codereview.chromium.org/1123353004/)
Reason for revert:
Failing test has been fixed.

Original issue's description:
> Revert of Wrap runtime.js in a function. (patchset #2 id:20001 of https://codereview.chromium.org/1126213002/)
>
> Reason for revert:
> [Sheriff] Breaks nosnap:
> http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap/builds/2872
>
> Original issue's description:
> > Wrap runtime.js in a function.
> >
> > R=jkummerow@chromium.org
> >
> > Committed: https://crrev.com/65c56d49b2d671ac9e379de726bff3eb03a508c1
> > Cr-Commit-Position: refs/heads/master@{#28275}
>
> TBR=jkummerow@chromium.org,yangguo@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://crrev.com/62bd294f909ff448d0f876a3d745966a24cdc3f7
> Cr-Commit-Position: refs/heads/master@{#28277}

TBR=jkummerow@chromium.org,machenbach@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28287}
2015-05-07 08:39:53 +00:00
yangguo
47e1c27649 Run test-heap/NoWeakHashTableLeakWithIncrementalMarking with a clean slate.
R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28286}
2015-05-07 08:37:55 +00:00
machenbach
36f5f40074 Revert of Remove Scope::scope_uses_this_ flag (patchset #1 id:1 of https://codereview.chromium.org/1129823002/)
Reason for revert:
The reason for reverting is: [Sheriff] Need to fix compilation after this revert:
5cab6be83a

Original issue's description:
> Remove Scope::scope_uses_this_ flag
>
> Use of the "this" variable is now tracked using scopes, like any other variable.
>
> R=arv@chromium.org
> LOG=N
> BUG=
>
> Committed: https://crrev.com/afba55965118d9ba57e53c729f52be2340e626e0
> Cr-Commit-Position: refs/heads/master@{#28268}

TBR=arv@chromium.org,wingo@igalia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28285}
2015-05-07 07:47:11 +00:00
machenbach
b8ff13111a Revert of Remove Scope::scope_uses_arguments_ flag (patchset #1 id:1 of https://codereview.chromium.org/1124233002/)
Reason for revert:
[Sheriff] Need to fix compilation after this revert:
5cab6be83a

Original issue's description:
> Remove Scope::scope_uses_arguments_ flag
>
> Use of arguments is tracked as a variable, like any other variable.
>
> R=arv@chromium.org
> LOG=N
> BUG=
>
> Committed: https://crrev.com/d4ea33f480243fb5b7d2cca6edddcaa3e9478e29
> Cr-Commit-Position: refs/heads/master@{#28271}

TBR=arv@chromium.org,wingo@igalia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28284}
2015-05-07 07:42:29 +00:00
machenbach
5cab6be83a Revert of Resolve references to "this" the same way as normal variables (patchset #2 id:20001 of https://codereview.chromium.org/1130733003/)
Reason for revert:
[Sheriff] Breaks jetstream benchmark with errors like this:

>>> Running suite: JetStream/bigfib.cpp
>>> Stdout (#1):
undefined:93: ReferenceError: this is not defined
  this['Module'] = Module;
  ^
ReferenceError: this is not defined
    at eval (eval at __run (runner.js:13:3), <anonymous>:93:3)
    at eval (native)
    at __run (runner.js:13:3)
    at Object.runSimpleBenchmark (runner.js:44:31)
    at runner.js:97:13

Original issue's description:
> Resolve references to "this" the same way as normal variables
>
> Make the parser handle references to "this" as unresolved variables, so the
> same logic as for the rest of function parameters is used for the receiver.
> Minor additions to the code generation handle copying the receiver to the
> context, along with the rest of the function parameters.
>
> Based on work by Adrian Perez de Castro <aperez@igalia.com>.
>
> BUG=v8:2700
> LOG=N
>
> Committed: https://crrev.com/06a792b7cc2db33ffce7244c044a9c05afbb6116
> Cr-Commit-Position: refs/heads/master@{#28263}

TBR=rossberg@chromium.org,arv@chromium.org,wingo@igalia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:2700

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

Cr-Commit-Position: refs/heads/master@{#28283}
2015-05-07 07:20:49 +00:00
yangguo
d4f014f676 Fix typo in test-heap/NoWeakHashTableLeakWithIncrementalMarking
NOTRY=true
TBR=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28282}
2015-05-07 06:13:01 +00:00
machenbach
62bd294f90 Revert of Wrap runtime.js in a function. (patchset #2 id:20001 of https://codereview.chromium.org/1126213002/)
Reason for revert:
[Sheriff] Breaks nosnap:
http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap/builds/2872

Original issue's description:
> Wrap runtime.js in a function.
>
> R=jkummerow@chromium.org
>
> Committed: https://crrev.com/65c56d49b2d671ac9e379de726bff3eb03a508c1
> Cr-Commit-Position: refs/heads/master@{#28275}

TBR=jkummerow@chromium.org,yangguo@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28277}
2015-05-06 20:03:11 +00:00
yangguo
65c56d49b2 Wrap runtime.js in a function.
R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28275}
2015-05-06 19:25:00 +00:00
wingo
d4ea33f480 Remove Scope::scope_uses_arguments_ flag
Use of arguments is tracked as a variable, like any other variable.

R=arv@chromium.org
LOG=N
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28271}
2015-05-06 16:25:21 +00:00
caitpotter88
fda20efb2f [es6] implement Object.assign
BUG=v8:4007
LOG=N
R=arv@chromium.org, rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28270}
2015-05-06 16:17:50 +00:00
wingo
afba559651 Remove Scope::scope_uses_this_ flag
Use of the "this" variable is now tracked using scopes, like any other variable.

R=arv@chromium.org
LOG=N
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28268}
2015-05-06 15:50:06 +00:00
conradw
382435480d [es6] Fix symbol comparison on some architectures
https://codereview.chromium.org/1125783002 did not handle all cases for some
architectures. These cases are now covered, and tests have been extended to
check them.

BUG=v8:4073
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28266}
2015-05-06 15:04:47 +00:00
wingo
06a792b7cc Resolve references to "this" the same way as normal variables
Make the parser handle references to "this" as unresolved variables, so the
same logic as for the rest of function parameters is used for the receiver.
Minor additions to the code generation handle copying the receiver to the
context, along with the rest of the function parameters.

Based on work by Adrian Perez de Castro <aperez@igalia.com>.

BUG=v8:2700
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28263}
2015-05-06 14:18:08 +00:00
ben
6618793e87 Add ObjectTemplate::New() taking FunctionTemplate.
I know the bug has been closed but this seems like a simple addition that may
be useful in other ways as well.

BUG=v8:2180
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28261}
2015-05-06 14:10:44 +00:00
bmeurer
203438d9bc [turbofan] Connect non-terminating loops via Terminate.
This revives the Terminate operator and removes the weird Always
operator. As a first step we let the ControlReducer connect non
terminating loops via Terminate. The next step will be to change the
graph builder to insert Terminate nodes into every loop.

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

Cr-Commit-Position: refs/heads/master@{#28259}
2015-05-06 12:51:44 +00:00
titzer
6d26ec0b4c Implement IdentityMap<V>, a robust, GC-safe object-identity HashMap.
R=hpayer@chromium.org, erikcorry@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28257}
2015-05-06 12:40:29 +00:00
conradw
97bee8e964 [strong] Fix inlining issue
The Hydrogen representation for binops was never changed to care about the
language mode. We thought this was ok, but it turns out we need to keep track
of it to make sure inlining doesn't mess with the "strongness" of binops.

Also added more rigorous inlining testing.

BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28253}
2015-05-06 10:40:38 +00:00
bmeurer
7b33409ba3 [turbofan] Add support for advanced reducers.
An AdvancedReducer is basically a regular Reducer with an editor
that can perform graph editing operations beyond changing or
replacing the node that is currently being reduced. The GraphReducer
is the default implementation of the AdvancedReducer::Editor interface.

The ControlReducerImpl is now just an AdvancedReducer, which
temporarily requires a Finish method in the reducer to implement
the dead node trimming until we move that to the GraphReducer
(which in turn requires that all loops are connected to End).

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

Cr-Commit-Position: refs/heads/master@{#28251}
2015-05-06 10:12:52 +00:00
yangguo
a5de69f4f8 Migrate error messages, part 8.
R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28250}
2015-05-06 07:52:05 +00:00
machenbach
f192f4cadd [test] Mark test as flaky.
TBR=yangguo@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28249}
2015-05-06 07:34:01 +00:00
yangguo
8b6c2a805d Mark mjsunit/allocation-site-info.js as NO_VARIANTS.
NOTRY=true
TBR=machenbach@chromium.org
BUG=4078
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28248}
2015-05-06 07:20:57 +00:00
machenbach
4a2b4cdbf8 Revert of [V8] Reland https://codereview.chromium.org/1100993003/ (patchset #1 id:1 of https://codereview.chromium.org/1121833003/)
Reason for revert:
[Sheriff] Speculative revert for breaking layout tests - will reland if it doesn't help:
http://build.chromium.org/p/client.v8/builders/V8-Blink%20Linux%2064/builds/3178

Original issue's description:
> [V8] Reland https://codereview.chromium.org/1100993003/
>
> Chromium tests were prepared in https://codereview.chromium.org/1118743003/
> Blink tests in https://codereview.chromium.org/1115193002/
>
> LOG=Y
> BUG=chromium:480652
> R=yangguo@chromium.org
>
> Committed: https://crrev.com/19b62e211d1829108e5c85c5043dd755afa17178
> Cr-Commit-Position: refs/heads/master@{#28229}

TBR=yangguo@chromium.org,kozyatinskiy@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:480652

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

Cr-Commit-Position: refs/heads/master@{#28247}
2015-05-06 06:59:43 +00:00
chunyang.dai
1f28a3df07 Disable RunAllocate test case for turbofan unsupported platform.
"RunAllocate" test case is added in d6945db7. it invokes Linkage::GetStubCallDescriptor
   which is unimplemented for turbofan unsupported platform.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#28244}
2015-05-06 02:04:57 +00:00
dslomov
cf53fed972 Handle the case when derived constructor is [[Call]]ed with 0 args.
ArgumentsAdaptorStub for derived constructor (the one that needs
new.target) works in this way:
 - If the constructor is invoked via the Construct stub, we know that
   actual arguments always include new.target. ``arguments`` object
   however should not include a new.target, therefore we remove it.
   We achieve this by decrementing the argument count.
 - If the constructor is invoked as a call, we do not care for a correct
   ``arguments`` array since the constructor will immediately throw on
   entrance.
The bug is that the call could actually pass 0 actual arguments, but I
decrement unconditionally :(. The fix is to detect this case and avoid
decrementing. ``arguments`` is bogus, but it is ok as constructor
throws.

Long-term we should just remove mucking about with arguments for
new.target and just get it from the stack.

R=arv@chromium.org,rossberg@chromium.org
BUG=chromium:474783
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#28242}
2015-05-05 19:57:04 +00:00
wingo
1e4173d93a Revert of Resolve references to "this" the same way as normal variables (patchset #11 id:240001 of https://codereview.chromium.org/1097283003/)
Reason for revert:
nosnap failures

Original issue's description:
> Resolve references to "this" the same way as normal variables
>
> Make the parser handle references to "this" as unresolved variables, so the
> same logic as for the rest of function parameters is used for the receiver.
> Minor additions to the code generation handle copying the receiver to the
> context, along with the rest of the function parameters.
>
> Based on work by Adrian Perez de Castro <aperez@igalia.com>.
>
> BUG=
> LOG=N
>
> Committed: https://crrev.com/18619d355192e2699203d12d9ebb9caea107b693
> Cr-Commit-Position: refs/heads/master@{#28236}

TBR=rossberg@chromium.org,mstarzinger@chromium.org,dslomov@chromium.org,adamk@chromium.org,arv@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28238}
2015-05-05 17:24:25 +00:00
danno
a988d5f261 Revert of Collect type feedback on result of Math.[round|ceil|floor] (patchset #13 id:230001 of https://codereview.chromium.org/1053143005/)
Reason for revert:
All sorts of performance regressions

Original issue's description:
> Collect type feedback on result of Math.[round|ceil|floor]
>
> By recording invocations of these builtins that can return -0, we now learn to not emit Crankshaft code that only handles integer results, avoiding deopt loops.
>
> Committed: https://crrev.com/f36ecaf3a4d61568ca50a20718acce7dd5da9a5f
> Cr-Commit-Position: refs/heads/master@{#28215}

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

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

Cr-Commit-Position: refs/heads/master@{#28237}
2015-05-05 16:42:16 +00:00
wingo
18619d3551 Resolve references to "this" the same way as normal variables
Make the parser handle references to "this" as unresolved variables, so the
same logic as for the rest of function parameters is used for the receiver.
Minor additions to the code generation handle copying the receiver to the
context, along with the rest of the function parameters.

Based on work by Adrian Perez de Castro <aperez@igalia.com>.

BUG=
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28236}
2015-05-05 16:38:22 +00:00
kozyatinskiy
19b62e211d [V8] Reland https://codereview.chromium.org/1100993003/
Chromium tests were prepared in https://codereview.chromium.org/1118743003/
Blink tests in https://codereview.chromium.org/1115193002/

LOG=Y
BUG=chromium:480652
R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28229}
2015-05-05 14:21:12 +00:00
arv
d26f5d3923 [es6] When comparing two symbols we may need to throw a TypeError
When comparing a symbol to istself using <, <=, > or >= we need to
throw a TypeError. This is correctly handled in the runtime function
so if we are comparing a symbol fall back to use the runtime.

BUG=v8:4073
LOG=Y
R=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28226}
2015-05-05 14:17:46 +00:00
yangguo
7546302b67 Move more parts of stack trace formatting to runtime.
R=ishell@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28223}
2015-05-05 14:17:43 +00:00
bmeurer
d21de2a48b [turbofan] Fix tail call optimization.
Tail calls are matched on the graph, with a dedicated tail call
optimization that is actually testable. The instruction selection can
still fall back to a regular if the platform constraints don't allow to
emit a tail call (i.e. the return locations of caller and callee differ
or the callee takes non-register parameters, which is a restriction that
will be removed in the future).

Also explicitly limit tail call optimization to stubs for now and drop
the global flag.

BUG=v8:4076
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#28219}
2015-05-05 09:43:02 +00:00
yangguo
b0eb920fe2 Reland #2 "Wrap v8natives.js into a function."
TBR=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28217}
2015-05-05 09:16:01 +00:00
yangguo
a3ddb1bc42 Migrate error messages, part 7.
R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28216}
2015-05-05 07:57:36 +00:00
danno
f36ecaf3a4 Collect type feedback on result of Math.[round|ceil|floor]
By recording invocations of these builtins that can return -0, we now learn to not emit Crankshaft code that only handles integer results, avoiding deopt loops.

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

Cr-Commit-Position: refs/heads/master@{#28215}
2015-05-05 07:55:58 +00:00
alph
6964a9e068 Make CPU profiler do not hog 100% of CPU.
Tick event processor should not stay in a tight loop
when there's nothing to do. It can go sleep until next sample event.

LOG=N
BUG=v8:3967

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

Cr-Commit-Position: refs/heads/master@{#28211}
2015-05-04 22:53:28 +00:00
machenbach
6afc0dcbfc Revert of Reland "Wrap v8natives.js into a function." (patchset #2 id:20001 of https://codereview.chromium.org/1123703002/)
Reason for revert:
[Sheriff] Speculative revert for braking arm64 nosnap:
http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20nosnap%20-%20debug%20-%202/builds/2314

(reverted already titzer's CL which didn't help)

Original issue's description:
> Reland "Wrap v8natives.js into a function."
>
> Committed: https://crrev.com/72ab42172979b60a1b784ea0c6a495d7ee2bba67
> Cr-Commit-Position: refs/heads/master@{#28193}

TBR=jkummerow@chromium.org,yangguo@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28208}
2015-05-04 16:49:58 +00:00
jarin
b5b47e1f88 Remove materialized objects on stack unwind.
BUG=v8:3985
LOG=n
R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28206}
2015-05-04 16:44:01 +00:00
verwaest
f21ea065b3 Fix smi scanning
BUG=chromium:483176
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#28202}
2015-05-04 15:02:30 +00:00
akos.palfi
2cdd74b3ae MIPS: Skip test-simplified-lowering/RunNumberDivide_2_TruncatingToUint32.
This test fails on board, temporarily skip failing test until we resolve this issue.

NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28201}
2015-05-04 14:14:36 +00:00
mstarzinger
d6945db703 [turbofan] Add SimplifiedOperator::Allocate operator.
This introduces a simplified allocation operator which can be used to
model inline allocations in TurboFan. It is currently used for context
allocations, but still disabled because change lowering introduces
floating allocations outside the effect chain that interfere.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28195}
2015-05-04 12:07:12 +00:00
yangguo
72ab421729 Reland "Wrap v8natives.js into a function."
Review URL: https://codereview.chromium.org/1123703002

Cr-Commit-Position: refs/heads/master@{#28193}
2015-05-04 11:17:01 +00:00
yangguo
f42544b768 Set inferred name of bound function to empty string.
Otherwise it's whatever the js minifier assigns it to.

R=jkummerow@chromium.org
BUG=chromium:484077
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28190}
2015-05-04 09:55:43 +00:00
machenbach
8e3d776dcb Revert of [V8] Use previous token location as EOS token location (patchset #2 id:20001 of https://codereview.chromium.org/1100993003/)
Reason for revert:
[Sheriff] Speculative revert. This seems to block the current roll:
https://codereview.chromium.org/1124463003/

This bisect also points at this CL:
https://codereview.chromium.org/1124523002/

Please prepare the chromium side tests before a reland.

Original issue's description:
> [V8] Use previous token location as EOS token location
>
> EOS token location is useless for users and messages.js are not ready for its location.
> With this CL we use location of token before EOS for it.
>
> LOG=Y
> BUG=chromium:480652
> R=yurys@chromium.org,yangguo@chromium.org
>
> Committed: https://crrev.com/81afc9313ce84350bcba9f84b255a77e97cd3726
> Cr-Commit-Position: refs/heads/master@{#28164}

TBR=yangguo@chromium.org,yurys@chromium.org,kozyatinskiy@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:480652

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

Cr-Commit-Position: refs/heads/master@{#28187}
2015-05-03 12:47:51 +00:00
machenbach
b0b82fa89d Revert of Wrap v8natives.js into a function. (patchset #2 id:20001 of https://codereview.chromium.org/1109343004/)
Reason for revert:
[Sheriff] Speculative revert for breaking layout tests, e.g.:
http://build.chromium.org/p/client.v8/builders/V8-Blink%20Linux%2064%20%28dbg%29/builds/2682

See. e.g.:
https://storage.googleapis.com/chromium-layout-test-archives/V8-Blink_Win/3130/layout-test-results/http/tests/websocket/workers/worker-reload-diff.txt

Original issue's description:
> Wrap v8natives.js into a function.
>
> R=jkummerow@chromium.org
>
> Committed: https://crrev.com/ee1b39b4303829e6c6805fe8b2f2602b13f6463a
> Cr-Commit-Position: refs/heads/master@{#28174}

TBR=jkummerow@chromium.org,yangguo@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28182}
2015-04-30 17:33:19 +00:00
dusan.milosavljevic
76ddd58cff MIPS: Add min/max suffixed variants.
TEST=
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28181}
2015-04-30 16:43:09 +00:00
yangguo
ac50edfee0 Migrate error messages, part 6. (string.js and date.js)
R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28180}
2015-04-30 16:22:05 +00:00
yangguo
3ba71e1bbd Cache experimental natives sources as external strings.
R=ulan@chromium.org
BUG=v8:4054
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28176}
2015-04-30 15:10:45 +00:00
yangguo
0327f8de2e Disable stack trace preprocessing.
This has to wait until issue 4065 has been fixed.

R=ulan@chromium.org
BUG=v8:2340, v8:4065, chromium:482312
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28175}
2015-04-30 15:04:25 +00:00
yangguo
ee1b39b430 Wrap v8natives.js into a function.
R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28174}
2015-04-30 14:59:09 +00:00
mstarzinger
986e242976 [test] Remove pesky MachineCallHelper from inheritance chain.
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28173}
2015-04-30 14:51:54 +00:00
titzer
b0dcf6abf2 Allow TurboFan to compile more methods.
Reorganize some bailout conditions to be after the decision to use TurboFan.

R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28172}
2015-04-30 14:50:45 +00:00
dcarney
4fe546c785 [test] make instruction sequence test emit cfgs more like the scheduler
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28167}
2015-04-30 13:39:16 +00:00
machenbach
1621dbf370 [test] Mark test as flaky.
BUG=v8:3803
LOG=n
TBR=mstarzinger@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28166}
2015-04-30 13:25:09 +00:00
kozyatinskiy
81afc9313c [V8] Use previous token location as EOS token location
EOS token location is useless for users and messages.js are not ready for its location.
With this CL we use location of token before EOS for it.

LOG=Y
BUG=chromium:480652
R=yurys@chromium.org,yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28164}
2015-04-30 12:44:54 +00:00
mvstanton
fb8e613638 Use a stub in crankshaft for grow store arrays.
We were deopting without learning anything.

This is a rebase/reland of https://codereview.chromium.org/368263003

BUG=v8:3417
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28163}
2015-04-30 12:34:10 +00:00
mstarzinger
00639c7511 [test] Remove DirectGraphBuilder helper.
R=bmeurer@chromium.org
TEST=cctest/test-js-context-specialization

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

Cr-Commit-Position: refs/heads/master@{#28160}
2015-04-30 12:06:24 +00:00
conradw
dea0d9b59e [strong] Disallow implicit conversions for add
Implements the strong mode proposal's restrictions on implicit conversions
for the binary + operator. Test suite is also cleaned up/refactored to allow
easier testing of the comparison operators in the future.

BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28159}
2015-04-30 11:46:08 +00:00
jochen
ac1c88a9b2 Reland "Remove the weak list of array buffers"
Original issue's description:
> Remove the weak list of array buffers
>
> Instead, collect live array buffers during marking and free pointers we
> no longer found.
>
> BUG=v8:3996
> R=hpayer@chromium.org
> LOG=n

BUG=v8:3996
TBR=hpayer@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#28156}
2015-04-30 10:57:51 +00:00
yangguo
7681432dbf JSON serializer should fail gracefully for special value wrappers.
R=mstarzinger@chromium.org
BUG=chromium:471702
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28154}
2015-04-30 10:02:21 +00:00
bmeurer
b9d583d581 [turbofan] Don't spread global flag checks all over the compiler code.
Better encapsulate the source position handling in TurboFan.

R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28153}
2015-04-30 09:56:31 +00:00
svenpanne
4b122b7504 Detect simple tail calls
This CL contains the first steps towards tail call optimization:

  * Structurally detect tail calls during instruction selection,
    looking for special return/call combinations.

  * Added new architecture-specific instructions for tail calls which
    jump instead of call and take care of frame adjustment.

  * Moved some code around.

Currently we restrict tail calls to callees which only use registers
for arguments/return value and to call sites which are explicitly
marked as being OK for tail calls. This excludes, among other things,
call sites in sloppy JS functions and our IC machinery (both need in
general to be able to access the caller's frame).

All this is behind a flag --turbo-tail-calls, which is currently off
by default, so it can easily be toggled.

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

Cr-Commit-Position: refs/heads/master@{#28150}
2015-04-30 09:10:28 +00:00
machenbach
3e25666c79 Revert of Remove the weak list of array buffers (patchset #8 id:140001 of https://codereview.chromium.org/1114563002/)
Reason for revert:
[Sheriff] Crashes in layout tests:
https://chromegw.corp.google.com/i/client.v8/builders/V8-Blink%20Linux%2064%20%28dbg%29/builds/2668

Original issue's description:
> Remove the weak list of array buffers
>
> Instead, collect live array buffers during marking and free pointers we
> no longer found.
>
> BUG=v8:3996
> R=hpayer@chromium.org
> LOG=n
>
> Committed: https://crrev.com/2d39709cf5ee17637f6f2d75380a9e61ae0b342b
> Cr-Commit-Position: refs/heads/master@{#28132}

TBR=dslomov@chromium.org,hpayer@chromium.org,jochen@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3996

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

Cr-Commit-Position: refs/heads/master@{#28148}
2015-04-30 08:38:24 +00:00
bmeurer
cf420ec337 [base] Drop obsolete Thread::YieldCPU.
The method is not used anywhere, and it is a bad idea in general anyway.
If you see a need to call YieldCPU, then you're code is probably in need
of a redesign!

R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28147}
2015-04-30 08:08:54 +00:00
michael_dawson
41cb1e51b9 Switch to larger TOC on AIX for unitttests
Switch to larger TOC on AIX for unitttests as the size has grown
such that it no longer compiles with the default TOC size

	modified:   unittests.gyp

R=danno@chromium.org, svenpanne@chromium.org, mbrandy@us.ibm.com

BUG=

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

Cr-Commit-Position: refs/heads/master@{#28144}
2015-04-30 07:50:27 +00:00
Djordje.Pesic
9da34c56a1 MIPS: Add rounding support in simulator and RINT instruction.
Added rounding according to fcsr, CVT_W_D and RINT.D instruction in assembler, dissasembler and simulator and wrote appropiate tests.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#28143}
2015-04-30 06:29:16 +00:00
dcarney
81345f1a2c Reland: [turbofan] add MachineType to AllocatedOperand
- allows the optimization of emitted gap move code since the representation of the value in the register is known
- necessary preparation for vector register allocation
- prepare for slot sharing for any value of the same byte width

TBR=jarin@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28140}
2015-04-29 19:36:25 +00:00
machenbach
7eccb18148 Revert of [turbofan] add MachineType to AllocatedOperand (patchset #17 id:310001 of https://codereview.chromium.org/1087793002/)
Reason for revert:
[Sheriff] Breaks compile on chromium asan and v8 msan:
http://build.chromium.org/p/client.v8/builders/Linux%20ASAN%20Builder/builds/3446
http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/builds/2085

Original issue's description:
> [turbofan] add MachineType to AllocatedOperand
>
> - allows the optimization of emitted gap move code since the representation of the value in the register is known
> - necessary preparation for vector register allocation
> - prepare for slot sharing for any value of the same byte width
>
> BUG=
>
> Committed: https://crrev.com/3a025d1ab6437559f86a464767aa03d2d9789f6f
> Cr-Commit-Position: refs/heads/master@{#28137}

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

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

Cr-Commit-Position: refs/heads/master@{#28139}
2015-04-29 18:28:47 +00:00
mstarzinger
de88984334 [test] Remove deprecated GraphTester helper class.
R=bmeurer@chromium.org
TEST=cctest/test-node

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

Cr-Commit-Position: refs/heads/master@{#28138}
2015-04-29 15:16:11 +00:00
dcarney
3a025d1ab6 [turbofan] add MachineType to AllocatedOperand
- allows the optimization of emitted gap move code since the representation of the value in the register is known
- necessary preparation for vector register allocation
- prepare for slot sharing for any value of the same byte width

BUG=

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

Cr-Commit-Position: refs/heads/master@{#28137}
2015-04-29 14:46:19 +00:00
mstarzinger
4bc2beab97 [test] Turn compiler/test-node-cache into a unit test.
R=jarin@chromium.org
TEST=unittests/NodeCacheTest

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

Cr-Commit-Position: refs/heads/master@{#28136}
2015-04-29 14:40:05 +00:00
mstarzinger
58b0023fa8 [test] Remove deprecated cctest/test-node-algorithm tests.
R=jarin@chromium.org
TEST=cctest/test-graph-visualizer

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

Cr-Commit-Position: refs/heads/master@{#28134}
2015-04-29 14:13:29 +00:00
jochen
2d39709cf5 Remove the weak list of array buffers
Instead, collect live array buffers during marking and free pointers we
no longer found.

BUG=v8:3996
R=hpayer@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#28132}
2015-04-29 13:04:55 +00:00
dslomov
cec53692d1 Destructuring: add more parssing tests.
R=arv@chromium.org
BUG=v8:811
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28131}
2015-04-29 13:03:35 +00:00
jochen
9ba5fe028f Pass ArrayBuffer::Allocator via Isolate::CreateParams
We shouldn't have shared state between isolates by default. The embedder
is free to pass the same allocator to all isolates it creates.

BUG=none
R=dcarney@chromium.org
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#28127}
2015-04-29 09:54:43 +00:00
jkummerow
22f2b13fa8 Fix unobservable constructor replacement on prototype maps
BUG=chromium:478522
LOG=y
R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28126}
2015-04-29 09:31:51 +00:00
machenbach
38a8d369b7 [test] Skip tests on msan.
NOTRY=true
BUG=chromium:425187
LOG=n
TBR=Sven Panne, titzer

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

Cr-Commit-Position: refs/heads/master@{#28122}
2015-04-29 07:19:59 +00:00
arv
525f7c85b9 Import webkit class tests
BUG=v8:3330
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28115}
2015-04-28 16:42:46 +00:00
arv
baddc25eb2 [es6] Fix return checking in derived constructors
In a derived class constructor in case undefined is returned, we
should return the receiver. If the return is any other value type
we should throw a TypeError.

BUG=v8:4061
LOG=N
R=dslomov@chromium.org, adamk@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28114}
2015-04-28 16:09:30 +00:00
dslomov
80bf5686fa Parsing binding patterns.
Just parsing, no desugaring yet.

R=arv@chromium.org,rossberg@chromium.org
BUG=v8:811
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28112}
2015-04-28 15:15:09 +00:00
jochen
b584bab2f5 Remove support for malloc'd typed arrays
All typed arrays should be allocated through the array buffer allocator

BUG=none
R=dcarney@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#28105}
2015-04-28 11:24:55 +00:00
conradw
6988aec61f [strong] Disallow implicit conversions for bitwise ops, shifts
See https://codereview.chromium.org/1092353002/

Due to parser rewrites, also implements restrictions for unary ~.

Still to come, implementing restrictions for binary + and comparison.

BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28104}
2015-04-28 11:19:49 +00:00
machenbach
b3000dda14 [test] Skip unsuitable tests for msan.
NOTRY=true
BUG=chromium:425187
LOG=n
TBR=Sven Panne, titzer

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

Cr-Commit-Position: refs/heads/master@{#28103}
2015-04-28 11:18:12 +00:00
yangguo
46b3582f48 Reland: Preprocess structured stack trace on GC to get rid of code reference.
BUG=v8:2340
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28102}
2015-04-28 11:12:56 +00:00
yangguo
4d12e94801 Port CallSite methods to C++.
The goal is to port all of error stack trace formatting to C++.
We will do this bottom up, by first porting helper functions.

Eventually, CallSite methods will only be used when a custom
error stack trace formatter is defined via Error.prepareStackTrace.

R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28095}
2015-04-28 08:52:47 +00:00
bmeurer
4486c47d9b [clang] Use -Wshorten-64-to-32 to enable warnings about 64bit to 32bit truncations.
Currently only the Win64 bots report this warnings, which adds quite
some overhead to the development process. With this flag we also get
compiler warnings about implicit 64bit to 32bit truncations when
building with clang on Linux/x64 and Mac/x64.

R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28093}
2015-04-28 06:53:41 +00:00
chunyang.dai
e31f5ec7eb Disable two test cases for turbofan unsupported platform.
These two test cases "InlineCreateArrayLiteral" and "InlineCreateObjectLiteral" are
  added in d1597b7d22. They invokes Linkage::GetStubCallDescriptor
  which is unimplemented for turbofan unsupported platform.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#28090}
2015-04-27 17:02:27 +00:00
dslomov
919c54910f Revert of Preprocess structured stack trace on GC to get rid of code reference. (patchset #5 id:80001 of https://codereview.chromium.org/1103843002/)
Reason for revert:
Broke GCStress

Original issue's description:
> Preprocess structured stack trace on GC to get rid of code reference.
>
> R=verwaest@chromium.org
> BUG=v8:2340
> LOG=N
>
> Committed: https://crrev.com/462ffa1dfa0ab3a851ea0294470d1ed7ed12dd56
> Cr-Commit-Position: refs/heads/master@{#28085}

TBR=verwaest@chromium.org,ulan@chromium.org,hpayer@chromium.org,yurys@chromium.org,yangguo@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:2340

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

Cr-Commit-Position: refs/heads/master@{#28086}
2015-04-27 15:53:23 +00:00
yangguo
462ffa1dfa Preprocess structured stack trace on GC to get rid of code reference.
R=verwaest@chromium.org
BUG=v8:2340
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28085}
2015-04-27 14:50:39 +00:00
erikcorry
da66e720a3 Do more to avoid last-resort stop-the-world GC
BUG=chromium:481433
R=hpayer@chromium.org
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#28082}
2015-04-27 14:10:05 +00:00
jkummerow
f6187fb3b5 Reland "Lazily register prototype users..."
...when handing out validity cells to handlers; because invalidating said cells is
the only time we'll need the user registrations.
Along the way, fix a corner case in WeakFixedArray, which can now be empty after
the recently introduced compaction support.

This reverts commit 968715c653.

Original review: https://codereview.chromium.org/1104813004/

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

Cr-Commit-Position: refs/heads/master@{#28076}
2015-04-27 12:59:36 +00:00
yangguo
77e37028c6 Wrap messages implementation in a function.
R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28074}
2015-04-27 12:33:34 +00:00
titzer
6e82fbfbaf [turbofan] Reland: Optimize loads from the global object in JSTypeFeedbackSpecializer.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28073}
2015-04-27 12:15:06 +00:00
titzer
da1f8d6399 Disable test-run-jsexceptions for nosnap builds.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28069}
2015-04-27 11:18:14 +00:00
Benedikt Meurer
2d827809e0 [turbofan] Add language mode to JSCallFunction operator.
Also do some drive-by-cleanup to the unittests.

R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28066}
2015-04-27 10:44:30 +00:00
machenbach
fbf300802f Revert of [turbofan] Optimize loads from the global object in JSTypeFeedbackSpecializer. (patchset #10 id:180001 of https://codereview.chromium.org/1063513003/)
Reason for revert:
[sheriff] Breaks nosnap debug:
http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap%20-%20debug%20-%201/builds/156

Original issue's description:
> [turbofan] Optimize loads from the global object in JSTypeFeedbackSpecializer.
>
> Uses lazy deoptimization and code dependencies to introduce loads
> from property cells and also to promote globals to constants.
>
> R=mstarzinger@chromium.org
> BUG=
>
> Committed: https://crrev.com/aae4a62d07e839455b1d0ad4fa512cc5d48a1a68
> Cr-Commit-Position: refs/heads/master@{#28057}

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

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

Cr-Commit-Position: refs/heads/master@{#28063}
2015-04-27 10:07:08 +00:00
mstarzinger
d6e99a7f52 [turbofan] Introduce explicit JSCreateLiteral[Array|Object].
This uses explicit operators instead of intrinsic runtime calls to
create literals froms boilerplates. It allows for easier access of
static parameters and syncs it with other allocating operators.

R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28062}
2015-04-27 09:57:22 +00:00
Benedikt Meurer
ecf499ef8e [turbofan] Sanitize language mode for JSStoreProperty operator.
R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28061}
2015-04-27 09:33:38 +00:00
jochen
3383f6280e Reland "Remove the weak list of views from array buffers"
Original description:
> Instead, views have to check their array buffer for whether
> it's neutered or not.
>
> BUG=v8:3996
> R=hpayer@chromium.org,dslomov@chromium.org,verwaest@chromium.org
> LOG=n

BUG=v8:3996
R=hpayer@chromium.org,dslomov@chromium.org,verwaest@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#28060}
2015-04-27 09:27:53 +00:00
Benedikt Meurer
f13f949361 [turbofan] Sanitize language mode for javascript operators.
R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28059}
2015-04-27 09:12:43 +00:00
mstarzinger
a38f9dddd1 [turbofan] Use FastNewClosureStub if possible.
This introduces a JSCreateClosure operator which can be lowered by the
typed pipeline to the aforementioned stub. It also allows for further
optimizations of closure creation.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28058}
2015-04-27 09:07:57 +00:00
titzer
aae4a62d07 [turbofan] Optimize loads from the global object in JSTypeFeedbackSpecializer.
Uses lazy deoptimization and code dependencies to introduce loads
from property cells and also to promote globals to constants.

R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28057}
2015-04-27 09:06:41 +00:00
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