Commit Graph

32126 Commits

Author SHA1 Message Date
caitp
08d0012dda [keys] propagate PropertyFilter to proxy targets in KeyAccumulator
BUG=v8:5174, v8:1543
R=cbruni@chromium.org, littledan@chromium.org

Review-Url: https://codereview.chromium.org/2129193003
Cr-Commit-Position: refs/heads/master@{#37634}
2016-07-11 10:39:35 +00:00
danno
3e2085eba4 [turbofan] Add MachineType to LinkageLocation
By adding MachineType to LinkageLocation, it is possible not only to reason
about the location of a LinkageLocation on the stack, but also about it's
size. This will be useful in follow-on CLs that attempt to merge some of the
parameter passing logic of tail calls and normal (non-tail) calls.

As a nice side-effect, it is no longer necessary to separately keep a
MachineSignature in a CallDescriptor, because the MachineTypes contianed in
LinkageLocation for all of the Descriptor's parameters and return types are
sufficient. This CL therefore removes the MachineSignature from the
CallDescriptor and adjusts all the calling code accordingly, simplifying and
de-duplicating code in a bunch of places.

R=titzer@chromium.org, bmeurer@chromium.org
LOG=N

Review-Url: https://codereview.chromium.org/2124023003
Cr-Commit-Position: refs/heads/master@{#37633}
2016-07-11 10:39:34 +00:00
jkummerow
bec49a4876 Revert of Avoid Context::Enter and Context::Exit if we're reentering the active and last entered context (patchset #2 id:20001 of https://codereview.chromium.org/2131483002/ )
Reason for revert:
crashes: crbug.com/626719

Original issue's description:
> Avoid Context::Enter and Context::Exit if we're reentering the active and last entered context
>
> A bit of browsing around indicates that the new fast-path is taken most of the time:
>    3496 Entering new
>  152295 Reentering same
>
> BUG=
>
> Committed: https://crrev.com/1829eb661ef1cf432fb551bcb193f521a219d490
> Cr-Commit-Position: refs/heads/master@{#37570}

TBR=jochen@chromium.org,verwaest@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=

Review-Url: https://codereview.chromium.org/2140563002
Cr-Commit-Position: refs/heads/master@{#37632}
2016-07-11 10:23:53 +00:00
jgruber
be5808bff8 Correctly format builtin constructors in stack traces
CallSite::IsConstructor() was unable to recognize builtin construct stubs
(NumberConstructor_ConstructStub and StringConstructor_ConstructStub) as
constructors, and thus these frames were not formatted correctly in stack
traces.

Fix this by explicitly marking their Code objects as construct stubs and
passing along a special receiver value when we encounter such cases in
CaptureSimpleStackTrace.

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

Review-Url: https://codereview.chromium.org/2125163004
Cr-Commit-Position: refs/heads/master@{#37631}
2016-07-11 10:05:03 +00:00
bmeurer
71becab88d [turbofan] Lower Smi field loads to Word32 field loads.
If a Smi field load is truncated to Word32, we can just load the upper
32 bits on 64-bit architectures (with 32-bit Smis), which avoids the
nasty shift right that we'd have to perform otherwise to untag it.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2140553002
Cr-Commit-Position: refs/heads/master@{#37630}
2016-07-11 09:24:58 +00:00
bmeurer
4f97632880 [turbofan] Eliminate a few redundant bounds checks.
Usually loops run from 0 to some array length l, which means the
induction variable i will probably have type Unsigned32, just like
the length l. The CheckBounds operation lowers to an Uint32LessThan
comparison, so if we also lower the user level i < l comparison to
Uint32LessThan (whenever possible), we get some bounds check elimination
for free (via value numbering plus branch condition elimination).

This merges the branch condition elimination phase with the late
optimization phase to make this magic happen.

R=jarin@chromium.org
BUG=v8:4930,v8:5141

Review-Url: https://codereview.chromium.org/2135123002
Cr-Commit-Position: refs/heads/master@{#37629}
2016-07-11 08:40:59 +00:00
mstarzinger
7dbc223983 [turbofan] Enable pretenuring tests for optimized code.
This enables tests which verify allocation site feedback is used and
influences pretenuring decisions. By now TurboFan is respecting such
feedback. Ignition however doesn't provide such feedback yet.

R=mvstanton@chromium.org

Review-Url: https://codereview.chromium.org/2135563003
Cr-Commit-Position: refs/heads/master@{#37628}
2016-07-11 08:40:58 +00:00
Alexander.Gilday2
7f162dbcb6 [turbolizer] Improve code comments in disassembly
This change analyzes and links the output of --code-comments in the disassembly view within turbolizer with the other views, such that selecting these comments will also select the respective blocks/lines/nodes within the other views. The block start comments (e.g. -- B4 start --) are linked with the blocks in the schedule phase view and vice versa. The source position comments (e.g. -- primes.js:3:10 --) select the respective spans, lines, and nodes in the JavaScript code view, the schedule phase view, and the other compilation phase views respectively, and vice versa. It also modifies the display of the line and column numbers in the source position comments to be offset from 1 instead of 0 and ignore the initial source position of the first line of code (from removal of the function name in the compiler).

Also fixed the bug where previous selections weren't being cleared properly across multiple views, adding appropriate clear calls when using the selection broker.

Review-Url: https://codereview.chromium.org/2133663002
Cr-Commit-Position: refs/heads/master@{#37627}
2016-07-11 08:28:22 +00:00
machenbach
4af2bb9e38 Revert three commits due to cpu-profiler failures.
Revert "Move SimulatorHelper into V8 out of profiler clients."

This reverts commit b837241150.

Revert "Make use of v8::TickSample instead of v8::internal::TickSample in logger."

This reverts commit c3a16f0a9f.

Revert "Clean up SimulatorHelper code."

This reverts commit 8ee236e144.

BUG=v8:5193
TBR=alph@chromium.org, yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2138643003
Cr-Commit-Position: refs/heads/master@{#37626}
2016-07-11 08:03:26 +00:00
jgruber
59705072ad Enable visibility and security checks for builtin exit frames
Enable the same checks for builtin exit frames as are used for all other
standard (i.e. non-wasm) types, and refactor them into a single helper
class.

R=yangguo@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2135593002
Cr-Commit-Position: refs/heads/master@{#37625}
2016-07-11 07:50:46 +00:00
machenbach
168d9eaa36 Reland of [gn] Switch gcc bots to gn (patchset #1 id:1 of https://codereview.chromium.org/2130303002/ )
Reason for revert:
Relanding as the goma problem is due to an upgrade of the binutils version we use.

Original issue's description:
> Revert of [gn] Switch gcc bots to gn (patchset #3 id:40001 of https://codereview.chromium.org/2124263002/ )
>
> Reason for revert:
> There are a bunch of goma errors on the gcc bot now. Maybe connected to this CL.
>
> https://build.chromium.org/p/tryserver.v8/builders/v8_linux_gcc_compile_rel/builds/19068
>
> Original issue's description:
> > [gn] Switch gcc bots to gn
> >
> > BUG=chromium:474921
> >
> > Committed: https://crrev.com/73f154ba601dc70c4007968fa902d4beacba4393
> > Cr-Commit-Position: refs/heads/master@{#37580}
>
> TBR=vogelheim@chromium.org,jochen@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=chromium:474921
>
> Committed: https://crrev.com/980d0d6e227f8de3cc0b71a0d3f492908adcf138
> Cr-Commit-Position: refs/heads/master@{#37603}

TBR=vogelheim@chromium.org,jochen@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=chromium:474921
NOTRY=true

Review-Url: https://codereview.chromium.org/2132333002
Cr-Commit-Position: refs/heads/master@{#37624}
2016-07-11 07:28:59 +00:00
yangguo
dfcc5d4ee8 [debugger] omit exception events for rethrown exceptions in async.
R=bmeurer@chromium.org, littledan@chromium.org
BUG=v8:5167

Review-Url: https://codereview.chromium.org/2124813002
Cr-Commit-Position: refs/heads/master@{#37623}
2016-07-11 05:50:03 +00:00
zhengxing.li
42baff6abe X87: [builtins] Construct builtin frame in String/Number ctors.
port d49d3864d7 (r37598)

  original commit message:

BUG=

Review-Url: https://codereview.chromium.org/2132303002
Cr-Commit-Position: refs/heads/master@{#37622}
2016-07-11 05:43:39 +00:00
bmeurer
03bde2660a [turbofan] Introduce CheckedInt32Div and CheckedInt32Mod operators.
Consume Smi/Signed32 feedback for division and modulus and introduce
appropriate checked operators. This is especially important for modulus
where the Float64Mod operator is significantly slower than Int32Mod on
most platforms. For division it's mostly important to propagate
integerness, i.e. to avoid follow-up conversions between float and
int32.

Drive-by-fix: Use Int32Mod for the ModulusStub (and the bytecode handler)
when the inputs are both Smi.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2138633002
Cr-Commit-Position: refs/heads/master@{#37621}
2016-07-11 05:27:55 +00:00
v8-autoroll
21e5e23f42 Update V8 DEPS.
Rolling v8/build to 766297ee7fd0da3d95276a02ff11089ec3aced9b

Rolling v8/tools/clang to 29e654f4a3d0fa9c7c69f2967d427ccbd6f4d4c8

Rolling v8/tools/mb to c279952c34ea262021767ad1f2087f988d85881c

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

Review-Url: https://codereview.chromium.org/2136463003
Cr-Commit-Position: refs/heads/master@{#37620}
2016-07-09 03:23:54 +00:00
alph
8ee236e144 Clean up SimulatorHelper code.
Review-Url: https://codereview.chromium.org/2131643003
Cr-Commit-Position: refs/heads/master@{#37619}
2016-07-09 02:06:50 +00:00
alph
c3a16f0a9f Make use of v8::TickSample instead of v8::internal::TickSample in logger.
BUG=v8:4789

Review-Url: https://codereview.chromium.org/2133533002
Cr-Commit-Position: refs/heads/master@{#37618}
2016-07-09 01:20:14 +00:00
alph
b837241150 Move SimulatorHelper into V8 out of profiler clients.
Clients should not know about the simulator.

BUG=v8:4789

Review-Url: https://codereview.chromium.org/2128613004
Cr-Commit-Position: refs/heads/master@{#37617}
2016-07-08 23:52:49 +00:00
jbudorick
f2ce4fe63b [Android] Switch outdated pylib.* references to equivalent devil.android.* ones.
BUG=chromium:617761
NOTRY=true

Review-Url: https://codereview.chromium.org/2113453007
Cr-Commit-Position: refs/heads/master@{#37616}
2016-07-08 17:30:27 +00:00
littledan
97e8046e44 Avoid calling the builtin String.prototype.split in Intl
The Intl code previously called the initial value of String.prototype.split
for some internal operations. However, this did not have the intended effect
as Intl only needs to split strings by strings, but String.prototype.split
has integration with Symbol.split for RegExps.

This patch replaces the calls of StringSplit in the Intl implementation
with direct calls to the %StringSplit runtime function to avoid the issue.

R=yangguo@chromium.org
BUG=v8:5179

Review-Url: https://codereview.chromium.org/2126073002
Cr-Commit-Position: refs/heads/master@{#37615}
2016-07-08 16:53:09 +00:00
ssanfilippo
c9fedd252c [Interpreter] Support Linux perf >= 4.1 in linux_perf_report.py.
Since Linux 4.1, flag -f became -F, but the long option --flags stayed
the same. Using --flags assures compatibility with new and old versions.

Also, symbols appear to be reported as name+offset in newer versions
even when not requested, so we trim the latter part if present.

BUG=v8:4899
LOG=N

Review-Url: https://codereview.chromium.org/2134703002
Cr-Commit-Position: refs/heads/master@{#37614}
2016-07-08 16:24:45 +00:00
alph
120b753f71 Introduce v8::CpuProfiler::New and v8::CpuProfiler::Dispose API.
Isolate is not going to retain a CPU profiler.
The client will be creating an instance of profiler when needed.

Deprectate v8::Isolate::GetCpuProfiler()

BUG=v8:4789

Review-Url: https://codereview.chromium.org/2117343006
Cr-Commit-Position: refs/heads/master@{#37613}
2016-07-08 15:01:10 +00:00
Miran.Karic
29b89b489a Revert of MIPS: [turbofan] Fix addition for deoptimization. (patchset #3 id:40001 of https://codereview.chromium.org/2102063002/ )
Reason for revert:
This workaround is no longer needed, port of e60c4053c7 fixes the issue.

Original issue's description:
> MIPS: [turbofan] Fix addition for deoptimization.
>
> In turbofan, after an addition operation where the same register is the
> output and both inputs, if deoptimization is performed the input is
> overwritten with the output value and the final result is not correct.
> This is fixed by restoring the original value of the input before
> deoptimization.
>
> BUG=
> TEST=mjsunit/regress/regress-int32-truncation
>
> Committed: https://crrev.com/99385e8e4bcef1f333ede61c936528bfc0c8ecfa
> Cr-Commit-Position: refs/heads/master@{#37524}

TBR=akos.palfi@imgtec.com,balazs.kilvady@imgtec.com,ivica.bogosavljevic@imgtec.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=

Review-Url: https://codereview.chromium.org/2129083003
Cr-Commit-Position: refs/heads/master@{#37612}
2016-07-08 14:57:50 +00:00
titzer
2dc9909c0c [wasm] Make print_wasm_code_size into a regular V8 counter.
R=ahaas@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2130293002
Cr-Commit-Position: refs/heads/master@{#37611}
2016-07-08 13:42:44 +00:00
Miran.Karic
91f63b2ee4 MIPS: [turbofan] Make sure binop results do not overwrite deoptimization inputs on arm.
Port e60c4053c7

        this fix applies to mips as well.

BUG=
TEST=mjsunit/regress/regress-int32-truncation

Review-Url: https://codereview.chromium.org/2133503004
Cr-Commit-Position: refs/heads/master@{#37610}
2016-07-08 12:59:17 +00:00
mstarzinger
3660505e5f [turbofan] Re-enable debugger tests that no longer fail.
R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2127423002
Cr-Commit-Position: refs/heads/master@{#37609}
2016-07-08 12:49:53 +00:00
mstarzinger
b1cbb98387 [turbofan] Remove eager frame state from divisions.
This removes the frame state input representing the before-state from
nodes having the {JSDivide} or the {JSModulus} operator. Lowering that
inserts number conversions of the inputs has to be disabled when
deoptimization is enabled, because the frame state layout is no longer
known.

R=jarin@chromium.org
BUG=v8:5021

Review-Url: https://codereview.chromium.org/2121153003
Cr-Commit-Position: refs/heads/master@{#37608}
2016-07-08 11:20:23 +00:00
ahaas
4d631c8cd9 [x64] Compare handles instead of code targets in emit_code_target.
This CL is on the way to extend parallel compilation of wasm modules to code generation. With parallel compilation it is not allowed to dereference handles during code generation. However, the is_identical_to check dereferences handles. In this CL we therefore replace the call to is_identical_to with a handle comparison.

Review-Url: https://codereview.chromium.org/2109143002
Cr-Commit-Position: refs/heads/master@{#37607}
2016-07-08 10:33:16 +00:00
machenbach
55b89ad7e6 [CQ] Temporarily make gcc bot experimental due to goma problems
BUG=chromium:626622
NOTRY=true
NOPRESUBMIT=true
TBR=sergiyb@chromium.org

Review-Url: https://codereview.chromium.org/2136443004
Cr-Commit-Position: refs/heads/master@{#37606}
2016-07-08 09:58:37 +00:00
machenbach
8545269374 [CQ] Temporarily remove gcc bot due to goma problems
BUG=chromium:626622
NOTRY=true
TBR=sergiyb@chromium.org

Review-Url: https://codereview.chromium.org/2134643002
Cr-Commit-Position: refs/heads/master@{#37605}
2016-07-08 09:55:23 +00:00
Michael Starzinger
2c09760ac4 [turbofan] Re-enable test that no longer fails.
This enables tests which rely on the context available at "debugger"
statements to be accurate. This is the case by now when deoptimization
information is available.

R=yangguo@chromium.org
BUG=v8:4055

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

Cr-Commit-Position: refs/heads/master@{#37604}
2016-07-08 09:52:07 +00:00
machenbach
980d0d6e22 Revert of [gn] Switch gcc bots to gn (patchset #3 id:40001 of https://codereview.chromium.org/2124263002/ )
Reason for revert:
There are a bunch of goma errors on the gcc bot now. Maybe connected to this CL.

https://build.chromium.org/p/tryserver.v8/builders/v8_linux_gcc_compile_rel/builds/19068

Original issue's description:
> [gn] Switch gcc bots to gn
>
> BUG=chromium:474921
>
> Committed: https://crrev.com/73f154ba601dc70c4007968fa902d4beacba4393
> Cr-Commit-Position: refs/heads/master@{#37580}

TBR=vogelheim@chromium.org,jochen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:474921

Review-Url: https://codereview.chromium.org/2130303002
Cr-Commit-Position: refs/heads/master@{#37603}
2016-07-08 09:36:37 +00:00
yangguo
3885fa0974 Do not record source positions for non-script or native script compiles.
R=bmeurer@chromium.org, mstarzinger@chromium.org, rmcilroy@chromium.org

Review-Url: https://codereview.chromium.org/2112853002
Cr-Commit-Position: refs/heads/master@{#37602}
2016-07-08 08:49:45 +00:00
ahaas
717b2eafdd [wasm] Use handles in wasm::GetDebugInfo.
Handles are necessary in wasm::GetDebugInfo because a GC can be
triggered in this function.

R=titzer@chromium.org, mstarzinger@chromium.org

Review-Url: https://codereview.chromium.org/2132553002
Cr-Commit-Position: refs/heads/master@{#37601}
2016-07-08 08:24:03 +00:00
brendan.kirby
237a00221c Update binutils version to match Chromium.
BUG=

Review-Url: https://codereview.chromium.org/2126423002
Cr-Commit-Position: refs/heads/master@{#37600}
2016-07-08 07:03:29 +00:00
lpy
4e53b1a1a7 Remove v8- prefix of file name in libsampler.
BUG=

Review-Url: https://codereview.chromium.org/2125023004
Cr-Commit-Position: refs/heads/master@{#37599}
2016-07-08 06:47:54 +00:00
jgruber
d49d3864d7 [builtins] Construct builtin frame in String/Number ctors
BUG=v8:5173
R=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2118283003
Cr-Commit-Position: refs/heads/master@{#37598}
2016-07-08 06:38:19 +00:00
ben
1f53e42bd6 Handle symbols in FrameMirror#invocationText().
Fix a TypeError when putting together the invocationText for a symbol
method's stack frame.

See https://github.com/nodejs/node/issues/7536.

Review-Url: https://codereview.chromium.org/2122793003
Cr-Commit-Position: refs/heads/master@{#37597}
2016-07-07 21:32:03 +00:00
littledan
62c950bc26 Reland of [esnext] ship --harmony-object-values-entries (patchset #1 id:1 of https://codereview.chromium.org/2129533004/ )
Reason for revert:
Performance stayed the same after the revert; relanding.

Original issue's description:
> Revert of [esnext] ship --harmony-object-values-entries (patchset #1 id:1 of https://codereview.chromium.org/2116053003/ )
>
> Reason for revert:
> Revert to see if it addresses the performance regression observed in chromium:625956 in automated graphs
>
> Original issue's description:
> > [esnext] ship --harmony-object-values-entries
> >
> > BUG=v8:4663
> > R=littledan@chromium.org, adamk@chromium.org
> >
> > Committed: https://crrev.com/ab529234853a1768642f8f6c907aaaa5ea8b19bf
> > Cr-Commit-Position: refs/heads/master@{#37485}
>
> TBR=adamk@chromium.org,caitpotter88@gmail.com
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=v8:4663
>
> Committed: https://crrev.com/1177750a98faaa11e92ece13b70115bf704baf3b
> Cr-Commit-Position: refs/heads/master@{#37566}

TBR=adamk@chromium.org,caitpotter88@gmail.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4663

Review-Url: https://codereview.chromium.org/2127253002
Cr-Commit-Position: refs/heads/master@{#37596}
2016-07-07 20:09:09 +00:00
franzih
2f36ee7176 [builtins] Migrate SharedArrayBuffer.byteLength to C++.
Drive-by-fix: hydrogen code does not blindly return the
byteLength offset, instead it executes what is defined
in the byteLength getter.

BUG=

Review-Url: https://codereview.chromium.org/2123263002
Cr-Commit-Position: refs/heads/master@{#37595}
2016-07-07 19:44:23 +00:00
jochen
0058f82e2c Add an API to create a detached global object
Such an object can be used to later create a context from it. It has to
have access checks with handlers enabled, as it cannot be accessed
otherwise.

BUG=chromium:618305
R=verwaest@chromium.org

Review-Url: https://codereview.chromium.org/2107673003
Cr-Commit-Position: refs/heads/master@{#37594}
2016-07-07 19:38:08 +00:00
machenbach
312d0149af [CQ] Make gyp bot a blocking bot
BUG=chromium:474921
NOTRY=true
TBR=vogelheim@chromium.org, jochen@chromium.org, tandrii@chromium.org

Review-Url: https://codereview.chromium.org/2126793004
Cr-Commit-Position: refs/heads/master@{#37593}
2016-07-07 17:35:12 +00:00
jbudorick
4ff581dd3a [Android] Guard android_assets usage with enable_java_templates.
BUG=pdfium:38

Review-Url: https://codereview.chromium.org/2113413002
Cr-Commit-Position: refs/heads/master@{#37592}
2016-07-07 16:14:36 +00:00
jochen
b93c80a603 If we can't rehash the backing store for weak sets & maps, do a last resort GC
BUG=v8:4909
R=hpayer@chromium.org

Review-Url: https://codereview.chromium.org/2129933002
Cr-Commit-Position: refs/heads/master@{#37591}
2016-07-07 15:49:44 +00:00
mstarzinger
b3b1bf279a [turbofan] Context in debugger is accurate by now.
This enables tests which rely on the context available at "debugger"
statements to be accurate. This is the case by now when deoptimization
information is available.

R=mvstanton@chromium.org
BUG=v8:4035

Review-Url: https://codereview.chromium.org/2125773005
Cr-Commit-Position: refs/heads/master@{#37590}
2016-07-07 14:26:52 +00:00
mstarzinger
67efc381b0 [turbofan] Re-enable tests that no longer fail.
R=mvstanton@chromium.org

Review-Url: https://codereview.chromium.org/2127093002
Cr-Commit-Position: refs/heads/master@{#37589}
2016-07-07 13:40:00 +00:00
jarin
8ff93b6d69 [turbofan] Always silence NaNs when storing to a double array.
Review-Url: https://codereview.chromium.org/2110343003
Cr-Commit-Position: refs/heads/master@{#37588}
2016-07-07 12:44:40 +00:00
ishell
3486bbc219 [runtime] Move HasUnwindingInfoField of Code::flags to unused ICStateField.
This should recover the regression caused by https://codereview.chromium.org/1993653003.
(Same sympthoms as in http://crbug/619016).

BUG=chromium:624309

Review-Url: https://codereview.chromium.org/2127103002
Cr-Commit-Position: refs/heads/master@{#37587}
2016-07-07 12:44:39 +00:00
ivica.bogosavljevic
db6d8e2a5a MIPS: [wasm] Detect unrepresentability in the float32-to-int32 conversion correctly on arm
Port de369129d2

Original commit message:

In the current implementation of wasm an unrepresentable input of the
float32-to-int32 conversion is detected by first truncating the input, then
converting the truncated input to int32 and back to float32, and then checking
whether the result is the same as the truncated input.

This input check does not work on arm and arm64 for an input of (INT32_MAX + 1)
because on these platforms the float32-to-int32 conversion results in INT32_MAX
if the input is greater than INT32_MAX.  When INT32_MAX is converted back to
float32, then the result is (INT32_MAX + 1) again because INT32_MAX cannot be
represented precisely as float32, and rounding-to-nearest results in (INT32_MAX
+ 1). Since (INT32_MAX + 1) equals the truncated input value, the input appears
to be representable.

With the changes in this CL, the result of the float32-to-int32 conversion is
incremented by 1 if the original result was INT32_MAX. Thereby the detection of
unrepresenable inputs in wasm works. Note that since INT32_MAX cannot be
represented precisely in float32, it can also never be a valid result of the
float32-to-int32 conversion.

BUG=cctest/test-run-wasm/RunWasmCompiled_I32SConvertF32,cctest/test-run-wasm/RunWasmCompiled_I32UConvertF32

Review-Url: https://codereview.chromium.org/2130763002
Cr-Commit-Position: refs/heads/master@{#37586}
2016-07-07 12:41:27 +00:00
ishell
3fbb45216d [runtime] Better encapsulation of dictionary objects handling in lookup iterator.
Now LookupIterator follows the same pattern of prepare transition, apply transition
and write value when adding new properties to dictionary objects.

JSGlobalObject case:
* Prepare transition phase ensures that there is a "transition" property cell
  prepared for receiving a value.
* Apply transition phase does nothing.
* Prepare for data property phase ensures that the existing property cell can
  receive the value.
* Write value phase writes value directly to the current property cell.

JSObject case:
* Prepare transition phase prepares the object for receiving a data value (which
  could switch an object to dictionary mode).
* Apply transition phase migrates object to a transition map. If the map happened
  to be a dictionary mode object's map then an uninitialized entry added to the
  properties dictionary.
* Prepare for data property phase does nothing.
* Write value phase just puts value to the properties dictionary.

BUG=chromium:576312

Review-Url: https://codereview.chromium.org/2127583002
Cr-Commit-Position: refs/heads/master@{#37585}
2016-07-07 12:35:06 +00:00