diff --git a/deps/v8/ChangeLog b/deps/v8/ChangeLog
index c31f5fc700..134540d3f0 100644
--- a/deps/v8/ChangeLog
+++ b/deps/v8/ChangeLog
@@ -1,12 +1,53 @@
+2010-09-30: Version 2.4.7
+
+ Changed the command-line flag --max-new-space-size to be in kB and the
+ flag --max-old-space-size to be in MB (previously they were in bytes).
+
+ Added Debug::CancelDebugBreak to the debugger API.
+
+ Fixed a bug in getters for negative numeric property names
+ (https://bugs.webkit.org/show_bug.cgi?id=46689).
+
+ Performance improvements on all platforms.
+
+
+2010-09-27: Version 2.4.6
+
+ Fixed assertion failure related to copy-on-write arrays (issue 876).
+
+ Fixed build failure of 64-bit V8 on Windows.
+
+ Fixed a bug in RegExp (issue http://crbug.com/52801).
+
+ Improved the profiler's coverage to cover more functions (issue 858).
+
+ Fixed error in shift operators on 64-bit V8
+ (issue http://crbug.com/54521).
+
+
+2010-09-22: Version 2.4.5
+
+ Changed the RegExp benchmark to exercise the regexp engine on different
+ inputs by scrambling the input strings.
+
+ Fixed a bug in keyed loads on strings.
+
+ Fixed a bug with loading global function prototypes.
+
+ Fixed a bug with profiling RegExp calls (issue http://crbug.com/55999).
+
+ Performance improvements on all platforms.
+
+
2010-09-15: Version 2.4.4
- Fix bug with hangs on very large sparse arrays.
+ Fixed bug with hangs on very large sparse arrays.
- Try harder to free up memory when running out of space.
+ Now tries harder to free up memory when running out of space.
- Add heap snapshots to JSON format to API.
+ Added heap snapshots to JSON format to API.
- Recalibrate benchmarks.
+ Recalibrated benchmarks.
2010-09-13: Version 2.4.3
@@ -42,33 +83,33 @@
2010-09-01: Version 2.4.0
- Fix bug in Object.freeze and Object.seal when Array.prototype or
- Object.prototype is changed (issue 842).
+ Fixed bug in Object.freeze and Object.seal when Array.prototype or
+ Object.prototype are changed (issue 842).
- Update Array.splice to follow Safari and Firefox when called
+ Updated Array.splice to follow Safari and Firefox when called
with zero arguments.
- Fix a missing live register when breaking at keyed loads on ARM.
+ Fixed a missing live register when breaking at keyed loads on ARM.
Performance improvements on all platforms.
2010-08-25: Version 2.3.11
- Fix bug in RegExp related to copy-on-write arrays.
+ Fixed bug in RegExp related to copy-on-write arrays.
- Refactoring of tools/test.py script, including the introduction of
+ Refactored tools/test.py script, including the introduction of
VARIANT_FLAGS that allows specification of sets of flags with which
all tests should be run.
- Fix a bug in the handling of debug breaks in CallIC.
+ Fixed a bug in the handling of debug breaks in CallIC.
Performance improvements on all platforms.
2010-08-23: Version 2.3.10
- Fix bug in bitops on ARM.
+ Fixed bug in bitops on ARM.
Build fixes for unusual compilers.
@@ -79,7 +120,7 @@
2010-08-18: Version 2.3.9
- Fix compilation for ARMv4 on OpenBSD/FreeBSD.
+ Fixed compilation for ARMv4 on OpenBSD/FreeBSD.
Removed specialized handling of GCC 4.4 (issue 830).
@@ -120,7 +161,7 @@
Fixed handling of JSObject::elements in CalculateNetworkSize
(issue 822).
- Allow compiling with strict aliasing enabled on GCC 4.4 (issue 463).
+ Allowed compiling with strict aliasing enabled on GCC 4.4 (issue 463).
2010-08-09: Version 2.3.6
@@ -130,7 +171,7 @@
Object.seal and Object.freeze return the modified object (issue 809).
- Fix building using GCC 4.4.4.
+ Fixed building using GCC 4.4.4.
2010-08-04: Version 2.3.5
@@ -139,7 +180,7 @@
dot-notation property access now allows keywords. Also allowed
non-identifiers after "get" or "set" in an object initialiser.
- Randomize the addresses of allocated executable memory on Windows.
+ Randomized the addresses of allocated executable memory on Windows.
2010-08-02: Version 2.3.4
@@ -251,15 +292,15 @@
2010-06-30: Version 2.2.21
- Fix bug in externalizing some ASCII strings (Chromium issue 47824).
+ Fixed bug in externalizing some ASCII strings (Chromium issue 47824).
- Update JSON.stringify to floor the space parameter (issue 753).
+ Updated JSON.stringify to floor the space parameter (issue 753).
- Update the Mozilla test expectations to the newest version.
+ Updated the Mozilla test expectations to the newest version.
- Update the ES5 Conformance Test expectations to the latest version.
+ Updated the ES5 Conformance Test expectations to the latest version.
- Update the V8 benchmark suite.
+ Updated the V8 benchmark suite.
Provide actual breakpoints locations in response to setBreakpoint
and listBreakpoints requests.
@@ -267,13 +308,13 @@
2010-06-28: Version 2.2.20
- Fix bug with for-in on x64 platform (issue 748).
+ Fixed bug with for-in on x64 platform (issue 748).
- Fix crash bug on x64 platform (issue 756).
+ Fixed crash bug on x64 platform (issue 756).
- Fix bug in Object.getOwnPropertyNames. (chromium issue 41243).
+ Fixed bug in Object.getOwnPropertyNames. (chromium issue 41243).
- Fix a bug on ARM that caused the result of 1 << x to be
+ Fixed a bug on ARM that caused the result of 1 << x to be
miscalculated for some inputs.
Performance improvements on all platforms.
@@ -281,7 +322,7 @@
2010-06-23: Version 2.2.19
- Fix bug that causes the build to break when profillingsupport=off
+ Fixed bug that causes the build to break when profillingsupport=off
(issue 738).
Added expose-externalize-string flag for testing extensions.
@@ -289,7 +330,7 @@
Resolve linker issues with using V8 as a DLL causing a number of
problems with unresolved symbols.
- Fix build failure for cctests when ENABLE_DEBUGGER_SUPPORT is not
+ Fixed build failure for cctests when ENABLE_DEBUGGER_SUPPORT is not
defined.
Performance improvements on all platforms.
@@ -300,11 +341,11 @@
Added API functions to retrieve information on indexed properties
managed by the embedding layer. Fixes bug 737.
- Make ES5 Object.defineProperty support array elements. Fixes bug 619.
+ Made ES5 Object.defineProperty support array elements. Fixes bug 619.
- Add heap profiling to the API.
+ Added heap profiling to the API.
- Remove old named property query from the API.
+ Removed old named property query from the API.
Incremental performance improvements.
@@ -330,12 +371,12 @@
2010-06-07: Version 2.2.15
- Add an API to control the disposal of external string resources.
+ Added an API to control the disposal of external string resources.
- Add missing initialization of a couple of variables which makes
+ Added missing initialization of a couple of variables which makes
some compilers complaint when compiling with -Werror.
- Improve performance on all platforms.
+ Improved performance on all platforms.
2010-06-02: Version 2.2.14
@@ -349,12 +390,12 @@
2010-05-31: Version 2.2.13
- Implement Object.getOwnPropertyDescriptor for element indices and
+ Implemented Object.getOwnPropertyDescriptor for element indices and
strings (issue 599).
- Fix bug for windows 64 bit C calls from generated code.
+ Fixed bug for windows 64 bit C calls from generated code.
- Add new scons flag unalignedaccesses for arm builds.
+ Added new scons flag unalignedaccesses for arm builds.
Performance improvements on all platforms.
@@ -369,7 +410,7 @@
2010-05-21: Version 2.2.11
- Fix crash bug in liveedit on 64 bit.
+ Fixed crash bug in liveedit on 64 bit.
Use 'full compiler' when debugging is active. This should increase
the density of possible break points, making single step more fine
@@ -379,11 +420,11 @@
Misc. fixes to the Solaris build.
- Add new flags --print-cumulative-gc-stat and --trace-gc-nvp.
+ Added new flags --print-cumulative-gc-stat and --trace-gc-nvp.
- Add filtering of CPU profiles by security context.
+ Added filtering of CPU profiles by security context.
- Fix crash bug on ARM when running without VFP2 or VFP3.
+ Fixed crash bug on ARM when running without VFP2 or VFP3.
Incremental performance improvements in all backends.
@@ -395,12 +436,12 @@
2010-05-10: Version 2.2.9
- Allow Object.create to be called with a function (issue 697).
+ Allowed Object.create to be called with a function (issue 697).
Fixed bug with Date.parse returning a non-NaN value when called on a
non date string (issue 696).
- Allow unaligned memory accesses on ARM targets that support it (by
+ Allowed unaligned memory accesses on ARM targets that support it (by
Subrato K De of CodeAurora ).
C++ API for retrieving JavaScript stack trace information.
@@ -554,9 +595,9 @@
2010-02-23: Version 2.1.2
- Fix a crash bug caused by wrong assert.
+ Fixed a crash bug caused by wrong assert.
- Fix a bug with register names on 64-bit V8 (issue 615).
+ Fixed a bug with register names on 64-bit V8 (issue 615).
Performance improvements on all platforms.
@@ -592,13 +633,13 @@
Solaris support by Erich Ocean and Ryan Dahl
.
- Fix a bug that Math.round() returns incorrect results for huge
+ Fixed a bug that Math.round() returns incorrect results for huge
integers.
- Fix enumeration order for objects created from some constructor
+ Fixed enumeration order for objects created from some constructor
functions (isue http://crbug.com/3867).
- Fix arithmetic on some integer constants (issue 580).
+ Fixed arithmetic on some integer constants (issue 580).
Numerous performance improvements including porting of previous IA-32
optimizations to x64 and ARM architectures.
@@ -737,11 +778,11 @@
X64: Convert smis to holding 32 bits of payload.
- Introduce v8::Integer::NewFromUnsigned method.
+ Introduced v8::Integer::NewFromUnsigned method.
- Add missing null check in Context::GetCurrent.
+ Added missing null check in Context::GetCurrent.
- Add trim, trimLeft and trimRight methods to String
+ Added trim, trimLeft and trimRight methods to String
Patch by Jan de Mooij
Implement ES5 Array.isArray
@@ -749,14 +790,15 @@
Skip access checks for hidden properties.
- Add String::Concat(Handle left, Handle right) to the V8 API.
+ Added String::Concat(Handle left, Handle right) to the
+ V8 API.
- Fix GYP-based builds of V8.
+ Fixed GYP-based builds of V8.
2009-10-07: Version 1.3.15
- Expand the maximum size of the code space to 512MB for 64-bit mode.
+ Expanded the maximum size of the code space to 512MB for 64-bit mode.
Fixed a crash bug happening when starting profiling (issue
http://crbug.com/23768).
@@ -768,10 +810,10 @@
located on the object or in the prototype chain skipping any
interceptors.
- Fix the stack limits setting API to work correctly with threads. The
+ Fixed the stack limits setting API to work correctly with threads. The
stack limit now needs to be set to each thread thich is used with V8.
- Remove the high-priority flag from IdleNotification()
+ Removed the high-priority flag from IdleNotification()
Ensure V8 is initialized before locking and unlocking threads.
@@ -839,7 +881,7 @@
Implemented missing pieces of debugger infrastructure on ARM. The
debugger is now fully functional on ARM.
- Make 'hidden' the default visibility for gcc.
+ Made 'hidden' the default visibility for gcc.
2009-09-09: Version 1.3.10
@@ -894,9 +936,9 @@
2009-08-21: Version 1.3.6
- Add support for forceful termination of JavaScript execution.
+ Added support for forceful termination of JavaScript execution.
- Add low memory notification to the API. The embedding host can signal
+ Added low memory notification to the API. The embedding host can signal
a low memory situation to V8.
Changed the handling of global handles (persistent handles in the API
@@ -910,9 +952,9 @@
2009-08-19: Version 1.3.5
- Optimize initialization of some arrays in the builtins.
+ Optimized initialization of some arrays in the builtins.
- Fix mac-nm script to support filenames with spaces.
+ Fixed mac-nm script to support filenames with spaces.
Support for using the V8 profiler when V8 is embedded in a Windows DLL.
@@ -925,7 +967,7 @@
Added API for getting object mirrors.
- Make sure that SSE3 instructions are used whenever possible even when
+ Made sure that SSE3 instructions are used whenever possible even when
running off a snapshot generated without using SSE3 instructions.
Tweaked the handling of the initial size and growth policy of the heap.
@@ -947,20 +989,20 @@
2009-08-12: Version 1.3.3
- Fix issue 417: incorrect %t placeholder expansion.
+ Fixed issue 417: incorrect %t placeholder expansion.
- Add .gitignore file similar to Chromium's one.
+ Added .gitignore file similar to Chromium's one.
- Fix SConstruct file to build with new logging code for Android.
+ Fixed SConstruct file to build with new logging code for Android.
API: added function to find instance of template in prototype
chain. Inlined Object::IsInstanceOf.
Land change to notify valgrind when we modify code on x86.
- Add api call to determine whether a string can be externalized.
+ Added api call to determine whether a string can be externalized.
- Add a write() command to d8.
+ Added a write() command to d8.
2009-08-05: Version 1.3.2
@@ -1243,7 +1285,7 @@
Added EcmaScript 5 JSON object.
- Fix bug in preemption support on ARM.
+ Fixed bug in preemption support on ARM.
2009-04-23: Version 1.2.0
diff --git a/deps/v8/benchmarks/README.txt b/deps/v8/benchmarks/README.txt
index 800b4f5185..6676f37556 100644
--- a/deps/v8/benchmarks/README.txt
+++ b/deps/v8/benchmarks/README.txt
@@ -70,7 +70,9 @@ Removed dead code from the RayTrace benchmark and fixed a couple of
typos in the DeltaBlue implementation. Changed the Splay benchmark to
avoid converting the same numeric key to a string over and over again
and to avoid inserting and removing the same element repeatedly thus
-increasing pressure on the memory subsystem.
+increasing pressure on the memory subsystem. Changed the RegExp
+benchmark to exercise the regular expression engine on different
+input strings.
Furthermore, the benchmark runner was changed to run the benchmarks
for at least a few times to stabilize the reported numbers on slower
diff --git a/deps/v8/benchmarks/regexp.js b/deps/v8/benchmarks/regexp.js
index f76086685c..71b9e6362c 100644
--- a/deps/v8/benchmarks/regexp.js
+++ b/deps/v8/benchmarks/regexp.js
@@ -1,4 +1,4 @@
-// Copyright 2009 the V8 project authors. All rights reserved.
+// Copyright 2010 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -25,21 +25,51 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Automatically generated on 2009-01-30.
+// Automatically generated on 2009-01-30. Manually updated on 2010-09-17.
// This benchmark is generated by loading 50 of the most popular pages
// on the web and logging all regexp operations performed. Each
// operation is given a weight that is calculated from an estimate of
// the popularity of the pages where it occurs and the number of times
-// it is executed while loading each page. Finally the literal
+// it is executed while loading each page. Furthermore the literal
// letters in the data are encoded using ROT13 in a way that does not
-// affect how the regexps match their input.
+// affect how the regexps match their input. Finally the strings are
+// scrambled to exercise the regexp engine on different input strings.
-var RegRxp = new BenchmarkSuite('RegExp', 910985, [
- new Benchmark("RegExp", runRegExpBenchmark)
+
+var RegExp = new BenchmarkSuite('RegExp', 910985, [
+ new Benchmark("RegExp", RegExpRun, RegExpSetup, RegExpTearDown)
]);
-function runRegExpBenchmark() {
+var regExpBenchmark = null;
+
+function RegExpSetup() {
+ regExpBenchmark = new RegExpBenchmark();
+ RegExpRun(); // run once to get system initialized
+}
+
+function RegExpRun() {
+ regExpBenchmark.run();
+}
+
+function RegExpTearDown() {
+ regExpBenchmark = null;
+}
+
+// Returns an array of n different variants of the input string str.
+// The variants are computed by randomly rotating one random
+// character.
+function computeInputVariants(str, n) {
+ var variants = [ str ];
+ for (var i = 1; i < n; i++) {
+ var pos = Math.floor(Math.random() * str.length);
+ var chr = String.fromCharCode((str.charCodeAt(pos) + Math.floor(Math.random() * 128)) % 128);
+ variants[i] = str.substring(0, pos) + chr + str.substring(pos + 1, str.length);
+ }
+ return variants;
+}
+
+function RegExpBenchmark() {
var re0 = /^ba/;
var re1 = /(((\w+):\/\/)([^\/:]*)(:(\d+))?)?([^#?]*)(\?([^#]*))?(#(.*))?/;
var re2 = /^\s*|\s*$/g;
@@ -59,77 +89,105 @@ function runRegExpBenchmark() {
var re14 = /\s+/g;
var re15 = /^\s*(\S*(\s+\S+)*)\s*$/;
var re16 = /(-[a-z])/i;
+
+ var s0 = computeInputVariants('pyvpx', 6511);
+ var s1 = computeInputVariants('uggc://jjj.snprobbx.pbz/ybtva.cuc', 1844);
+ var s2 = computeInputVariants('QBZPbageby_cynprubyqre', 739);
+ var s3 = computeInputVariants('uggc://jjj.snprobbx.pbz/', 598);
+ var s4 = computeInputVariants('uggc://jjj.snprobbx.pbz/fepu.cuc', 454);
+ var s5 = computeInputVariants('qqqq, ZZZ q, llll', 352);
+ var s6 = computeInputVariants('vachggrkg QBZPbageby_cynprubyqre', 312);
+ var s7 = computeInputVariants('/ZlFcnprUbzrcntr/Vaqrk-FvgrUbzr,10000000', 282);
+ var s8 = computeInputVariants('vachggrkg', 177);
+ var s9 = computeInputVariants('528.9', 170);
+ var s10 = computeInputVariants('528', 170);
+ var s11 = computeInputVariants('VCPhygher=ra-HF', 156);
+ var s12 = computeInputVariants('CersreerqPhygher=ra-HF', 156);
+ var s13 = computeInputVariants('xrlcerff', 144);
+ var s14 = computeInputVariants('521', 139);
+ var s15 = computeInputVariants(str0, 139);
+ var s16 = computeInputVariants('qvi .so_zrah', 137);
+ var s17 = computeInputVariants('qvi.so_zrah', 137);
+ var s18 = computeInputVariants('uvqqra_ryrz', 117);
+ var s19 = computeInputVariants('sevraqfgre_naba=nvq%3Qn6ss9p85n868ro9s059pn854735956o3%26ers%3Q%26df%3Q%26vpgl%3QHF', 95);
+ var s20 = computeInputVariants('uggc://ubzr.zlfcnpr.pbz/vaqrk.psz', 93);
+ var s21 = computeInputVariants(str1, 92);
+ var s22 = computeInputVariants('svefg', 85);
+ var s23 = computeInputVariants('uggc://cebsvyr.zlfcnpr.pbz/vaqrk.psz', 85);
+ var s24 = computeInputVariants('ynfg', 85);
+ var s25 = computeInputVariants('qvfcynl', 85);
+
function runBlock0() {
for (var i = 0; i < 6511; i++) {
- re0.exec('pyvpx');
+ re0.exec(s0[i]);
}
for (var i = 0; i < 1844; i++) {
- re1.exec('uggc://jjj.snprobbx.pbz/ybtva.cuc');
+ re1.exec(s1[i]);
}
for (var i = 0; i < 739; i++) {
- 'QBZPbageby_cynprubyqre'.replace(re2, '');
+ s2[i].replace(re2, '');
}
for (var i = 0; i < 598; i++) {
- re1.exec('uggc://jjj.snprobbx.pbz/');
+ re1.exec(s3[i]);
}
for (var i = 0; i < 454; i++) {
- re1.exec('uggc://jjj.snprobbx.pbz/fepu.cuc');
+ re1.exec(s4[i]);
}
for (var i = 0; i < 352; i++) {
- /qqqq|qqq|qq|q|ZZZZ|ZZZ|ZZ|Z|llll|ll|l|uu|u|UU|U|zz|z|ff|f|gg|g|sss|ss|s|mmm|mm|m/g.exec('qqqq, ZZZ q, llll');
+ /qqqq|qqq|qq|q|ZZZZ|ZZZ|ZZ|Z|llll|ll|l|uu|u|UU|U|zz|z|ff|f|gg|g|sss|ss|s|mmm|mm|m/g.exec(s5[i]);
}
for (var i = 0; i < 312; i++) {
- re3.exec('vachggrkg QBZPbageby_cynprubyqre');
+ re3.exec(s6[i]);
}
for (var i = 0; i < 282; i++) {
- re4.exec('/ZlFcnprUbzrcntr/Vaqrk-FvgrUbzr,10000000');
+ re4.exec(s7[i]);
}
for (var i = 0; i < 177; i++) {
- 'vachggrkg'.replace(re5, '');
+ s8[i].replace(re5, '');
}
for (var i = 0; i < 170; i++) {
- '528.9'.replace(re6, '');
- re7.exec('528');
+ s9[i].replace(re6, '');
+ re7.exec(s10[i]);
}
for (var i = 0; i < 156; i++) {
- re8.exec('VCPhygher=ra-HF');
- re8.exec('CersreerqPhygher=ra-HF');
+ re8.exec(s11[i]);
+ re8.exec(s12[i]);
}
for (var i = 0; i < 144; i++) {
- re0.exec('xrlcerff');
+ re0.exec(s13[i]);
}
for (var i = 0; i < 139; i++) {
- '521'.replace(re6, '');
- re7.exec('521');
+ s14[i].replace(re6, '');
+ re7.exec(s14[i]);
re9.exec('');
- /JroXvg\/(\S+)/.exec(str0);
+ /JroXvg\/(\S+)/.exec(s15[i]);
}
for (var i = 0; i < 137; i++) {
- 'qvi .so_zrah'.replace(re10, '');
- 'qvi .so_zrah'.replace(/\[/g, '');
- 'qvi.so_zrah'.replace(re11, '');
+ s16[i].replace(re10, '');
+ s16[i].replace(/\[/g, '');
+ s17[i].replace(re11, '');
}
for (var i = 0; i < 117; i++) {
- 'uvqqra_ryrz'.replace(re2, '');
+ s18[i].replace(re2, '');
}
for (var i = 0; i < 95; i++) {
- /(?:^|;)\s*sevraqfgre_ynat=([^;]*)/.exec('sevraqfgre_naba=nvq%3Qn6ss9p85n868ro9s059pn854735956o3%26ers%3Q%26df%3Q%26vpgl%3QHF');
+ /(?:^|;)\s*sevraqfgre_ynat=([^;]*)/.exec(s19[i]);
}
for (var i = 0; i < 93; i++) {
- 'uggc://ubzr.zlfcnpr.pbz/vaqrk.psz'.replace(re12, '');
- re13.exec('uggc://ubzr.zlfcnpr.pbz/vaqrk.psz');
+ s20[i].replace(re12, '');
+ re13.exec(s20[i]);
}
for (var i = 0; i < 92; i++) {
- str1.replace(/([a-zA-Z]|\s)+/, '');
+ s21[i].replace(/([a-zA-Z]|\s)+/, '');
}
for (var i = 0; i < 85; i++) {
- 'svefg'.replace(re14, '');
- 'svefg'.replace(re15, '');
- 'uggc://cebsvyr.zlfcnpr.pbz/vaqrk.psz'.replace(re12, '');
- 'ynfg'.replace(re14, '');
- 'ynfg'.replace(re15, '');
- re16.exec('qvfcynl');
- re13.exec('uggc://cebsvyr.zlfcnpr.pbz/vaqrk.psz');
+ s22[i].replace(re14, '');
+ s22[i].replace(re15, '');
+ s23[i].replace(re12, '');
+ s24[i].replace(re14, '');
+ s24[i].replace(re15, '');
+ re16.exec(s25[i]);
+ re13.exec(s23[i]);
}
}
var re17 = /(^|[^\\])\"\\\/Qngr\((-?[0-9]+)\)\\\/\"/g;
@@ -145,64 +203,98 @@ function runRegExpBenchmark() {
var str7 = ';;jvaqbj.IjPurpxZbhfrCbfvgvbaNQ_VQ=shapgvba(r){vs(!r)ine r=jvaqbj.rirag;ine c=-1;vs(d1)c=d1.EbyybssCnary;ine bo=IjTrgBow("IjCnayNQ_VQ_"+c);vs(bo&&bo.fglyr.ivfvovyvgl=="ivfvoyr"){ine fns=IjFns?8:0;ine pheK=r.pyvragK+IjBOFpe("U")+fns,pheL=r.pyvragL+IjBOFpe("I")+fns;ine y=IjBOEC(NQ_VQ,bo,"Y"),g=IjBOEC(NQ_VQ,bo,"G");ine e=y+d1.Cnaryf[c].Jvqgu,o=g+d1.Cnaryf[c].Urvtug;vs((pheKe)||(pheLo)){vs(jvaqbj.IjBaEbyybssNQ_VQ)IjBaEbyybssNQ_VQ(c);ryfr IjPybfrNq(NQ_VQ,c,gehr,"");}ryfr erghea;}IjPnapryZbhfrYvfgrareNQ_VQ();};;jvaqbj.IjFrgEbyybssCnaryNQ_VQ=shapgvba(c){ine z="zbhfrzbir",q=qbphzrag,s=IjPurpxZbhfrCbfvgvbaNQ_VQ;c=IjTc(NQ_VQ,c);vs(d1&&d1.EbyybssCnary>-1)IjPnapryZbhfrYvfgrareNQ_VQ();vs(d1)d1.EbyybssCnary=c;gel{vs(q.nqqRiragYvfgrare)q.nqqRiragYvfgrare(z,s,snyfr);ryfr vs(q.nggnpuRirag)q.nggnpuRirag("ba"+z,s);}pngpu(r){}};;jvaqbj.IjPnapryZbhfrYvfgrareNQ_VQ=shapgvba(){ine z="zbhfrzbir",q=qbphzrag,s=IjPurpxZbhfrCbfvgvbaNQ_VQ;vs(d1)d1.EbyybssCnary=-1;gel{vs(q.erzbirRiragYvfgrare)q.erzbirRiragYvfgrare(z,s,snyfr);ryfr vs(q.qrgnpuRirag)q.qrgnpuRirag("ba"+z,s);}pngpu(r){}};;d1.IjTc=d2(n,c){ine nq=d1;vs(vfAnA(c)){sbe(ine v=0;v0){vs(nq.FzV.yratgu>0)nq.FzV+="/";nq.FzV+=vh[v];nq.FtZ[nq.FtZ.yratgu]=snyfr;}}};;d1.IjYvzvg0=d2(n,f){ine nq=d1,vh=f.fcyvg("/");sbe(ine v=0;v0){vs(nq.OvC.yratgu>0)nq.OvC+="/";nq.OvC+=vh[v];}}};;d1.IjRVST=d2(n,c){jvaqbj["IjCnayNQ_VQ_"+c+"_Bow"]=IjTrgBow("IjCnayNQ_VQ_"+c+"_Bow");vs(jvaqbj["IjCnayNQ_VQ_"+c+"_Bow"]==ahyy)frgGvzrbhg("IjRVST(NQ_VQ,"+c+")",d1.rvsg);};;d1.IjNavzSHC=d2(n,c){ine nq=d1;vs(c>nq.Cnaryf.yratgu)erghea;ine cna=nq.Cnaryf[c],nn=gehr,on=gehr,yn=gehr,en=gehr,cn=nq.Cnaryf[0],sf=nq.ShF,j=cn.Jvqgu,u=cn.Urvtug;vs(j=="100%"){j=sf;en=snyfr;yn=snyfr;}vs(u=="100%"){u=sf;nn=snyfr;on=snyfr;}vs(cn.YnY=="Y")yn=snyfr;vs(cn.YnY=="E")en=snyfr;vs(cn.GnY=="G")nn=snyfr;vs(cn.GnY=="O")on=snyfr;ine k=0,l=0;fjvgpu(nq.NshP%8){pnfr 0:oernx;pnfr 1:vs(nn)l=-sf;oernx;pnfr 2:k=j-sf;oernx;pnfr 3:vs(en)k=j;oernx;pnfr 4:k=j-sf;l=u-sf;oernx;pnfr 5:k=j-sf;vs(on)l=u;oernx;pnfr 6:l=u-sf;oernx;pnfr 7:vs(yn)k=-sf;l=u-sf;oernx;}vs(nq.NshP++ 0)||(nethzragf.yratgu==3&&bG>0))){pyrneGvzrbhg(cay.UgU);cay.UgU=frgGvzrbhg(cay.UvqrNpgvba,(nethzragf.yratgu==3?bG:cay.UvqrGvzrbhgInyhr));}};;d1.IjErfrgGvzrbhg=d2(n,c,bG){c=IjTc(n,c);IjPnapryGvzrbhg(n,c);riny("IjFgnegGvzrbhg(NQ_VQ,c"+(nethzragf.yratgu==3?",bG":"")+")");};;d1.IjErfrgNyyGvzrbhgf=d2(n){sbe(ine c=0;c'.replace(re55, '');
''.replace(re55, '');
- str1.replace(/^.*\s+(\S+\s+\S+$)/, '');
+ s21[i].replace(/^.*\s+(\S+\s+\S+$)/, '');
'tzk%2Subzrcntr%2Sfgneg%2Sqr%2S'.replace(re30, '');
'tzk'.replace(re30, '');
'uggc://${ubfg}${cngu}/${dz}'.replace(/(\$\{ubfg\})|(\$ubfg\b)/g, '');
@@ -549,61 +671,70 @@ function runRegExpBenchmark() {
var re62 = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;
var str34 = '${1}://${2}${3}${4}${5}';
var str35 = ' O=6gnyg0g4znrrn&o=3&f=gc; Q=_lyu=K3bQZGSxnT4lZzD3OS9GNmV3ZGLkAQxRpTyxNmRlZmRmAmNkAQLRqTImqNZjOUEgpTjQnJ5xMKtgoN--; SCF=qy';
+ var s83 = computeInputVariants(str27, 11);
+ var s84 = computeInputVariants(str28, 11);
+ var s85 = computeInputVariants(str29, 11);
+ var s86 = computeInputVariants(str30, 11);
+ var s87 = computeInputVariants(str31, 11);
+ var s88 = computeInputVariants(str32, 11);
+ var s89 = computeInputVariants(str33, 11);
+ var s90 = computeInputVariants(str34, 11);
+
function runBlock6() {
for (var i = 0; i < 11; i++) {
- str27.replace(/##yv0##/gi, '');
- str27.replace(re57, '');
- str28.replace(re58, '');
- str29.replace(re59, '');
- str30.replace(/##\/o##/gi, '');
- str30.replace(/##\/v##/gi, '');
- str30.replace(/##\/h##/gi, '');
- str30.replace(/##o##/gi, '');
- str30.replace(/##oe##/gi, '');
- str30.replace(/##v##/gi, '');
- str30.replace(/##h##/gi, '');
- str31.replace(/##n##/gi, '');
- str32.replace(/##\/n##/gi, '');
- str33.replace(/#~#argjbexybtb#~#/g, '');
- / Zbovyr\//.exec(str0);
- /##yv1##/gi.exec(str27);
- /##yv10##/gi.exec(str28);
- /##yv11##/gi.exec(str28);
- /##yv12##/gi.exec(str28);
- /##yv13##/gi.exec(str28);
- /##yv14##/gi.exec(str28);
- /##yv15##/gi.exec(str28);
- re58.exec(str28);
- /##yv17##/gi.exec(str29);
- /##yv18##/gi.exec(str29);
- re59.exec(str29);
- /##yv2##/gi.exec(str27);
- /##yv20##/gi.exec(str30);
- /##yv21##/gi.exec(str30);
- /##yv22##/gi.exec(str30);
- /##yv23##/gi.exec(str30);
- /##yv3##/gi.exec(str27);
- re57.exec(str27);
- /##yv5##/gi.exec(str28);
- /##yv6##/gi.exec(str28);
- /##yv7##/gi.exec(str28);
- /##yv8##/gi.exec(str28);
- /##yv9##/gi.exec(str28);
+ s83[i].replace(/##yv0##/gi, '');
+ s83[i].replace(re57, '');
+ s84[i].replace(re58, '');
+ s85[i].replace(re59, '');
+ s86[i].replace(/##\/o##/gi, '');
+ s86[i].replace(/##\/v##/gi, '');
+ s86[i].replace(/##\/h##/gi, '');
+ s86[i].replace(/##o##/gi, '');
+ s86[i].replace(/##oe##/gi, '');
+ s86[i].replace(/##v##/gi, '');
+ s86[i].replace(/##h##/gi, '');
+ s87[i].replace(/##n##/gi, '');
+ s88[i].replace(/##\/n##/gi, '');
+ s89[i].replace(/#~#argjbexybtb#~#/g, '');
+ / Zbovyr\//.exec(s15[i]);
+ /##yv1##/gi.exec(s83[i]);
+ /##yv10##/gi.exec(s84[i]);
+ /##yv11##/gi.exec(s84[i]);
+ /##yv12##/gi.exec(s84[i]);
+ /##yv13##/gi.exec(s84[i]);
+ /##yv14##/gi.exec(s84[i]);
+ /##yv15##/gi.exec(s84[i]);
+ re58.exec(s84[i]);
+ /##yv17##/gi.exec(s85[i]);
+ /##yv18##/gi.exec(s85[i]);
+ re59.exec(s85[i]);
+ /##yv2##/gi.exec(s83[i]);
+ /##yv20##/gi.exec(s86[i]);
+ /##yv21##/gi.exec(s86[i]);
+ /##yv22##/gi.exec(s86[i]);
+ /##yv23##/gi.exec(s86[i]);
+ /##yv3##/gi.exec(s83[i]);
+ re57.exec(s83[i]);
+ /##yv5##/gi.exec(s84[i]);
+ /##yv6##/gi.exec(s84[i]);
+ /##yv7##/gi.exec(s84[i]);
+ /##yv8##/gi.exec(s84[i]);
+ /##yv9##/gi.exec(s84[i]);
re8.exec('473qq1rs0n2r70q9qo1pq48n021s9468ron90nps048p4p29');
re8.exec('SbeprqRkcvengvba=633669325184628362');
re8.exec('FrffvbaQQS2=473qq1rs0n2r70q9qo1pq48n021s9468ron90nps048p4p29');
- /AbxvnA[^\/]*/.exec(str0);
+ /AbxvnA[^\/]*/.exec(s15[i]);
}
for (var i = 0; i < 10; i++) {
' bss'.replace(/(?:^|\s+)bss(?:\s+|$)/g, '');
- str34.replace(/(\$\{0\})|(\$0\b)/g, '');
- str34.replace(/(\$\{1\})|(\$1\b)/g, '');
- str34.replace(/(\$\{pbzcyrgr\})|(\$pbzcyrgr\b)/g, '');
- str34.replace(/(\$\{sentzrag\})|(\$sentzrag\b)/g, '');
- str34.replace(/(\$\{ubfgcbeg\})|(\$ubfgcbeg\b)/g, '');
- str34.replace(re56, '');
- str34.replace(/(\$\{cebgbpby\})|(\$cebgbpby\b)/g, '');
- str34.replace(/(\$\{dhrel\})|(\$dhrel\b)/g, '');
+ s90[i].replace(/(\$\{0\})|(\$0\b)/g, '');
+ s90[i].replace(/(\$\{1\})|(\$1\b)/g, '');
+ s90[i].replace(/(\$\{pbzcyrgr\})|(\$pbzcyrgr\b)/g, '');
+ s90[i].replace(/(\$\{sentzrag\})|(\$sentzrag\b)/g, '');
+ s90[i].replace(/(\$\{ubfgcbeg\})|(\$ubfgcbeg\b)/g, '');
+ s90[i].replace(re56, '');
+ s90[i].replace(/(\$\{cebgbpby\})|(\$cebgbpby\b)/g, '');
+ s90[i].replace(/(\$\{dhrel\})|(\$dhrel\b)/g, '');
'nqfvmr'.replace(re29, '');
'nqfvmr'.replace(re30, '');
'uggc://${2}${3}${4}${5}'.replace(/(\$\{2\})|(\$2\b)/g, '');
@@ -629,7 +760,7 @@ function runRegExpBenchmark() {
re9.exec('zrqvgobk');
re9.exec('hsgy');
re9.exec('lhv-h');
- /Fnsnev|Xbadhrebe|XUGZY/gi.exec(str0);
+ /Fnsnev|Xbadhrebe|XUGZY/gi.exec(s15[i]);
re61.exec('uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/onfr.wf');
re62.exec('#Ybtva_rznvy');
}
@@ -640,6 +771,9 @@ function runRegExpBenchmark() {
var str38 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_zlfcnpr-ubzrcntr_wf&qg=1231364057761&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231364057761&punaary=svz_zlfcnpr_ubzrcntr_abgybttrqva%2Psvz_zlfcnpr_aba_HTP%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Ssevraqf.zlfcnpr.pbz%2Svaqrk.psz&nq_glcr=grkg&rvq=6083027&rn=0&sez=0&tn_ivq=1667363813.1231364061&tn_fvq=1231364061&tn_uvq=1917563877&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22';
var str39 = 'ZFPhygher=VC=74.125.75.20&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669321699093060&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
var str40 = 'ZFPhygher=VC=74.125.75.20&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669321699093060&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ var s91 = computeInputVariants(str36, 9);
+ var s92 = computeInputVariants(str37, 9);
+ var s93 = computeInputVariants(str38, 9);
function runBlock7() {
for (var i = 0; i < 9; i++) {
'0'.replace(re40, '');
@@ -660,15 +794,15 @@ function runRegExpBenchmark() {
for (var i = 0; i < 8; i++) {
'Pybfr {0}'.replace(re63, '');
'Bcra {0}'.replace(re63, '');
- str36.split(re32);
- str37.split(re32);
+ s91[i].split(re32);
+ s92[i].split(re32);
'puvyq p1 svefg gnournqref'.replace(re14, '');
'puvyq p1 svefg gnournqref'.replace(re15, '');
'uqy_fcb'.replace(re14, '');
'uqy_fcb'.replace(re15, '');
'uvag'.replace(re14, '');
'uvag'.replace(re15, '');
- str38.replace(re33, '');
+ s93[i].replace(re33, '');
'yvfg'.replace(re14, '');
'yvfg'.replace(re15, '');
'at_bhgre'.replace(re30, '');
@@ -697,8 +831,8 @@ function runRegExpBenchmark() {
re8.exec('__hgzo=144631658.0.10.1231364074');
re8.exec('__hgzm=144631658.1231364074.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
re8.exec('p98s8o9q42nr21or1r61pqorn1n002nsss569635984s6qp7');
- re34.exec(str36);
- re34.exec(str37);
+ re34.exec(s91[i]);
+ re34.exec(s92[i]);
}
}
var re64 = /\b[a-z]/g;
@@ -707,7 +841,7 @@ function runRegExpBenchmark() {
var str41 = 'uggc://cebsvyr.zlfcnpr.pbz/Zbqhyrf/Nccyvpngvbaf/Cntrf/Pnainf.nfck';
function runBlock8() {
for (var i = 0; i < 7; i++) {
- str1.match(/\d+/g);
+ s21[i].match(/\d+/g);
'nsgre'.replace(re64, '');
'orsber'.replace(re64, '');
'obggbz'.replace(re64, '');
@@ -741,9 +875,9 @@ function runRegExpBenchmark() {
re19.exec('gno6');
re19.exec('gno7');
re19.exec('gno8');
- /NqborNVE\/([^\s]*)/.exec(str0);
- /NccyrJroXvg\/([^ ]*)/.exec(str0);
- /XUGZY/gi.exec(str0);
+ /NqborNVE\/([^\s]*)/.exec(s15[i]);
+ /NccyrJroXvg\/([^ ]*)/.exec(s15[i]);
+ /XUGZY/gi.exec(s15[i]);
/^(?:obql|ugzy)$/i.exec('YV');
re38.exec('ohggba');
re38.exec('vachg');
@@ -774,14 +908,14 @@ function runRegExpBenchmark() {
'freivpr'.replace(re46, '');
'freivpr'.replace(re47, '');
'freivpr'.replace(re48, '');
- /((ZFVR\s+([6-9]|\d\d)\.))/.exec(str0);
+ /((ZFVR\s+([6-9]|\d\d)\.))/.exec(s15[i]);
re66.exec('');
re50.exec('fryrpgrq');
re8.exec('8sqq78r9n442851q565599o401385sp3s04r92rnn7o19ssn');
re8.exec('SbeprqRkcvengvba=633669340386893867');
re8.exec('VC=74.125.75.17');
re8.exec('FrffvbaQQS2=8sqq78r9n442851q565599o401385sp3s04r92rnn7o19ssn');
- /Xbadhrebe|Fnsnev|XUGZY/.exec(str0);
+ /Xbadhrebe|Fnsnev|XUGZY/.exec(s15[i]);
re13.exec(str41);
re49.exec('unfsbphf');
}
@@ -826,12 +960,23 @@ function runRegExpBenchmark() {
var str61 = 'uggc://gx2.fgp.f-zfa.pbz/oe/uc/11/ra-hf/pff/v/g.tvs#uggc://gx2.fgo.f-zfa.pbz/v/29/4RQP4969777N048NPS4RRR3PO2S7S.wct';
var str62 = 'uggc://gx2.fgp.f-zfa.pbz/oe/uc/11/ra-hf/pff/v/g.tvs#uggc://gx2.fgo.f-zfa.pbz/v/OQ/63NP9O94NS5OQP1249Q9S1ROP7NS3.wct';
var str63 = 'zbmvyyn/5.0 (jvaqbjf; h; jvaqbjf ag 5.1; ra-hf) nccyrjroxvg/528.9 (xugzy, yvxr trpxb) puebzr/2.0.157.0 fnsnev/528.9';
+ var s94 = computeInputVariants(str42, 5);
+ var s95 = computeInputVariants(str43, 5);
+ var s96 = computeInputVariants(str44, 5);
+ var s97 = computeInputVariants(str47, 5);
+ var s98 = computeInputVariants(str48, 5);
+ var s99 = computeInputVariants(str49, 5);
+ var s100 = computeInputVariants(str50, 5);
+ var s101 = computeInputVariants(str51, 5);
+ var s102 = computeInputVariants(str52, 5);
+ var s103 = computeInputVariants(str53, 5);
+
function runBlock9() {
for (var i = 0; i < 5; i++) {
- str42.split(re32);
- str43.split(re32);
+ s94[i].split(re32);
+ s95[i].split(re32);
'svz_zlfcnpr_hfre-ivrj-pbzzragf,svz_zlfcnpr_havgrq-fgngrf'.split(re20);
- str44.replace(re33, '');
+ s96[i].replace(re33, '');
'zrah_arj zrah_arj_gbttyr zrah_gbttyr'.replace(re67, '');
'zrah_byq zrah_byq_gbttyr zrah_gbttyr'.replace(re67, '');
re8.exec('102n9o0o9pq60132qn0337rr867p75953502q2s27s2s5r98');
@@ -855,12 +1000,12 @@ function runRegExpBenchmark() {
' yvfg2'.replace(re15, '');
' frneputebhc1'.replace(re14, '');
' frneputebhc1'.replace(re15, '');
- str47.replace(re68, '');
- str47.replace(re18, '');
+ s97[i].replace(re68, '');
+ s97[i].replace(re18, '');
''.replace(/&/g, '');
''.replace(re35, '');
'(..-{0})(\|(\d+)|)'.replace(re63, '');
- str48.replace(re18, '');
+ s98[i].replace(re18, '');
'//vzt.jro.qr/vij/FC/${cngu}/${anzr}/${inyhr}?gf=${abj}'.replace(re56, '');
'//vzt.jro.qr/vij/FC/tzk_uc/${anzr}/${inyhr}?gf=${abj}'.replace(/(\$\{anzr\})|(\$anzr\b)/g, '');
'Jvaqbjf Yvir Ubgznvy{1}'.replace(re69, '');
@@ -872,8 +1017,8 @@ function runRegExpBenchmark() {
'Zncf'.replace(re15, '');
'Zbq-Vasb-Vasb-WninFpevcgUvag'.replace(re39, '');
'Arjf'.replace(re15, '');
- str49.split(re32);
- str50.split(re32);
+ s99[i].split(re32);
+ s100[i].split(re32);
'Ivqrb'.replace(re15, '');
'Jro'.replace(re15, '');
'n'.replace(re39, '');
@@ -907,17 +1052,17 @@ function runRegExpBenchmark() {
'uc_fubccvatobk'.replace(re30, '');
'ugzy%2Rvq'.replace(re29, '');
'ugzy%2Rvq'.replace(re30, '');
- str51.replace(re33, '');
+ s101[i].replace(re33, '');
'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/cebgbglcr.wf${4}${5}'.replace(re71, '');
'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/cebgbglcr.wf${5}'.replace(re72, '');
- str52.replace(re73, '');
+ s102[i].replace(re73, '');
'uggc://zfacbegny.112.2b7.arg/o/ff/zfacbegnyubzr/1/U.7-cqi-2/f55332979829981?[NDO]&{1}&{2}&[NDR]'.replace(re69, '');
'vztZFSG'.replace(re14, '');
'vztZFSG'.replace(re15, '');
'zfasbbg1 ps'.replace(re14, '');
'zfasbbg1 ps'.replace(re15, '');
- str53.replace(re14, '');
- str53.replace(re15, '');
+ s103[i].replace(re14, '');
+ s103[i].replace(re15, '');
'cnerag puebzr6 fvatyr1 gno fryrpgrq ovaq'.replace(re14, '');
'cnerag puebzr6 fvatyr1 gno fryrpgrq ovaq'.replace(re15, '');
'cevznel'.replace(re14, '');
@@ -945,11 +1090,11 @@ function runRegExpBenchmark() {
re8.exec('__hgzn=144631658.2770915348920628700.1231367708.1231367708.1231367708.1');
re8.exec('__hgzo=144631658.0.10.1231367708');
re8.exec('__hgzm=144631658.1231367708.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
- re34.exec(str49);
- re34.exec(str50);
- /ZFVR\s+5[.]01/.exec(str0);
+ re34.exec(s99[i]);
+ re34.exec(s100[i]);
+ /ZFVR\s+5[.]01/.exec(s15[i]);
/HF(?=;)/i.exec(str56);
- re74.exec(str47);
+ re74.exec(s97[i]);
re28.exec('svefg npgvir svefgNpgvir');
re28.exec('ynfg');
/\bp:(..)/i.exec('m:94043|yn:37.4154|yb:-122.0585|p:HF');
@@ -967,15 +1112,15 @@ function runRegExpBenchmark() {
re79.exec(str60);
re79.exec(str59);
/\|p:([a-z]{2})/i.exec('m:94043|yn:37.4154|yb:-122.0585|p:HF|ue:1');
- re80.exec(str47);
+ re80.exec(s97[i]);
re61.exec('cebgbglcr.wf');
- re68.exec(str47);
- re81.exec(str47);
- re82.exec(str47);
- /^Fubpxjnir Synfu (\d)/.exec(str1);
- /^Fubpxjnir Synfu (\d+)/.exec(str1);
+ re68.exec(s97[i]);
+ re81.exec(s97[i]);
+ re82.exec(s97[i]);
+ /^Fubpxjnir Synfu (\d)/.exec(s21[i]);
+ /^Fubpxjnir Synfu (\d+)/.exec(s21[i]);
re83.exec('[bowrpg tybony]');
- re62.exec(str47);
+ re62.exec(s97[i]);
re84.exec(str61);
re84.exec(str62);
/jroxvg/.exec(str63);
@@ -1597,18 +1742,23 @@ function runRegExpBenchmark() {
/jvaqbjf/.exec(str63);
}
}
- for (var i = 0; i < 5; i++) {
- runBlock0();
- runBlock1();
- runBlock2();
- runBlock3();
- runBlock4();
- runBlock5();
- runBlock6();
- runBlock7();
- runBlock8();
- runBlock9();
- runBlock10();
- runBlock11();
+
+ function run() {
+ for (var i = 0; i < 5; i++) {
+ runBlock0();
+ runBlock1();
+ runBlock2();
+ runBlock3();
+ runBlock4();
+ runBlock5();
+ runBlock6();
+ runBlock7();
+ runBlock8();
+ runBlock9();
+ runBlock10();
+ runBlock11();
+ }
}
+
+ this.run = run;
}
diff --git a/deps/v8/benchmarks/revisions.html b/deps/v8/benchmarks/revisions.html
index 1c54f63462..6ff75be1e1 100644
--- a/deps/v8/benchmarks/revisions.html
+++ b/deps/v8/benchmarks/revisions.html
@@ -26,7 +26,9 @@ the benchmark suite.
typos in the DeltaBlue implementation. Changed the Splay benchmark to
avoid converting the same numeric key to a string over and over again
and to avoid inserting and removing the same element repeatedly thus
-increasing pressure on the memory subsystem.
+increasing pressure on the memory subsystem. Changed the RegExp
+benchmark to exercise the regular expression engine on different input
+strings.
Furthermore, the benchmark runner was changed to run the benchmarks
for at least a few times to stabilize the reported numbers on slower
diff --git a/deps/v8/benchmarks/run.html b/deps/v8/benchmarks/run.html
index 05bfffee02..36d2ad511b 100644
--- a/deps/v8/benchmarks/run.html
+++ b/deps/v8/benchmarks/run.html
@@ -114,7 +114,7 @@ higher scores means better performance: Bigger is better!
RayTrace Ray tracer benchmark based on code by Adam Burmister (904 lines).
EarleyBoyer Classic Scheme benchmarks, translated to JavaScript by Florian Loitsch's Scheme2Js compiler (4684 lines).
RegExp Regular expression benchmark generated by extracting regular expression operations from 50 of the most popular web pages
-(1614 lines).
+(1761 lines).
Splay Data manipulation benchmark that deals with splay trees and exercises the automatic memory management subsystem (394 lines).
diff --git a/deps/v8/include/v8-debug.h b/deps/v8/include/v8-debug.h
old mode 100644
new mode 100755
index 414fd8622a..4314727adc
--- a/deps/v8/include/v8-debug.h
+++ b/deps/v8/include/v8-debug.h
@@ -253,9 +253,12 @@ class EXPORT Debug {
static bool SetDebugEventListener(v8::Handle that,
Handle data = Handle());
- // Break execution of JavaScript.
+ // Schedule a debugger break to happen when JavaScript code is run.
static void DebugBreak();
+ // Remove scheduled debugger break if it has not happened yet.
+ static void CancelDebugBreak();
+
// Break execution of JavaScript (this method can be invoked from a
// non-VM thread) for further client command execution on a VM
// thread. Client data is then passed in EventDetails to
diff --git a/deps/v8/src/SConscript b/deps/v8/src/SConscript
index e2b01aaf98..05ccae4a98 100755
--- a/deps/v8/src/SConscript
+++ b/deps/v8/src/SConscript
@@ -100,6 +100,7 @@ SOURCES = {
serialize.cc
snapshot-common.cc
spaces.cc
+ string-search.cc
string-stream.cc
stub-cache.cc
token.cc
diff --git a/deps/v8/src/api.cc b/deps/v8/src/api.cc
index e09d4c954c..b7d85c68a1 100644
--- a/deps/v8/src/api.cc
+++ b/deps/v8/src/api.cc
@@ -134,27 +134,27 @@ void i::V8::FatalProcessOutOfMemory(const char* location, bool take_snapshot) {
heap_stats.new_space_size = &new_space_size;
int new_space_capacity;
heap_stats.new_space_capacity = &new_space_capacity;
- int old_pointer_space_size;
+ intptr_t old_pointer_space_size;
heap_stats.old_pointer_space_size = &old_pointer_space_size;
- int old_pointer_space_capacity;
+ intptr_t old_pointer_space_capacity;
heap_stats.old_pointer_space_capacity = &old_pointer_space_capacity;
- int old_data_space_size;
+ intptr_t old_data_space_size;
heap_stats.old_data_space_size = &old_data_space_size;
- int old_data_space_capacity;
+ intptr_t old_data_space_capacity;
heap_stats.old_data_space_capacity = &old_data_space_capacity;
- int code_space_size;
+ intptr_t code_space_size;
heap_stats.code_space_size = &code_space_size;
- int code_space_capacity;
+ intptr_t code_space_capacity;
heap_stats.code_space_capacity = &code_space_capacity;
- int map_space_size;
+ intptr_t map_space_size;
heap_stats.map_space_size = &map_space_size;
- int map_space_capacity;
+ intptr_t map_space_capacity;
heap_stats.map_space_capacity = &map_space_capacity;
- int cell_space_size;
+ intptr_t cell_space_size;
heap_stats.cell_space_size = &cell_space_size;
- int cell_space_capacity;
+ intptr_t cell_space_capacity;
heap_stats.cell_space_capacity = &cell_space_capacity;
- int lo_space_size;
+ intptr_t lo_space_size;
heap_stats.lo_space_size = &lo_space_size;
int global_handle_count;
heap_stats.global_handle_count = &global_handle_count;
@@ -166,9 +166,9 @@ void i::V8::FatalProcessOutOfMemory(const char* location, bool take_snapshot) {
heap_stats.near_death_global_handle_count = &near_death_global_handle_count;
int destroyed_global_handle_count;
heap_stats.destroyed_global_handle_count = &destroyed_global_handle_count;
- int memory_allocator_size;
+ intptr_t memory_allocator_size;
heap_stats.memory_allocator_size = &memory_allocator_size;
- int memory_allocator_capacity;
+ intptr_t memory_allocator_capacity;
heap_stats.memory_allocator_capacity = &memory_allocator_capacity;
int objects_per_type[LAST_TYPE + 1] = {0};
heap_stats.objects_per_type = objects_per_type;
@@ -767,6 +767,12 @@ int TypeSwitch::match(v8::Handle value) {
}
+#define SET_FIELD_WRAPPED(obj, setter, cdata) do { \
+ i::Handle proxy = FromCData(cdata); \
+ (obj)->setter(*proxy); \
+ } while (false)
+
+
void FunctionTemplate::SetCallHandler(InvocationCallback callback,
v8::Handle data) {
if (IsDeadCheck("v8::FunctionTemplate::SetCallHandler()")) return;
@@ -776,7 +782,7 @@ void FunctionTemplate::SetCallHandler(InvocationCallback callback,
i::Factory::NewStruct(i::CALL_HANDLER_INFO_TYPE);
i::Handle obj =
i::Handle::cast(struct_obj);
- obj->set_callback(*FromCData(callback));
+ SET_FIELD_WRAPPED(obj, set_callback, callback);
if (data.IsEmpty()) data = v8::Undefined();
obj->set_data(*Utils::OpenHandle(*data));
Utils::OpenHandle(this)->set_call_code(*obj);
@@ -792,8 +798,8 @@ static i::Handle MakeAccessorInfo(
v8::PropertyAttribute attributes) {
i::Handle obj = i::Factory::NewAccessorInfo();
ASSERT(getter != NULL);
- obj->set_getter(*FromCData(getter));
- obj->set_setter(*FromCData(setter));
+ SET_FIELD_WRAPPED(obj, set_getter, getter);
+ SET_FIELD_WRAPPED(obj, set_setter, setter);
if (data.IsEmpty()) data = v8::Undefined();
obj->set_data(*Utils::OpenHandle(*data));
obj->set_name(*Utils::OpenHandle(*name));
@@ -877,11 +883,13 @@ void FunctionTemplate::SetNamedInstancePropertyHandler(
i::Factory::NewStruct(i::INTERCEPTOR_INFO_TYPE);
i::Handle obj =
i::Handle::cast(struct_obj);
- if (getter != 0) obj->set_getter(*FromCData(getter));
- if (setter != 0) obj->set_setter(*FromCData(setter));
- if (query != 0) obj->set_query(*FromCData(query));
- if (remover != 0) obj->set_deleter(*FromCData(remover));
- if (enumerator != 0) obj->set_enumerator(*FromCData(enumerator));
+
+ if (getter != 0) SET_FIELD_WRAPPED(obj, set_getter, getter);
+ if (setter != 0) SET_FIELD_WRAPPED(obj, set_setter, setter);
+ if (query != 0) SET_FIELD_WRAPPED(obj, set_query, query);
+ if (remover != 0) SET_FIELD_WRAPPED(obj, set_deleter, remover);
+ if (enumerator != 0) SET_FIELD_WRAPPED(obj, set_enumerator, enumerator);
+
if (data.IsEmpty()) data = v8::Undefined();
obj->set_data(*Utils::OpenHandle(*data));
Utils::OpenHandle(this)->set_named_property_handler(*obj);
@@ -905,11 +913,13 @@ void FunctionTemplate::SetIndexedInstancePropertyHandler(
i::Factory::NewStruct(i::INTERCEPTOR_INFO_TYPE);
i::Handle obj =
i::Handle::cast(struct_obj);
- if (getter != 0) obj->set_getter(*FromCData(getter));
- if (setter != 0) obj->set_setter(*FromCData(setter));
- if (query != 0) obj->set_query(*FromCData(query));
- if (remover != 0) obj->set_deleter(*FromCData(remover));
- if (enumerator != 0) obj->set_enumerator(*FromCData(enumerator));
+
+ if (getter != 0) SET_FIELD_WRAPPED(obj, set_getter, getter);
+ if (setter != 0) SET_FIELD_WRAPPED(obj, set_setter, setter);
+ if (query != 0) SET_FIELD_WRAPPED(obj, set_query, query);
+ if (remover != 0) SET_FIELD_WRAPPED(obj, set_deleter, remover);
+ if (enumerator != 0) SET_FIELD_WRAPPED(obj, set_enumerator, enumerator);
+
if (data.IsEmpty()) data = v8::Undefined();
obj->set_data(*Utils::OpenHandle(*data));
Utils::OpenHandle(this)->set_indexed_property_handler(*obj);
@@ -928,7 +938,7 @@ void FunctionTemplate::SetInstanceCallAsFunctionHandler(
i::Factory::NewStruct(i::CALL_HANDLER_INFO_TYPE);
i::Handle obj =
i::Handle::cast(struct_obj);
- obj->set_callback(*FromCData(callback));
+ SET_FIELD_WRAPPED(obj, set_callback, callback);
if (data.IsEmpty()) data = v8::Undefined();
obj->set_data(*Utils::OpenHandle(*data));
Utils::OpenHandle(this)->set_instance_call_handler(*obj);
@@ -1043,8 +1053,10 @@ void ObjectTemplate::SetAccessCheckCallbacks(
i::Factory::NewStruct(i::ACCESS_CHECK_INFO_TYPE);
i::Handle info =
i::Handle::cast(struct_info);
- info->set_named_callback(*FromCData(named_callback));
- info->set_indexed_callback(*FromCData(indexed_callback));
+
+ SET_FIELD_WRAPPED(info, set_named_callback, named_callback);
+ SET_FIELD_WRAPPED(info, set_indexed_callback, indexed_callback);
+
if (data.IsEmpty()) data = v8::Undefined();
info->set_data(*Utils::OpenHandle(*data));
@@ -2646,8 +2658,9 @@ void v8::Object::SetIndexedPropertiesToPixelData(uint8_t* data, int length) {
return;
}
i::Handle pixels = i::Factory::NewPixelArray(length, data);
- self->set_map(
- *i::Factory::GetSlowElementsMap(i::Handle(self->map())));
+ i::Handle slow_map =
+ i::Factory::GetSlowElementsMap(i::Handle(self->map()));
+ self->set_map(*slow_map);
self->set_elements(*pixels);
}
@@ -2701,8 +2714,9 @@ void v8::Object::SetIndexedPropertiesToExternalArrayData(
}
i::Handle array =
i::Factory::NewExternalArray(length, array_type, data);
- self->set_map(
- *i::Factory::GetSlowElementsMap(i::Handle(self->map())));
+ i::Handle slow_map =
+ i::Factory::GetSlowElementsMap(i::Handle(self->map()));
+ self->set_map(*slow_map);
self->set_elements(*array);
}
@@ -4251,6 +4265,11 @@ void Debug::DebugBreak() {
}
+void Debug::CancelDebugBreak() {
+ i::StackGuard::Continue(i::DEBUGBREAK);
+}
+
+
void Debug::DebugBreakForCommand(ClientData* data) {
if (!i::V8::IsRunning()) return;
i::Debugger::EnqueueDebugCommand(data);
@@ -4433,7 +4452,7 @@ double CpuProfileNode::GetSelfSamplesCount() const {
unsigned CpuProfileNode::GetCallUid() const {
IsDeadCheck("v8::CpuProfileNode::GetCallUid");
- return reinterpret_cast(this)->entry()->call_uid();
+ return reinterpret_cast(this)->entry()->GetCallUid();
}
diff --git a/deps/v8/src/arm/assembler-arm.h b/deps/v8/src/arm/assembler-arm.h
index be9aa92f1a..1c4fd6094d 100644
--- a/deps/v8/src/arm/assembler-arm.h
+++ b/deps/v8/src/arm/assembler-arm.h
@@ -69,13 +69,13 @@ namespace internal {
//
// Core register
struct Register {
- bool is_valid() const { return 0 <= code_ && code_ < 16; }
- bool is(Register reg) const { return code_ == reg.code_; }
- int code() const {
+ bool is_valid() const { return 0 <= code_ && code_ < 16; }
+ bool is(Register reg) const { return code_ == reg.code_; }
+ int code() const {
ASSERT(is_valid());
return code_;
}
- int bit() const {
+ int bit() const {
ASSERT(is_valid());
return 1 << code_;
}
@@ -110,17 +110,17 @@ const Register pc = { 15 };
// Single word VFP register.
struct SwVfpRegister {
- bool is_valid() const { return 0 <= code_ && code_ < 32; }
- bool is(SwVfpRegister reg) const { return code_ == reg.code_; }
- int code() const {
+ bool is_valid() const { return 0 <= code_ && code_ < 32; }
+ bool is(SwVfpRegister reg) const { return code_ == reg.code_; }
+ int code() const {
ASSERT(is_valid());
return code_;
}
- int bit() const {
+ int bit() const {
ASSERT(is_valid());
return 1 << code_;
}
- void split_code(int* vm, int* m) const {
+ void split_code(int* vm, int* m) const {
ASSERT(is_valid());
*m = code_ & 0x1;
*vm = code_ >> 1;
@@ -133,31 +133,31 @@ struct SwVfpRegister {
// Double word VFP register.
struct DwVfpRegister {
// Supporting d0 to d15, can be later extended to d31.
- bool is_valid() const { return 0 <= code_ && code_ < 16; }
- bool is(DwVfpRegister reg) const { return code_ == reg.code_; }
- SwVfpRegister low() const {
+ bool is_valid() const { return 0 <= code_ && code_ < 16; }
+ bool is(DwVfpRegister reg) const { return code_ == reg.code_; }
+ SwVfpRegister low() const {
SwVfpRegister reg;
reg.code_ = code_ * 2;
ASSERT(reg.is_valid());
return reg;
}
- SwVfpRegister high() const {
+ SwVfpRegister high() const {
SwVfpRegister reg;
reg.code_ = (code_ * 2) + 1;
ASSERT(reg.is_valid());
return reg;
}
- int code() const {
+ int code() const {
ASSERT(is_valid());
return code_;
}
- int bit() const {
+ int bit() const {
ASSERT(is_valid());
return 1 << code_;
}
- void split_code(int* vm, int* m) const {
+ void split_code(int* vm, int* m) const {
ASSERT(is_valid());
*m = (code_ & 0x10) >> 4;
*vm = code_ & 0x0F;
@@ -222,13 +222,13 @@ const DwVfpRegister d15 = { 15 };
// Coprocessor register
struct CRegister {
- bool is_valid() const { return 0 <= code_ && code_ < 16; }
- bool is(CRegister creg) const { return code_ == creg.code_; }
- int code() const {
+ bool is_valid() const { return 0 <= code_ && code_ < 16; }
+ bool is(CRegister creg) const { return code_ == creg.code_; }
+ int code() const {
ASSERT(is_valid());
return code_;
}
- int bit() const {
+ int bit() const {
ASSERT(is_valid());
return 1 << code_;
}
diff --git a/deps/v8/src/arm/builtins-arm.cc b/deps/v8/src/arm/builtins-arm.cc
index 8b21558165..cf2f426243 100644
--- a/deps/v8/src/arm/builtins-arm.cc
+++ b/deps/v8/src/arm/builtins-arm.cc
@@ -521,7 +521,11 @@ void Builtins::Generate_JSConstructCall(MacroAssembler* masm) {
static void Generate_JSConstructStubHelper(MacroAssembler* masm,
- bool is_api_function) {
+ bool is_api_function,
+ bool count_constructions) {
+ // Should never count constructions for api objects.
+ ASSERT(!is_api_function || !count_constructions);
+
// Enter a construct frame.
__ EnterConstructFrame();
@@ -530,9 +534,6 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
__ push(r0); // Smi-tagged arguments count.
__ push(r1); // Constructor function.
- // Use r7 for holding undefined which is used in several places below.
- __ LoadRoot(r7, Heap::kUndefinedValueRootIndex);
-
// Try to allocate the object without transitioning into C code. If any of the
// preconditions is not met, the code bails out to the runtime call.
Label rt_call, allocated;
@@ -549,7 +550,6 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// Load the initial map and verify that it is in fact a map.
// r1: constructor function
- // r7: undefined value
__ ldr(r2, FieldMemOperand(r1, JSFunction::kPrototypeOrInitialMapOffset));
__ tst(r2, Operand(kSmiTagMask));
__ b(eq, &rt_call);
@@ -561,14 +561,35 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// instance type would be JS_FUNCTION_TYPE.
// r1: constructor function
// r2: initial map
- // r7: undefined value
__ CompareInstanceType(r2, r3, JS_FUNCTION_TYPE);
__ b(eq, &rt_call);
+ if (count_constructions) {
+ Label allocate;
+ // Decrease generous allocation count.
+ __ ldr(r3, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset));
+ MemOperand constructor_count =
+ FieldMemOperand(r3, SharedFunctionInfo::kConstructionCountOffset);
+ __ ldrb(r4, constructor_count);
+ __ sub(r4, r4, Operand(1), SetCC);
+ __ strb(r4, constructor_count);
+ __ b(ne, &allocate);
+
+ __ Push(r1, r2);
+
+ __ push(r1); // constructor
+ // The call will replace the stub, so the countdown is only done once.
+ __ CallRuntime(Runtime::kFinalizeInstanceSize, 1);
+
+ __ pop(r2);
+ __ pop(r1);
+
+ __ bind(&allocate);
+ }
+
// Now allocate the JSObject on the heap.
// r1: constructor function
// r2: initial map
- // r7: undefined value
__ ldrb(r3, FieldMemOperand(r2, Map::kInstanceSizeOffset));
__ AllocateInNewSpace(r3, r4, r5, r6, &rt_call, SIZE_IN_WORDS);
@@ -578,7 +599,6 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// r2: initial map
// r3: object size
// r4: JSObject (not tagged)
- // r7: undefined value
__ LoadRoot(r6, Heap::kEmptyFixedArrayRootIndex);
__ mov(r5, r4);
ASSERT_EQ(0 * kPointerSize, JSObject::kMapOffset);
@@ -588,16 +608,21 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
ASSERT_EQ(2 * kPointerSize, JSObject::kElementsOffset);
__ str(r6, MemOperand(r5, kPointerSize, PostIndex));
- // Fill all the in-object properties with undefined.
+ // Fill all the in-object properties with the appropriate filler.
// r1: constructor function
// r2: initial map
// r3: object size (in words)
// r4: JSObject (not tagged)
// r5: First in-object property of JSObject (not tagged)
- // r7: undefined value
__ add(r6, r4, Operand(r3, LSL, kPointerSizeLog2)); // End of object.
ASSERT_EQ(3 * kPointerSize, JSObject::kHeaderSize);
{ Label loop, entry;
+ if (count_constructions) {
+ // To allow for truncation.
+ __ LoadRoot(r7, Heap::kOnePointerFillerMapRootIndex);
+ } else {
+ __ LoadRoot(r7, Heap::kUndefinedValueRootIndex);
+ }
__ b(&entry);
__ bind(&loop);
__ str(r7, MemOperand(r5, kPointerSize, PostIndex));
@@ -617,7 +642,6 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// r1: constructor function
// r4: JSObject
// r5: start of next object (not tagged)
- // r7: undefined value
__ ldrb(r3, FieldMemOperand(r2, Map::kUnusedPropertyFieldsOffset));
// The field instance sizes contains both pre-allocated property fields and
// in-object properties.
@@ -637,7 +661,6 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// r3: number of elements in properties array
// r4: JSObject
// r5: start of next object
- // r7: undefined value
__ add(r0, r3, Operand(FixedArray::kHeaderSize / kPointerSize));
__ AllocateInNewSpace(
r0,
@@ -652,7 +675,6 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// r3: number of elements in properties array
// r4: JSObject
// r5: FixedArray (not tagged)
- // r7: undefined value
__ LoadRoot(r6, Heap::kFixedArrayMapRootIndex);
__ mov(r2, r5);
ASSERT_EQ(0 * kPointerSize, JSObject::kMapOffset);
@@ -667,10 +689,16 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// r3: number of elements in properties array
// r4: JSObject
// r5: FixedArray (not tagged)
- // r7: undefined
__ add(r6, r2, Operand(r3, LSL, kPointerSizeLog2)); // End of object.
ASSERT_EQ(2 * kPointerSize, FixedArray::kHeaderSize);
{ Label loop, entry;
+ if (count_constructions) {
+ __ LoadRoot(r7, Heap::kUndefinedValueRootIndex);
+ } else if (FLAG_debug_code) {
+ __ LoadRoot(r8, Heap::kUndefinedValueRootIndex);
+ __ cmp(r7, r8);
+ __ Assert(eq, "Undefined value not loaded.");
+ }
__ b(&entry);
__ bind(&loop);
__ str(r7, MemOperand(r2, kPointerSize, PostIndex));
@@ -822,13 +850,18 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
}
+void Builtins::Generate_JSConstructStubCountdown(MacroAssembler* masm) {
+ Generate_JSConstructStubHelper(masm, false, true);
+}
+
+
void Builtins::Generate_JSConstructStubGeneric(MacroAssembler* masm) {
- Generate_JSConstructStubHelper(masm, false);
+ Generate_JSConstructStubHelper(masm, false, false);
}
void Builtins::Generate_JSConstructStubApi(MacroAssembler* masm) {
- Generate_JSConstructStubHelper(masm, true);
+ Generate_JSConstructStubHelper(masm, true, false);
}
diff --git a/deps/v8/src/arm/codegen-arm.cc b/deps/v8/src/arm/codegen-arm.cc
index 6ba166f446..d273e75988 100644
--- a/deps/v8/src/arm/codegen-arm.cc
+++ b/deps/v8/src/arm/codegen-arm.cc
@@ -246,7 +246,7 @@ void CodeGenerator::Generate(CompilationInfo* info) {
frame_->AssertIsSpilled();
for (int i = 0; i < scope()->num_parameters(); i++) {
Variable* par = scope()->parameter(i);
- Slot* slot = par->slot();
+ Slot* slot = par->AsSlot();
if (slot != NULL && slot->type() == Slot::CONTEXT) {
ASSERT(!scope()->is_global_scope()); // No params in global scope.
__ ldr(r1, frame_->ParameterAt(i));
@@ -270,7 +270,7 @@ void CodeGenerator::Generate(CompilationInfo* info) {
// Initialize ThisFunction reference if present.
if (scope()->is_function_scope() && scope()->function() != NULL) {
frame_->EmitPushRoot(Heap::kTheHoleValueRootIndex);
- StoreToSlot(scope()->function()->slot(), NOT_CONST_INIT);
+ StoreToSlot(scope()->function()->AsSlot(), NOT_CONST_INIT);
}
// Initialize the function return target after the locals are set
@@ -608,24 +608,24 @@ void CodeGenerator::StoreArgumentsObject(bool initial) {
frame_->EmitPush(r0);
}
- Variable* arguments = scope()->arguments()->var();
- Variable* shadow = scope()->arguments_shadow()->var();
- ASSERT(arguments != NULL && arguments->slot() != NULL);
- ASSERT(shadow != NULL && shadow->slot() != NULL);
+ Variable* arguments = scope()->arguments();
+ Variable* shadow = scope()->arguments_shadow();
+ ASSERT(arguments != NULL && arguments->AsSlot() != NULL);
+ ASSERT(shadow != NULL && shadow->AsSlot() != NULL);
JumpTarget done;
if (mode == LAZY_ARGUMENTS_ALLOCATION && !initial) {
// We have to skip storing into the arguments slot if it has
// already been written to. This can happen if the a function
// has a local variable named 'arguments'.
- LoadFromSlot(scope()->arguments()->var()->slot(), NOT_INSIDE_TYPEOF);
+ LoadFromSlot(scope()->arguments()->AsSlot(), NOT_INSIDE_TYPEOF);
Register arguments = frame_->PopToRegister();
__ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
__ cmp(arguments, ip);
done.Branch(ne);
}
- StoreToSlot(arguments->slot(), NOT_CONST_INIT);
+ StoreToSlot(arguments->AsSlot(), NOT_CONST_INIT);
if (mode == LAZY_ARGUMENTS_ALLOCATION) done.Bind();
- StoreToSlot(shadow->slot(), NOT_CONST_INIT);
+ StoreToSlot(shadow->AsSlot(), NOT_CONST_INIT);
}
@@ -641,10 +641,10 @@ void CodeGenerator::LoadTypeofExpression(Expression* expr) {
Property property(&global, &key, RelocInfo::kNoPosition);
Reference ref(this, &property);
ref.GetValue();
- } else if (variable != NULL && variable->slot() != NULL) {
+ } else if (variable != NULL && variable->AsSlot() != NULL) {
// For a variable that rewrites to a slot, we signal it is the immediate
// subexpression of a typeof.
- LoadFromSlotCheckForArguments(variable->slot(), INSIDE_TYPEOF);
+ LoadFromSlotCheckForArguments(variable->AsSlot(), INSIDE_TYPEOF);
} else {
// Anything else can be handled normally.
Load(expr);
@@ -695,7 +695,7 @@ void CodeGenerator::LoadReference(Reference* ref) {
LoadGlobal();
ref->set_type(Reference::NAMED);
} else {
- ASSERT(var->slot() != NULL);
+ ASSERT(var->AsSlot() != NULL);
ref->set_type(Reference::SLOT);
}
} else {
@@ -1718,7 +1718,7 @@ void CodeGenerator::CallApplyLazy(Expression* applicand,
// Load the receiver and the existing arguments object onto the
// expression stack. Avoid allocating the arguments object here.
Load(receiver);
- LoadFromSlot(scope()->arguments()->var()->slot(), NOT_INSIDE_TYPEOF);
+ LoadFromSlot(scope()->arguments()->AsSlot(), NOT_INSIDE_TYPEOF);
// At this point the top two stack elements are probably in registers
// since they were just loaded. Ensure they are in regs and get the
@@ -1950,7 +1950,7 @@ void CodeGenerator::VisitDeclaration(Declaration* node) {
Comment cmnt(masm_, "[ Declaration");
Variable* var = node->proxy()->var();
ASSERT(var != NULL); // must have been resolved
- Slot* slot = var->slot();
+ Slot* slot = var->AsSlot();
// If it was not possible to allocate the variable at compile time,
// we need to "declare" it at runtime to make sure it actually
@@ -2480,8 +2480,8 @@ void CodeGenerator::VisitForStatement(ForStatement* node) {
// the bottom check of the loop condition.
TypeInfoCodeGenState type_info_scope(this,
node->is_fast_smi_loop() ?
- node->loop_variable()->slot() :
- NULL,
+ node->loop_variable()->AsSlot() :
+ NULL,
TypeInfo::Smi());
// If there is no update statement, label the top of the loop with the
@@ -2794,8 +2794,8 @@ void CodeGenerator::VisitTryCatchStatement(TryCatchStatement* node) {
// Store the caught exception in the catch variable.
Variable* catch_var = node->catch_var()->var();
- ASSERT(catch_var != NULL && catch_var->slot() != NULL);
- StoreToSlot(catch_var->slot(), NOT_CONST_INIT);
+ ASSERT(catch_var != NULL && catch_var->AsSlot() != NULL);
+ StoreToSlot(catch_var->AsSlot(), NOT_CONST_INIT);
// Remove the exception from the stack.
frame_->Drop();
@@ -3420,7 +3420,7 @@ void CodeGenerator::EmitDynamicLoadFromSlotFastCase(Slot* slot,
} else if (slot->var()->mode() == Variable::DYNAMIC_LOCAL) {
frame_->SpillAll();
- Slot* potential_slot = slot->var()->local_if_not_shadowed()->slot();
+ Slot* potential_slot = slot->var()->local_if_not_shadowed()->AsSlot();
Expression* rewrite = slot->var()->local_if_not_shadowed()->rewrite();
if (potential_slot != NULL) {
// Generate fast case for locals that rewrite to slots.
@@ -3449,7 +3449,7 @@ void CodeGenerator::EmitDynamicLoadFromSlotFastCase(Slot* slot,
// variables. Then load the argument from the arguments
// object using keyed load.
__ ldr(r0,
- ContextSlotOperandCheckExtensions(obj_proxy->var()->slot(),
+ ContextSlotOperandCheckExtensions(obj_proxy->var()->AsSlot(),
r1,
r2,
slow));
@@ -3735,7 +3735,7 @@ void CodeGenerator::EmitSlotAssignment(Assignment* node) {
Comment cmnt(masm(), "[ Variable Assignment");
Variable* var = node->target()->AsVariableProxy()->AsVariable();
ASSERT(var != NULL);
- Slot* slot = var->slot();
+ Slot* slot = var->AsSlot();
ASSERT(slot != NULL);
// Evaluate the right-hand side.
@@ -4136,14 +4136,14 @@ void CodeGenerator::VisitCall(Call* node) {
// in generated code. If we succeed, there is no need to perform a
// context lookup in the runtime system.
JumpTarget done;
- if (var->slot() != NULL && var->mode() == Variable::DYNAMIC_GLOBAL) {
- ASSERT(var->slot()->type() == Slot::LOOKUP);
+ if (var->AsSlot() != NULL && var->mode() == Variable::DYNAMIC_GLOBAL) {
+ ASSERT(var->AsSlot()->type() == Slot::LOOKUP);
JumpTarget slow;
// Prepare the stack for the call to
// ResolvePossiblyDirectEvalNoLookup by pushing the loaded
// function, the first argument to the eval call and the
// receiver.
- LoadFromGlobalSlotCheckExtensions(var->slot(),
+ LoadFromGlobalSlotCheckExtensions(var->AsSlot(),
NOT_INSIDE_TYPEOF,
&slow);
frame_->EmitPush(r0);
@@ -4225,8 +4225,8 @@ void CodeGenerator::VisitCall(Call* node) {
__ ldr(cp, frame_->Context());
frame_->EmitPush(r0);
- } else if (var != NULL && var->slot() != NULL &&
- var->slot()->type() == Slot::LOOKUP) {
+ } else if (var != NULL && var->AsSlot() != NULL &&
+ var->AsSlot()->type() == Slot::LOOKUP) {
// ----------------------------------
// JavaScript examples:
//
@@ -4244,7 +4244,7 @@ void CodeGenerator::VisitCall(Call* node) {
// Generate fast case for loading functions from slots that
// correspond to local/global variables or arguments unless they
// are shadowed by eval-introduced bindings.
- EmitDynamicLoadFromSlotFastCase(var->slot(),
+ EmitDynamicLoadFromSlotFastCase(var->AsSlot(),
NOT_INSIDE_TYPEOF,
&slow,
&done);
@@ -5928,7 +5928,7 @@ void CodeGenerator::VisitUnaryOperation(UnaryOperation* node) {
frame_->EmitPush(r0);
} else if (variable != NULL) {
- Slot* slot = variable->slot();
+ Slot* slot = variable->AsSlot();
if (variable->is_global()) {
LoadGlobal();
frame_->EmitPush(Operand(variable->name()));
@@ -6062,7 +6062,7 @@ void CodeGenerator::VisitCountOperation(CountOperation* node) {
bool is_const = (var != NULL && var->mode() == Variable::CONST);
bool is_slot = (var != NULL && var->mode() == Variable::VAR);
- if (!is_const && is_slot && type_info(var->slot()).IsSmi()) {
+ if (!is_const && is_slot && type_info(var->AsSlot()).IsSmi()) {
// The type info declares that this variable is always a Smi. That
// means it is a Smi both before and after the increment/decrement.
// Lets make use of that to make a very minimal count.
@@ -7207,7 +7207,7 @@ void Reference::GetValue() {
switch (type_) {
case SLOT: {
Comment cmnt(masm, "[ Load from Slot");
- Slot* slot = expression_->AsVariableProxy()->AsVariable()->slot();
+ Slot* slot = expression_->AsVariableProxy()->AsVariable()->AsSlot();
ASSERT(slot != NULL);
DupIfPersist();
cgen_->LoadFromSlotCheckForArguments(slot, NOT_INSIDE_TYPEOF);
@@ -7251,7 +7251,7 @@ void Reference::SetValue(InitState init_state, WriteBarrierCharacter wb_info) {
switch (type_) {
case SLOT: {
Comment cmnt(masm, "[ Store to Slot");
- Slot* slot = expression_->AsVariableProxy()->AsVariable()->slot();
+ Slot* slot = expression_->AsVariableProxy()->AsVariable()->AsSlot();
cgen_->StoreToSlot(slot, init_state);
set_unloaded();
break;
diff --git a/deps/v8/src/arm/codegen-arm.h b/deps/v8/src/arm/codegen-arm.h
index d4c352260e..1483c0b545 100644
--- a/deps/v8/src/arm/codegen-arm.h
+++ b/deps/v8/src/arm/codegen-arm.h
@@ -307,9 +307,9 @@ class CodeGenerator: public AstVisitor {
int NumberOfSlot(Slot* slot);
// State
- bool has_cc() const { return cc_reg_ != al; }
- JumpTarget* true_target() const { return state_->true_target(); }
- JumpTarget* false_target() const { return state_->false_target(); }
+ bool has_cc() const { return cc_reg_ != al; }
+ JumpTarget* true_target() const { return state_->true_target(); }
+ JumpTarget* false_target() const { return state_->false_target(); }
// Track loop nesting level.
int loop_nesting() const { return loop_nesting_; }
diff --git a/deps/v8/src/arm/frames-arm.cc b/deps/v8/src/arm/frames-arm.cc
index 47434392df..b0c0990306 100644
--- a/deps/v8/src/arm/frames-arm.cc
+++ b/deps/v8/src/arm/frames-arm.cc
@@ -37,17 +37,8 @@ namespace v8 {
namespace internal {
-StackFrame::Type ExitFrame::GetStateForFramePointer(Address fp, State* state) {
- if (fp == 0) return NONE;
- // Compute frame type and stack pointer.
- Address sp = fp + ExitFrameConstants::kSPOffset;
-
- // Fill in the state.
- state->sp = sp;
- state->fp = fp;
- state->pc_address = reinterpret_cast(sp - 1 * kPointerSize);
- ASSERT(*state->pc_address != NULL);
- return EXIT;
+Address ExitFrame::ComputeStackPointer(Address fp) {
+ return fp + ExitFrameConstants::kSPOffset;
}
diff --git a/deps/v8/src/arm/full-codegen-arm.cc b/deps/v8/src/arm/full-codegen-arm.cc
index c776d67cca..9fc0c096bb 100644
--- a/deps/v8/src/arm/full-codegen-arm.cc
+++ b/deps/v8/src/arm/full-codegen-arm.cc
@@ -100,7 +100,7 @@ void FullCodeGenerator::Generate(CompilationInfo* info) {
// Copy any necessary parameters into the context.
int num_parameters = scope()->num_parameters();
for (int i = 0; i < num_parameters; i++) {
- Slot* slot = scope()->parameter(i)->slot();
+ Slot* slot = scope()->parameter(i)->AsSlot();
if (slot != NULL && slot->type() == Slot::CONTEXT) {
int parameter_offset = StandardFrameConstants::kCallerSPOffset +
(num_parameters - 1 - i) * kPointerSize;
@@ -118,7 +118,7 @@ void FullCodeGenerator::Generate(CompilationInfo* info) {
}
}
- Variable* arguments = scope()->arguments()->AsVariable();
+ Variable* arguments = scope()->arguments();
if (arguments != NULL) {
// Function uses arguments object.
Comment cmnt(masm_, "[ Allocate arguments object");
@@ -143,9 +143,8 @@ void FullCodeGenerator::Generate(CompilationInfo* info) {
__ CallStub(&stub);
// Duplicate the value; move-to-slot operation might clobber registers.
__ mov(r3, r0);
- Move(arguments->slot(), r0, r1, r2);
- Slot* dot_arguments_slot =
- scope()->arguments_shadow()->AsVariable()->slot();
+ Move(arguments->AsSlot(), r0, r1, r2);
+ Slot* dot_arguments_slot = scope()->arguments_shadow()->AsSlot();
Move(dot_arguments_slot, r3, r1, r2);
}
@@ -253,205 +252,202 @@ FullCodeGenerator::ConstantOperand FullCodeGenerator::GetConstantOperand(
}
-void FullCodeGenerator::Apply(Expression::Context context, Register reg) {
- switch (context) {
- case Expression::kUninitialized:
- UNREACHABLE();
+void FullCodeGenerator::EffectContext::Plug(Slot* slot) const {
+}
- case Expression::kEffect:
- // Nothing to do.
- break;
- case Expression::kValue:
- // Move value into place.
- switch (location_) {
- case kAccumulator:
- if (!reg.is(result_register())) __ mov(result_register(), reg);
- break;
- case kStack:
- __ push(reg);
- break;
- }
- break;
+void FullCodeGenerator::AccumulatorValueContext::Plug(Slot* slot) const {
+ codegen()->Move(result_register(), slot);
+}
- case Expression::kTest:
- // For simplicity we always test the accumulator register.
- if (!reg.is(result_register())) __ mov(result_register(), reg);
- DoTest(true_label_, false_label_, fall_through_);
- break;
- }
+
+void FullCodeGenerator::StackValueContext::Plug(Slot* slot) const {
+ codegen()->Move(result_register(), slot);
+ __ push(result_register());
}
-void FullCodeGenerator::Apply(Expression::Context context, Slot* slot) {
- switch (context) {
- case Expression::kUninitialized:
- UNREACHABLE();
- case Expression::kEffect:
- // Nothing to do.
- break;
- case Expression::kValue:
- case Expression::kTest:
- // On ARM we have to move the value into a register to do anything
- // with it.
- Move(result_register(), slot);
- Apply(context, result_register());
- break;
- }
+void FullCodeGenerator::TestContext::Plug(Slot* slot) const {
+ // For simplicity we always test the accumulator register.
+ codegen()->Move(result_register(), slot);
+ codegen()->DoTest(true_label_, false_label_, fall_through_);
}
-void FullCodeGenerator::Apply(Expression::Context context, Literal* lit) {
- switch (context) {
- case Expression::kUninitialized:
- UNREACHABLE();
- case Expression::kEffect:
- break;
- // Nothing to do.
- case Expression::kValue:
- case Expression::kTest:
- // On ARM we have to move the value into a register to do anything
- // with it.
- __ mov(result_register(), Operand(lit->handle()));
- Apply(context, result_register());
- break;
+void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const {
+}
+
+
+void FullCodeGenerator::AccumulatorValueContext::Plug(
+ Heap::RootListIndex index) const {
+ __ LoadRoot(result_register(), index);
+}
+
+
+void FullCodeGenerator::StackValueContext::Plug(
+ Heap::RootListIndex index) const {
+ __ LoadRoot(result_register(), index);
+ __ push(result_register());
+}
+
+
+void FullCodeGenerator::TestContext::Plug(Heap::RootListIndex index) const {
+ if (index == Heap::kUndefinedValueRootIndex ||
+ index == Heap::kNullValueRootIndex ||
+ index == Heap::kFalseValueRootIndex) {
+ __ b(false_label_);
+ } else if (index == Heap::kTrueValueRootIndex) {
+ __ b(true_label_);
+ } else {
+ __ LoadRoot(result_register(), index);
+ codegen()->DoTest(true_label_, false_label_, fall_through_);
}
}
-void FullCodeGenerator::ApplyTOS(Expression::Context context) {
- switch (context) {
- case Expression::kUninitialized:
- UNREACHABLE();
+void FullCodeGenerator::EffectContext::Plug(Handle