johan
68d5f916d8
Fix build on solaris platforms
...
e8b9f2d7
introduced a different cast which broke building on Illumos.
Revert to previous behavior for V8_OS_SOLARIS only.
Found on SmartOS while building with gcc 4.9.0.
edit1: adding jochen to reviewers since he was assigned through the issue tracker and danno since he seems to do a fair amount of cross-platform work
edit2: removing BUG reference because I don't understand what LOG needs to contain (and it seems to link to chromium and not the v8 repo). Please edit commit message as appropriate.
BUG=3935
LOG=n
Review URL: https://codereview.chromium.org/990063002
Cr-Commit-Position: refs/heads/master@{#27163}
2015-03-12 15:12:45 +00:00
thakis
b97df83752
Use Rotate*() functions instead of doing this manually.
...
Shouldn't make a difference in practice, but it's a bit more readable and it
gets the case of a 0 shift correct without undefined behavior.
BUG=463436
LOG=N
Review URL: https://codereview.chromium.org/975283002
Cr-Commit-Position: refs/heads/master@{#26975}
2015-03-04 05:53:33 +00:00
sejunho
a6f5fca5e6
Fix preparing log file name.
...
Problem:
Excuting with flags as "--prof --logfile-per-isolate --logfile=/path/to/filename"
expected file name: /path/to/isolate-<isolate id>-filename
current result: isolate-<isolate id>-/path/to/filename
This patch makes the file name we expected.
Review URL: https://codereview.chromium.org/960813004
Cr-Commit-Position: refs/heads/master@{#26955}
2015-03-03 11:03:49 +00:00
tfarina
b00ea0f125
Cleanup: Remove DCHECK_RESULT macro.
...
BUG=None
R=bmeurer@chromium.org
LOG=N
Review URL: https://codereview.chromium.org/933673002
Cr-Commit-Position: refs/heads/master@{#26733}
2015-02-19 05:47:41 +00:00
bmeurer
c65ae4f10c
Reland "Initial switch to Chromium-style CHECK_* and DCHECK_* macros.".
...
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/877753007
Cr-Commit-Position: refs/heads/master@{#26346}
2015-01-30 09:29:41 +00:00
michael_dawson
f1ba8d8f86
Contribution of PowerPC port (continuation of 422063005) - AIX Common1
...
Contribution of PowerPC port (continuation of 422063005 and 817143002). This patch covers
the key changes needed to the common files needed to support AIX. Subsequent
patches will cover:
- changes to update the ppc directories so they are current with the changes
in the rest of the project.
- remaining AIX changes not resolved by 4.8 compiler
- individual optimizations for PPC
This is based off of the GitHub repository
https://github.com/andrewlow/v8ppc
R=danno@chromium.org , svenpanne@chromium.org
BUG=
Review URL: https://codereview.chromium.org/866843003
Cr-Commit-Position: refs/heads/master@{#26343}
2015-01-30 08:02:08 +00:00
Benedikt Meurer
883852293a
Revert "Make GCC happy again." and "Initial switch to Chromium-style CHECK_* and DCHECK_* macros.".
...
This reverts commit 6a4c0a3bae
and commit
0deaa4b629
for breaking GCC bots.
TBR=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/893533003
Cr-Commit-Position: refs/heads/master@{#26342}
2015-01-30 07:19:57 +00:00
bmeurer
0deaa4b629
Initial switch to Chromium-style CHECK_* and DCHECK_* macros.
...
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/888613002
Cr-Commit-Position: refs/heads/master@{#26340}
2015-01-30 06:25:36 +00:00
bmeurer
d93c4d19f1
[x86] Disable AVX unless the operating system explicitly claims to support it.
...
BUG=chromium:452033, v8:3846
LOG=y
R=jkummerow@chromium.org
Review URL: https://codereview.chromium.org/878063002
Cr-Commit-Position: refs/heads/master@{#26288}
2015-01-27 09:59:24 +00:00
Ben Noordhuis
9e99a6048a
Fix run-time ARMv6 detection.
...
BUG=v8:3844
LOG=y
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/867713003
Patch from Ben Noordhuis <info@bnoordhuis.nl>.
Cr-Commit-Position: refs/heads/master@{#26234}
2015-01-23 06:00:57 +00:00
bmeurer
4b31a97da3
Remove deprecated v8::base::OS::nan_value().
...
Use std::numeric_limits<double>::quiet_NaN() and
std::numeric_limits<float>::quiet_NaN() instead.
Review URL: https://codereview.chromium.org/864803002
Cr-Commit-Position: refs/heads/master@{#26195}
2015-01-21 14:38:58 +00:00
weiliang.lin
c63e994166
[x86] Avoid memory form of PUSH/CALL for ATOM.
...
Review URL: https://codereview.chromium.org/853703002
Cr-Commit-Position: refs/heads/master@{#26163}
2015-01-20 14:59:56 +00:00
Sven Panne
e4c5b84652
Contribution of PowerPC port (continuation of 422063005)
...
Contribution of PowerPC port (continuation of 422063005). The inital patch
covers the core changes to the common files. Subsequent patches will cover
changes to common files to support AIX and to update the ppc directories so
they are current with the changes in the rest of the project.
This is based off of the GitHub repository
https://github.com/andrewlow/v8ppc
BUG=
R=svenpanne@chromium.org , danno@chromium.org , sevnpanne@chromium.org
Review URL: https://codereview.chromium.org/817143002
Cr-Commit-Position: refs/heads/master@{#26091}
2015-01-16 07:42:15 +00:00
deftly
71fd742fc6
fix defines for openbsd - build fails without them:
...
Original version from robert@openbsd.org with modification from myself
BUG=
Review URL: https://codereview.chromium.org/856553002
Cr-Commit-Position: refs/heads/master@{#26089}
2015-01-16 05:07:24 +00:00
fedor.indutny
e8b9f2d70b
src: fix build on freebsd
...
BUG=
R=danno
Review URL: https://codereview.chromium.org/839053004
Cr-Commit-Position: refs/heads/master@{#26057}
2015-01-14 14:35:39 +00:00
paul.lind
eb68d6fe13
MIPS: remove immediate constraint within CompareAndSwap.
...
Improper use of immediate constraint is slightly non-optimal
with gcc/gnu-as but causes breakage with clang.
BUG=
Review URL: https://codereview.chromium.org/841263002
Cr-Commit-Position: refs/heads/master@{#26016}
2015-01-09 20:12:28 +00:00
jochen
0959123e57
Remove "extra checks"
...
Instead, just use DCHECKs. The builders that want them in release mode
should already be useding dcheck_always_on anyways
BUG=none
R=machenbach@chromium.org
LOG=y
Review URL: https://codereview.chromium.org/841083002
Cr-Commit-Position: refs/heads/master@{#26001}
2015-01-08 16:29:39 +00:00
dcarney
cc53844796
make check failures unlikely
...
BUG=
Review URL: https://codereview.chromium.org/843513002
Cr-Commit-Position: refs/heads/master@{#25976}
2015-01-07 14:40:51 +00:00
jochen
96143d1931
Remove UNREACHABLE() statements from sys-info.cc
...
We have safe fallbacks in all cases, and it's possible to hit those
codepaths, e.g., on Linux when /proc is not mounted
BUG=v8:3544
R=ulan@chromium.org
LOG=n
Review URL: https://codereview.chromium.org/818213002
Cr-Commit-Position: refs/heads/master@{#25940}
2014-12-23 19:25:27 +00:00
arajp
f4fb702569
Make FlushICache NOP for Nvidia Denver CPU's.
...
Denver supports a coherent cache mechanism. There is no need to clean
the D cache and invalidate I cache. MTS has to check the translation
anytime there is an I cache invalidate and this time can be saved by
making FlushICache a NOP.
The patch improves Octane by roughly 3-4% on Denver.
Review URL: https://codereview.chromium.org/797233002
Cr-Commit-Position: refs/heads/master@{#25898}
2014-12-19 11:16:36 +00:00
Benedikt Meurer
54a31b628d
[base] Add iterator_range helper class.
...
TEST=unittests
R=titzer@chromium.org
Review URL: https://codereview.chromium.org/810683003
Cr-Commit-Position: refs/heads/master@{#25834}
2014-12-16 07:32:03 +00:00
rmcilroy
6fb69a2136
Fix OS::GetCurrentThreadId to work when building Android on Mac.
...
The Mac version of GetCurrentThreadId should be used when building the host
build of V8 on Android for Mac.
Review URL: https://codereview.chromium.org/799943003
Cr-Commit-Position: refs/heads/master@{#25805}
2014-12-12 17:56:58 +00:00
svenpanne
71bb00e261
Consistently use only one of virtual/OVERRIDE/FINAL.
...
FINAL implies OVERRIDE, which in turn implies virtual, so there's no need to use
more than one of these. The Google C++ style guide even requires this, see
http://google-styleguide.googlecode.com/svn/trunk/cppguide.html#Inheritance .
While we're here, port r24662 to x87.
The net result is that v8 compiles again with a current clang.
BUG=v8:3753
LOG=y
Review URL: https://codereview.chromium.org/797943002
Cr-Commit-Position: refs/heads/master@{#25792}
2014-12-12 10:44:25 +00:00
weiliang.lin
2ad1c224b8
[ia32] Introduce vex prefix version of float64 arithmetic binop
...
port 50c4d8826b
BUG=
Review URL: https://codereview.chromium.org/770183002
Cr-Commit-Position: refs/heads/master@{#25595}
2014-12-02 08:09:53 +00:00
Weiliang Lin
83a635e0d7
[x64] Introduce FMA3 instructions on scalar data elements.
...
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/757503002
Patch from Weiliang Lin <weiliang.lin@intel.com>.
Cr-Commit-Position: refs/heads/master@{#25509}
2014-11-26 05:31:55 +00:00
rickyz
64a96f5a7e
Use 16 instead of 4 for determining member offsets.
...
This avoids UBSan warnings about unaligned memory access.
BUG=
Review URL: https://codereview.chromium.org/734873002
Cr-Commit-Position: refs/heads/master@{#25396}
2014-11-18 14:09:34 +00:00
alexanderk
c2c0d4ae54
Fix include mistakes
...
1) Missing <stdio.h> while using fopen, fclose, fseek etc
2) platform-linux.cc includes <sys/types.h> wtice
BUG=v8:3691
Review URL: https://codereview.chromium.org/716123003
Cr-Commit-Position: refs/heads/master@{#25395}
2014-11-18 13:47:10 +00:00
ulan@chromium.org
e21d3d7e21
Revert r24922 "Windows: use SystemTimeToTzSpecificLocalTime instead of localtime_s."
...
SystemTimeToTzSpecificLocalTime doesn't work correctly inside Chrome sandbox.
BUG=chromium:417640
LOG=Y
R=yangguo@chromium.org
Review URL: https://codereview.chromium.org/710643002
Cr-Commit-Position: refs/heads/master@{#25211}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25211 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-07 12:01:15 +00:00
hpayer@chromium.org
66430307b5
Use compiler barrier instead of memory barrier for release/acquire atomic operations on mac.
...
BUG=
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/694703003
Cr-Commit-Position: refs/heads/master@{#25147}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25147 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-05 12:35:51 +00:00
jochen@chromium.org
bd9d317e11
Don't crash if the tm_zone field returned by localtime is NULL
...
BUG=chromium:158355
R=svenpanne@chromium.org
LOG=n
Review URL: https://codereview.chromium.org/662093003
Cr-Commit-Position: refs/heads/master@{#25129}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25129 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-05 08:31:19 +00:00
ulan@chromium.org
2b26c7a144
Windows: use SystemTimeToTzSpecificLocalTime instead of localtime_s.
...
The localtime_s function produces incorrect results for russian time zone.
BUG=chromium:417640
LOG=Y
R=yangguo@chromium.org
Review URL: https://codereview.chromium.org/654843012
Cr-Commit-Position: refs/heads/master@{#24922}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-28 08:55:43 +00:00
bmeurer@chromium.org
f535763763
[turbofan] Implement the correct semantics for integer division/modulus.
...
Also fix the sdiv/udiv instructions on ARM as a nice side effect.
TEST=cctest,unittests
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/677483005
Cr-Commit-Position: refs/heads/master@{#24888}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24888 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-26 12:50:46 +00:00
svenpanne@chromium.org
e743eef448
only define ARRAYSIZE_UNSAFE for NaCl builds
...
Now that C++11 is allowed, we can use arraysize instead of
ARRAYSIZE_UNSAFE, except in NaCl builds. So let's move this
macro inside an NaCl ifdef.
BUG=chromium:405225
LOG=y
R=jochen@chromium.org
Review URL: https://codereview.chromium.org/668303002
Patch from Mostyn Bramley-Moore <mostynb@opera.com>.
Cr-Commit-Position: refs/heads/master@{#24875}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24875 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-24 13:21:48 +00:00
sigurds@chromium.org
df9ac2c165
Add Float64Floor, Float64Ceil, Float64RoundTruncate, Float64RoundTiesAway operators.
...
These operators are not supported by any backends yet, and a backend is free to not support them.
R=bmeurer@chromium.org
TEST=unittest/machine-operator
Review URL: https://codereview.chromium.org/668173002
Cr-Commit-Position: refs/heads/master@{#24874}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24874 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-24 13:12:12 +00:00
yangguo@chromium.org
7259d87f36
Use memcpy in List::AddAll for fundamental types.
...
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/663893004
Cr-Commit-Position: refs/heads/master@{#24868}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24868 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-24 13:12:06 +00:00
bmeurer@chromium.org
8214cc0e56
Use getauxval() if available.
...
This fixes the problem of not being able to detect ARM features on
ChromeOS because sandbox cannot access /proc/self/auxv and
/proc/cpuinfo there.
Drive-by-cleanup to libc detection in two other places.
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/672543002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24789 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-22 06:42:17 +00:00
svenpanne@chromium.org
3de17c6950
Remove v8stdint.h, it doesn't serve a purpose anymore.
...
Basically a follow-up to https://codereview.chromium.org/667573005/ .
LOG=y
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/670673002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-21 08:25:14 +00:00
bmeurer@chromium.org
010f089971
Remove (untested) code for unsupported compilers.
...
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/656143004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-20 12:04:22 +00:00
bmeurer@chromium.org
778b0926ea
platform: fix build on SmartOS
...
With -std=g++0x, `signbit` is no longer a define, and is an actual
function declared in C++-specific headers. Thus checking it's presence
with ifdef will no longer work.
Considering that g++0x implies newer compiler, there should not be the
case where it won't be present anymore.
BUG=
R=bmeurer@chromium.org , danno
Review URL: https://codereview.chromium.org/642203003
Patch from Fedor Indutny <fedor.indutny@gmail.com>.
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24730 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-20 11:27:39 +00:00
jochen@chromium.org
21f7300a5b
Fix GetCurrentThreadId for Solaris etc..
...
BUG=v8:3620
R=svenpanne@chromium.org
LOG=n
Review URL: https://codereview.chromium.org/653263003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24634 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-15 12:38:53 +00:00
bmeurer@chromium.org
8a00950303
[arm] Drop SMMLS support.
...
Apparently
SMMLS r, b, c, a
computes
r = ((a << 32) - b * c) >> 32
while the documentation is kinda misleading and states that it should
compute
r = a - ((b * c) >> 32)
The actual behavior is kinda useless, so we drop the instruction again.
TEST=cctest,unittests
TBR=dcarney@chromium.org
Review URL: https://codereview.chromium.org/654653004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24577 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-14 07:47:27 +00:00
bmeurer@chromium.org
8950e0a3de
[arm] Add support for SMMLA, SMMLS and SMMUL.
...
TEST=cctest,unittests
R=hpayer@chromium.org
Review URL: https://codereview.chromium.org/648283002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-14 05:03:04 +00:00
jochen@chromium.org
5a4578ccde
Fix typo in Mac GetCurrentThreadId
...
BUG=none
TBR=svenpanne@chromium.org
LOG=n
Review URL: https://codereview.chromium.org/642223003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24512 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-10 07:27:33 +00:00
jochen@chromium.org
3c7e440391
Sync OS::GetCurrentThreadId with chromium's/blink's implementation
...
Compare third_party/WebKit/Source/wtf/ThreadingPthreads.cpp
BUG=v8:3620
R=svenpanne@chromium.org
LOG=n
Review URL: https://codereview.chromium.org/649553002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24511 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-10 07:22:57 +00:00
dusan.milosavljevic@imgtec.com
3758fceca9
MIPS: Improve runtime detection and compatibility wrt arch. revisions.
...
TEST=
BUG=
R=jkummerow@chromium.org , paul.lind@imgtec.com
Review URL: https://codereview.chromium.org/618193005
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24486 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-09 09:39:23 +00:00
bmeurer@chromium.org
f0452e2193
[turbofan] Add support for ARM64 Ubfx
...
Support selecting Ubfx for shift-mask and mask-shift operations. Also, rename
the shifts to match the instruction names.
BUG=
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/633123002
Patch from Martyn Capewell <m.m.capewell@googlemail.com>.
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24482 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-09 09:18:31 +00:00
bmeurer@chromium.org
8617b3acf8
[turbofan] Fix HashCode/Equals for floating point operators.
...
Those floating point constant operators require bitwise handling of
their parameters, otherwise 0.0 equals -0.0. This is solved in a
general way by adding new base::bit_equal_to and base::bit_hash
function objects.
TEST=unittests
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/636953002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24450 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-08 07:32:07 +00:00
svenpanne@chromium.org
ac1224eafd
Fixed compilation with older clang versions.
...
TBR=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/638523002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24428 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-07 09:04:39 +00:00
bmeurer@chromium.org
0a6e406927
Further improve hashing of pointers and integers.
...
Also make sure that the appropriate functions are inlined properly
(using V8_INLINE instead of inline to enforce it even with GCC),
and improve the HashIsOkish unittest.
TEST=unittests
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/635733002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24427 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-07 07:39:19 +00:00
bmeurer@chromium.org
03255440de
Don't use identity as hash function for integers.
...
Also slightly improve hashing of floats/doubles.
TEST=unittests
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/632713002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24420 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-06 15:23:59 +00:00