Port r11010 (1daa81bc).
MIPS-specific changes:
-register codes and registers are defined using a macro to avoid redundancy
-renamed s8_fp to fp, removed the "fp" alias
-removed kSavedValueRegister (found by check-static-initializers.sh)
Original commit message:
Landing for pliard@chromium.org: Remove static initializers in v8.
This change includes two CLs by pliard@chromium.org:
1. http://codereview.chromium.org/9447052/ (Add CallOnce() and simple LazyInstance implementation):
Note that this implementation of LazyInstance does not handle global destructors (i.e. the lazy instances a
This CL was initially reviewed on codereview.appspot.com:
http://codereview.appspot.com/5687064/
2. http://codereview.chromium.org/9455088/ (Remove static initializers in v8):
This CL depends on CL 9447052 (adding CallOnce and LazyInstance).
It is based on a patch sent by Digit.
With this patch applied, we have only one static initializer left (in atomicops_internals_x86_gcc.cc). This
This CL also modifies the presubmit script to check the number of static initializers.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/9689069
Patch from Daniel Kalmar <kalmard@homejinni.com>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11241 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
The template system converts the actual struct type to an array of chars.
Make sure the alignment is kept by the compiler.
This fixes a lot of serialization-related HW tests, for example cctest test-serialize/Serialize.
BUG=
TEST=cctest test-serialize
Review URL: https://chromiumcodereview.appspot.com/9702114
Patch from Daniel Kalmar <kalmard@homejinni.com>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11240 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
The two tests (S8.5_A2.1, S8.5_A2.2) fail on ia32 Linux and simulators.
They do pass on ARM and MIPS hardware under Linux, and on the other
supported platforms and architectures.
They are now marked PASS || FAIL_OK.
BUG=
TEST=test262/S8.5_A2.1, test262/S8.5_A2.2
Review URL: https://chromiumcodereview.appspot.com/9959146
Patch from Paul Lind <plind44@gmail.com>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11230 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
regexp can match by using a Boyer-Moore-like table. This is done by identifying
non-greedy non-capturing loops in the nodes that eat any character one at a time.
For example in the middle of the regexp /foo[\s\S]*?bar/ we find such a loop.
There is also such a loop implicitly inserted at the start of any non-anchored
regexp.
When we have found such a loop we look ahead in the nodes to find the set of
characters that can come at given distances. For example for the regexp
/.?foo/ we know that there are at least 3 characters ahead of us, and the sets
of characters that can occur are [any, [f, o], [o]]. We find a range in the
lookahead info where the set of characters is reasonably constrained. In our
example this is from index 1 to 2 (0 is not constrained). We can now look 3
characters ahead and if we don't find one of [f, o] (the union of [f, o] and
[o]) then we can skip forwards by the range size (in this case 2).
For Unicode input strings we do the same, but modulo 128.
We also look at the first string fed to the regexp and use that to get a hint
of the character frequencies in the inputs. This affects the assessment of
whether the set of characters is 'reasonably constrained'.
We still have the old lookahead mechanism, which uses a wide load of multiple
characters followed by a mask and compare to determine whether a match is
possible at this point.
Review URL: http://codereview.chromium.org/9965010
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11204 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Note that in order to build for 64bits mode, you'll have
to specify the target architecture explicitely, the default
is still 32bits for Mac OS X.
Example with make and gcc:
$ export GYP_GENERATORS=make
$ make dependencies
$ make -j 8 library=shared x64.release
Example with make and clang:
$ export GYP_GENERATORS=make
$ export CC=/usr/bin/clang
$ export CXX=/usr/bin/clang++
$ export GYP_DEFINES="clang=1"
$ make dependencies
$ make -j 8 library=shared x64.release
Example with xcode:
$ export GYP_GENERATORS=xcode
$ build/gyp_v8 -Dtarget_arch=x64
$ xcodebuild -project build/all.xcodeproj -configuration Release
Contributed by Filipe David Manana <fdmanana@gmail.com>
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/9808065
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11199 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This CL:
- Adds a new trait parameter to LazyInstance to let it initialize the instance
without paying the cost of atomic operations (which are expensive on Mac).
This only works for users who don't care about thread-safety and this is now
the default initialization trait used by LazyInstance in v8.
- Reverts the changes that were made in r11010 in isolate.{cc,h}. That lets
Isolate's accessors be as cheap as they were before (but adds one static initializer).
- Adds OS::PostSetup() used to initialize the math functions which depend on CPU features.
That lets the math functions get rid of CallOnce().
BUG=118686
Review URL: https://chromiumcodereview.appspot.com/9873023
Patch from Philippe Liard <pliard@chromium.org>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11198 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Lithium translation rebuilds hydrogen environments from scratch so we have to ensure that arguments object is correctly bound on function entry otherwise deoptimization will not materialize it.
This fix was implemented as part of r11109 and then reverted.
R=danno@chromium.org
BUG=v8:2045
TEST=test/mjsunit/regress/regress-2045.js
Review URL: https://chromiumcodereview.appspot.com/9963008
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11194 ce2b1a6d-e550-0410-aec6-3dcde31c8c00