summaryrefslogtreecommitdiff
path: root/deps/v8/test
diff options
context:
space:
mode:
authorTrevor Norris <trev.norris@gmail.com>2013-07-22 15:26:27 -0700
committerTrevor Norris <trev.norris@gmail.com>2013-07-22 15:53:10 -0700
commit5777d7ab3038983d368046ab40eb34075f635348 (patch)
treeda7c01759b83e7afa463cbaac095a051f158eb44 /deps/v8/test
parent254b711155996e379a41a569a38dd98dbd7a6e47 (diff)
downloadnode-new-5777d7ab3038983d368046ab40eb34075f635348.tar.gz
v8: upgrade to v8 3.20.7
Diffstat (limited to 'deps/v8/test')
-rw-r--r--deps/v8/test/cctest/cctest.gyp8
-rw-r--r--deps/v8/test/cctest/cctest.status7
-rw-r--r--deps/v8/test/cctest/test-accessors.cc2
-rw-r--r--deps/v8/test/cctest/test-api.cc308
-rw-r--r--deps/v8/test/cctest/test-assembler-arm.cc183
-rw-r--r--deps/v8/test/cctest/test-assembler-ia32.cc89
-rw-r--r--deps/v8/test/cctest/test-assembler-x64.cc93
-rw-r--r--deps/v8/test/cctest/test-circular-queue.cc4
-rw-r--r--deps/v8/test/cctest/test-code-stubs-ia32.cc181
-rw-r--r--deps/v8/test/cctest/test-code-stubs-x64.cc149
-rw-r--r--deps/v8/test/cctest/test-code-stubs.cc130
-rw-r--r--deps/v8/test/cctest/test-code-stubs.h48
-rw-r--r--deps/v8/test/cctest/test-compare-nil-ic-stub.cc87
-rw-r--r--deps/v8/test/cctest/test-conversions.cc130
-rw-r--r--deps/v8/test/cctest/test-cpu-profiler.cc263
-rw-r--r--deps/v8/test/cctest/test-date.cc1
-rw-r--r--deps/v8/test/cctest/test-debug.cc43
-rw-r--r--deps/v8/test/cctest/test-disasm-arm.cc33
-rw-r--r--deps/v8/test/cctest/test-double.cc1
-rw-r--r--deps/v8/test/cctest/test-heap-profiler.cc178
-rw-r--r--deps/v8/test/cctest/test-heap.cc61
-rw-r--r--deps/v8/test/cctest/test-list.cc2
-rw-r--r--deps/v8/test/cctest/test-lockers.cc12
-rw-r--r--deps/v8/test/cctest/test-log-stack-tracer.cc1
-rw-r--r--deps/v8/test/cctest/test-log.cc3
-rw-r--r--[-rwxr-xr-x]deps/v8/test/cctest/test-macro-assembler-x64.cc2
-rw-r--r--deps/v8/test/cctest/test-mark-compact.cc3
-rw-r--r--deps/v8/test/cctest/test-object-observe.cc17
-rw-r--r--deps/v8/test/cctest/test-parsing.cc6
-rw-r--r--deps/v8/test/cctest/test-platform-tls.cc2
-rw-r--r--deps/v8/test/cctest/test-platform.cc63
-rw-r--r--deps/v8/test/cctest/test-profile-generator.cc209
-rw-r--r--deps/v8/test/cctest/test-regexp.cc4
-rw-r--r--deps/v8/test/cctest/test-thread-termination.cc4
-rw-r--r--deps/v8/test/cctest/test-threads.cc1
-rw-r--r--deps/v8/test/cctest/test-types.cc4
-rw-r--r--deps/v8/test/cctest/test-weaksets.cc250
-rw-r--r--deps/v8/test/intl/assert.js184
-rw-r--r--deps/v8/test/intl/break-iterator/default-locale.js48
-rw-r--r--deps/v8/test/intl/break-iterator/en-break.js61
-rw-r--r--deps/v8/test/intl/break-iterator/property-override.js64
-rw-r--r--deps/v8/test/intl/break-iterator/protected-icu-internals.js49
-rw-r--r--deps/v8/test/intl/break-iterator/resolved-options-is-method.js40
-rw-r--r--deps/v8/test/intl/break-iterator/wellformed-unsupported-locale.js32
-rw-r--r--deps/v8/test/intl/break-iterator/zh-break.js63
-rw-r--r--deps/v8/test/intl/collator/de-sort.js44
-rw-r--r--deps/v8/test/intl/collator/default-locale.js52
-rw-r--r--deps/v8/test/intl/collator/en-sort.js39
-rw-r--r--deps/v8/test/intl/collator/normalization.js56
-rw-r--r--deps/v8/test/intl/collator/property-override.js65
-rw-r--r--deps/v8/test/intl/collator/protected-icu-internals.js49
-rw-r--r--deps/v8/test/intl/collator/resolved-options-is-method.js40
-rw-r--r--deps/v8/test/intl/collator/sr-sort.js46
-rw-r--r--deps/v8/test/intl/collator/wellformed-unsupported-locale.js32
-rw-r--r--deps/v8/test/intl/date-format/default-locale.js44
-rw-r--r--deps/v8/test/intl/date-format/format-is-bound.js39
-rw-r--r--deps/v8/test/intl/date-format/format-test.js46
-rw-r--r--deps/v8/test/intl/date-format/parse-MMMdy.js48
-rw-r--r--deps/v8/test/intl/date-format/parse-invalid-input.js35
-rw-r--r--deps/v8/test/intl/date-format/parse-mdy.js49
-rw-r--r--deps/v8/test/intl/date-format/parse-mdyhms.js51
-rw-r--r--deps/v8/test/intl/date-format/property-override.js70
-rw-r--r--deps/v8/test/intl/date-format/protected-icu-internals.js49
-rw-r--r--deps/v8/test/intl/date-format/resolved-options-is-method.js40
-rw-r--r--deps/v8/test/intl/date-format/resolved-options.js107
-rw-r--r--deps/v8/test/intl/date-format/timezone.js65
-rw-r--r--deps/v8/test/intl/date-format/utils.js36
-rw-r--r--deps/v8/test/intl/date-format/wellformed-unsupported-locale.js32
-rw-r--r--deps/v8/test/intl/general/empty-handle.js48
-rw-r--r--deps/v8/test/intl/general/mapped-locale.js52
-rw-r--r--deps/v8/test/intl/general/supported-locales-of.js43
-rw-r--r--deps/v8/test/intl/general/v8Intl-exists.js36
-rw-r--r--deps/v8/test/intl/intl.status41
-rw-r--r--deps/v8/test/intl/number-format/check-digit-ranges.js56
-rw-r--r--deps/v8/test/intl/number-format/default-locale.js44
-rw-r--r--deps/v8/test/intl/number-format/format-is-bound.js39
-rw-r--r--deps/v8/test/intl/number-format/parse-currency.js33
-rw-r--r--deps/v8/test/intl/number-format/parse-decimal.js39
-rw-r--r--deps/v8/test/intl/number-format/parse-invalid-input.js38
-rw-r--r--deps/v8/test/intl/number-format/parse-percent.js36
-rw-r--r--deps/v8/test/intl/number-format/property-override.js78
-rw-r--r--deps/v8/test/intl/number-format/protected-icu-internals.js49
-rw-r--r--deps/v8/test/intl/number-format/resolved-options-is-method.js40
-rw-r--r--deps/v8/test/intl/number-format/wellformed-unsupported-locale.js32
-rw-r--r--deps/v8/test/intl/overrides/caching.js60
-rw-r--r--deps/v8/test/intl/overrides/date.js65
-rw-r--r--deps/v8/test/intl/overrides/number.js53
-rw-r--r--deps/v8/test/intl/overrides/security.js50
-rw-r--r--deps/v8/test/intl/overrides/string.js69
-rw-r--r--deps/v8/test/intl/overrides/webkit-tests.js32
-rw-r--r--deps/v8/test/intl/testcfg.py72
-rw-r--r--deps/v8/test/intl/utils.js40
-rw-r--r--deps/v8/test/mjsunit/allocation-folding.js46
-rw-r--r--deps/v8/test/mjsunit/allocation-site-info.js73
-rw-r--r--deps/v8/test/mjsunit/array-bounds-check-removal.js6
-rw-r--r--deps/v8/test/mjsunit/array-constructor-feedback.js25
-rw-r--r--deps/v8/test/mjsunit/array-feedback.js7
-rw-r--r--deps/v8/test/mjsunit/array-literal-feedback.js6
-rw-r--r--deps/v8/test/mjsunit/array-literal-transitions.js17
-rw-r--r--deps/v8/test/mjsunit/array-natives-elements.js1
-rw-r--r--deps/v8/test/mjsunit/assert-opt-and-deopt.js2
-rw-r--r--deps/v8/test/mjsunit/bugs/bug-2758.js49
-rw-r--r--deps/v8/test/mjsunit/compiler/inline-arguments.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/minus-zero.js37
-rw-r--r--deps/v8/test/mjsunit/compiler/parallel-proto-change.js15
-rw-r--r--deps/v8/test/mjsunit/compiler/phi-representations.js56
-rw-r--r--deps/v8/test/mjsunit/constant-folding-2.js2
-rw-r--r--deps/v8/test/mjsunit/count-based-osr.js4
-rw-r--r--deps/v8/test/mjsunit/date.js5
-rw-r--r--deps/v8/test/mjsunit/debug-break-inline.js1
-rw-r--r--deps/v8/test/mjsunit/debug-evaluate-closure.js91
-rw-r--r--deps/v8/test/mjsunit/debug-script.js3
-rw-r--r--deps/v8/test/mjsunit/deopt-minus-zero.js15
-rw-r--r--deps/v8/test/mjsunit/double-truncation.js78
-rw-r--r--deps/v8/test/mjsunit/elements-kind.js12
-rw-r--r--deps/v8/test/mjsunit/elements-transition-and-store.js41
-rw-r--r--deps/v8/test/mjsunit/elements-transition-hoisting.js17
-rw-r--r--deps/v8/test/mjsunit/elide-double-hole-check-9.js2
-rw-r--r--deps/v8/test/mjsunit/external-array-no-sse2.js6
-rw-r--r--deps/v8/test/mjsunit/external-array.js6
-rw-r--r--deps/v8/test/mjsunit/function-call.js4
-rw-r--r--deps/v8/test/mjsunit/generated-transition-stub.js340
-rw-r--r--deps/v8/test/mjsunit/harmony/array-iterator.js195
-rw-r--r--deps/v8/test/mjsunit/harmony/block-let-crankshaft.js4
-rw-r--r--deps/v8/test/mjsunit/harmony/collections.js65
-rw-r--r--deps/v8/test/mjsunit/harmony/dataview-accessors.js107
-rw-r--r--deps/v8/test/mjsunit/harmony/numeric-literals-off.js41
-rw-r--r--deps/v8/test/mjsunit/harmony/numeric-literals.js87
-rw-r--r--deps/v8/test/mjsunit/harmony/object-observe.js3
-rw-r--r--deps/v8/test/mjsunit/harmony/proxies-for.js20
-rw-r--r--deps/v8/test/mjsunit/harmony/proxies-with.js446
-rw-r--r--deps/v8/test/mjsunit/harmony/typedarrays.js57
-rw-r--r--deps/v8/test/mjsunit/manual-parallel-recompile.js19
-rw-r--r--deps/v8/test/mjsunit/math-floor-of-div-minus-zero.js4
-rw-r--r--deps/v8/test/mjsunit/md5.js211
-rw-r--r--deps/v8/test/mjsunit/mjsunit.js29
-rw-r--r--deps/v8/test/mjsunit/mjsunit.status4
-rw-r--r--deps/v8/test/mjsunit/never-optimize.js63
-rw-r--r--deps/v8/test/mjsunit/opt-elements-kind.js6
-rw-r--r--deps/v8/test/mjsunit/osr-elements-kind.js6
-rw-r--r--deps/v8/test/mjsunit/parallel-initial-prototype-change.js15
-rw-r--r--deps/v8/test/mjsunit/parallel-invalidate-transition-map.js18
-rw-r--r--deps/v8/test/mjsunit/parallel-optimize-disabled.js2
-rw-r--r--deps/v8/test/mjsunit/regress/poly_count_operation.js155
-rw-r--r--deps/v8/test/mjsunit/regress/regress-1118.js4
-rw-r--r--deps/v8/test/mjsunit/regress/regress-1713b.js126
-rw-r--r--deps/v8/test/mjsunit/regress/regress-173361.js33
-rw-r--r--deps/v8/test/mjsunit/regress/regress-2132.js4
-rw-r--r--deps/v8/test/mjsunit/regress/regress-2250.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-2315.js3
-rw-r--r--deps/v8/test/mjsunit/regress/regress-2339.js16
-rw-r--r--deps/v8/test/mjsunit/regress/regress-2451.js3
-rw-r--r--deps/v8/test/mjsunit/regress/regress-252797.js57
-rw-r--r--deps/v8/test/mjsunit/regress/regress-2537.js3
-rw-r--r--deps/v8/test/mjsunit/regress/regress-2618.js11
-rw-r--r--deps/v8/test/mjsunit/regress/regress-2711.js33
-rw-r--r--deps/v8/test/mjsunit/regress/regress-97116b.js50
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-150545.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-173907b.js88
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-259300.js49
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-260345.js59
-rw-r--r--deps/v8/test/mjsunit/regress/regress-deopt-gcb.js49
-rw-r--r--deps/v8/test/mjsunit/regress/regress-deopt-store-effect.js82
-rw-r--r--deps/v8/test/mjsunit/regress/regress-embedded-cons-string.js20
-rw-r--r--deps/v8/test/mjsunit/regress/regress-frame-details-null-receiver.js52
-rw-r--r--deps/v8/test/mjsunit/regress/regress-mul-canoverflowb.js45
-rw-r--r--deps/v8/test/mjsunit/regress/regress-opt-after-debug-deopt.js5
-rw-r--r--deps/v8/test/mjsunit/tools/profviz-test.default1566
-rw-r--r--deps/v8/test/mjsunit/tools/profviz.js83
-rw-r--r--deps/v8/test/mjsunit/transition-elements-kind.js48
-rw-r--r--deps/v8/test/mjsunit/unbox-double-arrays.js3
171 files changed, 9507 insertions, 917 deletions
diff --git a/deps/v8/test/cctest/cctest.gyp b/deps/v8/test/cctest/cctest.gyp
index a65de867dc..9df5c7bccc 100644
--- a/deps/v8/test/cctest/cctest.gyp
+++ b/deps/v8/test/cctest/cctest.gyp
@@ -30,7 +30,7 @@
'v8_code': 1,
'generated_file': '<(SHARED_INTERMEDIATE_DIR)/resources.cc',
},
- 'includes': ['../../build/common.gypi'],
+ 'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
'targets': [
{
'target_name': 'cctest',
@@ -54,7 +54,6 @@
'test-bignum.cc',
'test-bignum-dtoa.cc',
'test-circular-queue.cc',
- 'test-compare-nil-ic-stub.cc',
'test-compiler.cc',
'test-conversions.cc',
'test-cpu-profiler.cc',
@@ -105,12 +104,15 @@
'test-utils.cc',
'test-version.cc',
'test-weakmaps.cc',
+ 'test-weaksets.cc',
'test-weaktypedarrays.cc'
],
'conditions': [
['v8_target_arch=="ia32"', {
'sources': [
'test-assembler-ia32.cc',
+ 'test-code-stubs.cc',
+ 'test-code-stubs-ia32.cc',
'test-disasm-ia32.cc',
'test-log-stack-tracer.cc'
],
@@ -118,6 +120,8 @@
['v8_target_arch=="x64"', {
'sources': [
'test-assembler-x64.cc',
+ 'test-code-stubs.cc',
+ 'test-code-stubs-x64.cc',
'test-macro-assembler-x64.cc',
'test-log-stack-tracer.cc'
],
diff --git a/deps/v8/test/cctest/cctest.status b/deps/v8/test/cctest/cctest.status
index e37f3dbbef..9e8f6085e9 100644
--- a/deps/v8/test/cctest/cctest.status
+++ b/deps/v8/test/cctest/cctest.status
@@ -47,6 +47,7 @@ test-log/EquivalenceOfLoggingAndTraversal: PASS || FAIL
# We do not yet shrink weak maps after they have been emptied by the GC
test-weakmaps/Shrinking: FAIL
+test-weaksets/WeakSet_Shrinking: FAIL
# Deferred stack trace formatting is temporarily disabled.
test-heap/ReleaseStackTraceData: PASS || FAIL
@@ -101,6 +102,12 @@ test-threads/ThreadJoinSelf: SKIP
##############################################################################
[ $arch == nacl_ia32 || $arch == nacl_x64 ]
+# NaCl builds have problems with threaded tests since Pepper_28.
+# V8 Issue 2786
+test-api/Threading1: SKIP
+test-lockers/MultithreadedParallelIsolates: SKIP
+test-lockers/ExtensionsRegistration: SKIP
+
# These tests fail as there is no /tmp directory in Native Client.
test-log/LogAccessorCallbacks: SKIP
test-log/LogCallbacks: SKIP
diff --git a/deps/v8/test/cctest/test-accessors.cc b/deps/v8/test/cctest/test-accessors.cc
index 87d8d66363..7d96ea64c2 100644
--- a/deps/v8/test/cctest/test-accessors.cc
+++ b/deps/v8/test/cctest/test-accessors.cc
@@ -258,6 +258,7 @@ static void CheckAccessorArgsCorrect(
info.GetReturnValue().Set(17);
}
+
THREADED_TEST(DirectCall) {
LocalContext context;
v8::HandleScope scope(context->GetIsolate());
@@ -284,6 +285,7 @@ static void EmptyGetter(Local<String> name,
info.GetReturnValue().Set(v8::Handle<v8::Value>());
}
+
THREADED_TEST(EmptyResult) {
LocalContext context;
v8::HandleScope scope(context->GetIsolate());
diff --git a/deps/v8/test/cctest/test-api.cc b/deps/v8/test/cctest/test-api.cc
index 34432e36ac..fa671dc661 100644
--- a/deps/v8/test/cctest/test-api.cc
+++ b/deps/v8/test/cctest/test-api.cc
@@ -102,12 +102,14 @@ static void ExpectString(const char* code, const char* expected) {
CHECK_EQ(expected, *utf8);
}
+
static void ExpectInt32(const char* code, int expected) {
Local<Value> result = CompileRun(code);
CHECK(result->IsInt32());
CHECK_EQ(expected, result->Int32Value());
}
+
static void ExpectBoolean(const char* code, bool expected) {
Local<Value> result = CompileRun(code);
CHECK(result->IsBoolean());
@@ -860,10 +862,12 @@ static void handle_callback_impl(const v8::FunctionCallbackInfo<Value>& info,
info.GetReturnValue().Set(v8_num(102));
}
+
static void handle_callback(const v8::FunctionCallbackInfo<Value>& info) {
return handle_callback_impl(info, FUNCTION_ADDR(handle_callback));
}
+
static void handle_callback_2(const v8::FunctionCallbackInfo<Value>& info) {
return handle_callback_impl(info, FUNCTION_ADDR(handle_callback_2));
}
@@ -1077,6 +1081,7 @@ Handle<Value> TestFastReturnValues() {
return scope.Close(CompileRun("callback_object.callback()"));
}
+
THREADED_PROFILED_TEST(FastReturnValues) {
LocalContext env;
v8::HandleScope scope(v8::Isolate::GetCurrent());
@@ -1693,6 +1698,7 @@ static void EchoNamedProperty(Local<String> name,
info.GetReturnValue().Set(name);
}
+
// Helper functions for Interceptor/Accessor interaction tests
void SimpleAccessorGetter(Local<String> name,
@@ -1755,6 +1761,7 @@ void AddInterceptor(Handle<FunctionTemplate> templ,
templ->InstanceTemplate()->SetNamedPropertyHandler(getter, setter);
}
+
THREADED_TEST(EmptyInterceptorDoesNotShadowAccessors) {
v8::HandleScope scope(v8::Isolate::GetCurrent());
Handle<FunctionTemplate> parent = FunctionTemplate::New();
@@ -1772,6 +1779,7 @@ THREADED_TEST(EmptyInterceptorDoesNotShadowAccessors) {
ExpectInt32("child.accessor_age", 10);
}
+
THREADED_TEST(EmptyInterceptorDoesNotShadowJSAccessors) {
v8::HandleScope scope(v8::Isolate::GetCurrent());
Handle<FunctionTemplate> parent = FunctionTemplate::New();
@@ -1792,6 +1800,7 @@ THREADED_TEST(EmptyInterceptorDoesNotShadowJSAccessors) {
ExpectInt32("child.accessor_age", 10);
}
+
THREADED_TEST(EmptyInterceptorDoesNotAffectJSProperties) {
v8::HandleScope scope(v8::Isolate::GetCurrent());
Handle<FunctionTemplate> parent = FunctionTemplate::New();
@@ -1811,6 +1820,7 @@ THREADED_TEST(EmptyInterceptorDoesNotAffectJSProperties) {
ExpectString("parent.name", "Alice");
}
+
THREADED_TEST(SwitchFromInterceptorToAccessor) {
v8::HandleScope scope(v8::Isolate::GetCurrent());
Handle<FunctionTemplate> templ = FunctionTemplate::New();
@@ -1828,6 +1838,7 @@ THREADED_TEST(SwitchFromInterceptorToAccessor) {
ExpectInt32("obj.accessor_age", 10000);
}
+
THREADED_TEST(SwitchFromAccessorToInterceptor) {
v8::HandleScope scope(v8::Isolate::GetCurrent());
Handle<FunctionTemplate> templ = FunctionTemplate::New();
@@ -1845,6 +1856,7 @@ THREADED_TEST(SwitchFromAccessorToInterceptor) {
ExpectInt32("obj.interceptor_age", 9999);
}
+
THREADED_TEST(SwitchFromInterceptorToAccessorWithInheritance) {
v8::HandleScope scope(v8::Isolate::GetCurrent());
Handle<FunctionTemplate> parent = FunctionTemplate::New();
@@ -1864,6 +1876,7 @@ THREADED_TEST(SwitchFromInterceptorToAccessorWithInheritance) {
ExpectInt32("child.accessor_age", 10000);
}
+
THREADED_TEST(SwitchFromAccessorToInterceptorWithInheritance) {
v8::HandleScope scope(v8::Isolate::GetCurrent());
Handle<FunctionTemplate> parent = FunctionTemplate::New();
@@ -1883,6 +1896,7 @@ THREADED_TEST(SwitchFromAccessorToInterceptorWithInheritance) {
ExpectInt32("child.interceptor_age", 9999);
}
+
THREADED_TEST(SwitchFromInterceptorToJSAccessor) {
v8::HandleScope scope(v8::Isolate::GetCurrent());
Handle<FunctionTemplate> templ = FunctionTemplate::New();
@@ -1907,6 +1921,7 @@ THREADED_TEST(SwitchFromInterceptorToJSAccessor) {
ExpectUndefined("Object.getOwnPropertyDescriptor(obj, 'age').value");
}
+
THREADED_TEST(SwitchFromJSAccessorToInterceptor) {
v8::HandleScope scope(v8::Isolate::GetCurrent());
Handle<FunctionTemplate> templ = FunctionTemplate::New();
@@ -1931,6 +1946,7 @@ THREADED_TEST(SwitchFromJSAccessorToInterceptor) {
ExpectUndefined("Object.getOwnPropertyDescriptor(obj, 'age').value");
}
+
THREADED_TEST(SwitchFromInterceptorToProperty) {
v8::HandleScope scope(v8::Isolate::GetCurrent());
Handle<FunctionTemplate> parent = FunctionTemplate::New();
@@ -1948,6 +1964,7 @@ THREADED_TEST(SwitchFromInterceptorToProperty) {
ExpectInt32("child.age", 10000);
}
+
THREADED_TEST(SwitchFromPropertyToInterceptor) {
v8::HandleScope scope(v8::Isolate::GetCurrent());
Handle<FunctionTemplate> parent = FunctionTemplate::New();
@@ -1965,6 +1982,7 @@ THREADED_TEST(SwitchFromPropertyToInterceptor) {
ExpectInt32("child.interceptor_age", 9999);
}
+
THREADED_TEST(NamedPropertyHandlerGetter) {
echo_named_call_count = 0;
v8::HandleScope scope(v8::Isolate::GetCurrent());
@@ -2322,6 +2340,16 @@ THREADED_TEST(GlobalObjectInternalFields) {
}
+THREADED_TEST(GlobalObjectHasRealIndexedProperty) {
+ LocalContext env;
+ v8::HandleScope scope(v8::Isolate::GetCurrent());
+
+ v8::Local<v8::Object> global = env->Global();
+ global->Set(0, v8::String::New("value"));
+ CHECK(global->HasRealIndexedProperty(0));
+}
+
+
static void CheckAlignedPointerInInternalField(Handle<v8::Object> obj,
void* value) {
CHECK_EQ(0, static_cast<int>(reinterpret_cast<uintptr_t>(value) & 0x1));
@@ -2404,6 +2432,7 @@ static void CheckEmbedderData(LocalContext* env,
CHECK((*env)->GetEmbedderData(index)->StrictEquals(data));
}
+
THREADED_TEST(EmbedderData) {
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
@@ -2553,6 +2582,14 @@ class ScopedArrayBufferContents {
const v8::ArrayBuffer::Contents contents_;
};
+template <typename T>
+static void CheckInternalFieldsAreZero(v8::Handle<T> value) {
+ CHECK_EQ(T::kInternalFieldCount, value->InternalFieldCount());
+ for (int i = 0; i < value->InternalFieldCount(); i++) {
+ CHECK_EQ(0, value->GetInternalField(i)->Int32Value());
+ }
+}
+
THREADED_TEST(ArrayBuffer_ApiInternalToExternal) {
i::FLAG_harmony_array_buffer = true;
@@ -2563,6 +2600,7 @@ THREADED_TEST(ArrayBuffer_ApiInternalToExternal) {
v8::HandleScope handle_scope(isolate);
Local<v8::ArrayBuffer> ab = v8::ArrayBuffer::New(1024);
+ CheckInternalFieldsAreZero(ab);
CHECK_EQ(1024, static_cast<int>(ab->ByteLength()));
CHECK(!ab->IsExternal());
HEAP->CollectAllGarbage(i::Heap::kNoGCFlags);
@@ -2607,6 +2645,7 @@ THREADED_TEST(ArrayBuffer_JSInternalToExternal) {
"u8_a[0] = 0xAA;"
"u8_a[1] = 0xFF; u8_a.buffer");
Local<v8::ArrayBuffer> ab1 = Local<v8::ArrayBuffer>::Cast(result);
+ CheckInternalFieldsAreZero(ab1);
CHECK_EQ(2, static_cast<int>(ab1->ByteLength()));
CHECK(!ab1->IsExternal());
ScopedArrayBufferContents ab1_contents(ab1->Externalize());
@@ -2647,6 +2686,7 @@ THREADED_TEST(ArrayBuffer_External) {
i::ScopedVector<uint8_t> my_data(100);
memset(my_data.start(), 0, 100);
Local<v8::ArrayBuffer> ab3 = v8::ArrayBuffer::New(my_data.start(), 100);
+ CheckInternalFieldsAreZero(ab3);
CHECK_EQ(100, static_cast<int>(ab3->ByteLength()));
CHECK(ab3->IsExternal());
@@ -2699,6 +2739,7 @@ static Handle<TypedArray> CreateAndCheck(Handle<v8::ArrayBuffer> ab,
int byteOffset,
int length) {
v8::Handle<TypedArray> ta = TypedArray::New(ab, byteOffset, length);
+ CheckInternalFieldsAreZero<v8::ArrayBufferView>(ta);
CHECK_EQ(byteOffset, static_cast<int>(ta->ByteOffset()));
CHECK_EQ(length, static_cast<int>(ta->Length()));
CHECK_EQ(length * kElementSize, static_cast<int>(ta->ByteLength()));
@@ -2736,6 +2777,7 @@ THREADED_TEST(ArrayBuffer_NeuteringApi) {
CreateAndCheck<v8::Float64Array, 8>(buffer, 8, 127);
v8::Handle<v8::DataView> dv = v8::DataView::New(buffer, 1, 1023);
+ CheckInternalFieldsAreZero<v8::ArrayBufferView>(dv);
CHECK_EQ(1, static_cast<int>(dv->ByteOffset()));
CHECK_EQ(1023, static_cast<int>(dv->ByteLength()));
@@ -2754,6 +2796,7 @@ THREADED_TEST(ArrayBuffer_NeuteringApi) {
CheckDataViewIsNeutered(dv);
}
+
THREADED_TEST(ArrayBuffer_NeuteringScript) {
LocalContext env;
v8::Isolate* isolate = env->GetIsolate();
@@ -4386,6 +4429,7 @@ TEST(ExceptionOrder) {
fun->Call(fun, argc, a5);
}
+
void ThrowValue(const v8::FunctionCallbackInfo<v8::Value>& args) {
ApiTestFuzzer::Fuzz();
CHECK_EQ(1, args.Length());
@@ -4608,6 +4652,7 @@ THREADED_TEST(SimplePropertyRead) {
}
}
+
THREADED_TEST(DefinePropertyOnAPIAccessor) {
LocalContext context;
v8::HandleScope scope(context->GetIsolate());
@@ -4655,6 +4700,7 @@ THREADED_TEST(DefinePropertyOnAPIAccessor) {
CHECK_EQ(*exception_value, "TypeError: Cannot redefine property: x");
}
+
THREADED_TEST(DefinePropertyOnDefineGetterSetter) {
v8::HandleScope scope(v8::Isolate::GetCurrent());
Local<ObjectTemplate> templ = ObjectTemplate::New();
@@ -6318,6 +6364,7 @@ void WhammyPropertyGetter(Local<String> name,
info.GetReturnValue().Set(whammy->getScript()->Run());
}
+
THREADED_TEST(WeakReference) {
v8::HandleScope handle_scope(v8::Isolate::GetCurrent());
v8::Handle<v8::ObjectTemplate> templ= v8::ObjectTemplate::New();
@@ -7453,6 +7500,7 @@ static void ExceptionInNativeScriptTestListener(v8::Handle<v8::Message> message,
CHECK_EQ(" new o.foo();", *source_line);
}
+
TEST(ExceptionInNativeScript) {
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
@@ -10713,6 +10761,7 @@ static void FastApiCallback_SimpleSignature(
args.GetReturnValue().Set(args[0]->Int32Value() + 1);
}
+
// Helper to maximize the odds of object moving.
static void GenerateSomeGarbage() {
CompileRun(
@@ -10814,6 +10863,7 @@ static void LoadICFastApi_DirectCall_GCMoveStub(Accessor accessor) {
CHECK_EQ(31, p_getter_count);
}
+
THREADED_PROFILED_TEST(LoadICFastApi_DirectCall_GCMoveStub) {
LoadICFastApi_DirectCall_GCMoveStub(DirectGetterCallback);
}
@@ -10869,6 +10919,7 @@ THREADED_PROFILED_TEST(InterceptorCallICFastApi_TrivialSignature) {
CHECK_EQ(100, interceptor_call_count);
}
+
THREADED_PROFILED_TEST(InterceptorCallICFastApi_SimpleSignature) {
int interceptor_call_count = 0;
v8::HandleScope scope(v8::Isolate::GetCurrent());
@@ -10900,6 +10951,7 @@ THREADED_PROFILED_TEST(InterceptorCallICFastApi_SimpleSignature) {
CHECK_EQ(100, interceptor_call_count);
}
+
THREADED_PROFILED_TEST(InterceptorCallICFastApi_SimpleSignature_Miss1) {
int interceptor_call_count = 0;
v8::HandleScope scope(v8::Isolate::GetCurrent());
@@ -10937,6 +10989,7 @@ THREADED_PROFILED_TEST(InterceptorCallICFastApi_SimpleSignature_Miss1) {
CHECK_GE(interceptor_call_count, 50);
}
+
THREADED_PROFILED_TEST(InterceptorCallICFastApi_SimpleSignature_Miss2) {
int interceptor_call_count = 0;
v8::HandleScope scope(v8::Isolate::GetCurrent());
@@ -10974,6 +11027,7 @@ THREADED_PROFILED_TEST(InterceptorCallICFastApi_SimpleSignature_Miss2) {
CHECK_GE(interceptor_call_count, 50);
}
+
THREADED_PROFILED_TEST(InterceptorCallICFastApi_SimpleSignature_Miss3) {
int interceptor_call_count = 0;
v8::HandleScope scope(v8::Isolate::GetCurrent());
@@ -11014,6 +11068,7 @@ THREADED_PROFILED_TEST(InterceptorCallICFastApi_SimpleSignature_Miss3) {
CHECK_GE(interceptor_call_count, 50);
}
+
THREADED_PROFILED_TEST(InterceptorCallICFastApi_SimpleSignature_TypeError) {
int interceptor_call_count = 0;
v8::HandleScope scope(v8::Isolate::GetCurrent());
@@ -11054,6 +11109,7 @@ THREADED_PROFILED_TEST(InterceptorCallICFastApi_SimpleSignature_TypeError) {
CHECK_GE(interceptor_call_count, 50);
}
+
THREADED_PROFILED_TEST(CallICFastApi_TrivialSignature) {
v8::HandleScope scope(v8::Isolate::GetCurrent());
v8::Handle<v8::FunctionTemplate> fun_templ = v8::FunctionTemplate::New();
@@ -11078,6 +11134,7 @@ THREADED_PROFILED_TEST(CallICFastApi_TrivialSignature) {
CHECK_EQ(42, context->Global()->Get(v8_str("result"))->Int32Value());
}
+
THREADED_PROFILED_TEST(CallICFastApi_SimpleSignature) {
v8::HandleScope scope(v8::Isolate::GetCurrent());
v8::Handle<v8::FunctionTemplate> fun_templ = v8::FunctionTemplate::New();
@@ -11106,6 +11163,7 @@ THREADED_PROFILED_TEST(CallICFastApi_SimpleSignature) {
CHECK_EQ(42, context->Global()->Get(v8_str("result"))->Int32Value());
}
+
THREADED_PROFILED_TEST(CallICFastApi_SimpleSignature_Miss1) {
v8::HandleScope scope(v8::Isolate::GetCurrent());
v8::Handle<v8::FunctionTemplate> fun_templ = v8::FunctionTemplate::New();
@@ -11139,6 +11197,7 @@ THREADED_PROFILED_TEST(CallICFastApi_SimpleSignature_Miss1) {
CHECK_EQ(42, context->Global()->Get(v8_str("saved_result"))->Int32Value());
}
+
THREADED_PROFILED_TEST(CallICFastApi_SimpleSignature_Miss2) {
v8::HandleScope scope(v8::Isolate::GetCurrent());
v8::Handle<v8::FunctionTemplate> fun_templ = v8::FunctionTemplate::New();
@@ -11175,6 +11234,7 @@ THREADED_PROFILED_TEST(CallICFastApi_SimpleSignature_Miss2) {
CHECK_EQ(42, context->Global()->Get(v8_str("saved_result"))->Int32Value());
}
+
THREADED_PROFILED_TEST(CallICFastApi_SimpleSignature_TypeError) {
v8::HandleScope scope(v8::Isolate::GetCurrent());
v8::Handle<v8::FunctionTemplate> fun_templ = v8::FunctionTemplate::New();
@@ -11325,6 +11385,7 @@ THREADED_TEST(InterceptorKeyedCallICFromGlobal) {
CHECK_EQ(239, context->Global()->Get(v8_str("saved_result"))->Int32Value());
}
+
// Test the map transition before the interceptor.
THREADED_TEST(InterceptorKeyedCallICMapChangeBefore) {
v8::HandleScope scope(v8::Isolate::GetCurrent());
@@ -11427,6 +11488,7 @@ static void InterceptorICExceptionGetter(
}
}
+
// Test interceptor load/call IC where the interceptor throws an
// exception once in a while.
THREADED_TEST(InterceptorICGetterExceptions) {
@@ -11470,6 +11532,7 @@ static void InterceptorICExceptionSetter(
}
}
+
// Test interceptor store IC where the interceptor throws an exception
// once in a while.
THREADED_TEST(InterceptorICSetterExceptions) {
@@ -11633,6 +11696,7 @@ static void WebKitLike(Handle<Message> message, Handle<Value> data) {
message->GetScriptResourceName();
}
+
THREADED_TEST(ExceptionsDoNotPropagatePastTryCatch) {
LocalContext context;
HandleScope scope(context->GetIsolate());
@@ -11951,24 +12015,28 @@ TEST(Threading1) {
ApiTestFuzzer::TearDown();
}
+
TEST(Threading2) {
ApiTestFuzzer::SetUp(ApiTestFuzzer::SECOND_PART);
ApiTestFuzzer::RunAllTests();
ApiTestFuzzer::TearDown();
}
+
TEST(Threading3) {
ApiTestFuzzer::SetUp(ApiTestFuzzer::THIRD_PART);
ApiTestFuzzer::RunAllTests();
ApiTestFuzzer::TearDown();
}
+
TEST(Threading4) {
ApiTestFuzzer::SetUp(ApiTestFuzzer::FOURTH_PART);
ApiTestFuzzer::RunAllTests();
ApiTestFuzzer::TearDown();
}
+
void ApiTestFuzzer::CallTest() {
if (kLogThreading)
printf("Start test %d\n", test_number_);
@@ -12583,6 +12651,7 @@ void SetFunctionEntryHookTest::RunLoopInNewEnv(v8::Isolate* isolate) {
env->Exit();
}
+
void SetFunctionEntryHookTest::RunTest() {
// Work in a new isolate throughout.
v8::Isolate* isolate = v8::Isolate::New();
@@ -12671,13 +12740,18 @@ static bool FunctionNameIs(const char* expected,
const char* tail = event->name.str + kPreambleLen;
size_t tail_len = event->name.len - kPreambleLen;
size_t expected_len = strlen(expected);
- if (tail_len == expected_len + 1) {
- if (*tail == '*' || *tail == '~') {
- --tail_len;
- ++tail;
- } else {
- return false;
- }
+ if (tail_len > 1 && (*tail == '*' || *tail == '~')) {
+ --tail_len;
+ ++tail;
+ }
+
+ // Check for tails like 'bar :1'.
+ if (tail_len > expected_len + 2 &&
+ tail[expected_len] == ' ' &&
+ tail[expected_len + 1] == ':' &&
+ tail[expected_len + 2] &&
+ !strncmp(tail, expected, expected_len)) {
+ return true;
}
if (tail_len != expected_len)
@@ -13126,6 +13200,7 @@ THREADED_TEST(PropertyEnumeration) {
CheckOwnProperties(elms->Get(v8::Integer::New(3)), elmc4, elmv4);
}
+
THREADED_TEST(PropertyEnumeration2) {
LocalContext context;
v8::HandleScope scope(context->GetIsolate());
@@ -14234,6 +14309,7 @@ static void ForceSetInterceptSetter(
info.GetReturnValue().SetUndefined();
}
+
TEST(ForceSet) {
force_set_get_count = 0;
force_set_set_count = 0;
@@ -14275,6 +14351,7 @@ TEST(ForceSet) {
CHECK_EQ(2, force_set_get_count);
}
+
TEST(ForceSetWithInterceptor) {
force_set_get_count = 0;
force_set_set_count = 0;
@@ -15734,6 +15811,7 @@ void TypedArrayTestHelper(v8::ExternalArrayType array_type,
backing_store.start(), (kElementCount+2)*sizeof(ElementType));
Local<TypedArray> ta =
TypedArray::New(ab, 2*sizeof(ElementType), kElementCount);
+ CheckInternalFieldsAreZero<v8::ArrayBufferView>(ta);
CHECK_EQ(kElementCount, static_cast<int>(ta->Length()));
CHECK_EQ(2*sizeof(ElementType), static_cast<int>(ta->ByteOffset()));
CHECK_EQ(kElementCount*sizeof(ElementType),
@@ -15819,6 +15897,7 @@ THREADED_TEST(DataView) {
backing_store.start(), 2 + kSize);
Local<v8::DataView> dv =
v8::DataView::New(ab, 2, kSize);
+ CheckInternalFieldsAreZero<v8::ArrayBufferView>(dv);
CHECK_EQ(2, static_cast<int>(dv->ByteOffset()));
CHECK_EQ(kSize, static_cast<int>(dv->ByteLength()));
CHECK_EQ(ab, dv->Buffer());
@@ -15838,6 +15917,7 @@ THREADED_TEST(DataView) {
"new " #View "(ab)"); \
CHECK(result->IsArrayBufferView()); \
CHECK(result->Is##View()); \
+ CheckInternalFieldsAreZero<v8::ArrayBufferView>(result.As<v8::View>()); \
}
IS_ARRAY_BUFFER_VIEW_TEST(Uint8Array)
@@ -16019,6 +16099,7 @@ static void StackTraceForUncaughtExceptionListener(
stack_trace->GetFrame(1));
}
+
TEST(CaptureStackTraceForUncaughtException) {
report_count = 0;
LocalContext env;
@@ -16326,6 +16407,7 @@ TEST(DynamicWithSourceURLInStackTrace) {
CHECK(CompileRunWithOrigin(code.start(), "url", 0, 0)->IsUndefined());
}
+
static void CreateGarbageInOldSpace() {
i::Factory* factory = i::Isolate::Current()->factory();
v8::HandleScope scope(v8::Isolate::GetCurrent());
@@ -16335,6 +16417,7 @@ static void CreateGarbageInOldSpace() {
}
}
+
// Test that idle notification can be handled and eventually returns true.
TEST(IdleNotification) {
const intptr_t MB = 1024 * 1024;
@@ -16552,6 +16635,7 @@ class VisitorImpl : public v8::ExternalResourceVisitor {
bool found_resource_[4];
};
+
TEST(VisitExternalStrings) {
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
@@ -16611,6 +16695,7 @@ static double DoubleToDateTime(double input) {
return (input < 0) ? -(floor(-input)) : floor(input);
}
+
// We don't have a consistent way to write 64-bit constants syntactically, so we
// split them into two 32-bit constants and combine them programmatically.
static double DoubleFromBits(uint32_t high_bits, uint32_t low_bits) {
@@ -16850,6 +16935,7 @@ THREADED_TEST(ScriptOrigin) {
CHECK_EQ(0, script_origin_g.ResourceLineOffset()->Int32Value());
}
+
THREADED_TEST(FunctionGetInferredName) {
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
@@ -16862,6 +16948,7 @@ THREADED_TEST(FunctionGetInferredName) {
CHECK_EQ("foo.bar.baz", *v8::String::Utf8Value(f->GetInferredName()));
}
+
THREADED_TEST(ScriptLineNumber) {
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
@@ -17092,18 +17179,22 @@ void PrologueCallback(v8::GCType, v8::GCCallbackFlags) {
++prologue_call_count;
}
+
void EpilogueCallback(v8::GCType, v8::GCCallbackFlags) {
++epilogue_call_count;
}
+
void PrologueCallbackSecond(v8::GCType, v8::GCCallbackFlags) {
++prologue_call_count_second;
}
+
void EpilogueCallbackSecond(v8::GCType, v8::GCCallbackFlags) {
++epilogue_call_count_second;
}
+
TEST(GCCallbacks) {
LocalContext context;
@@ -17494,6 +17585,7 @@ TEST(GCInFailedAccessCheckCallback) {
v8::V8::SetFailedAccessCheckCallbackFunction(NULL);
}
+
TEST(DefaultIsolateGetCurrent) {
CHECK(v8::Isolate::GetCurrent() != NULL);
v8::Isolate* isolate = v8::Isolate::GetCurrent();
@@ -17501,6 +17593,7 @@ TEST(DefaultIsolateGetCurrent) {
printf("*** %s\n", "DefaultIsolateGetCurrent success");
}
+
TEST(IsolateNewDispose) {
v8::Isolate* current_isolate = v8::Isolate::GetCurrent();
v8::Isolate* isolate = v8::Isolate::New();
@@ -17516,6 +17609,7 @@ TEST(IsolateNewDispose) {
CHECK_EQ(last_message, NULL);
}
+
TEST(IsolateEnterExitDefault) {
v8::Isolate* current_isolate = v8::Isolate::GetCurrent();
CHECK(current_isolate != NULL); // Default isolate.
@@ -17534,6 +17628,7 @@ TEST(IsolateEnterExitDefault) {
ExpectString("'still working 3'", "still working 3");
}
+
TEST(DisposeDefaultIsolate) {
v8::V8::SetFatalErrorHandler(StoringErrorCallback);
@@ -17551,6 +17646,7 @@ TEST(DisposeDefaultIsolate) {
CHECK_NE(last_message, NULL);
}
+
TEST(RunDefaultAndAnotherIsolate) {
v8::HandleScope scope(v8::Isolate::GetCurrent());
LocalContext context;
@@ -17593,6 +17689,7 @@ TEST(RunDefaultAndAnotherIsolate) {
ExpectTrue("function f() { return bar == 371; }; f()");
}
+
TEST(DisposeIsolateWhenInUse) {
v8::Isolate* isolate = v8::Isolate::New();
CHECK(isolate);
@@ -17609,6 +17706,7 @@ TEST(DisposeIsolateWhenInUse) {
CHECK_NE(last_message, NULL);
}
+
TEST(RunTwoIsolatesOnSingleThread) {
// Run isolate 1.
v8::Isolate* isolate1 = v8::Isolate::New();
@@ -17733,6 +17831,7 @@ TEST(RunTwoIsolatesOnSingleThread) {
}
}
+
static int CalcFibonacci(v8::Isolate* isolate, int limit) {
v8::Isolate::Scope isolate_scope(isolate);
v8::HandleScope scope(isolate);
@@ -17768,6 +17867,7 @@ class IsolateThread : public v8::internal::Thread {
int result_;
};
+
TEST(MultipleIsolatesOnIndividualThreads) {
v8::Isolate* isolate1 = v8::Isolate::New();
v8::Isolate* isolate2 = v8::Isolate::New();
@@ -17796,6 +17896,7 @@ TEST(MultipleIsolatesOnIndividualThreads) {
isolate2->Dispose();
}
+
TEST(IsolateDifferentContexts) {
v8::Isolate* isolate = v8::Isolate::New();
Local<v8::Context> context;
@@ -17884,26 +17985,32 @@ static void InitializeTestHelper(InitDefaultIsolateThread::TestCase testCase) {
CHECK_EQ(thread.result(), true);
}
+
TEST(InitializeDefaultIsolateOnSecondaryThread1) {
InitializeTestHelper(InitDefaultIsolateThread::IgnoreOOM);
}
+
TEST(InitializeDefaultIsolateOnSecondaryThread2) {
InitializeTestHelper(InitDefaultIsolateThread::SetResourceConstraints);
}
+
TEST(InitializeDefaultIsolateOnSecondaryThread3) {
InitializeTestHelper(InitDefaultIsolateThread::SetFatalHandler);
}
+
TEST(InitializeDefaultIsolateOnSecondaryThread4) {
InitializeTestHelper(InitDefaultIsolateThread::SetCounterFunction);
}
+
TEST(InitializeDefaultIsolateOnSecondaryThread5) {
InitializeTestHelper(InitDefaultIsolateThread::SetCreateHistogramFunction);
}
+
TEST(InitializeDefaultIsolateOnSecondaryThread6) {
InitializeTestHelper(InitDefaultIsolateThread::SetAddHistogramSampleFunction);
}
@@ -19546,6 +19653,17 @@ THREADED_TEST(Regress2746) {
}
+THREADED_TEST(Regress260106) {
+ LocalContext context;
+ v8::HandleScope scope(context->GetIsolate());
+ Local<FunctionTemplate> templ = FunctionTemplate::New(DummyCallHandler);
+ CompileRun("for (var i = 0; i < 128; i++) Object.prototype[i] = 0;");
+ Local<Function> function = templ->GetFunction();
+ CHECK(!function.IsEmpty());
+ CHECK(function->IsFunction());
+}
+
+
#ifndef WIN32
class ThreadInterruptTest {
public:
@@ -19608,4 +19726,180 @@ THREADED_TEST(SemaphoreInterruption) {
ThreadInterruptTest().RunTest();
}
+
+static bool NamedAccessAlwaysBlocked(Local<v8::Object> global,
+ Local<Value> name,
+ v8::AccessType type,
+ Local<Value> data) {
+ i::PrintF("Named access blocked.\n");
+ return false;
+}
+
+
+static bool IndexAccessAlwaysBlocked(Local<v8::Object> global,
+ uint32_t key,
+ v8::AccessType type,
+ Local<Value> data) {
+ i::PrintF("Indexed access blocked.\n");
+ return false;
+}
+
+
+void UnreachableCallback(const v8::FunctionCallbackInfo<v8::Value>& args) {
+ CHECK(false);
+}
+
+
+TEST(JSONStringifyAccessCheck) {
+ v8::V8::Initialize();
+ v8::HandleScope scope(v8::Isolate::GetCurrent());
+
+ // Create an ObjectTemplate for global objects and install access
+ // check callbacks that will block access.
+ v8::Handle<v8::ObjectTemplate> global_template = v8::ObjectTemplate::New();
+ global_template->SetAccessCheckCallbacks(NamedAccessAlwaysBlocked,
+ IndexAccessAlwaysBlocked);
+
+ // Create a context and set an x property on it's global object.
+ LocalContext context0(NULL, global_template);
+ v8::Handle<v8::Object> global0 = context0->Global();
+ global0->Set(v8_str("x"), v8_num(42));
+ ExpectString("JSON.stringify(this)", "{\"x\":42}");
+
+ for (int i = 0; i < 2; i++) {
+ if (i == 1) {
+ // Install a toJSON function on the second run.
+ v8::Handle<v8::FunctionTemplate> toJSON =
+ v8::FunctionTemplate::New(UnreachableCallback);
+
+ global0->Set(v8_str("toJSON"), toJSON->GetFunction());
+ }
+ // Create a context with a different security token so that the
+ // failed access check callback will be called on each access.
+ LocalContext context1(NULL, global_template);
+ context1->Global()->Set(v8_str("other"), global0);
+
+ ExpectString("JSON.stringify(other)", "{}");
+ ExpectString("JSON.stringify({ 'a' : other, 'b' : ['c'] })",
+ "{\"a\":{},\"b\":[\"c\"]}");
+ ExpectString("JSON.stringify([other, 'b', 'c'])",
+ "[{},\"b\",\"c\"]");
+
+ v8::Handle<v8::Array> array = v8::Array::New(2);
+ array->Set(0, v8_str("a"));
+ array->Set(1, v8_str("b"));
+ context1->Global()->Set(v8_str("array"), array);
+ ExpectString("JSON.stringify(array)", "[\"a\",\"b\"]");
+ array->TurnOnAccessCheck();
+ ExpectString("JSON.stringify(array)", "[]");
+ ExpectString("JSON.stringify([array])", "[[]]");
+ ExpectString("JSON.stringify({'a' : array})", "{\"a\":[]}");
+ }
+}
+
+
+bool access_check_fail_thrown = false;
+bool catch_callback_called = false;
+
+
+// Failed access check callback that performs a GC on each invocation.
+void FailedAccessCheckThrows(Local<v8::Object> target,
+ v8::AccessType type,
+ Local<v8::Value> data) {
+ access_check_fail_thrown = true;
+ i::PrintF("Access check failed. Error thrown.\n");
+ v8::ThrowException(v8::Exception::Error(v8_str("cross context")));
+}
+
+
+void CatcherCallback(const v8::FunctionCallbackInfo<v8::Value>& args) {
+ for (int i = 0; i < args.Length(); i++) {
+ i::PrintF("%s\n", *String::Utf8Value(args[i]));
+ }
+ catch_callback_called = true;
+}
+
+
+void HasOwnPropertyCallback(const v8::FunctionCallbackInfo<v8::Value>& args) {
+ args[0]->ToObject()->HasOwnProperty(args[1]->ToString());
+}
+
+
+void CheckCorrectThrow(const char* script) {
+ // Test that the script, when wrapped into a try-catch, triggers the catch
+ // clause due to failed access check throwing an exception.
+ // The subsequent try-catch should run without any exception.
+ access_check_fail_thrown = false;
+ catch_callback_called = false;
+ i::ScopedVector<char> source(1024);
+ i::OS::SNPrintF(source, "try { %s; } catch (e) { catcher(e); }", script);
+ CompileRun(source.start());
+ CHECK(access_check_fail_thrown);
+ CHECK(catch_callback_called);
+
+ access_check_fail_thrown = false;
+ catch_callback_called = false;
+ CompileRun("try { [1, 2, 3].sort(); } catch (e) { catcher(e) };");
+ CHECK(!access_check_fail_thrown);
+ CHECK(!catch_callback_called);
+}
+
+
+TEST(AccessCheckThrows) {
+ i::FLAG_allow_natives_syntax = true;
+ v8::V8::Initialize();
+ v8::V8::SetFailedAccessCheckCallbackFunction(&FailedAccessCheckThrows);
+ v8::HandleScope scope(v8::Isolate::GetCurrent());
+
+ // Create an ObjectTemplate for global objects and install access
+ // check callbacks that will block access.
+ v8::Handle<v8::ObjectTemplate> global_template = v8::ObjectTemplate::New();
+ global_template->SetAccessCheckCallbacks(NamedAccessAlwaysBlocked,
+ IndexAccessAlwaysBlocked);
+
+ // Create a context and set an x property on it's global object.
+ LocalContext context0(NULL, global_template);
+ context0->Global()->Set(v8_str("x"), v8_num(42));
+ v8::Handle<v8::Object> global0 = context0->Global();
+
+ // Create a context with a different security token so that the
+ // failed access check callback will be called on each access.
+ LocalContext context1(NULL, global_template);
+ context1->Global()->Set(v8_str("other"), global0);
+
+ v8::Handle<v8::FunctionTemplate> catcher_fun =
+ v8::FunctionTemplate::New(CatcherCallback);
+ context1->Global()->Set(v8_str("catcher"), catcher_fun->GetFunction());
+
+ v8::Handle<v8::FunctionTemplate> has_own_property_fun =
+ v8::FunctionTemplate::New(HasOwnPropertyCallback);
+ context1->Global()->Set(v8_str("has_own_property"),
+ has_own_property_fun->GetFunction());
+
+ { v8::TryCatch try_catch;
+ access_check_fail_thrown = false;
+ CompileRun("other.x;");
+ CHECK(access_check_fail_thrown);
+ CHECK(try_catch.HasCaught());
+ }
+
+ CheckCorrectThrow("other.x");
+ CheckCorrectThrow("other[1]");
+ CheckCorrectThrow("JSON.stringify(other)");
+ CheckCorrectThrow("has_own_property(other, 'x')");
+ CheckCorrectThrow("%GetProperty(other, 'x')");
+ CheckCorrectThrow("%SetProperty(other, 'x', 'foo', 1, 0)");
+ CheckCorrectThrow("%IgnoreAttributesAndSetProperty(other, 'x', 'foo')");
+ CheckCorrectThrow("%DeleteProperty(other, 'x', 0)");
+ CheckCorrectThrow("%DeleteProperty(other, '1', 0)");
+ CheckCorrectThrow("%HasLocalProperty(other, 'x')");
+ CheckCorrectThrow("%HasProperty(other, 'x')");
+ CheckCorrectThrow("%HasElement(other, 1)");
+ CheckCorrectThrow("%IsPropertyEnumerable(other, 'x')");
+ CheckCorrectThrow("%GetPropertyNames(other)");
+ CheckCorrectThrow("%GetLocalPropertyNames(other, true)");
+ CheckCorrectThrow("%DefineOrRedefineAccessorProperty("
+ "other, 'x', null, null, 1)");
+}
+
#endif // WIN32
diff --git a/deps/v8/test/cctest/test-assembler-arm.cc b/deps/v8/test/cctest/test-assembler-arm.cc
index 232f846be0..c79e74019e 100644
--- a/deps/v8/test/cctest/test-assembler-arm.cc
+++ b/deps/v8/test/cctest/test-assembler-arm.cc
@@ -619,6 +619,7 @@ TEST(7) {
TestRoundingMode(u32_f64, RN, (kMaxUInt + 1.0), kMaxUInt, true);
}
+
TEST(8) {
// Test VFP multi load/store with ia_w.
CcTest::InitializeVM();
@@ -1226,4 +1227,186 @@ TEST(14) {
CHECK_EQ(kArmNanLower32, BitCast<int64_t>(t.div_result) & 0xffffffffu);
}
+
+TEST(15) {
+ // Test the Neon instructions.
+ CcTest::InitializeVM();
+ Isolate* isolate = Isolate::Current();
+ HandleScope scope(isolate);
+
+ typedef struct {
+ uint32_t src0;
+ uint32_t src1;
+ uint32_t src2;
+ uint32_t src3;
+ uint32_t src4;
+ uint32_t src5;
+ uint32_t src6;
+ uint32_t src7;
+ uint32_t dst0;
+ uint32_t dst1;
+ uint32_t dst2;
+ uint32_t dst3;
+ uint32_t dst4;
+ uint32_t dst5;
+ uint32_t dst6;
+ uint32_t dst7;
+ uint32_t srcA0;
+ uint32_t srcA1;
+ uint32_t dstA0;
+ uint32_t dstA1;
+ uint32_t dstA2;
+ uint32_t dstA3;
+ } T;
+ T t;
+
+ // Create a function that accepts &t, and loads, manipulates, and stores
+ // the doubles and floats.
+ Assembler assm(isolate, NULL, 0);
+
+
+ if (CpuFeatures::IsSupported(NEON)) {
+ CpuFeatureScope scope(&assm, NEON);
+
+ __ stm(db_w, sp, r4.bit() | lr.bit());
+ // Move 32 bytes with neon.
+ __ add(r4, r0, Operand(OFFSET_OF(T, src0)));
+ __ vld1(Neon8, NeonListOperand(d0, 4), NeonMemOperand(r4));
+ __ add(r4, r0, Operand(OFFSET_OF(T, dst0)));
+ __ vst1(Neon8, NeonListOperand(d0, 4), NeonMemOperand(r4));
+
+ // Expand 8 bytes into 8 words(16 bits).
+ __ add(r4, r0, Operand(OFFSET_OF(T, srcA0)));
+ __ vld1(Neon8, NeonListOperand(d0), NeonMemOperand(r4));
+ __ vmovl(NeonU8, q0, d0);
+ __ add(r4, r0, Operand(OFFSET_OF(T, dstA0)));
+ __ vst1(Neon8, NeonListOperand(d0, 2), NeonMemOperand(r4));
+
+ __ ldm(ia_w, sp, r4.bit() | pc.bit());
+
+ CodeDesc desc;
+ assm.GetCode(&desc);
+ Object* code = isolate->heap()->CreateCode(
+ desc,
+ Code::ComputeFlags(Code::STUB),
+ Handle<Code>())->ToObjectChecked();
+ CHECK(code->IsCode());
+#ifdef DEBUG
+ Code::cast(code)->Print();
+#endif
+ F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry());
+ t.src0 = 0x01020304;
+ t.src1 = 0x11121314;
+ t.src2 = 0x21222324;
+ t.src3 = 0x31323334;
+ t.src4 = 0x41424344;
+ t.src5 = 0x51525354;
+ t.src6 = 0x61626364;
+ t.src7 = 0x71727374;
+ t.dst0 = 0;
+ t.dst1 = 0;
+ t.dst2 = 0;
+ t.dst3 = 0;
+ t.dst4 = 0;
+ t.dst5 = 0;
+ t.dst6 = 0;
+ t.dst7 = 0;
+ t.srcA0 = 0x41424344;
+ t.srcA1 = 0x81828384;
+ t.dstA0 = 0;
+ t.dstA1 = 0;
+ t.dstA2 = 0;
+ t.dstA3 = 0;
+ Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
+ USE(dummy);
+ CHECK_EQ(0x01020304, t.dst0);
+ CHECK_EQ(0x11121314, t.dst1);
+ CHECK_EQ(0x21222324, t.dst2);
+ CHECK_EQ(0x31323334, t.dst3);
+ CHECK_EQ(0x41424344, t.dst4);
+ CHECK_EQ(0x51525354, t.dst5);
+ CHECK_EQ(0x61626364, t.dst6);
+ CHECK_EQ(0x71727374, t.dst7);
+ CHECK_EQ(0x00430044, t.dstA0);
+ CHECK_EQ(0x00410042, t.dstA1);
+ CHECK_EQ(0x00830084, t.dstA2);
+ CHECK_EQ(0x00810082, t.dstA3);
+ }
+}
+
+
+TEST(16) {
+ // Test the pkh, uxtb, uxtab and uxtb16 instructions.
+ CcTest::InitializeVM();
+ Isolate* isolate = Isolate::Current();
+ HandleScope scope(isolate);
+
+ typedef struct {
+ uint32_t src0;
+ uint32_t src1;
+ uint32_t src2;
+ uint32_t dst0;
+ uint32_t dst1;
+ uint32_t dst2;
+ uint32_t dst3;
+ uint32_t dst4;
+ } T;
+ T t;
+
+ // Create a function that accepts &t, and loads, manipulates, and stores
+ // the doubles and floats.
+ Assembler assm(isolate, NULL, 0);
+
+ __ stm(db_w, sp, r4.bit() | lr.bit());
+
+ __ mov(r4, Operand(r0));
+ __ ldr(r0, MemOperand(r4, OFFSET_OF(T, src0)));
+ __ ldr(r1, MemOperand(r4, OFFSET_OF(T, src1)));
+
+ __ pkhbt(r2, r0, Operand(r1, LSL, 8));
+ __ str(r2, MemOperand(r4, OFFSET_OF(T, dst0)));
+
+ __ pkhtb(r2, r0, Operand(r1, ASR, 8));
+ __ str(r2, MemOperand(r4, OFFSET_OF(T, dst1)));
+
+ __ uxtb16(r2, Operand(r0, ROR, 8));
+ __ str(r2, MemOperand(r4, OFFSET_OF(T, dst2)));
+
+ __ uxtb(r2, Operand(r0, ROR, 8));
+ __ str(r2, MemOperand(r4, OFFSET_OF(T, dst3)));
+
+ __ ldr(r0, MemOperand(r4, OFFSET_OF(T, src2)));
+ __ uxtab(r2, r0, Operand(r1, ROR, 8));
+ __ str(r2, MemOperand(r4, OFFSET_OF(T, dst4)));
+
+ __ ldm(ia_w, sp, r4.bit() | pc.bit());
+
+ CodeDesc desc;
+ assm.GetCode(&desc);
+ Object* code = isolate->heap()->CreateCode(
+ desc,
+ Code::ComputeFlags(Code::STUB),
+ Handle<Code>())->ToObjectChecked();
+ CHECK(code->IsCode());
+#ifdef DEBUG
+ Code::cast(code)->Print();
+#endif
+ F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry());
+ t.src0 = 0x01020304;
+ t.src1 = 0x11121314;
+ t.src2 = 0x11121300;
+ t.dst0 = 0;
+ t.dst1 = 0;
+ t.dst2 = 0;
+ t.dst3 = 0;
+ t.dst4 = 0;
+ Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
+ USE(dummy);
+ CHECK_EQ(0x12130304, t.dst0);
+ CHECK_EQ(0x01021213, t.dst1);
+ CHECK_EQ(0x00010003, t.dst2);
+ CHECK_EQ(0x00000003, t.dst3);
+ CHECK_EQ(0x11121313, t.dst4);
+}
+
#undef __
diff --git a/deps/v8/test/cctest/test-assembler-ia32.cc b/deps/v8/test/cctest/test-assembler-ia32.cc
index 880370f0f8..76eecc02e7 100644
--- a/deps/v8/test/cctest/test-assembler-ia32.cc
+++ b/deps/v8/test/cctest/test-assembler-ia32.cc
@@ -473,6 +473,95 @@ TEST(AssemblerMultiByteNop) {
}
+#ifdef __GNUC__
+#define ELEMENT_COUNT 4
+
+void DoSSE2(const v8::FunctionCallbackInfo<v8::Value>& args) {
+ Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
+ HandleScope scope(isolate);
+
+ CHECK(args[0]->IsArray());
+ v8::Local<v8::Array> vec = v8::Local<v8::Array>::Cast(args[0]);
+ CHECK_EQ(ELEMENT_COUNT, vec->Length());
+
+ v8::internal::byte buffer[256];
+ Assembler assm(isolate, buffer, sizeof buffer);
+
+ ASSERT(CpuFeatures::IsSupported(SSE2));
+ CpuFeatureScope fscope(&assm, SSE2);
+
+ // Remove return address from the stack for fix stack frame alignment.
+ __ pop(ecx);
+
+ // Store input vector on the stack.
+ for (int i = 0; i < ELEMENT_COUNT; ++i) {
+ __ push(Immediate(vec->Get(i)->Int32Value()));
+ }
+
+ // Read vector into a xmm register.
+ __ pxor(xmm0, xmm0);
+ __ movdqa(xmm0, Operand(esp, 0));
+ // Create mask and store it in the return register.
+ __ movmskps(eax, xmm0);
+
+ // Remove unused data from the stack.
+ __ add(esp, Immediate(ELEMENT_COUNT * sizeof(int32_t)));
+ // Restore return address.
+ __ push(ecx);
+
+ __ ret(0);
+
+ CodeDesc desc;
+ assm.GetCode(&desc);
+
+ Object* code = isolate->heap()->CreateCode(
+ desc,
+ Code::ComputeFlags(Code::STUB),
+ Handle<Code>())->ToObjectChecked();
+ CHECK(code->IsCode());
+
+ F0 f = FUNCTION_CAST<F0>(Code::cast(code)->entry());
+ int res = f();
+ args.GetReturnValue().Set(v8::Integer::New(res));
+}
+
+
+TEST(StackAlignmentForSSE2) {
+ CcTest::InitializeVM();
+ if (!CpuFeatures::IsSupported(SSE2)) return;
+
+ CHECK_EQ(0, OS::ActivationFrameAlignment() % 16);
+
+ v8::Isolate* isolate = v8::Isolate::GetCurrent();
+ v8::HandleScope handle_scope(isolate);
+ v8::Handle<v8::ObjectTemplate> global_template = v8::ObjectTemplate::New();
+ global_template->Set(v8_str("do_sse2"), v8::FunctionTemplate::New(DoSSE2));
+
+ LocalContext env(NULL, global_template);
+ CompileRun(
+ "function foo(vec) {"
+ " return do_sse2(vec);"
+ "}");
+
+ v8::Local<v8::Object> global_object = env->Global();
+ v8::Local<v8::Function> foo =
+ v8::Local<v8::Function>::Cast(global_object->Get(v8_str("foo")));
+
+ int32_t vec[ELEMENT_COUNT] = { -1, 1, 1, 1 };
+ v8::Local<v8::Array> v8_vec = v8::Array::New(ELEMENT_COUNT);
+ for (int i = 0; i < ELEMENT_COUNT; i++) {
+ v8_vec->Set(i, v8_num(vec[i]));
+ }
+
+ v8::Local<v8::Value> args[] = { v8_vec };
+ v8::Local<v8::Value> result = foo->Call(global_object, 1, args);
+
+ // The mask should be 0b1000.
+ CHECK_EQ(8, result->Int32Value());
+}
+
+#undef ELEMENT_COUNT
+#endif // __GNUC__
#undef __
diff --git a/deps/v8/test/cctest/test-assembler-x64.cc b/deps/v8/test/cctest/test-assembler-x64.cc
index 669475ad8a..d5aaf4f212 100644
--- a/deps/v8/test/cctest/test-assembler-x64.cc
+++ b/deps/v8/test/cctest/test-assembler-x64.cc
@@ -62,6 +62,7 @@ using v8::internal::rdx;
using v8::internal::rsi;
using v8::internal::rsp;
using v8::internal::times_1;
+using v8::internal::xmm0;
// Test the x64 assembler by compiling some simple functions into
// a buffer and executing them. These tests do not initialize the
@@ -110,6 +111,7 @@ TEST(AssemblerX64ReturnOperation) {
CHECK_EQ(2, result);
}
+
TEST(AssemblerX64StackOperations) {
OS::SetUp();
// Allocate an executable page of memory.
@@ -142,6 +144,7 @@ TEST(AssemblerX64StackOperations) {
CHECK_EQ(2, result);
}
+
TEST(AssemblerX64ArithmeticOperations) {
OS::SetUp();
// Allocate an executable page of memory.
@@ -164,6 +167,7 @@ TEST(AssemblerX64ArithmeticOperations) {
CHECK_EQ(5, result);
}
+
TEST(AssemblerX64ImulOperation) {
OS::SetUp();
// Allocate an executable page of memory.
@@ -192,6 +196,7 @@ TEST(AssemblerX64ImulOperation) {
CHECK_EQ(-1, result);
}
+
TEST(AssemblerX64MemoryOperands) {
OS::SetUp();
// Allocate an executable page of memory.
@@ -226,6 +231,7 @@ TEST(AssemblerX64MemoryOperands) {
CHECK_EQ(3, result);
}
+
TEST(AssemblerX64ControlFlow) {
OS::SetUp();
// Allocate an executable page of memory.
@@ -255,6 +261,7 @@ TEST(AssemblerX64ControlFlow) {
CHECK_EQ(3, result);
}
+
TEST(AssemblerX64LoopImmediates) {
OS::SetUp();
// Allocate an executable page of memory.
@@ -429,6 +436,92 @@ TEST(AssemblerMultiByteNop) {
}
+#ifdef __GNUC__
+#define ELEMENT_COUNT 4
+
+void DoSSE2(const v8::FunctionCallbackInfo<v8::Value>& args) {
+ CcTest::InitializeVM();
+ v8::HandleScope scope(CcTest::isolate());
+ v8::internal::byte buffer[1024];
+
+ CHECK(args[0]->IsArray());
+ v8::Local<v8::Array> vec = v8::Local<v8::Array>::Cast(args[0]);
+ CHECK_EQ(ELEMENT_COUNT, vec->Length());
+
+ Isolate* isolate = Isolate::Current();
+ Assembler assm(isolate, buffer, sizeof(buffer));
+
+ // Remove return address from the stack for fix stack frame alignment.
+ __ pop(rcx);
+
+ // Store input vector on the stack.
+ for (int i = 0; i < ELEMENT_COUNT; i++) {
+ __ movl(rax, Immediate(vec->Get(i)->Int32Value()));
+ __ shl(rax, Immediate(0x20));
+ __ or_(rax, Immediate(vec->Get(++i)->Int32Value()));
+ __ push(rax);
+ }
+
+ // Read vector into a xmm register.
+ __ xorps(xmm0, xmm0);
+ __ movdqa(xmm0, Operand(rsp, 0));
+ // Create mask and store it in the return register.
+ __ movmskps(rax, xmm0);
+
+ // Remove unused data from the stack.
+ __ addq(rsp, Immediate(ELEMENT_COUNT * sizeof(int32_t)));
+ // Restore return address.
+ __ push(rcx);
+
+ __ ret(0);
+
+ CodeDesc desc;
+ assm.GetCode(&desc);
+ Code* code = Code::cast(isolate->heap()->CreateCode(
+ desc,
+ Code::ComputeFlags(Code::STUB),
+ v8::internal::Handle<Code>())->ToObjectChecked());
+ CHECK(code->IsCode());
+
+ F0 f = FUNCTION_CAST<F0>(code->entry());
+ int res = f();
+ args.GetReturnValue().Set(v8::Integer::New(res));
+}
+
+
+TEST(StackAlignmentForSSE2) {
+ CHECK_EQ(0, OS::ActivationFrameAlignment() % 16);
+
+ v8::Isolate* isolate = v8::Isolate::GetCurrent();
+ v8::HandleScope handle_scope(isolate);
+ v8::Handle<v8::ObjectTemplate> global_template = v8::ObjectTemplate::New();
+ global_template->Set(v8_str("do_sse2"), v8::FunctionTemplate::New(DoSSE2));
+
+ LocalContext env(NULL, global_template);
+ CompileRun(
+ "function foo(vec) {"
+ " return do_sse2(vec);"
+ "}");
+
+ v8::Local<v8::Object> global_object = env->Global();
+ v8::Local<v8::Function> foo =
+ v8::Local<v8::Function>::Cast(global_object->Get(v8_str("foo")));
+
+ int32_t vec[ELEMENT_COUNT] = { -1, 1, 1, 1 };
+ v8::Local<v8::Array> v8_vec = v8::Array::New(ELEMENT_COUNT);
+ for (int i = 0; i < ELEMENT_COUNT; i++) {
+ v8_vec->Set(i, v8_num(vec[i]));
+ }
+
+ v8::Local<v8::Value> args[] = { v8_vec };
+ v8::Local<v8::Value> result = foo->Call(global_object, 1, args);
+
+ // The mask should be 0b1000.
+ CHECK_EQ(8, result->Int32Value());
+}
+
+#undef ELEMENT_COUNT
+#endif // __GNUC__
#undef __
diff --git a/deps/v8/test/cctest/test-circular-queue.cc b/deps/v8/test/cctest/test-circular-queue.cc
index 12b593f59f..4d7856e276 100644
--- a/deps/v8/test/cctest/test-circular-queue.cc
+++ b/deps/v8/test/cctest/test-circular-queue.cc
@@ -42,8 +42,6 @@ TEST(SamplingCircularQueue) {
3);
// Check that we are using non-reserved values.
- CHECK_NE(SamplingCircularQueue::kClear, 1);
- CHECK_NE(SamplingCircularQueue::kEnd, 1);
// Fill up the first chunk.
CHECK_EQ(NULL, scq.StartDequeue());
for (Record i = 1; i < 1 + kRecordsPerChunk; ++i) {
@@ -153,8 +151,6 @@ TEST(SamplingCircularQueueMultithreading) {
scq.FlushResidualRecords();
// Check that we are using non-reserved values.
- CHECK_NE(SamplingCircularQueue::kClear, 1);
- CHECK_NE(SamplingCircularQueue::kEnd, 1);
ProducerThread producer1(&scq, kRecordsPerChunk, 1, semaphore);
ProducerThread producer2(&scq, kRecordsPerChunk, 10, semaphore);
ProducerThread producer3(&scq, kRecordsPerChunk, 20, semaphore);
diff --git a/deps/v8/test/cctest/test-code-stubs-ia32.cc b/deps/v8/test/cctest/test-code-stubs-ia32.cc
new file mode 100644
index 0000000000..6f8de60471
--- /dev/null
+++ b/deps/v8/test/cctest/test-code-stubs-ia32.cc
@@ -0,0 +1,181 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#include <stdlib.h>
+
+#include <limits>
+
+#include "v8.h"
+
+#include "cctest.h"
+#include "code-stubs.h"
+#include "test-code-stubs.h"
+#include "factory.h"
+#include "macro-assembler.h"
+#include "platform.h"
+
+using namespace v8::internal;
+
+#define __ assm.
+
+ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate,
+ Register source_reg,
+ Register destination_reg) {
+ // Allocate an executable page of memory.
+ size_t actual_size;
+ byte* buffer = static_cast<byte*>(OS::Allocate(Assembler::kMinimalBufferSize,
+ &actual_size,
+ true));
+ CHECK(buffer);
+ HandleScope handles(isolate);
+ MacroAssembler assm(isolate, buffer, static_cast<int>(actual_size));
+ assm.set_allow_stub_calls(false);
+ int offset =
+ source_reg.is(esp) ? 0 : (HeapNumber::kValueOffset - kSmiTagSize);
+ DoubleToIStub stub(source_reg, destination_reg, offset, true);
+ byte* start = stub.GetCode(isolate)->instruction_start();
+
+ __ push(ebx);
+ __ push(ecx);
+ __ push(edx);
+ __ push(esi);
+ __ push(edi);
+
+ if (!source_reg.is(esp)) {
+ __ lea(source_reg, MemOperand(esp, 6 * kPointerSize - offset));
+ }
+
+ int param_offset = 7 * kPointerSize;
+ // Save registers make sure they don't get clobbered.
+ int reg_num = 0;
+ for (;reg_num < Register::NumAllocatableRegisters(); ++reg_num) {
+ Register reg = Register::from_code(reg_num);
+ if (!reg.is(esp) && !reg.is(ebp) && !reg.is(destination_reg)) {
+ __ push(reg);
+ param_offset += kPointerSize;
+ }
+ }
+
+ // Re-push the double argument
+ __ push(MemOperand(esp, param_offset));
+ __ push(MemOperand(esp, param_offset));
+
+ // Call through to the actual stub
+ __ call(start, RelocInfo::EXTERNAL_REFERENCE);
+
+ __ add(esp, Immediate(kDoubleSize));
+
+ // Make sure no registers have been unexpectedly clobbered
+ for (--reg_num; reg_num >= 0; --reg_num) {
+ Register reg = Register::from_code(reg_num);
+ if (!reg.is(esp) && !reg.is(ebp) && !reg.is(destination_reg)) {
+ __ cmp(reg, MemOperand(esp, 0));
+ __ Assert(equal, "register was clobbered");
+ __ add(esp, Immediate(kPointerSize));
+ }
+ }
+
+ __ mov(eax, destination_reg);
+
+ __ pop(edi);
+ __ pop(esi);
+ __ pop(edx);
+ __ pop(ecx);
+ __ pop(ebx);
+
+ __ ret(kDoubleSize);
+
+ CodeDesc desc;
+ assm.GetCode(&desc);
+ return reinterpret_cast<ConvertDToIFunc>(
+ reinterpret_cast<intptr_t>(buffer));
+}
+
+#undef __
+
+
+static Isolate* GetIsolateFrom(LocalContext* context) {
+ return reinterpret_cast<Isolate*>((*context)->GetIsolate());
+}
+
+
+TEST(ConvertDToI) {
+ CcTest::InitializeVM();
+ LocalContext context;
+ Isolate* isolate = GetIsolateFrom(&context);
+ HandleScope scope(isolate);
+
+#if DEBUG
+ // Verify that the tests actually work with the C version. In the release
+ // code, the compiler optimizes it away because it's all constant, but does it
+ // wrong, triggering an assert on gcc.
+ RunAllTruncationTests(&ConvertDToICVersion);
+#endif
+
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, esp, eax));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, esp, ebx));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, esp, ecx));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, esp, edx));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, esp, edi));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, esp, esi));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, eax, eax));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, eax, ebx));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, eax, ecx));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, eax, edx));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, eax, edi));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, eax, esi));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, ebx, eax));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, ebx, ebx));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, ebx, ecx));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, ebx, edx));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, ebx, edi));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, ebx, esi));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, ecx, eax));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, ecx, ebx));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, ecx, ecx));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, ecx, edx));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, ecx, edi));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, ecx, esi));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, edx, eax));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, edx, ebx));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, edx, ecx));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, edx, edx));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, edx, edi));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, edx, esi));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, esi, eax));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, esi, ebx));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, esi, ecx));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, esi, edx));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, esi, edi));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, esi, esi));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, edi, eax));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, edi, ebx));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, edi, ecx));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, edi, edx));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, edi, edi));
+ RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, edi, esi));
+}
diff --git a/deps/v8/test/cctest/test-code-stubs-x64.cc b/deps/v8/test/cctest/test-code-stubs-x64.cc
new file mode 100644
index 0000000000..e30c160e7a
--- /dev/null
+++ b/deps/v8/test/cctest/test-code-stubs-x64.cc
@@ -0,0 +1,149 @@
+// Copyright 2013 the V8 project authors. All rights reserved.
+// Rrdistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Rrdistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Rrdistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#include <stdlib.h>
+
+#include "v8.h"
+
+#include "cctest.h"
+#include "code-stubs.h"
+#include "test-code-stubs.h"
+#include "factory.h"
+#include "macro-assembler.h"
+#include "platform.h"
+
+using namespace v8::internal;
+
+
+#define __ assm.
+
+ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate,
+ Register source_reg,
+ Register destination_reg) {
+ // Allocate an executable page of memory.
+ size_t actual_size;
+ byte* buffer = static_cast<byte*>(OS::Allocate(Assembler::kMinimalBufferSize,
+ &actual_size,
+ true));
+ CHECK(buffer);
+ HandleScope handles(isolate);
+ MacroAssembler assm(isolate, buffer, static_cast<int>(actual_size));
+ assm.set_allow_stub_calls(false);
+ int offset =
+ source_reg.is(rsp) ? 0 : (HeapNumber::kValueOffset - kSmiTagSize);
+ DoubleToIStub stub(source_reg, destination_reg, offset, true);
+ byte* start = stub.GetCode(isolate)->instruction_start();
+
+ __ push(rbx);
+ __ push(rcx);
+ __ push(rdx);
+ __ push(rsi);
+ __ push(rdi);
+
+ if (!source_reg.is(rsp)) {
+ __ lea(source_reg, MemOperand(rsp, -8 * kPointerSize - offset));
+ }
+
+ int param_offset = 7 * kPointerSize;
+ // Save registers make sure they don't get clobbered.
+ int reg_num = 0;
+ for (;reg_num < Register::NumAllocatableRegisters(); ++reg_num) {
+ Register reg = Register::from_code(reg_num);
+ if (!reg.is(rsp) && !reg.is(rbp) && !reg.is(destination_reg)) {
+ __ push(reg);
+ param_offset += kPointerSize;
+ }
+ }
+
+ // Re-push the double argument
+ __ subq(rsp, Immediate(kDoubleSize));
+ __ movsd(MemOperand(rsp, 0), xmm0);
+
+ // Call through to the actual stub
+ __ Call(start, RelocInfo::EXTERNAL_REFERENCE);
+
+ __ addq(rsp, Immediate(kDoubleSize));
+
+ // Make sure no registers have been unexpectedly clobbered
+ for (--reg_num; reg_num >= 0; --reg_num) {
+ Register reg = Register::from_code(reg_num);
+ if (!reg.is(rsp) && !reg.is(rbp) && !reg.is(destination_reg)) {
+ __ cmpq(reg, MemOperand(rsp, 0));
+ __ Assert(equal, "register was clobbered");
+ __ addq(rsp, Immediate(kPointerSize));
+ }
+ }
+
+ __ movq(rax, destination_reg);
+
+ __ pop(rdi);
+ __ pop(rsi);
+ __ pop(rdx);
+ __ pop(rcx);
+ __ pop(rbx);
+
+ __ ret(0);
+
+ CodeDesc desc;
+ assm.GetCode(&desc);
+ return reinterpret_cast<ConvertDToIFunc>(
+ reinterpret_cast<intptr_t>(buffer));
+}
+
+#undef __
+
+
+static Isolate* GetIsolateFrom(LocalContext* context) {
+ return reinterpret_cast<Isolate*>((*context)->GetIsolate());
+}
+
+
+TEST(ConvertDToI) {
+ CcTest::InitializeVM();
+ LocalContext context;
+ Isolate* isolate = GetIsolateFrom(&context);
+ HandleScope scope(isolate);
+
+#if DEBUG
+ // Verify that the tests actually work with the C version. In the release
+ // code, the compiler optimizes it away because it's all constant, but does it
+ // wrong, triggering an assert on gcc.
+ RunAllTruncationTests(&ConvertDToICVersion);
+#endif
+
+ Register source_registers[] = {rsp, rax, rbx, rcx, rdx, rsi, rdi, r8, r9};
+ Register dest_registers[] = {rax, rbx, rcx, rdx, rsi, rdi, r8, r9};
+
+ for (size_t s = 0; s < sizeof(*source_registers); s++) {
+ for (size_t d = 0; d < sizeof(*dest_registers); d++) {
+ RunAllTruncationTests(
+ MakeConvertDToIFuncTrampoline(isolate,
+ source_registers[s],
+ dest_registers[d]));
+ }
+ }
+}
diff --git a/deps/v8/test/cctest/test-code-stubs.cc b/deps/v8/test/cctest/test-code-stubs.cc
new file mode 100644
index 0000000000..405069626b
--- /dev/null
+++ b/deps/v8/test/cctest/test-code-stubs.cc
@@ -0,0 +1,130 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#include <stdlib.h>
+
+#include <limits>
+
+#include "v8.h"
+
+#include "cctest.h"
+#include "code-stubs.h"
+#include "test-code-stubs.h"
+#include "factory.h"
+#include "macro-assembler.h"
+#include "platform.h"
+
+using namespace v8::internal;
+
+
+int STDCALL ConvertDToICVersion(double d) {
+ Address double_ptr = reinterpret_cast<Address>(&d);
+ uint32_t exponent_bits = Memory::uint32_at(double_ptr + kDoubleSize / 2);
+ int32_t shifted_mask = static_cast<int32_t>(Double::kExponentMask >> 32);
+ int32_t exponent = (((exponent_bits & shifted_mask) >>
+ (Double::kPhysicalSignificandSize - 32)) -
+ HeapNumber::kExponentBias);
+ uint32_t unsigned_exponent = static_cast<uint32_t>(exponent);
+ int result = 0;
+ uint32_t max_exponent =
+ static_cast<uint32_t>(Double::kPhysicalSignificandSize);
+ if (unsigned_exponent >= max_exponent) {
+ if ((exponent - Double::kPhysicalSignificandSize) < 32) {
+ result = Memory::uint32_at(double_ptr) <<
+ (exponent - Double::kPhysicalSignificandSize);
+ }
+ } else {
+ uint64_t big_result =
+ (BitCast<uint64_t>(d) & Double::kSignificandMask) | Double::kHiddenBit;
+ big_result = big_result >> (Double::kPhysicalSignificandSize - exponent);
+ result = static_cast<uint32_t>(big_result);
+ }
+ if (static_cast<int32_t>(exponent_bits) < 0) {
+ return (0 - result);
+ } else {
+ return result;
+ }
+}
+
+
+void RunOneTruncationTestWithTest(ConvertDToIFunc func,
+ double from,
+ double raw) {
+ uint64_t to = static_cast<int64_t>(raw);
+ int result = (*func)(from);
+ CHECK_EQ(static_cast<int>(to), result);
+}
+
+
+// #define NaN and Infinity so that it's possible to cut-and-paste these tests
+// directly to a .js file and run them.
+#define NaN (OS::nan_value())
+#define Infinity (std::numeric_limits<double>::infinity())
+#define RunOneTruncationTest(p1, p2) RunOneTruncationTestWithTest(func, p1, p2)
+
+void RunAllTruncationTests(ConvertDToIFunc func) {
+ RunOneTruncationTest(0, 0);
+ RunOneTruncationTest(0.5, 0);
+ RunOneTruncationTest(-0.5, 0);
+ RunOneTruncationTest(1.5, 1);
+ RunOneTruncationTest(-1.5, -1);
+ RunOneTruncationTest(5.5, 5);
+ RunOneTruncationTest(-5.0, -5);
+ RunOneTruncationTest(NaN, 0);
+ RunOneTruncationTest(Infinity, 0);
+ RunOneTruncationTest(-NaN, 0);
+ RunOneTruncationTest(-Infinity, 0);
+
+ RunOneTruncationTest(4.5036e+15, 0x1635E000);
+ RunOneTruncationTest(-4.5036e+15, -372629504);
+
+ RunOneTruncationTest(4503603922337791.0, -1);
+ RunOneTruncationTest(-4503603922337791.0, 1);
+ RunOneTruncationTest(4503601774854143.0, 2147483647);
+ RunOneTruncationTest(-4503601774854143.0, -2147483647);
+ RunOneTruncationTest(9007207844675582.0, -2);
+ RunOneTruncationTest(-9007207844675582.0, 2);
+
+ RunOneTruncationTest(2.4178527921507624e+24, -536870912);
+ RunOneTruncationTest(-2.4178527921507624e+24, 536870912);
+ RunOneTruncationTest(2.417853945072267e+24, -536870912);
+ RunOneTruncationTest(-2.417853945072267e+24, 536870912);
+
+ RunOneTruncationTest(4.8357055843015248e+24, -1073741824);
+ RunOneTruncationTest(-4.8357055843015248e+24, 1073741824);
+ RunOneTruncationTest(4.8357078901445341e+24, -1073741824);
+ RunOneTruncationTest(-4.8357078901445341e+24, 1073741824);
+
+ RunOneTruncationTest(9.6714111686030497e+24, -2147483648.0);
+ RunOneTruncationTest(-9.6714111686030497e+24, -2147483648.0);
+ RunOneTruncationTest(9.6714157802890681e+24, -2147483648.0);
+ RunOneTruncationTest(-9.6714157802890681e+24, -2147483648.0);
+}
+
+#undef NaN
+#undef Infinity
+#undef RunOneTruncationTest
diff --git a/deps/v8/test/cctest/test-code-stubs.h b/deps/v8/test/cctest/test-code-stubs.h
new file mode 100644
index 0000000000..eab8e63b2a
--- /dev/null
+++ b/deps/v8/test/cctest/test-code-stubs.h
@@ -0,0 +1,48 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef V8_TEST_CODE_STUBS_H_
+#define V8_TEST_CODE_STUBS_H_
+
+#if V8_TARGET_ARCH_IA32
+#if __GNUC__
+#define STDCALL __attribute__((stdcall))
+#else
+#define STDCALL __stdcall
+#endif
+#else
+#define STDCALL
+#endif
+
+typedef int32_t STDCALL ConvertDToIFuncType(double input);
+typedef ConvertDToIFuncType* ConvertDToIFunc;
+
+int STDCALL ConvertDToICVersion(double d);
+
+void RunAllTruncationTests(ConvertDToIFunc func);
+
+#endif
diff --git a/deps/v8/test/cctest/test-compare-nil-ic-stub.cc b/deps/v8/test/cctest/test-compare-nil-ic-stub.cc
deleted file mode 100644
index 258ab012c7..0000000000
--- a/deps/v8/test/cctest/test-compare-nil-ic-stub.cc
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2006-2013 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:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided
-// with the distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived
-// from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#include <stdlib.h>
-
-#include "v8.h"
-#include "cctest.h"
-#include "code-stubs.h"
-
-
-using namespace v8::internal;
-
-typedef CompareNilICStub::State State;
-
-TEST(StateConstructors) {
- State state;
- state.Add(CompareNilICStub::MONOMORPHIC_MAP);
- State state2(state);
- CHECK_EQ(state.ToIntegral(), state2.ToIntegral());
-}
-
-TEST(ExternalICStateParsing) {
- State state;
- state.Add(CompareNilICStub::UNDEFINED);
- CompareNilICStub stub(kUndefinedValue, state);
- CompareNilICStub stub2(stub.GetExtraICState());
- CHECK_EQ(stub.GetNilValue(), stub2.GetNilValue());
- CHECK_EQ(stub.GetState().ToIntegral(), stub2.GetState().ToIntegral());
-}
-
-TEST(SettingState) {
- State state;
- CHECK(state.IsEmpty());
- state.Add(CompareNilICStub::NULL_TYPE);
- CHECK(!state.IsEmpty());
- CHECK(state.Contains(CompareNilICStub::NULL_TYPE));
- CHECK(!state.Contains(CompareNilICStub::UNDEFINED));
- CHECK(!state.Contains(CompareNilICStub::UNDETECTABLE));
- state.Add(CompareNilICStub::UNDEFINED);
- CHECK(state.Contains(CompareNilICStub::UNDEFINED));
- CHECK(state.Contains(CompareNilICStub::NULL_TYPE));
- CHECK(!state.Contains(CompareNilICStub::UNDETECTABLE));
-}
-
-TEST(ClearState) {
- State state;
- state.Add(CompareNilICStub::NULL_TYPE);
- state.RemoveAll();
- CHECK(state.IsEmpty());
-}
-
-TEST(Generic) {
- State state;
- CHECK(State::Generic() != state);
- state.Add(CompareNilICStub::UNDEFINED);
- CHECK(state != State::Generic());
- state.Add(CompareNilICStub::NULL_TYPE);
- CHECK(state != State::Generic());
- state.Add(CompareNilICStub::UNDETECTABLE);
- CHECK(state != State::Generic());
- state.Add(CompareNilICStub::GENERIC);
- CHECK(state == State::Generic());
-}
diff --git a/deps/v8/test/cctest/test-conversions.cc b/deps/v8/test/cctest/test-conversions.cc
index cf2092e4d3..9e194eafff 100644
--- a/deps/v8/test/cctest/test-conversions.cc
+++ b/deps/v8/test/cctest/test-conversions.cc
@@ -37,12 +37,14 @@ using namespace v8::internal;
TEST(Hex) {
UnicodeCache uc;
- CHECK_EQ(0.0, StringToDouble(&uc, "0x0", ALLOW_HEX | ALLOW_OCTALS));
- CHECK_EQ(0.0, StringToDouble(&uc, "0X0", ALLOW_HEX | ALLOW_OCTALS));
- CHECK_EQ(1.0, StringToDouble(&uc, "0x1", ALLOW_HEX | ALLOW_OCTALS));
- CHECK_EQ(16.0, StringToDouble(&uc, "0x10", ALLOW_HEX | ALLOW_OCTALS));
- CHECK_EQ(255.0, StringToDouble(&uc, "0xff", ALLOW_HEX | ALLOW_OCTALS));
- CHECK_EQ(175.0, StringToDouble(&uc, "0xAF", ALLOW_HEX | ALLOW_OCTALS));
+ CHECK_EQ(0.0, StringToDouble(&uc, "0x0", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(0.0, StringToDouble(&uc, "0X0", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(1.0, StringToDouble(&uc, "0x1", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(16.0, StringToDouble(&uc, "0x10", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(255.0, StringToDouble(&uc, "0xff",
+ ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(175.0, StringToDouble(&uc, "0xAF",
+ ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
CHECK_EQ(0.0, StringToDouble(&uc, "0x0", ALLOW_HEX));
CHECK_EQ(0.0, StringToDouble(&uc, "0X0", ALLOW_HEX));
@@ -55,12 +57,32 @@ TEST(Hex) {
TEST(Octal) {
UnicodeCache uc;
- CHECK_EQ(0.0, StringToDouble(&uc, "0", ALLOW_HEX | ALLOW_OCTALS));
- CHECK_EQ(0.0, StringToDouble(&uc, "00", ALLOW_HEX | ALLOW_OCTALS));
- CHECK_EQ(1.0, StringToDouble(&uc, "01", ALLOW_HEX | ALLOW_OCTALS));
- CHECK_EQ(7.0, StringToDouble(&uc, "07", ALLOW_HEX | ALLOW_OCTALS));
- CHECK_EQ(8.0, StringToDouble(&uc, "010", ALLOW_HEX | ALLOW_OCTALS));
- CHECK_EQ(63.0, StringToDouble(&uc, "077", ALLOW_HEX | ALLOW_OCTALS));
+ CHECK_EQ(0.0, StringToDouble(&uc, "0o0", ALLOW_OCTAL | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(0.0, StringToDouble(&uc, "0O0", ALLOW_OCTAL | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(1.0, StringToDouble(&uc, "0o1", ALLOW_OCTAL | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(7.0, StringToDouble(&uc, "0o7", ALLOW_OCTAL | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(8.0, StringToDouble(&uc, "0o10",
+ ALLOW_OCTAL | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(63.0, StringToDouble(&uc, "0o77",
+ ALLOW_OCTAL | ALLOW_IMPLICIT_OCTAL));
+
+ CHECK_EQ(0.0, StringToDouble(&uc, "0o0", ALLOW_OCTAL));
+ CHECK_EQ(0.0, StringToDouble(&uc, "0O0", ALLOW_OCTAL));
+ CHECK_EQ(1.0, StringToDouble(&uc, "0o1", ALLOW_OCTAL));
+ CHECK_EQ(7.0, StringToDouble(&uc, "0o7", ALLOW_OCTAL));
+ CHECK_EQ(8.0, StringToDouble(&uc, "0o10", ALLOW_OCTAL));
+ CHECK_EQ(63.0, StringToDouble(&uc, "0o77", ALLOW_OCTAL));
+}
+
+
+TEST(ImplicitOctal) {
+ UnicodeCache uc;
+ CHECK_EQ(0.0, StringToDouble(&uc, "0", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(0.0, StringToDouble(&uc, "00", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(1.0, StringToDouble(&uc, "01", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(7.0, StringToDouble(&uc, "07", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(8.0, StringToDouble(&uc, "010", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(63.0, StringToDouble(&uc, "077", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
CHECK_EQ(0.0, StringToDouble(&uc, "0", ALLOW_HEX));
CHECK_EQ(0.0, StringToDouble(&uc, "00", ALLOW_HEX));
@@ -71,26 +93,53 @@ TEST(Octal) {
const double x = 010000000000; // Power of 2, no rounding errors.
CHECK_EQ(x * x * x * x * x, StringToDouble(&uc, "01" "0000000000" "0000000000"
- "0000000000" "0000000000" "0000000000", ALLOW_OCTALS));
+ "0000000000" "0000000000" "0000000000", ALLOW_IMPLICIT_OCTAL));
}
-TEST(MalformedOctal) {
+TEST(Binary) {
UnicodeCache uc;
- CHECK_EQ(8.0, StringToDouble(&uc, "08", ALLOW_HEX | ALLOW_OCTALS));
- CHECK_EQ(81.0, StringToDouble(&uc, "081", ALLOW_HEX | ALLOW_OCTALS));
- CHECK_EQ(78.0, StringToDouble(&uc, "078", ALLOW_HEX | ALLOW_OCTALS));
-
- CHECK(std::isnan(StringToDouble(&uc, "07.7", ALLOW_HEX | ALLOW_OCTALS)));
- CHECK(std::isnan(StringToDouble(&uc, "07.8", ALLOW_HEX | ALLOW_OCTALS)));
- CHECK(std::isnan(StringToDouble(&uc, "07e8", ALLOW_HEX | ALLOW_OCTALS)));
- CHECK(std::isnan(StringToDouble(&uc, "07e7", ALLOW_HEX | ALLOW_OCTALS)));
+ CHECK_EQ(0.0, StringToDouble(&uc, "0b0",
+ ALLOW_BINARY | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(0.0, StringToDouble(&uc, "0B0",
+ ALLOW_BINARY | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(1.0, StringToDouble(&uc, "0b1",
+ ALLOW_BINARY | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(2.0, StringToDouble(&uc, "0b10",
+ ALLOW_BINARY | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(3.0, StringToDouble(&uc, "0b11",
+ ALLOW_BINARY | ALLOW_IMPLICIT_OCTAL));
+
+ CHECK_EQ(0.0, StringToDouble(&uc, "0b0", ALLOW_BINARY));
+ CHECK_EQ(0.0, StringToDouble(&uc, "0B0", ALLOW_BINARY));
+ CHECK_EQ(1.0, StringToDouble(&uc, "0b1", ALLOW_BINARY));
+ CHECK_EQ(2.0, StringToDouble(&uc, "0b10", ALLOW_BINARY));
+ CHECK_EQ(3.0, StringToDouble(&uc, "0b11", ALLOW_BINARY));
+}
- CHECK_EQ(8.7, StringToDouble(&uc, "08.7", ALLOW_HEX | ALLOW_OCTALS));
- CHECK_EQ(8e7, StringToDouble(&uc, "08e7", ALLOW_HEX | ALLOW_OCTALS));
- CHECK_EQ(0.001, StringToDouble(&uc, "0.001", ALLOW_HEX | ALLOW_OCTALS));
- CHECK_EQ(0.713, StringToDouble(&uc, "0.713", ALLOW_HEX | ALLOW_OCTALS));
+TEST(MalformedOctal) {
+ UnicodeCache uc;
+ CHECK_EQ(8.0, StringToDouble(&uc, "08", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(81.0, StringToDouble(&uc, "081", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(78.0, StringToDouble(&uc, "078", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
+
+ CHECK(std::isnan(StringToDouble(&uc, "07.7",
+ ALLOW_HEX | ALLOW_IMPLICIT_OCTAL)));
+ CHECK(std::isnan(StringToDouble(&uc, "07.8",
+ ALLOW_HEX | ALLOW_IMPLICIT_OCTAL)));
+ CHECK(std::isnan(StringToDouble(&uc, "07e8",
+ ALLOW_HEX | ALLOW_IMPLICIT_OCTAL)));
+ CHECK(std::isnan(StringToDouble(&uc, "07e7",
+ ALLOW_HEX | ALLOW_IMPLICIT_OCTAL)));
+
+ CHECK_EQ(8.7, StringToDouble(&uc, "08.7", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(8e7, StringToDouble(&uc, "08e7", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
+
+ CHECK_EQ(0.001, StringToDouble(&uc, "0.001",
+ ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(0.713, StringToDouble(&uc, "0.713",
+ ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
CHECK_EQ(8.0, StringToDouble(&uc, "08", ALLOW_HEX));
CHECK_EQ(81.0, StringToDouble(&uc, "081", ALLOW_HEX));
@@ -112,12 +161,12 @@ TEST(MalformedOctal) {
TEST(TrailingJunk) {
UnicodeCache uc;
CHECK_EQ(8.0, StringToDouble(&uc, "8q", ALLOW_TRAILING_JUNK));
- CHECK_EQ(63.0,
- StringToDouble(&uc, "077qqq", ALLOW_OCTALS | ALLOW_TRAILING_JUNK));
- CHECK_EQ(10.0,
- StringToDouble(&uc, "10e", ALLOW_OCTALS | ALLOW_TRAILING_JUNK));
- CHECK_EQ(10.0,
- StringToDouble(&uc, "10e-", ALLOW_OCTALS | ALLOW_TRAILING_JUNK));
+ CHECK_EQ(63.0, StringToDouble(&uc, "077qqq",
+ ALLOW_IMPLICIT_OCTAL | ALLOW_TRAILING_JUNK));
+ CHECK_EQ(10.0, StringToDouble(&uc, "10e",
+ ALLOW_IMPLICIT_OCTAL | ALLOW_TRAILING_JUNK));
+ CHECK_EQ(10.0, StringToDouble(&uc, "10e-",
+ ALLOW_IMPLICIT_OCTAL | ALLOW_TRAILING_JUNK));
}
@@ -130,6 +179,7 @@ TEST(NonStrDecimalLiteral) {
CHECK_EQ(0.0, StringToDouble(&uc, " ", NO_FLAGS));
}
+
TEST(IntegerStrLiteral) {
UnicodeCache uc;
CHECK_EQ(0.0, StringToDouble(&uc, "0.0", NO_FLAGS));
@@ -143,14 +193,17 @@ TEST(IntegerStrLiteral) {
CHECK(std::isnan(StringToDouble(&uc, " - 1 ", NO_FLAGS)));
CHECK(std::isnan(StringToDouble(&uc, " + 1 ", NO_FLAGS)));
- CHECK_EQ(0.0, StringToDouble(&uc, "0e0", ALLOW_HEX | ALLOW_OCTALS));
- CHECK_EQ(0.0, StringToDouble(&uc, "0e1", ALLOW_HEX | ALLOW_OCTALS));
- CHECK_EQ(0.0, StringToDouble(&uc, "0e-1", ALLOW_HEX | ALLOW_OCTALS));
- CHECK_EQ(0.0, StringToDouble(&uc, "0e-100000", ALLOW_HEX | ALLOW_OCTALS));
- CHECK_EQ(0.0, StringToDouble(&uc, "0e+100000", ALLOW_HEX | ALLOW_OCTALS));
- CHECK_EQ(0.0, StringToDouble(&uc, "0.", ALLOW_HEX | ALLOW_OCTALS));
+ CHECK_EQ(0.0, StringToDouble(&uc, "0e0", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(0.0, StringToDouble(&uc, "0e1", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(0.0, StringToDouble(&uc, "0e-1", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(0.0, StringToDouble(&uc, "0e-100000",
+ ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(0.0, StringToDouble(&uc, "0e+100000",
+ ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
+ CHECK_EQ(0.0, StringToDouble(&uc, "0.", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
}
+
TEST(LongNumberStr) {
UnicodeCache uc;
CHECK_EQ(1e10, StringToDouble(&uc, "1" "0000000000", NO_FLAGS));
@@ -204,6 +257,7 @@ TEST(MaximumSignificantDigits) {
CHECK_EQ(4.4501477170144022721148e-308, StringToDouble(&uc, num, NO_FLAGS));
}
+
TEST(MinimumExponent) {
UnicodeCache uc;
// Same test but with different point-position.
diff --git a/deps/v8/test/cctest/test-cpu-profiler.cc b/deps/v8/test/cctest/test-cpu-profiler.cc
index e59687b215..eb72550c2c 100644
--- a/deps/v8/test/cctest/test-cpu-profiler.cc
+++ b/deps/v8/test/cctest/test-cpu-profiler.cc
@@ -27,24 +27,21 @@
//
// Tests of profiles generator and utilities.
-#define V8_DISABLE_DEPRECATIONS 1
#include "v8.h"
#include "cpu-profiler-inl.h"
#include "cctest.h"
#include "platform.h"
#include "utils.h"
#include "../include/v8-profiler.h"
-#undef V8_DISABLE_DEPRECATIONS
-
using i::CodeEntry;
using i::CpuProfile;
using i::CpuProfiler;
using i::CpuProfilesCollection;
+using i::Heap;
using i::ProfileGenerator;
using i::ProfileNode;
using i::ProfilerEventsProcessor;
using i::ScopedVector;
-using i::TokenEnumerator;
using i::Vector;
@@ -53,10 +50,11 @@ TEST(StartStop) {
ProfileGenerator generator(&profiles);
ProfilerEventsProcessor processor(&generator);
processor.Start();
- processor.Stop();
+ processor.StopSynchronously();
processor.Join();
}
+
static inline i::Address ToAddress(int n) {
return reinterpret_cast<i::Address>(n);
}
@@ -160,7 +158,7 @@ TEST(CodeEvents) {
// Enqueue a tick event to enable code events processing.
EnqueueTickSampleEvent(&processor, aaa_code->address());
- processor.Stop();
+ processor.StopSynchronously();
processor.Join();
// Check the state of profile generator.
@@ -189,6 +187,7 @@ static int CompareProfileNodes(const T* p1, const T* p2) {
return strcmp((*p1)->entry()->name(), (*p2)->entry()->name());
}
+
TEST(TickEvents) {
TestSetup test_setup;
LocalContext env;
@@ -221,10 +220,9 @@ TEST(TickEvents) {
frame2_code->instruction_end() - 1,
frame1_code->instruction_end() - 1);
- processor.Stop();
+ processor.StopSynchronously();
processor.Join();
- CpuProfile* profile =
- profiles->StopProfiling(TokenEnumerator::kNoSecurityToken, "", 1);
+ CpuProfile* profile = profiles->StopProfiling("", 1);
CHECK_NE(NULL, profile);
// Check call trees.
@@ -286,10 +284,9 @@ TEST(Issue1398) {
sample->stack[i] = code->address();
}
- processor.Stop();
+ processor.StopSynchronously();
processor.Join();
- CpuProfile* profile =
- profiles->StopProfiling(TokenEnumerator::kNoSecurityToken, "", 1);
+ CpuProfile* profile = profiles->StopProfiling("", 1);
CHECK_NE(NULL, profile);
int actual_depth = 0;
@@ -393,63 +390,6 @@ TEST(DeleteCpuProfile) {
}
-TEST(DeleteCpuProfileDifferentTokens) {
- LocalContext env;
- v8::HandleScope scope(env->GetIsolate());
- v8::CpuProfiler* cpu_profiler = env->GetIsolate()->GetCpuProfiler();
-
- CHECK_EQ(0, cpu_profiler->GetProfileCount());
- v8::Local<v8::String> name1 = v8::String::New("1");
- cpu_profiler->StartCpuProfiling(name1);
- const v8::CpuProfile* p1 = cpu_profiler->StopCpuProfiling(name1);
- CHECK_NE(NULL, p1);
- CHECK_EQ(1, cpu_profiler->GetProfileCount());
- unsigned uid1 = p1->GetUid();
- CHECK_EQ(p1, cpu_profiler->FindCpuProfile(uid1));
- v8::Local<v8::String> token1 = v8::String::New("token1");
- const v8::CpuProfile* p1_t1 = cpu_profiler->FindCpuProfile(uid1, token1);
- CHECK_NE(NULL, p1_t1);
- CHECK_NE(p1, p1_t1);
- CHECK_EQ(1, cpu_profiler->GetProfileCount());
- const_cast<v8::CpuProfile*>(p1)->Delete();
- CHECK_EQ(0, cpu_profiler->GetProfileCount());
- CHECK_EQ(NULL, cpu_profiler->FindCpuProfile(uid1));
- CHECK_EQ(NULL, cpu_profiler->FindCpuProfile(uid1, token1));
- const_cast<v8::CpuProfile*>(p1_t1)->Delete();
- CHECK_EQ(0, cpu_profiler->GetProfileCount());
-
- v8::Local<v8::String> name2 = v8::String::New("2");
- cpu_profiler->StartCpuProfiling(name2);
- v8::Local<v8::String> token2 = v8::String::New("token2");
- const v8::CpuProfile* p2_t2 = cpu_profiler->StopCpuProfiling(name2, token2);
- CHECK_NE(NULL, p2_t2);
- CHECK_EQ(1, cpu_profiler->GetProfileCount());
- unsigned uid2 = p2_t2->GetUid();
- CHECK_NE(static_cast<int>(uid1), static_cast<int>(uid2));
- const v8::CpuProfile* p2 = cpu_profiler->FindCpuProfile(uid2);
- CHECK_NE(p2_t2, p2);
- v8::Local<v8::String> name3 = v8::String::New("3");
- cpu_profiler->StartCpuProfiling(name3);
- const v8::CpuProfile* p3 = cpu_profiler->StopCpuProfiling(name3);
- CHECK_NE(NULL, p3);
- CHECK_EQ(2, cpu_profiler->GetProfileCount());
- unsigned uid3 = p3->GetUid();
- CHECK_NE(static_cast<int>(uid1), static_cast<int>(uid3));
- CHECK_EQ(p3, cpu_profiler->FindCpuProfile(uid3));
- const_cast<v8::CpuProfile*>(p2_t2)->Delete();
- CHECK_EQ(1, cpu_profiler->GetProfileCount());
- CHECK_EQ(NULL, cpu_profiler->FindCpuProfile(uid2));
- CHECK_EQ(p3, cpu_profiler->FindCpuProfile(uid3));
- const_cast<v8::CpuProfile*>(p2)->Delete();
- CHECK_EQ(1, cpu_profiler->GetProfileCount());
- CHECK_EQ(NULL, cpu_profiler->FindCpuProfile(uid2));
- CHECK_EQ(p3, cpu_profiler->FindCpuProfile(uid3));
- const_cast<v8::CpuProfile*>(p3)->Delete();
- CHECK_EQ(0, cpu_profiler->GetProfileCount());
- CHECK_EQ(NULL, cpu_profiler->FindCpuProfile(uid3));
-}
-
-
TEST(GetProfilerWhenIsolateIsNotInitialized) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
CHECK(i::Isolate::Current()->IsDefaultIsolate());
@@ -470,6 +410,33 @@ TEST(GetProfilerWhenIsolateIsNotInitialized) {
}
+static const v8::CpuProfile* RunProfiler(
+ LocalContext& env, v8::Handle<v8::Function> function,
+ v8::Handle<v8::Value> argv[], int argc,
+ unsigned min_js_samples) {
+ v8::CpuProfiler* cpu_profiler = env->GetIsolate()->GetCpuProfiler();
+ v8::Local<v8::String> profile_name = v8::String::New("my_profile");
+
+ cpu_profiler->StartCpuProfiling(profile_name);
+
+ i::Sampler* sampler =
+ reinterpret_cast<i::Isolate*>(env->GetIsolate())->logger()->sampler();
+ sampler->StartCountingSamples();
+ do {
+ function->Call(env->Global(), argc, argv);
+ } while (sampler->js_and_external_sample_count() < min_js_samples);
+
+ const v8::CpuProfile* profile = cpu_profiler->StopCpuProfiling(profile_name);
+
+ CHECK_NE(NULL, profile);
+ // Dump collected profile to have a better diagnostic in case of failure.
+ reinterpret_cast<i::CpuProfile*>(
+ const_cast<v8::CpuProfile*>(profile))->Print();
+
+ return profile;
+}
+
+
static bool ContainsString(v8::Handle<v8::String> string,
const Vector<v8::Handle<v8::String> >& vector) {
for (int i = 0; i < vector.length(); i++) {
@@ -583,24 +550,11 @@ TEST(CollectCpuProfile) {
v8::Local<v8::Function> function = v8::Local<v8::Function>::Cast(
env->Global()->Get(v8::String::New("start")));
- v8::CpuProfiler* cpu_profiler = env->GetIsolate()->GetCpuProfiler();
- v8::Local<v8::String> profile_name = v8::String::New("my_profile");
-
- cpu_profiler->StartCpuProfiling(profile_name);
int32_t profiling_interval_ms = 200;
-#if defined(_WIN32) || defined(_WIN64)
- // 200ms is not enough on Windows. See
- // https://code.google.com/p/v8/issues/detail?id=2628
- profiling_interval_ms = 500;
-#endif
v8::Handle<v8::Value> args[] = { v8::Integer::New(profiling_interval_ms) };
+ const v8::CpuProfile* profile =
+ RunProfiler(env, function, args, ARRAY_SIZE(args), 200);
function->Call(env->Global(), ARRAY_SIZE(args), args);
- const v8::CpuProfile* profile = cpu_profiler->StopCpuProfiling(profile_name);
-
- CHECK_NE(NULL, profile);
- // Dump collected profile to have a better diagnostic in case of failure.
- reinterpret_cast<i::CpuProfile*>(
- const_cast<v8::CpuProfile*>(profile))->Print();
const v8::CpuProfileNode* root = profile->GetTopDownRoot();
@@ -623,6 +577,7 @@ TEST(CollectCpuProfile) {
const char* delayBranch[] = { "delay", "loop" };
CheckSimpleBranch(fooNode, delayBranch, ARRAY_SIZE(delayBranch));
+ v8::CpuProfiler* cpu_profiler = env->GetIsolate()->GetCpuProfiler();
cpu_profiler->DeleteAllCpuProfiles();
}
@@ -656,23 +611,14 @@ TEST(SampleWhenFrameIsNotSetup) {
v8::Local<v8::Function> function = v8::Local<v8::Function>::Cast(
env->Global()->Get(v8::String::New("start")));
- v8::CpuProfiler* cpu_profiler = env->GetIsolate()->GetCpuProfiler();
- v8::Local<v8::String> profile_name = v8::String::New("my_profile");
-
- cpu_profiler->StartCpuProfiling(profile_name);
int32_t repeat_count = 100;
#if defined(USE_SIMULATOR)
// Simulators are much slower.
repeat_count = 1;
#endif
v8::Handle<v8::Value> args[] = { v8::Integer::New(repeat_count) };
- function->Call(env->Global(), ARRAY_SIZE(args), args);
- const v8::CpuProfile* profile = cpu_profiler->StopCpuProfiling(profile_name);
-
- CHECK_NE(NULL, profile);
- // Dump collected profile to have a better diagnostic in case of failure.
- reinterpret_cast<i::CpuProfile*>(
- const_cast<v8::CpuProfile*>(profile))->Print();
+ const v8::CpuProfile* profile =
+ RunProfiler(env, function, args, ARRAY_SIZE(args), 100);
const v8::CpuProfileNode* root = profile->GetTopDownRoot();
@@ -694,6 +640,7 @@ TEST(SampleWhenFrameIsNotSetup) {
}
}
+ v8::CpuProfiler* cpu_profiler = env->GetIsolate()->GetCpuProfiler();
cpu_profiler->DeleteAllCpuProfiles();
}
@@ -712,16 +659,15 @@ class TestApiCallbacks {
: min_duration_ms_(min_duration_ms),
is_warming_up_(false) {}
- static v8::Handle<v8::Value> Getter(v8::Local<v8::String> name,
- const v8::AccessorInfo& info) {
+ static void Getter(v8::Local<v8::String> name,
+ const v8::PropertyCallbackInfo<v8::Value>& info) {
TestApiCallbacks* data = fromInfo(info);
data->Wait();
- return v8::Int32::New(2013);
}
static void Setter(v8::Local<v8::String> name,
v8::Local<v8::Value> value,
- const v8::AccessorInfo& info) {
+ const v8::PropertyCallbackInfo<void>& info) {
TestApiCallbacks* data = fromInfo(info);
data->Wait();
}
@@ -744,13 +690,8 @@ class TestApiCallbacks {
}
}
- static TestApiCallbacks* fromInfo(const v8::AccessorInfo& info) {
- void* data = v8::External::Cast(*info.Data())->Value();
- return reinterpret_cast<TestApiCallbacks*>(data);
- }
-
- static TestApiCallbacks* fromInfo(
- const v8::FunctionCallbackInfo<v8::Value>& info) {
+ template<typename T>
+ static TestApiCallbacks* fromInfo(const T& info) {
void* data = v8::External::Cast(*info.Data())->Value();
return reinterpret_cast<TestApiCallbacks*>(data);
}
@@ -786,25 +727,17 @@ TEST(NativeAccessorUninitializedIC) {
v8::Local<v8::Function> function = v8::Local<v8::Function>::Cast(
env->Global()->Get(v8::String::New("start")));
- v8::CpuProfiler* cpu_profiler = env->GetIsolate()->GetCpuProfiler();
- v8::Local<v8::String> profile_name = v8::String::New("my_profile");
-
- cpu_profiler->StartCpuProfiling(profile_name);
int32_t repeat_count = 1;
v8::Handle<v8::Value> args[] = { v8::Integer::New(repeat_count) };
- function->Call(env->Global(), ARRAY_SIZE(args), args);
- const v8::CpuProfile* profile = cpu_profiler->StopCpuProfiling(profile_name);
-
- CHECK_NE(NULL, profile);
- // Dump collected profile to have a better diagnostic in case of failure.
- reinterpret_cast<i::CpuProfile*>(
- const_cast<v8::CpuProfile*>(profile))->Print();
+ const v8::CpuProfile* profile =
+ RunProfiler(env, function, args, ARRAY_SIZE(args), 180);
const v8::CpuProfileNode* root = profile->GetTopDownRoot();
const v8::CpuProfileNode* startNode = GetChild(root, "start");
GetChild(startNode, "get foo");
GetChild(startNode, "set foo");
+ v8::CpuProfiler* cpu_profiler = env->GetIsolate()->GetCpuProfiler();
cpu_profiler->DeleteAllCpuProfiles();
}
@@ -844,25 +777,17 @@ TEST(NativeAccessorMonomorphicIC) {
accessors.set_warming_up(false);
}
- v8::CpuProfiler* cpu_profiler = env->GetIsolate()->GetCpuProfiler();
- v8::Local<v8::String> profile_name = v8::String::New("my_profile");
-
- cpu_profiler->StartCpuProfiling(profile_name);
int32_t repeat_count = 100;
v8::Handle<v8::Value> args[] = { v8::Integer::New(repeat_count) };
- function->Call(env->Global(), ARRAY_SIZE(args), args);
- const v8::CpuProfile* profile = cpu_profiler->StopCpuProfiling(profile_name);
-
- CHECK_NE(NULL, profile);
- // Dump collected profile to have a better diagnostic in case of failure.
- reinterpret_cast<i::CpuProfile*>(
- const_cast<v8::CpuProfile*>(profile))->Print();
+ const v8::CpuProfile* profile =
+ RunProfiler(env, function, args, ARRAY_SIZE(args), 200);
const v8::CpuProfileNode* root = profile->GetTopDownRoot();
const v8::CpuProfileNode* startNode = GetChild(root, "start");
GetChild(startNode, "get foo");
GetChild(startNode, "set foo");
+ v8::CpuProfiler* cpu_profiler = env->GetIsolate()->GetCpuProfiler();
cpu_profiler->DeleteAllCpuProfiles();
}
@@ -897,24 +822,16 @@ TEST(NativeMethodUninitializedIC) {
v8::Local<v8::Function> function = v8::Local<v8::Function>::Cast(
env->Global()->Get(v8::String::New("start")));
- v8::CpuProfiler* cpu_profiler = env->GetIsolate()->GetCpuProfiler();
- v8::Local<v8::String> profile_name = v8::String::New("my_profile");
-
- cpu_profiler->StartCpuProfiling(profile_name);
int32_t repeat_count = 1;
v8::Handle<v8::Value> args[] = { v8::Integer::New(repeat_count) };
- function->Call(env->Global(), ARRAY_SIZE(args), args);
- const v8::CpuProfile* profile = cpu_profiler->StopCpuProfiling(profile_name);
-
- CHECK_NE(NULL, profile);
- // Dump collected profile to have a better diagnostic in case of failure.
- reinterpret_cast<i::CpuProfile*>(
- const_cast<v8::CpuProfile*>(profile))->Print();
+ const v8::CpuProfile* profile =
+ RunProfiler(env, function, args, ARRAY_SIZE(args), 100);
const v8::CpuProfileNode* root = profile->GetTopDownRoot();
const v8::CpuProfileNode* startNode = GetChild(root, "start");
GetChild(startNode, "fooMethod");
+ v8::CpuProfiler* cpu_profiler = env->GetIsolate()->GetCpuProfiler();
cpu_profiler->DeleteAllCpuProfiles();
}
@@ -951,25 +868,17 @@ TEST(NativeMethodMonomorphicIC) {
callbacks.set_warming_up(false);
}
- v8::CpuProfiler* cpu_profiler = env->GetIsolate()->GetCpuProfiler();
- v8::Local<v8::String> profile_name = v8::String::New("my_profile");
-
- cpu_profiler->StartCpuProfiling(profile_name);
int32_t repeat_count = 100;
v8::Handle<v8::Value> args[] = { v8::Integer::New(repeat_count) };
- function->Call(env->Global(), ARRAY_SIZE(args), args);
- const v8::CpuProfile* profile = cpu_profiler->StopCpuProfiling(profile_name);
-
- CHECK_NE(NULL, profile);
- // Dump collected profile to have a better diagnostic in case of failure.
- reinterpret_cast<i::CpuProfile*>(
- const_cast<v8::CpuProfile*>(profile))->Print();
+ const v8::CpuProfile* profile =
+ RunProfiler(env, function, args, ARRAY_SIZE(args), 100);
const v8::CpuProfileNode* root = profile->GetTopDownRoot();
GetChild(root, "start");
const v8::CpuProfileNode* startNode = GetChild(root, "start");
GetChild(startNode, "fooMethod");
+ v8::CpuProfiler* cpu_profiler = env->GetIsolate()->GetCpuProfiler();
cpu_profiler->DeleteAllCpuProfiles();
}
@@ -996,19 +905,10 @@ TEST(BoundFunctionCall) {
v8::Local<v8::Function> function = v8::Local<v8::Function>::Cast(
env->Global()->Get(v8::String::New("start")));
- v8::CpuProfiler* cpu_profiler = env->GetIsolate()->GetCpuProfiler();
- v8::Local<v8::String> profile_name = v8::String::New("my_profile");
-
- cpu_profiler->StartCpuProfiling(profile_name);
int32_t duration_ms = 100;
v8::Handle<v8::Value> args[] = { v8::Integer::New(duration_ms) };
- function->Call(env->Global(), ARRAY_SIZE(args), args);
- const v8::CpuProfile* profile = cpu_profiler->StopCpuProfiling(profile_name);
-
- CHECK_NE(NULL, profile);
- // Dump collected profile to have a better diagnostic in case of failure.
- reinterpret_cast<i::CpuProfile*>(
- const_cast<v8::CpuProfile*>(profile))->Print();
+ const v8::CpuProfile* profile =
+ RunProfiler(env, function, args, ARRAY_SIZE(args), 100);
const v8::CpuProfileNode* root = profile->GetTopDownRoot();
ScopedVector<v8::Handle<v8::String> > names(3);
@@ -1021,6 +921,7 @@ TEST(BoundFunctionCall) {
const v8::CpuProfileNode* startNode = GetChild(root, "start");
GetChild(startNode, "foo");
+ v8::CpuProfiler* cpu_profiler = env->GetIsolate()->GetCpuProfiler();
cpu_profiler->DeleteAllCpuProfiles();
}
@@ -1053,28 +954,17 @@ TEST(FunctionCallSample) {
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
+ // Collect garbage that might have be generated while installing extensions.
+ HEAP->CollectAllGarbage(Heap::kNoGCFlags);
+
v8::Script::Compile(v8::String::New(call_function_test_source))->Run();
v8::Local<v8::Function> function = v8::Local<v8::Function>::Cast(
env->Global()->Get(v8::String::New("start")));
- v8::CpuProfiler* cpu_profiler = env->GetIsolate()->GetCpuProfiler();
- v8::Local<v8::String> profile_name = v8::String::New("my_profile");
-
- cpu_profiler->StartCpuProfiling(profile_name);
int32_t duration_ms = 100;
-#if defined(_WIN32) || defined(_WIN64)
- // 100ms is not enough on Windows. See
- // https://code.google.com/p/v8/issues/detail?id=2628
- duration_ms = 400;
-#endif
v8::Handle<v8::Value> args[] = { v8::Integer::New(duration_ms) };
- function->Call(env->Global(), ARRAY_SIZE(args), args);
- const v8::CpuProfile* profile = cpu_profiler->StopCpuProfiling(profile_name);
-
- CHECK_NE(NULL, profile);
- // Dump collected profile to have a better diagnostic in case of failure.
- reinterpret_cast<i::CpuProfile*>(
- const_cast<v8::CpuProfile*>(profile))->Print();
+ const v8::CpuProfile* profile =
+ RunProfiler(env, function, args, ARRAY_SIZE(args), 100);
const v8::CpuProfileNode* root = profile->GetTopDownRoot();
{
@@ -1108,6 +998,7 @@ TEST(FunctionCallSample) {
CheckChildrenNames(unresolvedNode, names);
}
+ v8::CpuProfiler* cpu_profiler = env->GetIsolate()->GetCpuProfiler();
cpu_profiler->DeleteAllCpuProfiles();
}
@@ -1145,24 +1036,11 @@ TEST(FunctionApplySample) {
v8::Local<v8::Function> function = v8::Local<v8::Function>::Cast(
env->Global()->Get(v8::String::New("start")));
- v8::CpuProfiler* cpu_profiler = env->GetIsolate()->GetCpuProfiler();
- v8::Local<v8::String> profile_name = v8::String::New("my_profile");
-
- cpu_profiler->StartCpuProfiling(profile_name);
int32_t duration_ms = 100;
-#if defined(_WIN32) || defined(_WIN64)
- // 100ms is not enough on Windows. See
- // https://code.google.com/p/v8/issues/detail?id=2628
- duration_ms = 400;
-#endif
v8::Handle<v8::Value> args[] = { v8::Integer::New(duration_ms) };
- function->Call(env->Global(), ARRAY_SIZE(args), args);
- const v8::CpuProfile* profile = cpu_profiler->StopCpuProfiling(profile_name);
- CHECK_NE(NULL, profile);
- // Dump collected profile to have a better diagnostic in case of failure.
- reinterpret_cast<i::CpuProfile*>(
- const_cast<v8::CpuProfile*>(profile))->Print();
+ const v8::CpuProfile* profile =
+ RunProfiler(env, function, args, ARRAY_SIZE(args), 100);
const v8::CpuProfileNode* root = profile->GetTopDownRoot();
{
@@ -1200,5 +1078,6 @@ TEST(FunctionApplySample) {
}
}
+ v8::CpuProfiler* cpu_profiler = env->GetIsolate()->GetCpuProfiler();
cpu_profiler->DeleteAllCpuProfiles();
}
diff --git a/deps/v8/test/cctest/test-date.cc b/deps/v8/test/cctest/test-date.cc
index 0152bb7a81..6336481dcc 100644
--- a/deps/v8/test/cctest/test-date.cc
+++ b/deps/v8/test/cctest/test-date.cc
@@ -107,6 +107,7 @@ static int64_t TimeFromYearMonthDay(DateCache* date_cache,
return (result + day - 1) * DateCache::kMsPerDay;
}
+
static void CheckDST(int64_t time) {
Isolate* isolate = Isolate::Current();
DateCache* date_cache = isolate->date_cache();
diff --git a/deps/v8/test/cctest/test-debug.cc b/deps/v8/test/cctest/test-debug.cc
index 788f7af437..484eb8e3fb 100644
--- a/deps/v8/test/cctest/test-debug.cc
+++ b/deps/v8/test/cctest/test-debug.cc
@@ -29,6 +29,7 @@
#include <stdlib.h>
+#define V8_DISABLE_DEPRECATIONS 1
#include "v8.h"
#include "api.h"
@@ -39,6 +40,7 @@
#include "platform.h"
#include "stub-cache.h"
#include "utils.h"
+#undef V8_DISABLE_DEPRECATIONS
using ::v8::internal::EmbeddedVector;
@@ -820,6 +822,8 @@ struct EvaluateCheck {
const char* expr; // An expression to evaluate when a break point is hit.
v8::Handle<v8::Value> expected; // The expected result.
};
+
+
// Array of checks to do.
struct EvaluateCheck* checks = NULL;
// Source for The JavaScript function which can do the evaluation when a break
@@ -1393,6 +1397,7 @@ static void CallWithBreakPoints(v8::Local<v8::Object> recv,
}
}
+
// Test GC during break point processing.
TEST(GCDuringBreakPointProcessing) {
break_point_hit_count = 0;
@@ -2526,6 +2531,7 @@ static void CheckDebugEvent(const v8::Debug::EventDetails& eventDetails) {
if (eventDetails.GetEvent() == v8::Break) ++debugEventCount;
}
+
// Test that the conditional breakpoints work event if code generation from
// strings is prohibited in the debugee context.
TEST(ConditionalBreakpointWithCodeGenerationDisallowed) {
@@ -2571,6 +2577,7 @@ static void CheckDebugEval(const v8::Debug::EventDetails& eventDetails) {
}
}
+
// Test that the evaluation of expressions when a break point is hit generates
// the correct results in case code generation from strings is disallowed in the
// debugee context.
@@ -2625,6 +2632,7 @@ int AsciiToUtf16(const char* input_buffer, uint16_t* output_buffer) {
return i;
}
+
// Copies a 16-bit string to a C string by dropping the high byte of
// each character. Does not check for buffer overflow.
// Can be used in any thread. Requires string length as an input.
@@ -2712,6 +2720,7 @@ static void DebugProcessDebugMessagesHandler(
}
}
+
// Test that the evaluation of expressions works even from ProcessDebugMessages
// i.e. with empty stack.
TEST(DebugEvaluateWithoutStack) {
@@ -4265,6 +4274,7 @@ TEST(NoBreakWhenBootstrapping) {
CheckDebuggerUnloaded();
}
+
static void NamedEnum(const v8::PropertyCallbackInfo<v8::Array>& info) {
v8::Handle<v8::Array> result = v8::Array::New(3);
result->Set(v8::Integer::New(0), v8::String::New("a"));
@@ -4709,6 +4719,7 @@ ThreadBarrier::ThreadBarrier(int num_threads)
invalid_ = false; // A barrier may only be used once. Then it is invalid.
}
+
// Do not call, due to race condition with Wait().
// Could be resolved with Pthread condition variables.
ThreadBarrier::~ThreadBarrier() {
@@ -4717,6 +4728,7 @@ ThreadBarrier::~ThreadBarrier() {
delete sem_;
}
+
void ThreadBarrier::Wait() {
lock_->Lock();
CHECK(!invalid_);
@@ -4736,6 +4748,7 @@ void ThreadBarrier::Wait() {
}
}
+
// A set containing enough barriers and semaphores for any of the tests.
class Barriers {
public:
@@ -4845,6 +4858,7 @@ int GetSourceLineFromBreakEventMessage(char *message) {
return res;
}
+
/* Test MessageQueues */
/* Tests the message queues that hold debugger commands and
* response messages to the debugger. Fills queues and makes
@@ -4876,6 +4890,7 @@ static void MessageHandler(const uint16_t* message, int length,
message_queue_barriers.semaphore_1->Wait();
}
+
void MessageQueueDebuggerThread::Run() {
const int kBufferSize = 1000;
uint16_t buffer_1[kBufferSize];
@@ -5175,6 +5190,7 @@ void V8Thread::Run() {
CompileRun(source);
}
+
void DebuggerThread::Run() {
const int kBufSize = 1000;
uint16_t buffer[kBufSize];
@@ -5209,6 +5225,7 @@ TEST(ThreadedDebugging) {
debugger_thread.Join();
}
+
/* Test RecursiveBreakpoints */
/* In this test, the debugger evaluates a function with a breakpoint, after
* hitting a breakpoint in another function. We do this with both values
@@ -5400,6 +5417,7 @@ void BreakpointsDebuggerThread::Run() {
v8::Debug::SendCommand(buffer, AsciiToUtf16(command_8, buffer));
}
+
void TestRecursiveBreakpointsGeneric(bool global_evaluate) {
i::FLAG_debugger_auto_break = true;
@@ -5418,10 +5436,12 @@ void TestRecursiveBreakpointsGeneric(bool global_evaluate) {
breakpoints_debugger_thread.Join();
}
+
TEST(RecursiveBreakpoints) {
TestRecursiveBreakpointsGeneric(false);
}
+
TEST(RecursiveBreakpointsGlobal) {
TestRecursiveBreakpointsGeneric(true);
}
@@ -6270,8 +6290,6 @@ TEST(ContextData) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::HandleScope scope(isolate);
- v8::Debug::SetMessageHandler2(ContextCheckMessageHandler);
-
// Create two contexts.
v8::Handle<v8::Context> context_1;
v8::Handle<v8::Context> context_2;
@@ -6281,6 +6299,8 @@ TEST(ContextData) {
context_1 = v8::Context::New(isolate, NULL, global_template, global_object);
context_2 = v8::Context::New(isolate, NULL, global_template, global_object);
+ v8::Debug::SetMessageHandler2(ContextCheckMessageHandler);
+
// Default data value is undefined.
CHECK(context_1->GetEmbedderData(0)->IsUndefined());
CHECK(context_2->GetEmbedderData(0)->IsUndefined());
@@ -6438,7 +6458,8 @@ TEST(RegExpDebugBreak) {
// Common part of EvalContextData and NestedBreakEventContextData tests.
-static void ExecuteScriptForContextCheck() {
+static void ExecuteScriptForContextCheck(
+ v8::Debug::MessageHandler2 message_handler) {
// Create a context.
v8::Handle<v8::Context> context_1;
v8::Handle<v8::ObjectTemplate> global_template =
@@ -6446,6 +6467,8 @@ static void ExecuteScriptForContextCheck() {
context_1 =
v8::Context::New(v8::Isolate::GetCurrent(), NULL, global_template);
+ v8::Debug::SetMessageHandler2(message_handler);
+
// Default data value is undefined.
CHECK(context_1->GetEmbedderData(0)->IsUndefined());
@@ -6465,6 +6488,8 @@ static void ExecuteScriptForContextCheck() {
v8::Local<v8::Function> f = CompileFunction(source, "f");
f->Call(context_1->Global(), 0, NULL);
}
+
+ v8::Debug::SetMessageHandler2(NULL);
}
@@ -6474,13 +6499,11 @@ static void ExecuteScriptForContextCheck() {
// Message.GetEventContext.
TEST(EvalContextData) {
v8::HandleScope scope(v8::Isolate::GetCurrent());
- v8::Debug::SetMessageHandler2(ContextCheckMessageHandler);
- ExecuteScriptForContextCheck();
+ ExecuteScriptForContextCheck(ContextCheckMessageHandler);
// One time compile event and one time break event.
CHECK_GT(message_handler_hit_count, 2);
- v8::Debug::SetMessageHandler2(NULL);
CheckDebuggerUnloaded();
}
@@ -6539,16 +6562,14 @@ TEST(NestedBreakEventContextData) {
v8::HandleScope scope(v8::Isolate::GetCurrent());
break_count = 0;
message_handler_hit_count = 0;
- v8::Debug::SetMessageHandler2(DebugEvalContextCheckMessageHandler);
- ExecuteScriptForContextCheck();
+ ExecuteScriptForContextCheck(DebugEvalContextCheckMessageHandler);
// One time compile event and two times break event.
CHECK_GT(message_handler_hit_count, 3);
// One break from the source and another from the evaluate request.
CHECK_EQ(break_count, 2);
- v8::Debug::SetMessageHandler2(NULL);
CheckDebuggerUnloaded();
}
@@ -6873,6 +6894,7 @@ static void CountingMessageHandler(const v8::Debug::Message& message) {
counting_message_handler_counter++;
}
+
// Test that debug messages get processed when ProcessDebugMessages is called.
TEST(ProcessDebugMessages) {
DebugLocalContext env;
@@ -7112,14 +7134,15 @@ static void DebugEventContextChecker(const v8::Debug::EventDetails& details) {
CHECK_EQ(expected_callback_data, details.GetCallbackData());
}
+
// Check that event details contain context where debug event occured.
TEST(DebugEventContext) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::HandleScope scope(isolate);
expected_callback_data = v8::Int32::New(2010);
+ expected_context = v8::Context::New(isolate);
v8::Debug::SetDebugEventListener2(DebugEventContextChecker,
expected_callback_data);
- expected_context = v8::Context::New(isolate);
v8::Context::Scope context_scope(expected_context);
v8::Script::Compile(v8::String::New("(function(){debugger;})();"))->Run();
expected_context.Clear();
diff --git a/deps/v8/test/cctest/test-disasm-arm.cc b/deps/v8/test/cctest/test-disasm-arm.cc
index 85b472d30a..9d6623ea9a 100644
--- a/deps/v8/test/cctest/test-disasm-arm.cc
+++ b/deps/v8/test/cctest/test-disasm-arm.cc
@@ -405,6 +405,17 @@ TEST(Type3) {
"e6ff3f94 usat r3, #31, r4, lsl #31");
COMPARE(usat(r8, 0, Operand(r5, ASR, 17)),
"e6e088d5 usat r8, #0, r5, asr #17");
+
+ COMPARE(pkhbt(r3, r4, Operand(r5, LSL, 17)),
+ "e6843895 pkhbt r3, r4, r5, lsl #17");
+ COMPARE(pkhtb(r3, r4, Operand(r5, ASR, 17)),
+ "e68438d5 pkhtb r3, r4, r5, asr #17");
+ COMPARE(uxtb(r3, Operand(r4, ROR, 8)),
+ "e6ef3474 uxtb r3, r4, ror #8");
+ COMPARE(uxtab(r3, r4, Operand(r5, ROR, 8)),
+ "e6e43475 uxtab r3, r4, r5, ror #8");
+ COMPARE(uxtb16(r3, Operand(r4, ROR, 8)),
+ "e6cf3474 uxtb16 r3, r4, ror #8");
}
VERIFY_RUN();
@@ -662,6 +673,23 @@ TEST(Vfp) {
}
+TEST(Neon) {
+ SET_UP();
+
+ if (CpuFeatures::IsSupported(NEON)) {
+ CpuFeatureScope scope(&assm, NEON);
+ COMPARE(vld1(Neon8, NeonListOperand(d4, 4), NeonMemOperand(r1)),
+ "f421420f vld1.8 {d4, d5, d6, d7}, [r1]");
+ COMPARE(vst1(Neon16, NeonListOperand(d17, 4), NeonMemOperand(r9)),
+ "f449124f vst1.16 {d17, d18, d19, d20}, [r9]");
+ COMPARE(vmovl(NeonU8, q4, d2),
+ "f3884a12 vmovl.u8 q4, d2");
+ }
+
+ VERIFY_RUN();
+}
+
+
TEST(LoadStore) {
SET_UP();
@@ -858,6 +886,11 @@ TEST(LoadStore) {
"e1eba7ff strd r10, [fp, #+127]!");
COMPARE(strd(ip, sp, MemOperand(sp, -127, PreIndex)),
"e16dc7ff strd ip, [sp, #-127]!");
+
+ COMPARE(pld(MemOperand(r1, 0)),
+ "f5d1f000 pld [r1]");
+ COMPARE(pld(MemOperand(r2, 128)),
+ "f5d2f080 pld [r2, #+128]");
}
VERIFY_RUN();
diff --git a/deps/v8/test/cctest/test-double.cc b/deps/v8/test/cctest/test-double.cc
index 0e50bdcc8a..2c9f0c21bb 100644
--- a/deps/v8/test/cctest/test-double.cc
+++ b/deps/v8/test/cctest/test-double.cc
@@ -50,6 +50,7 @@ TEST(Uint64Conversions) {
CHECK_EQ(1.7976931348623157e308, Double(max_double64).value());
}
+
TEST(AsDiyFp) {
uint64_t ordered = V8_2PART_UINT64_C(0x01234567, 89ABCDEF);
DiyFp diy_fp = Double(ordered).AsDiyFp();
diff --git a/deps/v8/test/cctest/test-heap-profiler.cc b/deps/v8/test/cctest/test-heap-profiler.cc
index 5973941edc..e30fcc00c9 100644
--- a/deps/v8/test/cctest/test-heap-profiler.cc
+++ b/deps/v8/test/cctest/test-heap-profiler.cc
@@ -127,6 +127,43 @@ static bool HasString(const v8::HeapGraphNode* node, const char* contents) {
}
+static bool AddressesMatch(void* key1, void* key2) {
+ return key1 == key2;
+}
+
+
+// Check that snapshot has no unretained entries except root.
+static bool ValidateSnapshot(const v8::HeapSnapshot* snapshot, int depth = 3) {
+ i::HeapSnapshot* heap_snapshot = const_cast<i::HeapSnapshot*>(
+ reinterpret_cast<const i::HeapSnapshot*>(snapshot));
+
+ i::HashMap visited(AddressesMatch);
+ i::List<i::HeapGraphEdge>& edges = heap_snapshot->edges();
+ for (int i = 0; i < edges.length(); ++i) {
+ i::HashMap::Entry* entry = visited.Lookup(
+ reinterpret_cast<void*>(edges[i].to()),
+ static_cast<uint32_t>(reinterpret_cast<uintptr_t>(edges[i].to())),
+ true);
+ uint32_t ref_count = static_cast<uint32_t>(
+ reinterpret_cast<uintptr_t>(entry->value));
+ entry->value = reinterpret_cast<void*>(ref_count + 1);
+ }
+ uint32_t unretained_entries_count = 0;
+ i::List<i::HeapEntry>& entries = heap_snapshot->entries();
+ for (int i = 0; i < entries.length(); ++i) {
+ i::HashMap::Entry* entry = visited.Lookup(
+ reinterpret_cast<void*>(&entries[i]),
+ static_cast<uint32_t>(reinterpret_cast<uintptr_t>(&entries[i])),
+ false);
+ if (!entry && entries[i].id() != 1) {
+ entries[i].Print("entry with no retainer", "", depth, 0);
+ ++unretained_entries_count;
+ }
+ }
+ return unretained_entries_count == 0;
+}
+
+
TEST(HeapSnapshot) {
LocalContext env2;
v8::HandleScope scope(env2->GetIsolate());
@@ -141,6 +178,7 @@ TEST(HeapSnapshot) {
"var c2 = new C2(a2);");
const v8::HeapSnapshot* snapshot_env2 =
heap_profiler->TakeHeapSnapshot(v8_str("env2"));
+ CHECK(ValidateSnapshot(snapshot_env2));
const v8::HeapGraphNode* global_env2 = GetGlobalObject(snapshot_env2);
// Verify, that JS global object of env2 has '..2' properties.
@@ -176,6 +214,7 @@ TEST(HeapSnapshotObjectSizes) {
"(function() { x.a.a = x.b; })();");
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("sizes"));
+ CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
const v8::HeapGraphNode* x =
GetProperty(global, v8::HeapGraphEdge::kProperty, "x");
@@ -204,6 +243,7 @@ TEST(BoundFunctionInSnapshot) {
"boundFunction = myFunction.bind(new AAAAA(), 20, new Number(12)); \n");
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("sizes"));
+ CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
const v8::HeapGraphNode* f =
GetProperty(global, v8::HeapGraphEdge::kProperty, "boundFunction");
@@ -242,6 +282,7 @@ TEST(HeapSnapshotEntryChildren) {
"a = new A;");
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("children"));
+ CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
for (int i = 0, count = global->GetChildrenCount(); i < count; ++i) {
const v8::HeapGraphEdge* prop = global->GetChild(i);
@@ -269,6 +310,7 @@ TEST(HeapSnapshotCodeObjects) {
"compiled(1)");
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("code"));
+ CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
const v8::HeapGraphNode* compiled =
@@ -332,6 +374,7 @@ TEST(HeapSnapshotHeapNumbers) {
"b = 2.5; // b is HeapNumber");
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("numbers"));
+ CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
CHECK_EQ(NULL, GetProperty(global, v8::HeapGraphEdge::kProperty, "a"));
const v8::HeapGraphNode* b =
@@ -340,6 +383,7 @@ TEST(HeapSnapshotHeapNumbers) {
CHECK_EQ(v8::HeapGraphNode::kHeapNumber, b->GetType());
}
+
TEST(HeapSnapshotSlicedString) {
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
@@ -352,6 +396,7 @@ TEST(HeapSnapshotSlicedString) {
"child_string = parent_string.slice(100);");
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("strings"));
+ CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
const v8::HeapGraphNode* parent_string =
GetProperty(global, v8::HeapGraphEdge::kProperty, "parent_string");
@@ -364,6 +409,7 @@ TEST(HeapSnapshotSlicedString) {
CHECK_EQ(parent_string, parent);
}
+
TEST(HeapSnapshotInternalReferences) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::HandleScope scope(isolate);
@@ -379,6 +425,7 @@ TEST(HeapSnapshotInternalReferences) {
v8::HeapProfiler* heap_profiler = isolate->GetHeapProfiler();
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("internals"));
+ CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* global_node = GetGlobalObject(snapshot);
// The first reference will not present, because it's a Smi.
CHECK_EQ(NULL, GetProperty(global_node, v8::HeapGraphEdge::kInternal, "0"));
@@ -407,6 +454,7 @@ TEST(HeapSnapshotAddressReuse) {
" a[i] = new A();\n");
const v8::HeapSnapshot* snapshot1 =
heap_profiler->TakeHeapSnapshot(v8_str("snapshot1"));
+ CHECK(ValidateSnapshot(snapshot1));
v8::SnapshotObjectId maxId1 = snapshot1->GetMaxSnapshotJSObjectId();
CompileRun(
@@ -416,6 +464,7 @@ TEST(HeapSnapshotAddressReuse) {
const v8::HeapSnapshot* snapshot2 =
heap_profiler->TakeHeapSnapshot(v8_str("snapshot2"));
+ CHECK(ValidateSnapshot(snapshot2));
const v8::HeapGraphNode* global2 = GetGlobalObject(snapshot2);
const v8::HeapGraphNode* array_node =
@@ -449,6 +498,7 @@ TEST(HeapEntryIdsAndArrayShift) {
" a.push(new AnObject());\n");
const v8::HeapSnapshot* snapshot1 =
heap_profiler->TakeHeapSnapshot(v8_str("s1"));
+ CHECK(ValidateSnapshot(snapshot1));
CompileRun(
"for (var i = 0; i < 1; ++i)\n"
@@ -458,6 +508,7 @@ TEST(HeapEntryIdsAndArrayShift) {
const v8::HeapSnapshot* snapshot2 =
heap_profiler->TakeHeapSnapshot(v8_str("s2"));
+ CHECK(ValidateSnapshot(snapshot2));
const v8::HeapGraphNode* global1 = GetGlobalObject(snapshot1);
const v8::HeapGraphNode* global2 = GetGlobalObject(snapshot2);
@@ -481,6 +532,7 @@ TEST(HeapEntryIdsAndArrayShift) {
CHECK_EQ_SNAPSHOT_OBJECT_ID(k1->GetId(), k2->GetId());
}
+
TEST(HeapEntryIdsAndGC) {
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
@@ -495,11 +547,13 @@ TEST(HeapEntryIdsAndGC) {
v8::Local<v8::String> s2_str = v8_str("s2");
const v8::HeapSnapshot* snapshot1 =
heap_profiler->TakeHeapSnapshot(s1_str);
+ CHECK(ValidateSnapshot(snapshot1));
HEAP->CollectAllGarbage(i::Heap::kNoGCFlags);
const v8::HeapSnapshot* snapshot2 =
heap_profiler->TakeHeapSnapshot(s2_str);
+ CHECK(ValidateSnapshot(snapshot2));
CHECK_GT(snapshot1->GetMaxSnapshotJSObjectId(), 7000);
CHECK(snapshot1->GetMaxSnapshotJSObjectId() <=
@@ -550,6 +604,7 @@ TEST(HeapSnapshotRootPreservedAfterSorting) {
v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler();
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("s"));
+ CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* root1 = snapshot->GetRoot();
const_cast<i::HeapSnapshot*>(reinterpret_cast<const i::HeapSnapshot*>(
snapshot))->GetSortedEntriesList();
@@ -617,6 +672,8 @@ TEST(HeapSnapshotJSONSerialization) {
"var b = new B(a);");
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("json"));
+ CHECK(ValidateSnapshot(snapshot));
+
TestJSONStream stream;
snapshot->Serialize(&stream, v8::HeapSnapshot::kJSON);
CHECK_GT(stream.size(), 0);
@@ -713,6 +770,7 @@ TEST(HeapSnapshotJSONSerializationAborting) {
v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler();
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("abort"));
+ CHECK(ValidateSnapshot(snapshot));
TestJSONStream stream(5);
snapshot->Serialize(&stream, v8::HeapSnapshot::kJSON);
CHECK_GT(stream.size(), 0);
@@ -952,6 +1010,7 @@ TEST(HeapSnapshotGetNodeById) {
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("id"));
+ CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* root = snapshot->GetRoot();
CheckChildrenIds(snapshot, root, 0, 3);
// Check a big id, which should not exist yet.
@@ -966,6 +1025,7 @@ TEST(HeapSnapshotGetSnapshotObjectId) {
CompileRun("globalObject = {};\n");
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("get_snapshot_object_id"));
+ CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
const v8::HeapGraphNode* global_object =
GetProperty(global, v8::HeapGraphEdge::kProperty, "globalObject");
@@ -990,6 +1050,7 @@ TEST(HeapSnapshotUnknownSnapshotObjectId) {
CompileRun("globalObject = {};\n");
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("unknown_object_id"));
+ CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* node =
snapshot->GetNodeById(v8::HeapProfiler::kUnknownObjectId);
CHECK_EQ(NULL, node);
@@ -1017,6 +1078,7 @@ class TestActivityControl : public v8::ActivityControl {
};
}
+
TEST(TakeHeapSnapshotAborting) {
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
@@ -1035,6 +1097,8 @@ TEST(TakeHeapSnapshotAborting) {
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("full"),
&control);
+ CHECK(ValidateSnapshot(snapshot));
+
CHECK_NE(NULL, snapshot);
CHECK_EQ(snapshots_count + 1, heap_profiler->GetSnapshotCount());
CHECK_EQ(control.total(), control.done());
@@ -1145,6 +1209,7 @@ TEST(HeapSnapshotRetainedObjectInfo) {
CHECK_EQ(0, TestRetainedObjectInfo::instances.length());
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("retained"));
+ CHECK(ValidateSnapshot(snapshot));
CHECK_EQ(3, TestRetainedObjectInfo::instances.length());
for (int i = 0; i < TestRetainedObjectInfo::instances.length(); ++i) {
@@ -1237,6 +1302,7 @@ TEST(HeapSnapshotImplicitReferences) {
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("implicit_refs"));
+ CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* global_object = GetGlobalObject(snapshot);
const v8::HeapGraphNode* obj0 = GetProperty(
@@ -1301,6 +1367,7 @@ TEST(DeleteHeapSnapshot) {
CHECK_EQ(0, heap_profiler->GetSnapshotCount());
const v8::HeapSnapshot* s1 =
heap_profiler->TakeHeapSnapshot(v8_str("1"));
+
CHECK_NE(NULL, s1);
CHECK_EQ(1, heap_profiler->GetSnapshotCount());
unsigned uid1 = s1->GetUid();
@@ -1340,6 +1407,7 @@ class NameResolver : public v8::HeapProfiler::ObjectNameResolver {
}
};
+
TEST(GlobalObjectName) {
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
@@ -1352,6 +1420,7 @@ TEST(GlobalObjectName) {
heap_profiler->TakeHeapSnapshot(v8_str("document"),
NULL,
&name_resolver);
+ CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
CHECK_NE(NULL, global);
CHECK_EQ("Object / Global object name" ,
@@ -1382,6 +1451,7 @@ TEST(NodesIteration) {
v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler();
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("iteration"));
+ CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
CHECK_NE(NULL, global);
// Verify that we can find this object by iteration.
@@ -1403,6 +1473,7 @@ TEST(GetHeapValue) {
CompileRun("a = { s_prop: \'value\', n_prop: 0.1 };");
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("value"));
+ CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
CHECK(global->GetHeapValue()->IsObject());
v8::Local<v8::Object> js_global =
@@ -1437,6 +1508,7 @@ TEST(GetHeapValueForDeletedObject) {
CompileRun("a = { p: { r: {} } };");
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("snapshot"));
+ CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
const v8::HeapGraphNode* obj = GetProperty(
global, v8::HeapGraphEdge::kProperty, "a");
@@ -1523,6 +1595,7 @@ TEST(FastCaseAccessors) {
"});\n");
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("fastCaseAccessors"));
+ CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
CHECK_NE(NULL, global);
@@ -1556,6 +1629,7 @@ TEST(SlowCaseAccessors) {
"});\n");
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("slowCaseAccessors"));
+ CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
CHECK_NE(NULL, global);
@@ -1584,6 +1658,7 @@ TEST(HiddenPropertiesFastCase) {
"c = new C(2012);\n");
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("HiddenPropertiesFastCase1"));
+ CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
const v8::HeapGraphNode* c =
GetProperty(global, v8::HeapGraphEdge::kProperty, "c");
@@ -1598,6 +1673,7 @@ TEST(HiddenPropertiesFastCase) {
snapshot = heap_profiler->TakeHeapSnapshot(
v8_str("HiddenPropertiesFastCase2"));
+ CHECK(ValidateSnapshot(snapshot));
global = GetGlobalObject(snapshot);
c = GetProperty(global, v8::HeapGraphEdge::kProperty, "c");
CHECK_NE(NULL, c);
@@ -1606,6 +1682,7 @@ TEST(HiddenPropertiesFastCase) {
CHECK_NE(NULL, hidden_props);
}
+
bool HasWeakEdge(const v8::HeapGraphNode* node) {
for (int i = 0; i < node->GetChildrenCount(); ++i) {
const v8::HeapGraphEdge* handle_edge = node->GetChild(i);
@@ -1620,6 +1697,7 @@ bool HasWeakGlobalHandle() {
v8::HeapProfiler* heap_profiler = isolate->GetHeapProfiler();
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("weaks"));
+ CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* gc_roots = GetNode(
snapshot->GetRoot(), v8::HeapGraphNode::kSynthetic, "(GC roots)");
CHECK_NE(NULL, gc_roots);
@@ -1650,26 +1728,6 @@ TEST(WeakGlobalHandle) {
}
-TEST(WeakNativeContextRefs) {
- LocalContext env;
- v8::HandleScope scope(env->GetIsolate());
- v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler();
-
- const v8::HeapSnapshot* snapshot =
- heap_profiler->TakeHeapSnapshot(v8_str("weaks"));
- const v8::HeapGraphNode* gc_roots = GetNode(
- snapshot->GetRoot(), v8::HeapGraphNode::kSynthetic, "(GC roots)");
- CHECK_NE(NULL, gc_roots);
- const v8::HeapGraphNode* global_handles = GetNode(
- gc_roots, v8::HeapGraphNode::kSynthetic, "(Global handles)");
- CHECK_NE(NULL, global_handles);
- const v8::HeapGraphNode* native_context = GetNode(
- global_handles, v8::HeapGraphNode::kHidden, "system / NativeContext");
- CHECK_NE(NULL, native_context);
- CHECK(HasWeakEdge(native_context));
-}
-
-
TEST(SfiAndJsFunctionWeakRefs) {
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
@@ -1679,14 +1737,15 @@ TEST(SfiAndJsFunctionWeakRefs) {
"fun = (function (x) { return function () { return x + 1; } })(1);");
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("fun"));
+ CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
CHECK_NE(NULL, global);
const v8::HeapGraphNode* fun =
GetProperty(global, v8::HeapGraphEdge::kProperty, "fun");
- CHECK(HasWeakEdge(fun));
+ CHECK(!HasWeakEdge(fun));
const v8::HeapGraphNode* shared =
GetProperty(fun, v8::HeapGraphEdge::kInternal, "shared");
- CHECK(HasWeakEdge(shared));
+ CHECK(!HasWeakEdge(shared));
}
@@ -1700,6 +1759,7 @@ TEST(NoDebugObjectInSnapshot) {
CompileRun("foo = {};");
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("snapshot"));
+ CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* root = snapshot->GetRoot();
int globals_count = 0;
for (int i = 0; i < root->GetChildrenCount(); ++i) {
@@ -1725,6 +1785,7 @@ TEST(AllStrongGcRootsHaveNames) {
CompileRun("foo = {};");
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("snapshot"));
+ CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* gc_roots = GetNode(
snapshot->GetRoot(), v8::HeapGraphNode::kSynthetic, "(GC roots)");
CHECK_NE(NULL, gc_roots);
@@ -1747,6 +1808,7 @@ TEST(NoRefsToNonEssentialEntries) {
CompileRun("global_object = {};\n");
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("snapshot"));
+ CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
const v8::HeapGraphNode* global_object =
GetProperty(global, v8::HeapGraphEdge::kProperty, "global_object");
@@ -1767,6 +1829,7 @@ TEST(MapHasDescriptorsAndTransitions) {
CompileRun("obj = { a: 10 };\n");
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("snapshot"));
+ CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
const v8::HeapGraphNode* global_object =
GetProperty(global, v8::HeapGraphEdge::kProperty, "obj");
@@ -1805,6 +1868,8 @@ TEST(ManyLocalsInSharedContext) {
"var ok = eval(result.join('\\n'));");
const v8::HeapSnapshot* snapshot =
heap_profiler->TakeHeapSnapshot(v8_str("snapshot"));
+ CHECK(ValidateSnapshot(snapshot));
+
const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
CHECK_NE(NULL, global);
const v8::HeapGraphNode* ok_object =
@@ -1826,3 +1891,72 @@ TEST(ManyLocalsInSharedContext) {
CHECK_NE(NULL, f_object);
}
}
+
+
+TEST(AllocationSitesAreVisible) {
+ LocalContext env;
+ v8::HandleScope scope(env->GetIsolate());
+ v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler();
+ CompileRun(
+ "fun = function () { var a = [3, 2, 1]; return a; }\n"
+ "fun();");
+ const v8::HeapSnapshot* snapshot =
+ heap_profiler->TakeHeapSnapshot(v8_str("snapshot"));
+ CHECK(ValidateSnapshot(snapshot));
+
+ const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
+ CHECK_NE(NULL, global);
+ const v8::HeapGraphNode* fun_code =
+ GetProperty(global, v8::HeapGraphEdge::kProperty, "fun");
+ CHECK_NE(NULL, fun_code);
+ const v8::HeapGraphNode* literals =
+ GetProperty(fun_code, v8::HeapGraphEdge::kInternal, "literals");
+ CHECK_NE(NULL, literals);
+ CHECK_EQ(v8::HeapGraphNode::kArray, literals->GetType());
+ CHECK_EQ(2, literals->GetChildrenCount());
+
+ // The second value in the literals array should be the boilerplate,
+ // after an AllocationSite.
+ const v8::HeapGraphEdge* prop = literals->GetChild(1);
+ const v8::HeapGraphNode* allocation_site = prop->GetToNode();
+ v8::String::Utf8Value name(allocation_site->GetName());
+ CHECK_EQ("system / AllocationSite", *name);
+ const v8::HeapGraphNode* transition_info =
+ GetProperty(allocation_site, v8::HeapGraphEdge::kInternal,
+ "transition_info");
+ CHECK_NE(NULL, transition_info);
+
+ const v8::HeapGraphNode* elements =
+ GetProperty(transition_info, v8::HeapGraphEdge::kInternal,
+ "elements");
+ CHECK_NE(NULL, elements);
+ CHECK_EQ(v8::HeapGraphNode::kArray, elements->GetType());
+ CHECK_EQ(v8::internal::FixedArray::SizeFor(3), elements->GetSelfSize());
+
+ CHECK(transition_info->GetHeapValue()->IsArray());
+ v8::Handle<v8::Array> array = v8::Handle<v8::Array>::Cast(
+ transition_info->GetHeapValue());
+ // Verify the array is "a" in the code above.
+ CHECK_EQ(3, array->Length());
+ CHECK_EQ(v8::Integer::New(3), array->Get(v8::Integer::New(0)));
+ CHECK_EQ(v8::Integer::New(2), array->Get(v8::Integer::New(1)));
+ CHECK_EQ(v8::Integer::New(1), array->Get(v8::Integer::New(2)));
+}
+
+
+TEST(JSFunctionHasCodeLink) {
+ LocalContext env;
+ v8::HandleScope scope(env->GetIsolate());
+ v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler();
+ CompileRun("function foo(x, y) { return x + y; }\n");
+ const v8::HeapSnapshot* snapshot =
+ heap_profiler->TakeHeapSnapshot(v8_str("snapshot"));
+ CHECK(ValidateSnapshot(snapshot));
+ const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
+ const v8::HeapGraphNode* foo_func =
+ GetProperty(global, v8::HeapGraphEdge::kProperty, "foo");
+ CHECK_NE(NULL, foo_func);
+ const v8::HeapGraphNode* code =
+ GetProperty(foo_func, v8::HeapGraphEdge::kInternal, "code");
+ CHECK_NE(NULL, code);
+}
diff --git a/deps/v8/test/cctest/test-heap.cc b/deps/v8/test/cctest/test-heap.cc
index be1098cc4c..d2b915690e 100644
--- a/deps/v8/test/cctest/test-heap.cc
+++ b/deps/v8/test/cctest/test-heap.cc
@@ -127,7 +127,7 @@ static void CheckFindCodeObject(Isolate* isolate) {
Address obj_addr = obj->address();
for (int i = 0; i < obj->Size(); i += kPointerSize) {
- Object* found = heap->FindCodeObject(obj_addr + i);
+ Object* found = isolate->FindCodeObject(obj_addr + i);
CHECK_EQ(code, found);
}
@@ -137,8 +137,8 @@ static void CheckFindCodeObject(Isolate* isolate) {
Handle<Code>())->ToObjectChecked();
CHECK(copy->IsCode());
HeapObject* obj_copy = HeapObject::cast(copy);
- Object* not_right = heap->FindCodeObject(obj_copy->address() +
- obj_copy->Size() / 2);
+ Object* not_right = isolate->FindCodeObject(obj_copy->address() +
+ obj_copy->Size() / 2);
CHECK(not_right != code);
}
@@ -661,7 +661,7 @@ TEST(ObjectProperties) {
CHECK(obj->HasLocalProperty(*first));
// delete first
- CHECK(obj->DeleteProperty(*first, JSObject::NORMAL_DELETION));
+ JSReceiver::DeleteProperty(obj, first, JSReceiver::NORMAL_DELETION);
CHECK(!obj->HasLocalProperty(*first));
// add first and then second
@@ -673,9 +673,9 @@ TEST(ObjectProperties) {
CHECK(obj->HasLocalProperty(*second));
// delete first and then second
- CHECK(obj->DeleteProperty(*first, JSObject::NORMAL_DELETION));
+ JSReceiver::DeleteProperty(obj, first, JSReceiver::NORMAL_DELETION);
CHECK(obj->HasLocalProperty(*second));
- CHECK(obj->DeleteProperty(*second, JSObject::NORMAL_DELETION));
+ JSReceiver::DeleteProperty(obj, second, JSReceiver::NORMAL_DELETION);
CHECK(!obj->HasLocalProperty(*first));
CHECK(!obj->HasLocalProperty(*second));
@@ -688,9 +688,9 @@ TEST(ObjectProperties) {
CHECK(obj->HasLocalProperty(*second));
// delete second and then first
- CHECK(obj->DeleteProperty(*second, JSObject::NORMAL_DELETION));
+ JSReceiver::DeleteProperty(obj, second, JSReceiver::NORMAL_DELETION);
CHECK(obj->HasLocalProperty(*first));
- CHECK(obj->DeleteProperty(*first, JSObject::NORMAL_DELETION));
+ JSReceiver::DeleteProperty(obj, first, JSReceiver::NORMAL_DELETION);
CHECK(!obj->HasLocalProperty(*first));
CHECK(!obj->HasLocalProperty(*second));
@@ -1327,6 +1327,11 @@ TEST(TestInternalWeakLists) {
for (int i = 0; i < kNumTestContexts; i++) {
ctx[i] = v8::Context::New(v8::Isolate::GetCurrent());
+ // Collect garbage that might have been created by one of the
+ // installed extensions.
+ isolate->compilation_cache()->Clear();
+ heap->CollectAllGarbage(Heap::kNoGCFlags);
+
bool opt = (FLAG_always_opt && i::V8::UseCrankshaft());
CHECK_EQ(i + 1, CountNativeContexts());
@@ -1388,6 +1393,7 @@ TEST(TestInternalWeakLists) {
}
// Force compilation cache cleanup.
+ HEAP->NotifyContextDisposed();
HEAP->CollectAllGarbage(Heap::kNoGCFlags);
// Dispose the native contexts one by one.
@@ -1942,7 +1948,7 @@ TEST(PrototypeTransitionClearing) {
// Verify that only dead prototype transitions are cleared.
CHECK_EQ(10, baseObject->map()->NumberOfProtoTransitions());
- HEAP->CollectAllGarbage(Heap::kNoGCFlags);
+ HEAP->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
const int transitions = 10 - 3;
CHECK_EQ(transitions, baseObject->map()->NumberOfProtoTransitions());
@@ -2346,6 +2352,31 @@ TEST(OptimizedAllocationArrayLiterals) {
}
+TEST(OptimizedPretenuringCallNew) {
+ i::FLAG_allow_natives_syntax = true;
+ i::FLAG_pretenuring_call_new = true;
+ CcTest::InitializeVM();
+ if (!i::V8::UseCrankshaft() || i::FLAG_always_opt) return;
+ if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
+ v8::HandleScope scope(CcTest::isolate());
+ HEAP->SetNewSpaceHighPromotionModeActive(true);
+
+ AlwaysAllocateScope always_allocate;
+ v8::Local<v8::Value> res = CompileRun(
+ "function g() { this.a = 0; }"
+ "function f() {"
+ " return new g();"
+ "};"
+ "f(); f(); f();"
+ "%OptimizeFunctionOnNextCall(f);"
+ "f();");
+
+ Handle<JSObject> o =
+ v8::Utils::OpenHandle(*v8::Handle<v8::Object>::Cast(res));
+ CHECK(HEAP->InOldPointerSpace(*o));
+}
+
+
static int CountMapTransitions(Map* map) {
return map->transitions()->number_of_transitions();
}
@@ -3011,6 +3042,10 @@ TEST(Regress169209) {
i::FLAG_harmony_typed_arrays = false;
i::FLAG_harmony_array_buffer = false;
+ // Disable loading the i18n extension which breaks the assumptions of this
+ // test about the heap layout.
+ i::FLAG_enable_i18n = false;
+
CcTest::InitializeVM();
Isolate* isolate = Isolate::Current();
Heap* heap = isolate->heap();
@@ -3135,7 +3170,7 @@ TEST(Regress169928) {
array_data->set(1, Smi::FromInt(2));
AllocateAllButNBytes(HEAP->new_space(),
- JSArray::kSize + AllocationSiteInfo::kSize +
+ JSArray::kSize + AllocationMemento::kSize +
kPointerSize);
Handle<JSArray> array = factory->NewJSArrayWithElements(array_data,
@@ -3145,16 +3180,16 @@ TEST(Regress169928) {
CHECK_EQ(Smi::FromInt(2), array->length());
CHECK(array->HasFastSmiOrObjectElements());
- // We need filler the size of AllocationSiteInfo object, plus an extra
+ // We need filler the size of AllocationMemento object, plus an extra
// fill pointer value.
MaybeObject* maybe_object = HEAP->AllocateRaw(
- AllocationSiteInfo::kSize + kPointerSize, NEW_SPACE, OLD_POINTER_SPACE);
+ AllocationMemento::kSize + kPointerSize, NEW_SPACE, OLD_POINTER_SPACE);
Object* obj = NULL;
CHECK(maybe_object->ToObject(&obj));
Address addr_obj = reinterpret_cast<Address>(
reinterpret_cast<byte*>(obj - kHeapObjectTag));
HEAP->CreateFillerObjectAt(addr_obj,
- AllocationSiteInfo::kSize + kPointerSize);
+ AllocationMemento::kSize + kPointerSize);
// Give the array a name, making sure not to allocate strings.
v8::Handle<v8::Object> array_obj = v8::Utils::ToLocal(array);
diff --git a/deps/v8/test/cctest/test-list.cc b/deps/v8/test/cctest/test-list.cc
index 740b432f3e..a29972b583 100644
--- a/deps/v8/test/cctest/test-list.cc
+++ b/deps/v8/test/cctest/test-list.cc
@@ -51,6 +51,7 @@ class ZeroingAllocationPolicy {
}
};
+
// Check that we can add (a reference to) an element of the list
// itself.
TEST(ListAdd) {
@@ -66,6 +67,7 @@ TEST(ListAdd) {
CHECK_EQ(1, list[4]);
}
+
// Test that we can add all elements from a list to another list.
TEST(ListAddAll) {
List<int, ZeroingAllocationPolicy> list(4);
diff --git a/deps/v8/test/cctest/test-lockers.cc b/deps/v8/test/cctest/test-lockers.cc
index 072bbffd24..a8e870e671 100644
--- a/deps/v8/test/cctest/test-lockers.cc
+++ b/deps/v8/test/cctest/test-lockers.cc
@@ -96,6 +96,7 @@ class KangarooThread : public v8::internal::Thread {
Persistent<v8::Context> context_;
};
+
// Migrates an isolate from one thread to another
TEST(KangarooIsolates) {
v8::Isolate* isolate = v8::Isolate::New();
@@ -114,6 +115,7 @@ TEST(KangarooIsolates) {
thread1->Join();
}
+
static void CalcFibAndCheck() {
Local<Value> v = CompileRun("function fib(n) {"
" if (n <= 2) return 1;"
@@ -192,6 +194,7 @@ class IsolateLockingThreadWithLocalContext : public JoinableThread {
v8::Isolate* isolate_;
};
+
static void StartJoinAndDeleteThreads(const i::List<JoinableThread*>& threads) {
for (int i = 0; i < threads.length(); i++) {
threads[i]->Start();
@@ -242,6 +245,7 @@ class IsolateNonlockingThread : public JoinableThread {
private:
};
+
// Run many threads each accessing its own isolate without locking
TEST(MultithreadedParallelIsolates) {
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS
@@ -280,6 +284,7 @@ class IsolateNestedLockingThread : public JoinableThread {
v8::Isolate* isolate_;
};
+
// Run many threads with nested locks
TEST(IsolateNestedLocking) {
#if V8_TARGET_ARCH_MIPS
@@ -321,6 +326,7 @@ class SeparateIsolatesLocksNonexclusiveThread : public JoinableThread {
v8::Isolate* isolate2_;
};
+
// Run parallel threads that lock and access different isolates in parallel
TEST(SeparateIsolatesLocksNonexclusive) {
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS
@@ -397,6 +403,7 @@ class LockerUnlockerThread : public JoinableThread {
v8::Isolate* isolate_;
};
+
// Use unlocker inside of a Locker, multiple threads.
TEST(LockerUnlocker) {
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS
@@ -450,6 +457,7 @@ class LockTwiceAndUnlockThread : public JoinableThread {
v8::Isolate* isolate_;
};
+
// Use Unlocker inside two Lockers.
TEST(LockTwiceAndUnlock) {
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS
@@ -517,6 +525,7 @@ class LockAndUnlockDifferentIsolatesThread : public JoinableThread {
v8::Isolate* isolate2_;
};
+
// Lock two isolates and unlock one of them.
TEST(LockAndUnlockDifferentIsolates) {
v8::Isolate* isolate1 = v8::Isolate::New();
@@ -571,6 +580,7 @@ class LockUnlockLockThread : public JoinableThread {
v8::Persistent<v8::Context> context_;
};
+
// Locker inside an Unlocker inside a Locker.
TEST(LockUnlockLockMultithreaded) {
#if V8_TARGET_ARCH_MIPS
@@ -626,6 +636,7 @@ class LockUnlockLockDefaultIsolateThread : public JoinableThread {
v8::Persistent<v8::Context> context_;
};
+
// Locker inside an Unlocker inside a Locker for default isolate.
TEST(LockUnlockLockDefaultIsolateMultithreaded) {
#if V8_TARGET_ARCH_MIPS
@@ -696,6 +707,7 @@ class IsolateGenesisThread : public JoinableThread {
const char** extension_names_;
};
+
// Test installing extensions in separate isolates concurrently.
// http://code.google.com/p/v8/issues/detail?id=1821
TEST(ExtensionsRegistration) {
diff --git a/deps/v8/test/cctest/test-log-stack-tracer.cc b/deps/v8/test/cctest/test-log-stack-tracer.cc
index 20f135d8f6..7c3567c140 100644
--- a/deps/v8/test/cctest/test-log-stack-tracer.cc
+++ b/deps/v8/test/cctest/test-log-stack-tracer.cc
@@ -186,6 +186,7 @@ static bool IsAddressWithinFuncCode(JSFunction* function, Address addr) {
return code->contains(addr);
}
+
static bool IsAddressWithinFuncCode(const char* func_name, Address addr) {
v8::Local<v8::Value> func = CcTest::env()->Global()->Get(v8_str(func_name));
CHECK(func->IsFunction());
diff --git a/deps/v8/test/cctest/test-log.cc b/deps/v8/test/cctest/test-log.cc
index 6ccf58e690..81cb001b13 100644
--- a/deps/v8/test/cctest/test-log.cc
+++ b/deps/v8/test/cctest/test-log.cc
@@ -36,6 +36,7 @@
#include "v8.h"
#include "log.h"
+#include "log-utils.h"
#include "cpu-profiler.h"
#include "natives.h"
#include "v8threads.h"
@@ -395,6 +396,7 @@ TEST(Issue23768) {
static void ObjMethod1(const v8::FunctionCallbackInfo<v8::Value>& args) {
}
+
TEST(LogCallbacks) {
ScopedLoggerInitializer initialize_logger(false);
Logger* logger = initialize_logger.logger();
@@ -443,6 +445,7 @@ static void Prop2Getter(v8::Local<v8::String> property,
const v8::PropertyCallbackInfo<v8::Value>& info) {
}
+
TEST(LogAccessorCallbacks) {
ScopedLoggerInitializer initialize_logger(false);
Logger* logger = initialize_logger.logger();
diff --git a/deps/v8/test/cctest/test-macro-assembler-x64.cc b/deps/v8/test/cctest/test-macro-assembler-x64.cc
index 3945f1bba6..a2070a5ea8 100755..100644
--- a/deps/v8/test/cctest/test-macro-assembler-x64.cc
+++ b/deps/v8/test/cctest/test-macro-assembler-x64.cc
@@ -801,6 +801,7 @@ static void SmiAddTest(MacroAssembler* masm,
__ j(not_equal, exit);
}
+
TEST(SmiAdd) {
v8::internal::V8::Initialize(NULL);
// Allocate an executable page of memory.
@@ -1397,6 +1398,7 @@ void TestSmiIndex(MacroAssembler* masm, Label* exit, int id, int x) {
}
}
+
TEST(SmiIndex) {
v8::internal::V8::Initialize(NULL);
// Allocate an executable page of memory.
diff --git a/deps/v8/test/cctest/test-mark-compact.cc b/deps/v8/test/cctest/test-mark-compact.cc
index 8be72d303a..626df16617 100644
--- a/deps/v8/test/cctest/test-mark-compact.cc
+++ b/deps/v8/test/cctest/test-mark-compact.cc
@@ -310,6 +310,7 @@ static void WeakPointerCallback(v8::Isolate* isolate,
handle->Dispose(isolate);
}
+
TEST(ObjectGroups) {
FLAG_incremental_marking = false;
CcTest::InitializeVM();
@@ -560,7 +561,7 @@ TEST(BootUpMemoryUse) {
if (v8::internal::Snapshot::IsEnabled()) {
CHECK_LE(delta, 3100 * 1024);
} else {
- CHECK_LE(delta, 3400 * 1024);
+ CHECK_LE(delta, 3450 * 1024);
}
}
}
diff --git a/deps/v8/test/cctest/test-object-observe.cc b/deps/v8/test/cctest/test-object-observe.cc
index 3778fed813..44ddb6fa20 100644
--- a/deps/v8/test/cctest/test-object-observe.cc
+++ b/deps/v8/test/cctest/test-object-observe.cc
@@ -54,6 +54,7 @@ class HarmonyIsolate {
};
}
+
TEST(PerIsolateState) {
HarmonyIsolate isolate;
HandleScope scope(isolate.GetIsolate());
@@ -94,6 +95,7 @@ TEST(PerIsolateState) {
CHECK_EQ(3, CompileRun("count")->Int32Value());
}
+
TEST(EndOfMicrotaskDelivery) {
HarmonyIsolate isolate;
HandleScope scope(isolate.GetIsolate());
@@ -107,6 +109,7 @@ TEST(EndOfMicrotaskDelivery) {
CHECK_EQ(1, CompileRun("count")->Int32Value());
}
+
TEST(DeliveryOrdering) {
HarmonyIsolate isolate;
HandleScope scope(isolate.GetIsolate());
@@ -138,6 +141,7 @@ TEST(DeliveryOrdering) {
CHECK_EQ(3, CompileRun("ordering[2]")->Int32Value());
}
+
TEST(DeliveryOrderingReentrant) {
HarmonyIsolate isolate;
HandleScope scope(isolate.GetIsolate());
@@ -169,6 +173,7 @@ TEST(DeliveryOrderingReentrant) {
CHECK_EQ(2, CompileRun("ordering[1]")->Int32Value());
}
+
TEST(DeliveryOrderingDeliverChangeRecords) {
HarmonyIsolate isolate;
HandleScope scope(isolate.GetIsolate());
@@ -193,6 +198,7 @@ TEST(DeliveryOrderingDeliverChangeRecords) {
CHECK_EQ(2, CompileRun("ordering[3]")->Int32Value());
}
+
TEST(ObjectHashTableGrowth) {
HarmonyIsolate isolate;
HandleScope scope(isolate.GetIsolate());
@@ -222,6 +228,7 @@ TEST(ObjectHashTableGrowth) {
CHECK(CompileRun("ran")->BooleanValue());
}
+
TEST(GlobalObjectObservation) {
HarmonyIsolate isolate;
LocalContext context;
@@ -290,6 +297,7 @@ struct RecordExpectation {
Handle<Value> old_value;
};
+
// TODO(adamk): Use this helper elsewhere in this file.
static void ExpectRecords(Handle<Value> records,
const RecordExpectation expectations[],
@@ -360,6 +368,7 @@ TEST(APITestBasicMutation) {
EXPECT_RECORDS(CompileRun("records"), expected_records);
}
+
TEST(HiddenPrototypeObservation) {
HarmonyIsolate isolate;
HandleScope scope(isolate.GetIsolate());
@@ -420,20 +429,20 @@ TEST(ObservationWeakMap) {
"obj = null;");
i::Handle<i::JSObject> observation_state =
i::Isolate::Current()->factory()->observation_state();
- i::Handle<i::JSWeakMap> observerInfoMap =
+ i::Handle<i::JSWeakMap> callbackInfoMap =
i::Handle<i::JSWeakMap>::cast(
- i::GetProperty(observation_state, "observerInfoMap"));
+ i::GetProperty(observation_state, "callbackInfoMap"));
i::Handle<i::JSWeakMap> objectInfoMap =
i::Handle<i::JSWeakMap>::cast(
i::GetProperty(observation_state, "objectInfoMap"));
i::Handle<i::JSWeakMap> notifierTargetMap =
i::Handle<i::JSWeakMap>::cast(
i::GetProperty(observation_state, "notifierTargetMap"));
- CHECK_EQ(1, NumberOfElements(observerInfoMap));
+ CHECK_EQ(1, NumberOfElements(callbackInfoMap));
CHECK_EQ(1, NumberOfElements(objectInfoMap));
CHECK_EQ(1, NumberOfElements(notifierTargetMap));
HEAP->CollectAllGarbage(i::Heap::kAbortIncrementalMarkingMask);
- CHECK_EQ(0, NumberOfElements(observerInfoMap));
+ CHECK_EQ(0, NumberOfElements(callbackInfoMap));
CHECK_EQ(0, NumberOfElements(objectInfoMap));
CHECK_EQ(0, NumberOfElements(notifierTargetMap));
}
diff --git a/deps/v8/test/cctest/test-parsing.cc b/deps/v8/test/cctest/test-parsing.cc
index 9879886991..999fe4c5bd 100644
--- a/deps/v8/test/cctest/test-parsing.cc
+++ b/deps/v8/test/cctest/test-parsing.cc
@@ -633,6 +633,7 @@ void TestStreamScanner(i::Utf16CharacterStream* stream,
} while (expected_tokens[i] != i::Token::ILLEGAL);
}
+
TEST(StreamScanner) {
v8::V8::Initialize();
@@ -1085,6 +1086,7 @@ enum ParserFlag {
kAllowModules,
kAllowGenerators,
kAllowForOf,
+ kAllowHarmonyNumericLiterals,
kParserFlagCount
};
@@ -1102,7 +1104,9 @@ static bool checkParserFlag(unsigned flags, ParserFlag flag) {
kAllowHarmonyScoping)); \
parser.set_allow_modules(checkParserFlag(flags, kAllowModules)); \
parser.set_allow_generators(checkParserFlag(flags, kAllowGenerators)); \
- parser.set_allow_for_of(checkParserFlag(flags, kAllowForOf));
+ parser.set_allow_for_of(checkParserFlag(flags, kAllowForOf)); \
+ parser.set_allow_harmony_numeric_literals( \
+ checkParserFlag(flags, kAllowHarmonyNumericLiterals));
void TestParserSyncWithFlags(i::Handle<i::String> source, unsigned flags) {
i::Isolate* isolate = i::Isolate::Current();
diff --git a/deps/v8/test/cctest/test-platform-tls.cc b/deps/v8/test/cctest/test-platform-tls.cc
index cc9ffebe38..31501d9ef7 100644
--- a/deps/v8/test/cctest/test-platform-tls.cc
+++ b/deps/v8/test/cctest/test-platform-tls.cc
@@ -43,6 +43,7 @@ static void* GetValue(int num) {
return reinterpret_cast<void*>(static_cast<intptr_t>(num + 1));
}
+
static void DoTest() {
for (int i = 0; i < kValueCount; i++) {
CHECK(!Thread::HasThreadLocal(keys[i]));
@@ -80,6 +81,7 @@ class TestThread : public Thread {
}
};
+
TEST(FastTLS) {
for (int i = 0; i < kValueCount; i++) {
keys[i] = Thread::CreateThreadLocalKey();
diff --git a/deps/v8/test/cctest/test-platform.cc b/deps/v8/test/cctest/test-platform.cc
index 6c20b853c5..2d8eb201e8 100644
--- a/deps/v8/test/cctest/test-platform.cc
+++ b/deps/v8/test/cctest/test-platform.cc
@@ -35,3 +35,66 @@ using namespace ::v8::internal;
TEST(NumberOfCores) {
CHECK_GT(OS::NumberOfCores(), 0);
}
+
+
+#ifdef __GNUC__
+#define ASM __asm__ __volatile__
+
+#if defined(_M_X64) || defined(__x86_64__)
+#define GET_STACK_POINTER() \
+ static int sp_addr = 0; \
+ do { \
+ ASM("mov %%rsp, %0" : "=g" (sp_addr)); \
+ } while (0)
+#elif defined(_M_IX86) || defined(__i386__)
+#define GET_STACK_POINTER() \
+ static int sp_addr = 0; \
+ do { \
+ ASM("mov %%esp, %0" : "=g" (sp_addr)); \
+ } while (0)
+#elif defined(__ARMEL__)
+#define GET_STACK_POINTER() \
+ static int sp_addr = 0; \
+ do { \
+ ASM("str %%sp, %0" : "=g" (sp_addr)); \
+ } while (0)
+#elif defined(__MIPSEL__)
+#define GET_STACK_POINTER() \
+ static int sp_addr = 0; \
+ do { \
+ ASM("sw $sp, %0" : "=g" (sp_addr)); \
+ } while (0)
+#else
+#error Host architecture was not detected as supported by v8
+#endif
+
+void GetStackPointer(const v8::FunctionCallbackInfo<v8::Value>& args) {
+ GET_STACK_POINTER();
+ args.GetReturnValue().Set(v8_num(sp_addr));
+}
+
+
+TEST(StackAlignment) {
+ v8::Isolate* isolate = v8::Isolate::GetCurrent();
+ v8::HandleScope handle_scope(isolate);
+ v8::Handle<v8::ObjectTemplate> global_template = v8::ObjectTemplate::New();
+ global_template->Set(v8_str("get_stack_pointer"),
+ v8::FunctionTemplate::New(GetStackPointer));
+
+ LocalContext env(NULL, global_template);
+ CompileRun(
+ "function foo() {"
+ " return get_stack_pointer();"
+ "}");
+
+ v8::Local<v8::Object> global_object = env->Global();
+ v8::Local<v8::Function> foo =
+ v8::Local<v8::Function>::Cast(global_object->Get(v8_str("foo")));
+
+ v8::Local<v8::Value> result = foo->Call(global_object, 0, NULL);
+ CHECK_EQ(0, result->Int32Value() % OS::ActivationFrameAlignment());
+}
+
+#undef GET_STACK_POINTERS
+#undef ASM
+#endif // __GNUC__
diff --git a/deps/v8/test/cctest/test-profile-generator.cc b/deps/v8/test/cctest/test-profile-generator.cc
index 7472669e32..7b8278ba66 100644
--- a/deps/v8/test/cctest/test-profile-generator.cc
+++ b/deps/v8/test/cctest/test-profile-generator.cc
@@ -43,48 +43,9 @@ using i::ProfileTree;
using i::ProfileGenerator;
using i::SampleRateCalculator;
using i::TickSample;
-using i::TokenEnumerator;
using i::Vector;
-namespace v8 {
-namespace internal {
-
-class TokenEnumeratorTester {
- public:
- static i::List<bool>* token_removed(TokenEnumerator* te) {
- return &te->token_removed_;
- }
-};
-
-} } // namespace v8::internal
-
-TEST(TokenEnumerator) {
- TokenEnumerator te;
- CHECK_EQ(TokenEnumerator::kNoSecurityToken, te.GetTokenId(NULL));
- v8::HandleScope hs(v8::Isolate::GetCurrent());
- v8::Local<v8::String> token1(v8::String::New("1x"));
- CHECK_EQ(0, te.GetTokenId(*v8::Utils::OpenHandle(*token1)));
- CHECK_EQ(0, te.GetTokenId(*v8::Utils::OpenHandle(*token1)));
- v8::Local<v8::String> token2(v8::String::New("2x"));
- CHECK_EQ(1, te.GetTokenId(*v8::Utils::OpenHandle(*token2)));
- CHECK_EQ(1, te.GetTokenId(*v8::Utils::OpenHandle(*token2)));
- CHECK_EQ(0, te.GetTokenId(*v8::Utils::OpenHandle(*token1)));
- {
- v8::HandleScope hs(v8::Isolate::GetCurrent());
- v8::Local<v8::String> token3(v8::String::New("3x"));
- CHECK_EQ(2, te.GetTokenId(*v8::Utils::OpenHandle(*token3)));
- CHECK_EQ(1, te.GetTokenId(*v8::Utils::OpenHandle(*token2)));
- CHECK_EQ(0, te.GetTokenId(*v8::Utils::OpenHandle(*token1)));
- }
- CHECK(!i::TokenEnumeratorTester::token_removed(&te)->at(2));
- HEAP->CollectAllGarbage(i::Heap::kNoGCFlags);
- CHECK(i::TokenEnumeratorTester::token_removed(&te)->at(2));
- CHECK_EQ(1, te.GetTokenId(*v8::Utils::OpenHandle(*token2)));
- CHECK_EQ(0, te.GetTokenId(*v8::Utils::OpenHandle(*token1)));
-}
-
-
TEST(ProfileNodeFindOrAddChild) {
ProfileTree tree;
ProfileNode node(&tree, NULL);
@@ -121,8 +82,7 @@ TEST(ProfileNodeFindOrAddChildForSameFunction) {
CodeEntry entry2(i::Logger::FUNCTION_TAG, aaa);
CHECK_EQ(childNode1, node.FindOrAddChild(&entry2));
// Now with a different security token.
- CodeEntry entry3(i::Logger::FUNCTION_TAG, aaa,
- TokenEnumerator::kNoSecurityToken + 1);
+ CodeEntry entry3(i::Logger::FUNCTION_TAG, aaa);
CHECK_EQ(childNode1, node.FindOrAddChild(&entry3));
}
@@ -415,108 +375,11 @@ TEST(ProfileTreeCalculateTotalTicks) {
}
-TEST(ProfileTreeFilteredClone) {
- ProfileTree source_tree;
- const int token0 = 0, token1 = 1, token2 = 2;
- CodeEntry entry1(i::Logger::FUNCTION_TAG, "aaa", token0);
- CodeEntry entry2(i::Logger::FUNCTION_TAG, "bbb", token1);
- CodeEntry entry3(i::Logger::FUNCTION_TAG, "ccc", token0);
- CodeEntry entry4(i::Logger::FUNCTION_TAG, "ddd",
- TokenEnumerator::kInheritsSecurityToken);
-
- {
- CodeEntry* e1_e2_path[] = {&entry1, &entry2};
- Vector<CodeEntry*> e1_e2_path_vec(
- e1_e2_path, sizeof(e1_e2_path) / sizeof(e1_e2_path[0]));
- source_tree.AddPathFromStart(e1_e2_path_vec);
- CodeEntry* e2_e4_path[] = {&entry2, &entry4};
- Vector<CodeEntry*> e2_e4_path_vec(
- e2_e4_path, sizeof(e2_e4_path) / sizeof(e2_e4_path[0]));
- source_tree.AddPathFromStart(e2_e4_path_vec);
- CodeEntry* e3_e1_path[] = {&entry3, &entry1};
- Vector<CodeEntry*> e3_e1_path_vec(
- e3_e1_path, sizeof(e3_e1_path) / sizeof(e3_e1_path[0]));
- source_tree.AddPathFromStart(e3_e1_path_vec);
- CodeEntry* e3_e2_path[] = {&entry3, &entry2};
- Vector<CodeEntry*> e3_e2_path_vec(
- e3_e2_path, sizeof(e3_e2_path) / sizeof(e3_e2_path[0]));
- source_tree.AddPathFromStart(e3_e2_path_vec);
- source_tree.CalculateTotalTicks();
- // Results in -> {entry1,0,1,0} -> {entry2,1,1,1}
- // {root,0,4,-1} -> {entry2,0,1,1} -> {entry4,1,1,inherits}
- // -> {entry3,0,2,0} -> {entry1,1,1,0}
- // -> {entry2,1,1,1}
- CHECK_EQ(4, source_tree.root()->total_ticks());
- CHECK_EQ(0, source_tree.root()->self_ticks());
- }
-
- {
- ProfileTree token0_tree;
- token0_tree.FilteredClone(&source_tree, token0);
- // Should be -> {entry1,1,1,0}
- // {root,1,4,-1} -> {entry3,1,2,0} -> {entry1,1,1,0}
- // [self ticks from filtered nodes are attributed to their parents]
- CHECK_EQ(4, token0_tree.root()->total_ticks());
- CHECK_EQ(1, token0_tree.root()->self_ticks());
- ProfileTreeTestHelper token0_helper(&token0_tree);
- ProfileNode* node1 = token0_helper.Walk(&entry1);
- CHECK_NE(NULL, node1);
- CHECK_EQ(1, node1->total_ticks());
- CHECK_EQ(1, node1->self_ticks());
- CHECK_EQ(NULL, token0_helper.Walk(&entry2));
- ProfileNode* node3 = token0_helper.Walk(&entry3);
- CHECK_NE(NULL, node3);
- CHECK_EQ(2, node3->total_ticks());
- CHECK_EQ(1, node3->self_ticks());
- ProfileNode* node3_1 = token0_helper.Walk(&entry3, &entry1);
- CHECK_NE(NULL, node3_1);
- CHECK_EQ(1, node3_1->total_ticks());
- CHECK_EQ(1, node3_1->self_ticks());
- CHECK_EQ(NULL, token0_helper.Walk(&entry3, &entry2));
- }
-
- {
- ProfileTree token1_tree;
- token1_tree.FilteredClone(&source_tree, token1);
- // Should be
- // {root,1,4,-1} -> {entry2,2,3,1} -> {entry4,1,1,inherits}
- // [child nodes referring to the same entry get merged and
- // their self times summed up]
- CHECK_EQ(4, token1_tree.root()->total_ticks());
- CHECK_EQ(1, token1_tree.root()->self_ticks());
- ProfileTreeTestHelper token1_helper(&token1_tree);
- CHECK_EQ(NULL, token1_helper.Walk(&entry1));
- CHECK_EQ(NULL, token1_helper.Walk(&entry3));
- ProfileNode* node2 = token1_helper.Walk(&entry2);
- CHECK_NE(NULL, node2);
- CHECK_EQ(3, node2->total_ticks());
- CHECK_EQ(2, node2->self_ticks());
- ProfileNode* node2_4 = token1_helper.Walk(&entry2, &entry4);
- CHECK_NE(NULL, node2_4);
- CHECK_EQ(1, node2_4->total_ticks());
- CHECK_EQ(1, node2_4->self_ticks());
- }
-
- {
- ProfileTree token2_tree;
- token2_tree.FilteredClone(&source_tree, token2);
- // Should be
- // {root,4,4,-1}
- // [no nodes, all ticks get migrated into root node]
- CHECK_EQ(4, token2_tree.root()->total_ticks());
- CHECK_EQ(4, token2_tree.root()->self_ticks());
- ProfileTreeTestHelper token2_helper(&token2_tree);
- CHECK_EQ(NULL, token2_helper.Walk(&entry1));
- CHECK_EQ(NULL, token2_helper.Walk(&entry2));
- CHECK_EQ(NULL, token2_helper.Walk(&entry3));
- }
-}
-
-
static inline i::Address ToAddress(int n) {
return reinterpret_cast<i::Address>(n);
}
+
TEST(CodeMapAddCode) {
CodeMap code_map;
CodeEntry entry1(i::Logger::FUNCTION_TAG, "aaa");
@@ -622,8 +485,7 @@ TEST(RecordTickSample) {
sample3.frames_count = 2;
generator.RecordTickSample(sample3);
- CpuProfile* profile =
- profiles.StopProfiling(TokenEnumerator::kNoSecurityToken, "", 1);
+ CpuProfile* profile = profiles.StopProfiling("", 1);
CHECK_NE(NULL, profile);
ProfileTreeTestHelper top_down_test_helper(profile->top_down());
CHECK_EQ(NULL, top_down_test_helper.Walk(entry2));
@@ -700,6 +562,7 @@ static void CheckNodeIds(ProfileNode* node, int* expectedId) {
}
}
+
TEST(SampleIds) {
TestSetup test_setup;
CpuProfilesCollection profiles;
@@ -735,8 +598,7 @@ TEST(SampleIds) {
sample3.frames_count = 2;
generator.RecordTickSample(sample3);
- CpuProfile* profile =
- profiles.StopProfiling(TokenEnumerator::kNoSecurityToken, "", 1);
+ CpuProfile* profile = profiles.StopProfiling("", 1);
int nodeId = 1;
CheckNodeIds(profile->top_down()->root(), &nodeId);
CHECK_EQ(7, nodeId - 1);
@@ -765,8 +627,7 @@ TEST(NoSamples) {
sample1.frames_count = 1;
generator.RecordTickSample(sample1);
- CpuProfile* profile =
- profiles.StopProfiling(TokenEnumerator::kNoSecurityToken, "", 1);
+ CpuProfile* profile = profiles.StopProfiling("", 1);
int nodeId = 1;
CheckNodeIds(profile->top_down()->root(), &nodeId);
CHECK_EQ(3, nodeId - 1);
@@ -860,7 +721,7 @@ TEST(RecordStackTraceAtStartProfiling) {
"a();\n"
"stopProfiling();");
CHECK_EQ(1, profiler->GetProfilesCount());
- CpuProfile* profile = profiler->GetProfile(NULL, 0);
+ CpuProfile* profile = profiler->GetProfile(0);
const ProfileTree* topDown = profile->top_down();
const ProfileNode* current = topDown->root();
const_cast<ProfileNode*>(current)->Print(0);
@@ -965,3 +826,59 @@ TEST(ProfileNodeScriptId) {
}
+
+
+static const char* line_number_test_source_existing_functions =
+"function foo_at_the_first_line() {\n"
+"}\n"
+"foo_at_the_first_line();\n"
+"function lazy_func_at_forth_line() {}\n";
+
+
+static const char* line_number_test_source_profile_time_functions =
+"// Empty first line\n"
+"function bar_at_the_second_line() {\n"
+" foo_at_the_first_line();\n"
+"}\n"
+"bar_at_the_second_line();\n"
+"function lazy_func_at_6th_line() {}";
+
+int GetFunctionLineNumber(LocalContext* env, const char* name) {
+ CpuProfiler* profiler = i::Isolate::Current()->cpu_profiler();
+ CodeMap* code_map = profiler->generator()->code_map();
+ i::Handle<i::JSFunction> func = v8::Utils::OpenHandle(
+ *v8::Local<v8::Function>::Cast(
+ (*(*env))->Global()->Get(v8_str(name))));
+ CodeEntry* func_entry = code_map->FindEntry(func->code()->address());
+ if (!func_entry)
+ FATAL(name);
+ return func_entry->line_number();
+}
+
+
+TEST(LineNumber) {
+ i::FLAG_use_inlining = false;
+
+ CcTest::InitializeVM();
+ LocalContext env;
+ i::Isolate* isolate = i::Isolate::Current();
+ TestSetup test_setup;
+
+ i::HandleScope scope(isolate);
+
+ CompileRun(line_number_test_source_existing_functions);
+
+ CpuProfiler* profiler = isolate->cpu_profiler();
+ profiler->StartProfiling("LineNumber");
+
+ CompileRun(line_number_test_source_profile_time_functions);
+
+ profiler->processor()->StopSynchronously();
+
+ CHECK_EQ(1, GetFunctionLineNumber(&env, "foo_at_the_first_line"));
+ CHECK_EQ(0, GetFunctionLineNumber(&env, "lazy_func_at_forth_line"));
+ CHECK_EQ(2, GetFunctionLineNumber(&env, "bar_at_the_second_line"));
+ CHECK_EQ(0, GetFunctionLineNumber(&env, "lazy_func_at_6th_line"));
+
+ profiler->StopProfiling("LineNumber");
+}
diff --git a/deps/v8/test/cctest/test-regexp.cc b/deps/v8/test/cctest/test-regexp.cc
index f9eed1f04f..14989ee980 100644
--- a/deps/v8/test/cctest/test-regexp.cc
+++ b/deps/v8/test/cctest/test-regexp.cc
@@ -94,6 +94,7 @@ static SmartArrayPointer<const char> Parse(const char* input) {
return output;
}
+
static bool CheckSimple(const char* input) {
V8::Initialize(NULL);
v8::HandleScope scope(v8::Isolate::GetCurrent());
@@ -112,6 +113,7 @@ struct MinMaxPair {
int max_match;
};
+
static MinMaxPair CheckMinMaxMatch(const char* input) {
V8::Initialize(NULL);
v8::HandleScope scope(v8::Isolate::GetCurrent());
@@ -377,6 +379,7 @@ TEST(Parser) {
CHECK_MIN_MAX("a(?!bbb|bb)c", 2, 2);
}
+
TEST(ParserRegression) {
CHECK_PARSE_EQ("[A-Z$-][x]", "(! [A-Z $ -] [x])");
CHECK_PARSE_EQ("a{3,4*}", "(: 'a{3,' (# 0 - g '4') '}')");
@@ -659,6 +662,7 @@ TEST(DispatchTableConstruction) {
}
}
+
// Test of debug-only syntax.
#ifdef DEBUG
diff --git a/deps/v8/test/cctest/test-thread-termination.cc b/deps/v8/test/cctest/test-thread-termination.cc
index 50be5011f6..b29b1dcf0c 100644
--- a/deps/v8/test/cctest/test-thread-termination.cc
+++ b/deps/v8/test/cctest/test-thread-termination.cc
@@ -322,6 +322,7 @@ TEST(TerminateLoadICException) {
v8::Script::Compile(source)->Run();
}
+
void ReenterAfterTermination(const v8::FunctionCallbackInfo<v8::Value>& args) {
v8::TryCatch try_catch;
CHECK(!v8::V8::IsExecutionTerminating());
@@ -346,6 +347,7 @@ void ReenterAfterTermination(const v8::FunctionCallbackInfo<v8::Value>& args) {
v8::Script::Compile(v8::String::New("function f() { fail(); } f()"))->Run();
}
+
// Test that reentry into V8 while the termination exception is still pending
// (has not yet unwound the 0-level JS frame) does not crash.
TEST(TerminateAndReenterFromThreadItself) {
@@ -365,6 +367,7 @@ TEST(TerminateAndReenterFromThreadItself) {
"f()"))->Run()->IsTrue());
}
+
void DoLoopCancelTerminate(const v8::FunctionCallbackInfo<v8::Value>& args) {
v8::TryCatch try_catch;
CHECK(!v8::V8::IsExecutionTerminating());
@@ -384,6 +387,7 @@ void DoLoopCancelTerminate(const v8::FunctionCallbackInfo<v8::Value>& args) {
CHECK(!v8::V8::IsExecutionTerminating());
}
+
// Test that a single thread of JavaScript execution can terminate
// itself and then resume execution.
TEST(TerminateCancelTerminateFromThreadItself) {
diff --git a/deps/v8/test/cctest/test-threads.cc b/deps/v8/test/cctest/test-threads.cc
index 3b9c1ad80b..a35a88dc26 100644
--- a/deps/v8/test/cctest/test-threads.cc
+++ b/deps/v8/test/cctest/test-threads.cc
@@ -175,6 +175,7 @@ class ThreadIdValidationThread : public v8::internal::Thread {
i::Semaphore* semaphore_;
};
+
TEST(ThreadIdValidation) {
const int kNThreads = 100;
i::List<ThreadIdValidationThread*> threads(kNThreads);
diff --git a/deps/v8/test/cctest/test-types.cc b/deps/v8/test/cctest/test-types.cc
index 78abeba0ab..b5f65954fa 100644
--- a/deps/v8/test/cctest/test-types.cc
+++ b/deps/v8/test/cctest/test-types.cc
@@ -62,6 +62,7 @@ static void CheckEqual(Handle<Type> type1, Handle<Type> type2) {
CHECK(type2->Is(type1));
}
+
static void CheckSub(Handle<Type> type1, Handle<Type> type2) {
CHECK(type1->Is(type2));
CHECK(!type2->Is(type1));
@@ -70,6 +71,7 @@ static void CheckSub(Handle<Type> type1, Handle<Type> type2) {
}
}
+
static void CheckUnordered(Handle<Type> type1, Handle<Type> type2) {
CHECK(!type1->Is(type2));
CHECK(!type2->Is(type1));
@@ -78,6 +80,7 @@ static void CheckUnordered(Handle<Type> type1, Handle<Type> type2) {
}
}
+
static void CheckOverlap(Handle<Type> type1, Handle<Type> type2) {
CHECK(type1->Maybe(type2));
CHECK(type2->Maybe(type1));
@@ -86,6 +89,7 @@ static void CheckOverlap(Handle<Type> type1, Handle<Type> type2) {
}
}
+
static void CheckDisjoint(Handle<Type> type1, Handle<Type> type2) {
CHECK(!type1->Is(type2));
CHECK(!type2->Is(type1));
diff --git a/deps/v8/test/cctest/test-weaksets.cc b/deps/v8/test/cctest/test-weaksets.cc
new file mode 100644
index 0000000000..707f903284
--- /dev/null
+++ b/deps/v8/test/cctest/test-weaksets.cc
@@ -0,0 +1,250 @@
+// Copyright 2011 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#include "v8.h"
+
+#include "global-handles.h"
+#include "snapshot.h"
+#include "cctest.h"
+
+using namespace v8::internal;
+
+
+static Isolate* GetIsolateFrom(LocalContext* context) {
+ return reinterpret_cast<Isolate*>((*context)->GetIsolate());
+}
+
+
+static Handle<JSWeakSet> AllocateJSWeakSet(Isolate* isolate) {
+ Factory* factory = isolate->factory();
+ Heap* heap = isolate->heap();
+ Handle<Map> map = factory->NewMap(JS_WEAK_SET_TYPE, JSWeakSet::kSize);
+ Handle<JSObject> weakset_obj = factory->NewJSObjectFromMap(map);
+ Handle<JSWeakSet> weakset(JSWeakSet::cast(*weakset_obj));
+ // Do not use handles for the hash table, it would make entries strong.
+ Object* table_obj = ObjectHashTable::Allocate(heap, 1)->ToObjectChecked();
+ ObjectHashTable* table = ObjectHashTable::cast(table_obj);
+ weakset->set_table(table);
+ weakset->set_next(Smi::FromInt(0));
+ return weakset;
+}
+
+static void PutIntoWeakSet(Handle<JSWeakSet> weakset,
+ Handle<JSObject> key,
+ Handle<Object> value) {
+ Handle<ObjectHashTable> table = PutIntoObjectHashTable(
+ Handle<ObjectHashTable>(ObjectHashTable::cast(weakset->table())),
+ Handle<JSObject>(JSObject::cast(*key)),
+ value);
+ weakset->set_table(*table);
+}
+
+static int NumberOfWeakCalls = 0;
+static void WeakPointerCallback(v8::Isolate* isolate,
+ v8::Persistent<v8::Value>* handle,
+ void* id) {
+ ASSERT(id == reinterpret_cast<void*>(1234));
+ NumberOfWeakCalls++;
+ handle->Dispose(isolate);
+}
+
+
+TEST(WeakSet_Weakness) {
+ FLAG_incremental_marking = false;
+ LocalContext context;
+ Isolate* isolate = GetIsolateFrom(&context);
+ Factory* factory = isolate->factory();
+ Heap* heap = isolate->heap();
+ HandleScope scope(isolate);
+ Handle<JSWeakSet> weakset = AllocateJSWeakSet(isolate);
+ GlobalHandles* global_handles = isolate->global_handles();
+
+ // Keep global reference to the key.
+ Handle<Object> key;
+ {
+ HandleScope scope(isolate);
+ Handle<Map> map = factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
+ Handle<JSObject> object = factory->NewJSObjectFromMap(map);
+ key = global_handles->Create(*object);
+ }
+ CHECK(!global_handles->IsWeak(key.location()));
+
+ // Put entry into weak set.
+ {
+ HandleScope scope(isolate);
+ PutIntoWeakSet(weakset,
+ Handle<JSObject>(JSObject::cast(*key)),
+ Handle<Smi>(Smi::FromInt(23), isolate));
+ }
+ CHECK_EQ(1, ObjectHashTable::cast(weakset->table())->NumberOfElements());
+
+ // Force a full GC.
+ heap->CollectAllGarbage(false);
+ CHECK_EQ(0, NumberOfWeakCalls);
+ CHECK_EQ(1, ObjectHashTable::cast(weakset->table())->NumberOfElements());
+ CHECK_EQ(
+ 0, ObjectHashTable::cast(weakset->table())->NumberOfDeletedElements());
+
+ // Make the global reference to the key weak.
+ {
+ HandleScope scope(isolate);
+ global_handles->MakeWeak(key.location(),
+ reinterpret_cast<void*>(1234),
+ &WeakPointerCallback);
+ }
+ CHECK(global_handles->IsWeak(key.location()));
+
+ // Force a full GC.
+ // Perform two consecutive GCs because the first one will only clear
+ // weak references whereas the second one will also clear weak sets.
+ heap->CollectAllGarbage(false);
+ CHECK_EQ(1, NumberOfWeakCalls);
+ CHECK_EQ(1, ObjectHashTable::cast(weakset->table())->NumberOfElements());
+ CHECK_EQ(
+ 0, ObjectHashTable::cast(weakset->table())->NumberOfDeletedElements());
+ heap->CollectAllGarbage(false);
+ CHECK_EQ(1, NumberOfWeakCalls);
+ CHECK_EQ(0, ObjectHashTable::cast(weakset->table())->NumberOfElements());
+ CHECK_EQ(
+ 1, ObjectHashTable::cast(weakset->table())->NumberOfDeletedElements());
+}
+
+
+TEST(WeakSet_Shrinking) {
+ LocalContext context;
+ Isolate* isolate = GetIsolateFrom(&context);
+ Factory* factory = isolate->factory();
+ Heap* heap = isolate->heap();
+ HandleScope scope(isolate);
+ Handle<JSWeakSet> weakset = AllocateJSWeakSet(isolate);
+
+ // Check initial capacity.
+ CHECK_EQ(32, ObjectHashTable::cast(weakset->table())->Capacity());
+
+ // Fill up weak set to trigger capacity change.
+ {
+ HandleScope scope(isolate);
+ Handle<Map> map = factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
+ for (int i = 0; i < 32; i++) {
+ Handle<JSObject> object = factory->NewJSObjectFromMap(map);
+ PutIntoWeakSet(weakset, object, Handle<Smi>(Smi::FromInt(i), isolate));
+ }
+ }
+
+ // Check increased capacity.
+ CHECK_EQ(128, ObjectHashTable::cast(weakset->table())->Capacity());
+
+ // Force a full GC.
+ CHECK_EQ(32, ObjectHashTable::cast(weakset->table())->NumberOfElements());
+ CHECK_EQ(
+ 0, ObjectHashTable::cast(weakset->table())->NumberOfDeletedElements());
+ heap->CollectAllGarbage(false);
+ CHECK_EQ(0, ObjectHashTable::cast(weakset->table())->NumberOfElements());
+ CHECK_EQ(
+ 32, ObjectHashTable::cast(weakset->table())->NumberOfDeletedElements());
+
+ // Check shrunk capacity.
+ CHECK_EQ(32, ObjectHashTable::cast(weakset->table())->Capacity());
+}
+
+
+// Test that weak set values on an evacuation candidate which are not reachable
+// by other paths are correctly recorded in the slots buffer.
+TEST(WeakSet_Regress2060a) {
+ FLAG_always_compact = true;
+ LocalContext context;
+ Isolate* isolate = GetIsolateFrom(&context);
+ Factory* factory = isolate->factory();
+ Heap* heap = isolate->heap();
+ HandleScope scope(isolate);
+ Handle<JSFunction> function =
+ factory->NewFunction(factory->function_string(), factory->null_value());
+ Handle<JSObject> key = factory->NewJSObject(function);
+ Handle<JSWeakSet> weakset = AllocateJSWeakSet(isolate);
+
+ // Start second old-space page so that values land on evacuation candidate.
+ Page* first_page = heap->old_pointer_space()->anchor()->next_page();
+ factory->NewFixedArray(900 * KB / kPointerSize, TENURED);
+
+ // Fill up weak set with values on an evacuation candidate.
+ {
+ HandleScope scope(isolate);
+ for (int i = 0; i < 32; i++) {
+ Handle<JSObject> object = factory->NewJSObject(function, TENURED);
+ CHECK(!heap->InNewSpace(object->address()));
+ CHECK(!first_page->Contains(object->address()));
+ PutIntoWeakSet(weakset, key, object);
+ }
+ }
+
+ // Force compacting garbage collection.
+ CHECK(FLAG_always_compact);
+ heap->CollectAllGarbage(Heap::kNoGCFlags);
+}
+
+
+// Test that weak set keys on an evacuation candidate which are reachable by
+// other strong paths are correctly recorded in the slots buffer.
+TEST(WeakSet_Regress2060b) {
+ FLAG_always_compact = true;
+#ifdef VERIFY_HEAP
+ FLAG_verify_heap = true;
+#endif
+
+ LocalContext context;
+ Isolate* isolate = GetIsolateFrom(&context);
+ Factory* factory = isolate->factory();
+ Heap* heap = isolate->heap();
+ HandleScope scope(isolate);
+ Handle<JSFunction> function =
+ factory->NewFunction(factory->function_string(), factory->null_value());
+
+ // Start second old-space page so that keys land on evacuation candidate.
+ Page* first_page = heap->old_pointer_space()->anchor()->next_page();
+ factory->NewFixedArray(900 * KB / kPointerSize, TENURED);
+
+ // Fill up weak set with keys on an evacuation candidate.
+ Handle<JSObject> keys[32];
+ for (int i = 0; i < 32; i++) {
+ keys[i] = factory->NewJSObject(function, TENURED);
+ CHECK(!heap->InNewSpace(keys[i]->address()));
+ CHECK(!first_page->Contains(keys[i]->address()));
+ }
+ Handle<JSWeakSet> weakset = AllocateJSWeakSet(isolate);
+ for (int i = 0; i < 32; i++) {
+ PutIntoWeakSet(weakset,
+ keys[i],
+ Handle<Smi>(Smi::FromInt(i), isolate));
+ }
+
+ // Force compacting garbage collection. The subsequent collections are used
+ // to verify that key references were actually updated.
+ CHECK(FLAG_always_compact);
+ heap->CollectAllGarbage(Heap::kNoGCFlags);
+ heap->CollectAllGarbage(Heap::kNoGCFlags);
+ heap->CollectAllGarbage(Heap::kNoGCFlags);
+}
diff --git a/deps/v8/test/intl/assert.js b/deps/v8/test/intl/assert.js
new file mode 100644
index 0000000000..3180e6f96e
--- /dev/null
+++ b/deps/v8/test/intl/assert.js
@@ -0,0 +1,184 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Some methods are taken from v8/test/mjsunit/mjsunit.js
+
+/**
+ * Compares two objects for key/value equality.
+ * Returns true if they are equal, false otherwise.
+ */
+function deepObjectEquals(a, b) {
+ var aProps = Object.keys(a);
+ aProps.sort();
+ var bProps = Object.keys(b);
+ bProps.sort();
+ if (!deepEquals(aProps, bProps)) {
+ return false;
+ }
+ for (var i = 0; i < aProps.length; i++) {
+ if (!deepEquals(a[aProps[i]], b[aProps[i]])) {
+ return false;
+ }
+ }
+ return true;
+}
+
+
+/**
+ * Compares two JavaScript values for type and value equality.
+ * It checks internals of arrays and objects.
+ */
+function deepEquals(a, b) {
+ if (a === b) {
+ // Check for -0.
+ if (a === 0) return (1 / a) === (1 / b);
+ return true;
+ }
+ if (typeof a != typeof b) return false;
+ if (typeof a == 'number') return isNaN(a) && isNaN(b);
+ if (typeof a !== 'object' && typeof a !== 'function') return false;
+ // Neither a nor b is primitive.
+ var objectClass = classOf(a);
+ if (objectClass !== classOf(b)) return false;
+ if (objectClass === 'RegExp') {
+ // For RegExp, just compare pattern and flags using its toString.
+ return (a.toString() === b.toString());
+ }
+ // Functions are only identical to themselves.
+ if (objectClass === 'Function') return false;
+ if (objectClass === 'Array') {
+ var elementCount = 0;
+ if (a.length != b.length) {
+ return false;
+ }
+ for (var i = 0; i < a.length; i++) {
+ if (!deepEquals(a[i], b[i])) return false;
+ }
+ return true;
+ }
+ if (objectClass == 'String' || objectClass == 'Number' ||
+ objectClass == 'Boolean' || objectClass == 'Date') {
+ if (a.valueOf() !== b.valueOf()) return false;
+ }
+ return deepObjectEquals(a, b);
+}
+
+
+/**
+ * Throws an exception, and prints the values in case of error.
+ */
+function fail(expected, found) {
+ // TODO(cira): Replace String with PrettyPrint for objects and arrays.
+ var message = 'Failure: expected <' + String(expected) + '>, found <' +
+ String(found) + '>.';
+ throw new Error(message);
+}
+
+
+/**
+ * Throws if two variables have different types or values.
+ */
+function assertEquals(expected, found) {
+ if (!deepEquals(expected, found)) {
+ fail(expected, found);
+ }
+}
+
+
+/**
+ * Throws if value is false.
+ */
+function assertTrue(value) {
+ assertEquals(true, value)
+}
+
+
+/**
+ * Throws if value is true.
+ */
+function assertFalse(value) {
+ assertEquals(false, value);
+}
+
+
+/**
+ * Returns true if code throws specified exception.
+ */
+function assertThrows(code, type_opt, cause_opt) {
+ var threwException = true;
+ try {
+ if (typeof code == 'function') {
+ code();
+ } else {
+ eval(code);
+ }
+ threwException = false;
+ } catch (e) {
+ if (typeof type_opt == 'function') {
+ assertInstanceof(e, type_opt);
+ }
+ if (arguments.length >= 3) {
+ assertEquals(e.type, cause_opt);
+ }
+ // Success.
+ return;
+ }
+ throw new Error("Did not throw exception");
+}
+
+
+/**
+ * Throws an exception if code throws.
+ */
+function assertDoesNotThrow(code, name_opt) {
+ try {
+ if (typeof code == 'function') {
+ code();
+ } else {
+ eval(code);
+ }
+ } catch (e) {
+ fail("threw an exception: ", e.message || e, name_opt);
+ }
+}
+
+
+/**
+ * Throws if obj is not of given type.
+ */
+function assertInstanceof(obj, type) {
+ if (!(obj instanceof type)) {
+ var actualTypeName = null;
+ var actualConstructor = Object.prototypeOf(obj).constructor;
+ if (typeof actualConstructor == "function") {
+ actualTypeName = actualConstructor.name || String(actualConstructor);
+ }
+ throw new Error('Object <' + obj + '> is not an instance of <' +
+ (type.name || type) + '>' +
+ (actualTypeName ? ' but of < ' + actualTypeName + '>' : ''));
+ }
+}
diff --git a/deps/v8/test/intl/break-iterator/default-locale.js b/deps/v8/test/intl/break-iterator/default-locale.js
new file mode 100644
index 0000000000..39a88574fe
--- /dev/null
+++ b/deps/v8/test/intl/break-iterator/default-locale.js
@@ -0,0 +1,48 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Constructing BreakIterator with no locale arguments or with []
+// creates one with default locale.
+
+var iterator = new Intl.v8BreakIterator([]);
+
+var options = iterator.resolvedOptions();
+
+// Check it's none of these first.
+assertFalse(options.locale === 'und');
+assertFalse(options.locale === '');
+assertFalse(options.locale === undefined);
+
+// Then check for equality.
+assertEquals(options.locale, getDefaultLocale());
+
+var iteratorNone = new Intl.v8BreakIterator();
+assertEquals(options.locale, iteratorNone.resolvedOptions().locale);
+
+// TODO(cira): remove support for {} to mean empty list.
+var iteratorBraket = new Intl.v8BreakIterator({});
+assertEquals(options.locale, iteratorBraket.resolvedOptions().locale);
diff --git a/deps/v8/test/intl/break-iterator/en-break.js b/deps/v8/test/intl/break-iterator/en-break.js
new file mode 100644
index 0000000000..7268a101e7
--- /dev/null
+++ b/deps/v8/test/intl/break-iterator/en-break.js
@@ -0,0 +1,61 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Segment plain English sentence and check results.
+
+var iterator = new Intl.v8BreakIterator(['en']);
+
+var textToSegment = 'Jack and Jill, went over hill, and got lost. Alert!';
+iterator.adoptText(textToSegment);
+
+var slices = [];
+var types = [];
+var pos = iterator.first();
+while (pos !== -1) {
+ var nextPos = iterator.next();
+ if (nextPos === -1) break;
+
+ slices.push(textToSegment.slice(pos, nextPos));
+ types.push(iterator.breakType());
+
+ pos = nextPos;
+}
+
+assertEquals('Jack', slices[0]);
+assertEquals(' ', slices[1]);
+assertEquals('and', slices[2]);
+assertEquals(' ', slices[3]);
+assertEquals('Jill', slices[4]);
+assertEquals(',', slices[5]);
+assertEquals('!', slices[slices.length - 1]);
+
+assertEquals('letter', types[0]);
+assertEquals('none', types[1]);
+assertEquals('letter', types[2]);
+assertEquals('none', types[3]);
+assertEquals('letter', types[4]);
+assertEquals('none', types[types.length - 1]);
diff --git a/deps/v8/test/intl/break-iterator/property-override.js b/deps/v8/test/intl/break-iterator/property-override.js
new file mode 100644
index 0000000000..49bd86fa6e
--- /dev/null
+++ b/deps/v8/test/intl/break-iterator/property-override.js
@@ -0,0 +1,64 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Checks for security holes introduced by Object.property overrides.
+// For example:
+// Object.defineProperty(Array.prototype, 'locale', {
+// set: function(value) {
+// throw new Error('blah');
+// },
+// configurable: true,
+// enumerable: false
+// });
+//
+// would throw in case of (JS) x.locale = 'us' or (C++) x->Set('locale', 'us').
+//
+// Update both break-iterator.js and break-iterator.cc so they have the same
+// list of properties.
+
+// First get supported properties.
+var properties = [];
+var options = Intl.v8BreakIterator().resolvedOptions();
+for (var prop in options) {
+ if (options.hasOwnProperty(prop)) {
+ properties.push(prop);
+ }
+}
+
+var expectedProperties = [
+ 'type', 'locale'
+];
+
+assertEquals(expectedProperties.length, properties.length);
+
+properties.forEach(function(prop) {
+ assertFalse(expectedProperties.indexOf(prop) === -1);
+});
+
+taintProperties(properties);
+
+var locale = Intl.v8BreakIterator().resolvedOptions().locale;
diff --git a/deps/v8/test/intl/break-iterator/protected-icu-internals.js b/deps/v8/test/intl/break-iterator/protected-icu-internals.js
new file mode 100644
index 0000000000..ad1dc54fbe
--- /dev/null
+++ b/deps/v8/test/intl/break-iterator/protected-icu-internals.js
@@ -0,0 +1,49 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Internal object we got from native code should not be writable,
+// configurable or enumerable. One can still change its public properties, but
+// we don't use them to do actual work.
+
+var iterator = new Intl.v8BreakIterator([]);
+
+// Direct write should fail.
+iterator.iterator = {'zzz':'some random object'};
+
+assertFalse(iterator.iterator.hasOwnProperty('zzz'));
+
+// Try redefining the property.
+var didThrow = false;
+try {
+ Object.defineProperty(iterator, 'iterator', {value: undefined});
+} catch(e) {
+ didThrow = true;
+}
+assertTrue(didThrow);
+
+// Try deleting the property.
+assertFalse(delete iterator.iterator);
diff --git a/deps/v8/test/intl/break-iterator/resolved-options-is-method.js b/deps/v8/test/intl/break-iterator/resolved-options-is-method.js
new file mode 100644
index 0000000000..0e9e06c2f2
--- /dev/null
+++ b/deps/v8/test/intl/break-iterator/resolved-options-is-method.js
@@ -0,0 +1,40 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Test that resolvedOptions is a method, not a property getter and that
+// the result is mutable.
+
+var iterator = new Intl.v8BreakIterator();
+
+var result = iterator.resolvedOptions();
+
+assertTrue(result instanceof Object);
+
+// Result should be mutable.
+result.locale = 'xx';
+
+assertEquals(result.locale, 'xx');
diff --git a/deps/v8/test/intl/break-iterator/wellformed-unsupported-locale.js b/deps/v8/test/intl/break-iterator/wellformed-unsupported-locale.js
new file mode 100644
index 0000000000..56457b4829
--- /dev/null
+++ b/deps/v8/test/intl/break-iterator/wellformed-unsupported-locale.js
@@ -0,0 +1,32 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Passing a well formed but unsupported locale falls back to default.
+
+var iterator = Intl.v8BreakIterator(['xx']);
+
+assertEquals(iterator.resolvedOptions().locale, getDefaultLocale());
diff --git a/deps/v8/test/intl/break-iterator/zh-break.js b/deps/v8/test/intl/break-iterator/zh-break.js
new file mode 100644
index 0000000000..c8434b10c2
--- /dev/null
+++ b/deps/v8/test/intl/break-iterator/zh-break.js
@@ -0,0 +1,63 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Segment plain Chinese sentence and check results.
+
+var iterator = new Intl.v8BreakIterator(['zh']);
+
+var textToSegment = '\u56FD\u52A1\u9662\u5173\u4E8E\u300A\u571F\u5730' +
+ '\u623F\u5C4B\u7BA1\u7406\u6761\u4F8B\u300B';
+iterator.adoptText(textToSegment);
+
+var slices = [];
+var types = [];
+var pos = iterator.first();
+while (pos !== -1) {
+ var nextPos = iterator.next();
+ if (nextPos === -1) break;
+
+ slices.push(textToSegment.slice(pos, nextPos));
+ types.push(iterator.breakType());
+
+ pos = nextPos;
+}
+
+assertEquals('\u56FD\u52A1\u9662', slices[0]);
+assertEquals('\u5173\u4E8E', slices[1]);
+assertEquals('\u300A', slices[2]);
+assertEquals('\u571F\u5730', slices[3]);
+assertEquals('\u623F\u5C4B', slices[4]);
+assertEquals('\u7BA1\u7406', slices[5]);
+assertEquals('\u6761\u4F8B', slices[6]);
+assertEquals('\u300B', slices[7]);
+
+assertEquals('ideo', types[0]);
+assertEquals('ideo', types[1]);
+assertEquals('none', types[2]);
+assertEquals('ideo', types[3]);
+assertEquals('ideo', types[4]);
+assertEquals('none', types[types.length - 1]);
diff --git a/deps/v8/test/intl/collator/de-sort.js b/deps/v8/test/intl/collator/de-sort.js
new file mode 100644
index 0000000000..278b9492d3
--- /dev/null
+++ b/deps/v8/test/intl/collator/de-sort.js
@@ -0,0 +1,44 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Sort plain German text using defaults.
+
+var strings = ['März', 'Fuße', 'FUSSE', 'Fluße', 'Flusse',
+ 'flusse', 'fluße', 'flüße', 'flüsse'];
+
+var collator = Intl.Collator(['de']);
+var result = strings.sort(collator.compare);
+
+assertEquals('flusse', result[0]);
+assertEquals('Flusse', result[1]);
+assertEquals('fluße', result[2]);
+assertEquals('Fluße', result[3]);
+assertEquals('flüsse', result[4]);
+assertEquals('flüße', result[5]);
+assertEquals('FUSSE', result[6]);
+assertEquals('Fuße', result[7]);
+assertEquals('März', result[8]);
diff --git a/deps/v8/test/intl/collator/default-locale.js b/deps/v8/test/intl/collator/default-locale.js
new file mode 100644
index 0000000000..f6ffba8e1d
--- /dev/null
+++ b/deps/v8/test/intl/collator/default-locale.js
@@ -0,0 +1,52 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Constructing Collator with no locale arguments or with []
+// creates one with default locale.
+
+var collator = new Intl.Collator([]);
+
+var options = collator.resolvedOptions();
+
+// Check it's none of these first.
+assertFalse(options.locale === 'und');
+assertFalse(options.locale === '');
+assertFalse(options.locale === undefined);
+
+// Then check for equality.
+assertEquals(options.locale, getDefaultLocale());
+
+var collatorNone = new Intl.Collator();
+assertEquals(options.locale, collatorNone.resolvedOptions().locale);
+
+// TODO(cira): remove support for {} to mean empty list.
+var collatorBraket = new Intl.Collator({});
+assertEquals(options.locale, collatorBraket.resolvedOptions().locale);
+
+var collatorWithOptions = new Intl.Collator(undefined, {usage: 'search'});
+assertEquals(getDefaultLocale() + '-u-co-search',
+ collatorWithOptions.resolvedOptions().locale);
diff --git a/deps/v8/test/intl/collator/en-sort.js b/deps/v8/test/intl/collator/en-sort.js
new file mode 100644
index 0000000000..24adc773eb
--- /dev/null
+++ b/deps/v8/test/intl/collator/en-sort.js
@@ -0,0 +1,39 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Sort plain English text using defaults.
+
+var strings = ['blood', 'bull', 'ascend', 'zed', 'down'];
+
+var collator = Intl.Collator(['en']);
+var result = strings.sort(collator.compare);
+
+assertEquals('ascend', result[0]);
+assertEquals('blood', result[1]);
+assertEquals('bull', result[2]);
+assertEquals('down', result[3]);
+assertEquals('zed', result[4]);
diff --git a/deps/v8/test/intl/collator/normalization.js b/deps/v8/test/intl/collator/normalization.js
new file mode 100644
index 0000000000..8238f235a8
--- /dev/null
+++ b/deps/v8/test/intl/collator/normalization.js
@@ -0,0 +1,56 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Make sure normalization is always on, and normalization flag is ignored.
+
+// We need a character with two combining marks, from two different classes,
+// to make ICU fail comparison without normalization (upper, lower accent).
+// We will just switch order of combining characters to try to induce failure.
+
+// FYI, this one wouldn't work, since both accents are from the same class:
+// http://unicode.org/cldr/utility/character.jsp?a=01DF
+
+// See http://demo.icu-project.org/icu-bin/nbrowser?t=&s=1E09&uv=0 and
+// http://unicode.org/cldr/utility/character.jsp?a=1E09 for character details.
+var toCompare = ['\u0063\u0327\u0301', '\u0063\u0301\u0327'];
+
+// Try with normalization off (as an option).
+var collator = Intl.Collator([], {normalization: false});
+// If we accepted normalization parameter, this would have failed.
+assertEquals(0, collator.compare(toCompare[0], toCompare[1]));
+assertFalse(collator.resolvedOptions().hasOwnProperty('normalization'));
+
+// Try with normalization off (as Unicode extension).
+collator = Intl.Collator(['de-u-kk-false']);
+// If we accepted normalization parameter, this would have failed.
+assertEquals(0, collator.compare(toCompare[0], toCompare[1]));
+assertFalse(collator.resolvedOptions().hasOwnProperty('normalization'));
+
+// Normalization is on by default.
+collator = Intl.Collator();
+assertEquals(0, collator.compare(toCompare[0], toCompare[1]));
+assertFalse(collator.resolvedOptions().hasOwnProperty('normalization'));
diff --git a/deps/v8/test/intl/collator/property-override.js b/deps/v8/test/intl/collator/property-override.js
new file mode 100644
index 0000000000..bed4d7773d
--- /dev/null
+++ b/deps/v8/test/intl/collator/property-override.js
@@ -0,0 +1,65 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Checks for security holes introduced by Object.property overrides.
+// For example:
+// Object.defineProperty(Array.prototype, 'locale', {
+// set: function(value) {
+// throw new Error('blah');
+// },
+// configurable: true,
+// enumerable: false
+// });
+//
+// would throw in case of (JS) x.locale = 'us' or (C++) x->Set('locale', 'us').
+//
+// Update both collator.js and collator.cc so they have the same list of
+// properties.
+
+// First get supported properties.
+var properties = [];
+var options = Intl.Collator().resolvedOptions();
+for (var prop in options) {
+ if (options.hasOwnProperty(prop)) {
+ properties.push(prop);
+ }
+}
+
+var expectedProperties = [
+ 'caseFirst', 'sensitivity', 'ignorePunctuation',
+ 'locale', 'numeric', 'usage', 'collation'
+];
+
+assertEquals(expectedProperties.length, properties.length);
+
+properties.forEach(function(prop) {
+ assertFalse(expectedProperties.indexOf(prop) === -1);
+});
+
+taintProperties(properties);
+
+var locale = Intl.Collator().resolvedOptions().locale;
diff --git a/deps/v8/test/intl/collator/protected-icu-internals.js b/deps/v8/test/intl/collator/protected-icu-internals.js
new file mode 100644
index 0000000000..7acd35e454
--- /dev/null
+++ b/deps/v8/test/intl/collator/protected-icu-internals.js
@@ -0,0 +1,49 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Internal object we got from native code should not be writable,
+// configurable or enumerable. One can still change its public properties, but
+// we don't use them to do actual work.
+
+var collator = new Intl.Collator([]);
+
+// Direct write should fail.
+collator.collator = {'zzz':'some random object'};
+
+assertFalse(collator.collator.hasOwnProperty('zzz'));
+
+// Try redefining the property.
+var didThrow = false;
+try {
+ Object.defineProperty(collator, 'collator', {value: undefined});
+} catch(e) {
+ didThrow = true;
+}
+assertTrue(didThrow);
+
+// Try deleting the property.
+assertFalse(delete collator.collator);
diff --git a/deps/v8/test/intl/collator/resolved-options-is-method.js b/deps/v8/test/intl/collator/resolved-options-is-method.js
new file mode 100644
index 0000000000..e7c874f0af
--- /dev/null
+++ b/deps/v8/test/intl/collator/resolved-options-is-method.js
@@ -0,0 +1,40 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Test that resolvedOptions is a method, not a property getter and that
+// the result is mutable.
+
+var collator = new Intl.Collator();
+
+var result = collator.resolvedOptions();
+
+assertTrue(result instanceof Object);
+
+// Result should be mutable.
+result.locale = 'xx';
+
+assertEquals(result.locale, 'xx');
diff --git a/deps/v8/test/intl/collator/sr-sort.js b/deps/v8/test/intl/collator/sr-sort.js
new file mode 100644
index 0000000000..53c784ce0d
--- /dev/null
+++ b/deps/v8/test/intl/collator/sr-sort.js
@@ -0,0 +1,46 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Sort plain Serbian text using defaults.
+
+var strings = ['новине', 'ограда', 'жирафа', 'Никола', 'Андрија',
+ 'Стара Планина', 'џак', 'алав', 'ћук', 'чука'];
+
+var collator = Intl.Collator(['sr']);
+var result = strings.sort(collator.compare);
+
+assertEquals('алав', result[0]);
+assertEquals('Андрија', result[1]);
+assertEquals('жирафа', result[2]);
+assertEquals('Никола', result[3]);
+assertEquals('новине', result[4]);
+assertEquals('ограда', result[5]);
+assertEquals('Стара Планина', result[6]);
+assertEquals('ћук', result[7]);
+assertEquals('чука', result[8]);
+assertEquals('џак', result[9]);
+
diff --git a/deps/v8/test/intl/collator/wellformed-unsupported-locale.js b/deps/v8/test/intl/collator/wellformed-unsupported-locale.js
new file mode 100644
index 0000000000..ea143fdc63
--- /dev/null
+++ b/deps/v8/test/intl/collator/wellformed-unsupported-locale.js
@@ -0,0 +1,32 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Passing a well formed but unsupported locale falls back to default.
+
+var collator = Intl.Collator(['xx']);
+
+assertEquals(collator.resolvedOptions().locale, getDefaultLocale());
diff --git a/deps/v8/test/intl/date-format/default-locale.js b/deps/v8/test/intl/date-format/default-locale.js
new file mode 100644
index 0000000000..2dcb0f8ae7
--- /dev/null
+++ b/deps/v8/test/intl/date-format/default-locale.js
@@ -0,0 +1,44 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Constructing DateTimeFormat with no locale arguments or with []
+// creates one with default locale.
+
+var dtf = new Intl.DateTimeFormat([]);
+
+var options = dtf.resolvedOptions();
+
+// Check it's none of these first.
+assertFalse(options.locale === 'und');
+assertFalse(options.locale === '');
+assertFalse(options.locale === undefined);
+
+// Then check for equality.
+assertEquals(options.locale, getDefaultLocale());
+
+var dtfNone = new Intl.DateTimeFormat();
+assertEquals(options.locale, dtfNone.resolvedOptions().locale);
diff --git a/deps/v8/test/intl/date-format/format-is-bound.js b/deps/v8/test/intl/date-format/format-is-bound.js
new file mode 100644
index 0000000000..b744b65b91
--- /dev/null
+++ b/deps/v8/test/intl/date-format/format-is-bound.js
@@ -0,0 +1,39 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Create default DateTimeFormat.
+var dtf = new Intl.DateTimeFormat();
+
+// Array we want to iterate, actual dates are not important.
+var dateArray = [Date.now(), Date.now(), Date.now()];
+
+// It shouldn't throw.
+// The format() method should be properly bound to the dtf object.
+dateArray.forEach(dtf.format);
+
+// Formatting a date should work in a direct call.
+dtf.format();
diff --git a/deps/v8/test/intl/date-format/format-test.js b/deps/v8/test/intl/date-format/format-test.js
new file mode 100644
index 0000000000..9817c97ed9
--- /dev/null
+++ b/deps/v8/test/intl/date-format/format-test.js
@@ -0,0 +1,46 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Test formatting method with specified date, invalid input.
+
+var dtf = new Intl.DateTimeFormat('en-US', {timeZone: 'UTC'});
+
+var someDate = dtf.format(144313200000);
+assertEquals('7/29/1974', someDate);
+
+var invalidValues = [NaN, Infinity, -Infinity];
+invalidValues.forEach(function(value) {
+ var error;
+ try {
+ dtf.format(value);
+ } catch (e) {
+ error = e;
+ }
+
+ assertTrue(error !== undefined);
+ assertEquals('RangeError', error.name);
+});
diff --git a/deps/v8/test/intl/date-format/parse-MMMdy.js b/deps/v8/test/intl/date-format/parse-MMMdy.js
new file mode 100644
index 0000000000..7136527810
--- /dev/null
+++ b/deps/v8/test/intl/date-format/parse-MMMdy.js
@@ -0,0 +1,48 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Testing v8Parse method for date and time pattern.
+// Month is represented as a short name.
+
+var dtf = new Intl.DateTimeFormat(['en'],
+ {year: 'numeric', month: 'short',
+ day: 'numeric'});
+
+// Make sure we have pattern we expect (may change in the future).
+assertEquals('MMM d, y', dtf.resolved.pattern);
+
+assertEquals('Sat May 04 1974 00:00:00 GMT-0007 (PDT)',
+ usePDT(String(dtf.v8Parse('May 4, 1974'))));
+
+// Missing , in the pattern.
+assertEquals(undefined, dtf.v8Parse('May 4 1974'));
+
+// Extra "th" after 4 in the pattern.
+assertEquals(undefined, dtf.v8Parse('May 4th, 1974'));
+
+// Wrong pattern.
+assertEquals(undefined, dtf.v8Parse('5/4/1974'));
diff --git a/deps/v8/test/intl/date-format/parse-invalid-input.js b/deps/v8/test/intl/date-format/parse-invalid-input.js
new file mode 100644
index 0000000000..ab0b889ff5
--- /dev/null
+++ b/deps/v8/test/intl/date-format/parse-invalid-input.js
@@ -0,0 +1,35 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Invalid input is handled properly.
+
+var dtf = new Intl.DateTimeFormat(['en']);
+
+assertEquals(undefined, dtf.v8Parse(''));
+assertEquals(undefined, dtf.v8Parse('A'));
+assertEquals(undefined, dtf.v8Parse(5));
+assertEquals(undefined, dtf.v8Parse(new Date()));
diff --git a/deps/v8/test/intl/date-format/parse-mdy.js b/deps/v8/test/intl/date-format/parse-mdy.js
new file mode 100644
index 0000000000..e767a0b2d2
--- /dev/null
+++ b/deps/v8/test/intl/date-format/parse-mdy.js
@@ -0,0 +1,49 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Testing v8Parse method for date only.
+
+var dtf = new Intl.DateTimeFormat(['en']);
+
+// Make sure we have pattern we expect (may change in the future).
+assertEquals('M/d/y', dtf.resolved.pattern);
+
+assertEquals('Sat May 04 1974 00:00:00 GMT-0007 (PDT)',
+ usePDT(String(dtf.v8Parse('5/4/74'))));
+assertEquals('Sat May 04 1974 00:00:00 GMT-0007 (PDT)',
+ usePDT(String(dtf.v8Parse('05/04/74'))));
+assertEquals('Sat May 04 1974 00:00:00 GMT-0007 (PDT)',
+ usePDT(String(dtf.v8Parse('5/04/74'))));
+assertEquals('Sat May 04 1974 00:00:00 GMT-0007 (PDT)',
+ usePDT(String(dtf.v8Parse('5/4/1974'))));
+
+// Month is numeric, so it fails on "May".
+assertEquals(undefined, dtf.v8Parse('May 4th 1974'));
+
+// Time is ignored from the input, since the pattern doesn't have it.
+assertEquals('Sat May 04 1974 00:00:00 GMT-0007 (PDT)',
+ usePDT(String(dtf.v8Parse('5/4/74 12:30:12'))));
diff --git a/deps/v8/test/intl/date-format/parse-mdyhms.js b/deps/v8/test/intl/date-format/parse-mdyhms.js
new file mode 100644
index 0000000000..74f7467f3d
--- /dev/null
+++ b/deps/v8/test/intl/date-format/parse-mdyhms.js
@@ -0,0 +1,51 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Testing v8Parse method for date and time pattern.
+
+var dtf = new Intl.DateTimeFormat(['en'],
+ {year: 'numeric', month: 'numeric',
+ day: 'numeric', hour: 'numeric',
+ minute: 'numeric', second: 'numeric'});
+
+// Make sure we have pattern we expect (may change in the future).
+assertEquals('M/d/y h:mm:ss a', dtf.resolved.pattern);
+
+assertEquals('Sat May 04 1974 12:30:12 GMT-0007 (PDT)',
+ usePDT(String(dtf.v8Parse('5/4/74 12:30:12 pm'))));
+
+// AM/PM were not specified.
+assertEquals(undefined, dtf.v8Parse('5/4/74 12:30:12'));
+
+// Time was not specified.
+assertEquals(undefined, dtf.v8Parse('5/4/74'));
+
+// Month is numeric, so it fails on "May".
+assertEquals(undefined, dtf.v8Parse('May 4th 1974'));
+
+// Wrong date delimiter.
+assertEquals(undefined, dtf.v8Parse('5-4-74 12:30:12 am'));
diff --git a/deps/v8/test/intl/date-format/property-override.js b/deps/v8/test/intl/date-format/property-override.js
new file mode 100644
index 0000000000..a2bc2d9a30
--- /dev/null
+++ b/deps/v8/test/intl/date-format/property-override.js
@@ -0,0 +1,70 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Checks for security holes introduced by Object.property overrides.
+// For example:
+// Object.defineProperty(Array.prototype, 'locale', {
+// set: function(value) {
+// throw new Error('blah');
+// },
+// configurable: true,
+// enumerable: false
+// });
+//
+// would throw in case of (JS) x.locale = 'us' or (C++) x->Set('locale', 'us').
+//
+// Update both date-format.js and date-format.cc so they have the same list of
+// properties.
+
+// First get supported properties.
+// Some of the properties are optional, so we request them.
+var properties = [];
+var options = Intl.DateTimeFormat(
+ 'en-US', {weekday: 'short', era: 'short', year: 'numeric', month: 'short',
+ day: 'numeric', hour: 'numeric', minute: 'numeric',
+ second: 'numeric', timeZoneName: 'short'}).resolvedOptions();
+for (var prop in options) {
+ if (options.hasOwnProperty(prop)) {
+ properties.push(prop);
+ }
+}
+
+var expectedProperties = [
+ 'calendar', 'day', 'era', 'hour12', 'hour', 'locale',
+ 'minute', 'month', 'numberingSystem',
+ 'second', 'timeZone', 'timeZoneName', 'weekday', 'year'
+];
+
+assertEquals(expectedProperties.length, properties.length);
+
+properties.forEach(function(prop) {
+ assertFalse(expectedProperties.indexOf(prop) === -1);
+});
+
+taintProperties(properties);
+
+var locale = Intl.DateTimeFormat().resolvedOptions().locale;
diff --git a/deps/v8/test/intl/date-format/protected-icu-internals.js b/deps/v8/test/intl/date-format/protected-icu-internals.js
new file mode 100644
index 0000000000..140f4b594d
--- /dev/null
+++ b/deps/v8/test/intl/date-format/protected-icu-internals.js
@@ -0,0 +1,49 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Internal object we got from native code should not be writable,
+// configurable or enumerable. One can still change its public properties, but
+// we don't use them to do actual work.
+
+var format = new Intl.DateTimeFormat([]);
+
+// Direct write should fail.
+format.formatter = {'zzz':'some random object'};
+
+assertFalse(format.formatter.hasOwnProperty('zzz'));
+
+// Try redefining the property.
+var didThrow = false;
+try {
+ Object.defineProperty(format, 'formatter', {value: undefined});
+} catch(e) {
+ didThrow = true;
+}
+assertTrue(didThrow);
+
+// Try deleting the property.
+assertFalse(delete format.formatter);
diff --git a/deps/v8/test/intl/date-format/resolved-options-is-method.js b/deps/v8/test/intl/date-format/resolved-options-is-method.js
new file mode 100644
index 0000000000..0c44778384
--- /dev/null
+++ b/deps/v8/test/intl/date-format/resolved-options-is-method.js
@@ -0,0 +1,40 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Test that resolvedOptions is a method, not a property getter and that
+// the result is mutable.
+
+var dtf = new Intl.DateTimeFormat();
+
+var result = dtf.resolvedOptions();
+
+assertTrue(result instanceof Object);
+
+// Result should be mutable.
+result.locale = 'xx';
+
+assertEquals(result.locale, 'xx');
diff --git a/deps/v8/test/intl/date-format/resolved-options.js b/deps/v8/test/intl/date-format/resolved-options.js
new file mode 100644
index 0000000000..707eb07a98
--- /dev/null
+++ b/deps/v8/test/intl/date-format/resolved-options.js
@@ -0,0 +1,107 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Test if resolvedOptions() returns expected fields/values.
+
+// Default (year, month, day) formatter.
+var dtfDefault = Intl.DateTimeFormat('en-US');
+var resolved = dtfDefault.resolvedOptions();
+
+assertTrue(resolved.hasOwnProperty('locale'));
+assertEquals('en-US', resolved.locale);
+assertTrue(resolved.hasOwnProperty('numberingSystem'));
+assertEquals('latn', resolved.numberingSystem);
+assertTrue(resolved.hasOwnProperty('calendar'));
+assertEquals('gregory', resolved.calendar);
+assertTrue(resolved.hasOwnProperty('timeZone'));
+assertEquals(getDefaultTimeZone(), resolved.timeZone);
+// These are in by default.
+assertTrue(resolved.hasOwnProperty('year'));
+assertEquals('numeric', resolved.year);
+assertTrue(resolved.hasOwnProperty('month'));
+assertEquals('numeric', resolved.month);
+assertTrue(resolved.hasOwnProperty('day'));
+assertEquals('numeric', resolved.day);
+// These shouldn't be in by default.
+assertFalse(resolved.hasOwnProperty('era'));
+assertFalse(resolved.hasOwnProperty('timeZoneName'));
+assertFalse(resolved.hasOwnProperty('weekday'));
+assertFalse(resolved.hasOwnProperty('hour12'));
+assertFalse(resolved.hasOwnProperty('hour'));
+assertFalse(resolved.hasOwnProperty('minute'));
+assertFalse(resolved.hasOwnProperty('second'));
+
+// Time formatter.
+var dtfTime = Intl.DateTimeFormat(
+ 'sr-RS', {hour: 'numeric', minute: 'numeric', second: 'numeric'});
+resolved = dtfTime.resolvedOptions();
+
+assertTrue(resolved.hasOwnProperty('locale'));
+assertTrue(resolved.hasOwnProperty('numberingSystem'));
+assertTrue(resolved.hasOwnProperty('calendar'));
+assertTrue(resolved.hasOwnProperty('timeZone'));
+assertTrue(resolved.hasOwnProperty('hour12'));
+assertEquals(false, resolved.hour12);
+assertTrue(resolved.hasOwnProperty('hour'));
+assertEquals('2-digit', resolved.hour);
+assertTrue(resolved.hasOwnProperty('minute'));
+assertEquals('2-digit', resolved.minute);
+assertTrue(resolved.hasOwnProperty('second'));
+assertEquals('2-digit', resolved.second);
+// Didn't ask for them.
+assertFalse(resolved.hasOwnProperty('year'));
+assertFalse(resolved.hasOwnProperty('month'));
+assertFalse(resolved.hasOwnProperty('day'));
+assertFalse(resolved.hasOwnProperty('era'));
+assertFalse(resolved.hasOwnProperty('timeZoneName'));
+assertFalse(resolved.hasOwnProperty('weekday'));
+
+// Full formatter.
+var dtfFull = Intl.DateTimeFormat(
+ 'en-US', {weekday: 'short', era: 'short', year: 'numeric', month: 'short',
+ day: 'numeric', hour: 'numeric', minute: 'numeric',
+ second: 'numeric', timeZoneName: 'short', timeZone: 'UTC'});
+resolved = dtfFull.resolvedOptions();
+
+assertTrue(resolved.hasOwnProperty('locale'));
+assertTrue(resolved.hasOwnProperty('numberingSystem'));
+assertTrue(resolved.hasOwnProperty('calendar'));
+assertTrue(resolved.hasOwnProperty('timeZone'));
+assertTrue(resolved.hasOwnProperty('hour12'));
+assertEquals(true, resolved.hour12);
+assertTrue(resolved.hasOwnProperty('hour'));
+assertTrue(resolved.hasOwnProperty('minute'));
+assertTrue(resolved.hasOwnProperty('second'));
+assertTrue(resolved.hasOwnProperty('year'));
+assertTrue(resolved.hasOwnProperty('month'));
+assertTrue(resolved.hasOwnProperty('day'));
+assertTrue(resolved.hasOwnProperty('era'));
+assertEquals('short', resolved.era);
+assertTrue(resolved.hasOwnProperty('timeZoneName'));
+assertEquals('short', resolved.timeZoneName);
+assertTrue(resolved.hasOwnProperty('weekday'));
+assertEquals('short', resolved.weekday);
diff --git a/deps/v8/test/intl/date-format/timezone.js b/deps/v8/test/intl/date-format/timezone.js
new file mode 100644
index 0000000000..03e25f0574
--- /dev/null
+++ b/deps/v8/test/intl/date-format/timezone.js
@@ -0,0 +1,65 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Tests time zone support.
+
+var df = Intl.DateTimeFormat();
+assertEquals(getDefaultTimeZone(), df.resolvedOptions().timeZone);
+
+df = Intl.DateTimeFormat(undefined, {timeZone: 'UtC'});
+assertEquals('UTC', df.resolvedOptions().timeZone);
+
+df = Intl.DateTimeFormat(undefined, {timeZone: 'gmt'});
+assertEquals('UTC', df.resolvedOptions().timeZone);
+
+df = Intl.DateTimeFormat(undefined, {timeZone: 'America/Los_Angeles'});
+assertEquals('America/Los_Angeles', df.resolvedOptions().timeZone);
+
+df = Intl.DateTimeFormat(undefined, {timeZone: 'Europe/Belgrade'});
+assertEquals('Europe/Belgrade', df.resolvedOptions().timeZone);
+
+// Check Etc/XXX variants. They should work too.
+df = Intl.DateTimeFormat(undefined, {timeZone: 'Etc/UTC'});
+assertEquals('UTC', df.resolvedOptions().timeZone);
+
+df = Intl.DateTimeFormat(undefined, {timeZone: 'Etc/GMT'});
+assertEquals('UTC', df.resolvedOptions().timeZone);
+
+df = Intl.DateTimeFormat(undefined, {timeZone: 'euRope/beLGRade'});
+assertEquals('Europe/Belgrade', df.resolvedOptions().timeZone);
+
+// : + - are not allowed, only / _ are.
+assertThrows('Intl.DateTimeFormat(undefined, {timeZone: \'GMT+07:00\'})');
+assertThrows('Intl.DateTimeFormat(undefined, {timeZone: \'GMT+0700\'})');
+assertThrows('Intl.DateTimeFormat(undefined, {timeZone: \'GMT-05:00\'})');
+assertThrows('Intl.DateTimeFormat(undefined, {timeZone: \'GMT-0500\'})');
+assertThrows('Intl.DateTimeFormat(undefined, {timeZone: \'Etc/GMT+0\'})');
+assertThrows('Intl.DateTimeFormat(undefined, ' +
+ '{timeZone: \'America/Los-Angeles\'})');
+
+// Throws for unsupported time zones.
+assertThrows('Intl.DateTimeFormat(undefined, {timeZone: \'Aurope/Belgrade\'})');
diff --git a/deps/v8/test/intl/date-format/utils.js b/deps/v8/test/intl/date-format/utils.js
new file mode 100644
index 0000000000..535de15e9a
--- /dev/null
+++ b/deps/v8/test/intl/date-format/utils.js
@@ -0,0 +1,36 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Utility methods for date testing.
+
+/**
+ * Returns date with timezone info forced into PDT.
+ */
+function usePDT(dateString) {
+ var removedTZ = dateString.replace(/(\+|-)\d{4}/, '-0007');
+ return removedTZ.replace(/\(.*?\)/, '(PDT)');
+}
diff --git a/deps/v8/test/intl/date-format/wellformed-unsupported-locale.js b/deps/v8/test/intl/date-format/wellformed-unsupported-locale.js
new file mode 100644
index 0000000000..8867ec6442
--- /dev/null
+++ b/deps/v8/test/intl/date-format/wellformed-unsupported-locale.js
@@ -0,0 +1,32 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Passing a well formed but unsupported locale falls back to default.
+
+var dtf = Intl.DateTimeFormat(['xx']);
+
+assertEquals(dtf.resolvedOptions().locale, getDefaultLocale());
diff --git a/deps/v8/test/intl/general/empty-handle.js b/deps/v8/test/intl/general/empty-handle.js
new file mode 100644
index 0000000000..d61896381c
--- /dev/null
+++ b/deps/v8/test/intl/general/empty-handle.js
@@ -0,0 +1,48 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Minimal test case for b/161999.
+// We have to check if ObjectTemplate::NewInstance returned empty handle, which
+// can happen if there was a stack overflow.
+// This test can take some time to fail.
+
+var didThrowRangeError = false;
+try {
+ var X = '})()';
+ function C() { X[C("asd".localeCompare("asdf") < 0)] = C("a"); }
+ var b = C(C(new Date(Number.b, "").getTime()),
+ function() {
+ if (!X.C()) {
+ }
+ }[0].b++);
+} catch (e) {
+ if (e instanceof RangeError) {
+ didThrowRangeError = true;
+ }
+}
+
+assertTrue(didThrowRangeError);
diff --git a/deps/v8/test/intl/general/mapped-locale.js b/deps/v8/test/intl/general/mapped-locale.js
new file mode 100644
index 0000000000..17151b557f
--- /dev/null
+++ b/deps/v8/test/intl/general/mapped-locale.js
@@ -0,0 +1,52 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Make sure that zh locales map properly, i.e. don't map zh-TW to zh.
+
+var nf = Intl.NumberFormat(['zh-TW'], {localeMatcher: 'lookup'});
+assertEquals('zh-TW', nf.resolvedOptions().locale);
+
+var nf = Intl.NumberFormat(['zh-Hant-TW'], {localeMatcher: 'lookup'});
+assertEquals('zh-Hant-TW', nf.resolvedOptions().locale);
+
+var nf = Intl.NumberFormat(['zh-Hant'], {localeMatcher: 'lookup'});
+assertEquals('zh-Hant', nf.resolvedOptions().locale);
+
+nf = Intl.NumberFormat(['zh'], {localeMatcher: 'lookup'});
+assertEquals('zh', nf.resolvedOptions().locale);
+
+nf = Intl.NumberFormat(['zh-CN'], {localeMatcher: 'lookup'});
+assertEquals('zh-CN', nf.resolvedOptions().locale);
+
+nf = Intl.NumberFormat(['zh-Hans-CN'], {localeMatcher: 'lookup'});
+assertEquals('zh-Hans-CN', nf.resolvedOptions().locale);
+
+nf = Intl.NumberFormat(['zh-Hans'], {localeMatcher: 'lookup'});
+assertEquals('zh-Hans', nf.resolvedOptions().locale);
+
+nf = Intl.NumberFormat(['en-US'], {localeMatcher: 'lookup'});
+assertEquals('en-US', nf.resolvedOptions().locale);
diff --git a/deps/v8/test/intl/general/supported-locales-of.js b/deps/v8/test/intl/general/supported-locales-of.js
new file mode 100644
index 0000000000..016b4e9e5d
--- /dev/null
+++ b/deps/v8/test/intl/general/supported-locales-of.js
@@ -0,0 +1,43 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Tests supportedLocalesOf method.
+
+var undef = Intl.DateTimeFormat.supportedLocalesOf();
+assertEquals(undefined, undef[0]);
+
+var empty = Intl.DateTimeFormat.supportedLocalesOf([]);
+assertEquals(undefined, empty[0]);
+
+var strLocale = Intl.DateTimeFormat.supportedLocalesOf('sr');
+assertEquals('sr', strLocale[0]);
+
+var multiLocale =
+ Intl.DateTimeFormat.supportedLocalesOf(['sr-Thai-RS', 'de', 'zh-CN']);
+assertEquals('sr-Thai-RS', multiLocale[0]);
+assertEquals('de', multiLocale[1]);
+assertEquals('zh-CN', multiLocale[2]);
diff --git a/deps/v8/test/intl/general/v8Intl-exists.js b/deps/v8/test/intl/general/v8Intl-exists.js
new file mode 100644
index 0000000000..610767e376
--- /dev/null
+++ b/deps/v8/test/intl/general/v8Intl-exists.js
@@ -0,0 +1,36 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Make sure that v8Intl is mapped into Intl for backward compatibility.
+
+assertEquals(v8Intl, Intl);
+
+// Extra checks.
+assertTrue(v8Intl.hasOwnProperty('DateTimeFormat'));
+assertTrue(v8Intl.hasOwnProperty('NumberFormat'));
+assertTrue(v8Intl.hasOwnProperty('Collator'));
+assertTrue(v8Intl.hasOwnProperty('v8BreakIterator'));
diff --git a/deps/v8/test/intl/intl.status b/deps/v8/test/intl/intl.status
new file mode 100644
index 0000000000..913626b1f4
--- /dev/null
+++ b/deps/v8/test/intl/intl.status
@@ -0,0 +1,41 @@
+# Copyright 2013 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:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+prefix intl
+
+# The following tests use getDefaultLocale() or getDefaultTimezone().
+break-iterator/default-locale: FAIL
+break-iterator/wellformed-unsupported-locale: FAIL
+collator/default-locale: FAIL
+collator/wellformed-unsupported-locale: FAIL
+date-format/default-locale: FAIL
+date-format/resolved-options: FAIL
+date-format/timezone: FAIL
+date-format/wellformed-unsupported-locale: FAIL
+general/v8Intl-exists: FAIL
+number-format/default-locale: FAIL
+number-format/wellformed-unsupported-locale: FAIL
diff --git a/deps/v8/test/intl/number-format/check-digit-ranges.js b/deps/v8/test/intl/number-format/check-digit-ranges.js
new file mode 100644
index 0000000000..322785cbf9
--- /dev/null
+++ b/deps/v8/test/intl/number-format/check-digit-ranges.js
@@ -0,0 +1,56 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Digit ranges are obeyed.
+
+// Invalid ranges
+assertThrows('Intl.NumberFormat(undefined, {minimumIntegerDigits: 0})');
+assertThrows('Intl.NumberFormat(undefined, {minimumIntegerDigits: 22})');
+assertThrows('Intl.NumberFormat(undefined, {minimumIntegerDigits: null})');
+assertThrows('Intl.NumberFormat(undefined, {minimumIntegerDigits: Infinity})');
+assertThrows('Intl.NumberFormat(undefined, {minimumIntegerDigits: -Infinity})');
+assertThrows('Intl.NumberFormat(undefined, {minimumIntegerDigits: x})');
+
+assertThrows('Intl.NumberFormat(undefined, {minimumFractionDigits: -1})');
+assertThrows('Intl.NumberFormat(undefined, {maximumFractionDigits: 21})');
+
+assertThrows('Intl.NumberFormat(undefined, {minimumSignificantDigits: 0})');
+assertThrows('Intl.NumberFormat(undefined, {maximumSignificantDigits: 22})');
+assertThrows('Intl.NumberFormat(undefined, ' +
+ '{minimumSignificantDigits: 5, maximumSignificantDigits: 2})');
+
+// Valid ranges
+assertDoesNotThrow('Intl.NumberFormat(undefined, {minimumIntegerDigits: 1})');
+assertDoesNotThrow('Intl.NumberFormat(undefined, {minimumIntegerDigits: 21})');
+
+assertDoesNotThrow('Intl.NumberFormat(undefined, {minimumFractionDigits: 0})');
+assertDoesNotThrow('Intl.NumberFormat(undefined, {minimumFractionDigits: 20})');
+
+assertDoesNotThrow('Intl.NumberFormat(undefined, ' +
+ '{minimumSignificantDigits: 1})');
+assertDoesNotThrow('Intl.NumberFormat(undefined, ' +
+ '{maximumSignificantDigits: 21})');
diff --git a/deps/v8/test/intl/number-format/default-locale.js b/deps/v8/test/intl/number-format/default-locale.js
new file mode 100644
index 0000000000..0d5e24dd70
--- /dev/null
+++ b/deps/v8/test/intl/number-format/default-locale.js
@@ -0,0 +1,44 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Constructing NumberFormat with no locale arguments or with []
+// creates one with default locale.
+
+var nf = new Intl.NumberFormat([]);
+
+var options = nf.resolvedOptions();
+
+// Check it's none of these first.
+assertFalse(options.locale === 'und');
+assertFalse(options.locale === '');
+assertFalse(options.locale === undefined);
+
+// Then check for equality.
+assertEquals(options.locale, getDefaultLocale());
+
+var nfNone = new Intl.NumberFormat();
+assertEquals(options.locale, nfNone.resolvedOptions().locale);
diff --git a/deps/v8/test/intl/number-format/format-is-bound.js b/deps/v8/test/intl/number-format/format-is-bound.js
new file mode 100644
index 0000000000..b24c2ed0ca
--- /dev/null
+++ b/deps/v8/test/intl/number-format/format-is-bound.js
@@ -0,0 +1,39 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Create default NumberFormat.
+var nf = new Intl.NumberFormat();
+
+// Array we want to iterate, actual numbers are not important.
+var numberArray = [1, 2, 3];
+
+// It shouldn't throw.
+// The format() method should be properly bound to the nf object.
+numberArray.forEach(nf.format);
+
+// Formatting a number should work in a direct call.
+nf.format(12345);
diff --git a/deps/v8/test/intl/number-format/parse-currency.js b/deps/v8/test/intl/number-format/parse-currency.js
new file mode 100644
index 0000000000..c87ffea0d2
--- /dev/null
+++ b/deps/v8/test/intl/number-format/parse-currency.js
@@ -0,0 +1,33 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Currency parsing is not yet supported. We need ICU49 or higher to get
+// it working.
+
+var nf = new Intl.NumberFormat(['en'], {style: 'currency', currency: 'USD'});
+
+assertEquals(undefined, nf.v8Parse('USD 123.43'));
diff --git a/deps/v8/test/intl/number-format/parse-decimal.js b/deps/v8/test/intl/number-format/parse-decimal.js
new file mode 100644
index 0000000000..ea3f8ddf30
--- /dev/null
+++ b/deps/v8/test/intl/number-format/parse-decimal.js
@@ -0,0 +1,39 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+var nf = new Intl.NumberFormat(['en'], {style: 'decimal'});
+
+assertEquals(123.43, nf.v8Parse('123.43'));
+assertEquals(123, nf.v8Parse('123'));
+assertEquals(NaN, nf.v8Parse(NaN));
+assertEquals(12323, nf.v8Parse('123,23'));
+assertEquals(12323.456, nf.v8Parse('123,23.456'));
+assertEquals(12323.456, nf.v8Parse('0000000123,23.456'));
+assertEquals(-12323.456, nf.v8Parse('-123,23.456'));
+
+// Scientific notation gets ignored.
+assertEquals(123.456, nf.v8Parse('123.456e-3'));
diff --git a/deps/v8/test/intl/number-format/parse-invalid-input.js b/deps/v8/test/intl/number-format/parse-invalid-input.js
new file mode 100644
index 0000000000..8c84d0b87e
--- /dev/null
+++ b/deps/v8/test/intl/number-format/parse-invalid-input.js
@@ -0,0 +1,38 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Invalid input is handled properly.
+
+var nf = new Intl.NumberFormat(['en']);
+
+assertEquals(undefined, nf.v8Parse(''));
+assertEquals(undefined, nf.v8Parse('A'));
+assertEquals(undefined, nf.v8Parse(new Date()));
+assertEquals(undefined, nf.v8Parse(undefined));
+assertEquals(undefined, nf.v8Parse(null));
+assertEquals(undefined, nf.v8Parse());
+assertEquals(undefined, nf.v8Parse('Text before 12345'));
diff --git a/deps/v8/test/intl/number-format/parse-percent.js b/deps/v8/test/intl/number-format/parse-percent.js
new file mode 100644
index 0000000000..4964da4ae7
--- /dev/null
+++ b/deps/v8/test/intl/number-format/parse-percent.js
@@ -0,0 +1,36 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+var nf = new Intl.NumberFormat(['en'], {style: 'percent'});
+
+assertEquals(1.2343, nf.v8Parse('123.43%'));
+assertEquals(1.23, nf.v8Parse('123%'));
+assertEquals(NaN, nf.v8Parse(NaN));
+assertEquals(123.23, nf.v8Parse('123,23%'));
+assertEquals(123.23456, nf.v8Parse('123,23.456%'));
+assertEquals(123.23456, nf.v8Parse('0000000123,23.456%'));
+assertEquals(-123.23456, nf.v8Parse('-123,23.456%'));
diff --git a/deps/v8/test/intl/number-format/property-override.js b/deps/v8/test/intl/number-format/property-override.js
new file mode 100644
index 0000000000..1fbe78e080
--- /dev/null
+++ b/deps/v8/test/intl/number-format/property-override.js
@@ -0,0 +1,78 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Checks for security holes introduced by Object.property overrides.
+// For example:
+// Object.defineProperty(Array.prototype, 'locale', {
+// set: function(value) {
+// throw new Error('blah');
+// },
+// configurable: true,
+// enumerable: false
+// });
+//
+// would throw in case of (JS) x.locale = 'us' or (C++) x->Set('locale', 'us').
+//
+// Update both number-format.js and number-format.cc so they have the same
+// list of properties.
+
+// First get supported properties.
+var properties = [];
+// Some properties are optional and won't show up in resolvedOptions if
+// they were not requested - currency, currencyDisplay,
+// minimumSignificantDigits and maximumSignificantDigits - so we request them.
+var options = Intl.NumberFormat(
+ undefined, {style: 'currency', currency: 'USD', currencyDisplay: 'name',
+ minimumSignificantDigits: 1, maximumSignificantDigits: 5}).
+ resolvedOptions();
+for (var prop in options) {
+ if (options.hasOwnProperty(prop)) {
+ properties.push(prop);
+ }
+}
+
+var expectedProperties = [
+ 'style', 'locale', 'numberingSystem',
+ 'currency', 'currencyDisplay', 'useGrouping',
+ 'minimumIntegerDigits', 'minimumFractionDigits',
+ 'maximumFractionDigits', 'minimumSignificantDigits',
+ 'maximumSignificantDigits'
+];
+
+assertEquals(expectedProperties.length, properties.length);
+
+properties.forEach(function(prop) {
+ assertFalse(expectedProperties.indexOf(prop) === -1);
+});
+
+taintProperties(properties);
+
+var locale = Intl.NumberFormat(undefined,
+ {currency: 'USD', currencyDisplay: 'name',
+ minimumIntegerDigits: 2,
+ numberingSystem: 'latn'}).
+ resolvedOptions().locale;
diff --git a/deps/v8/test/intl/number-format/protected-icu-internals.js b/deps/v8/test/intl/number-format/protected-icu-internals.js
new file mode 100644
index 0000000000..fc9b709c82
--- /dev/null
+++ b/deps/v8/test/intl/number-format/protected-icu-internals.js
@@ -0,0 +1,49 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Internal object we got from native code should not be writable,
+// configurable or enumerable. One can still change its public properties, but
+// we don't use them to do actual work.
+
+var format = new Intl.NumberFormat([]);
+
+// Direct write should fail.
+format.formatter = {'zzz':'some random object'};
+
+assertFalse(format.formatter.hasOwnProperty('zzz'));
+
+// Try redefining the property.
+var didThrow = false;
+try {
+ Object.defineProperty(format, 'formatter', {value: undefined});
+} catch(e) {
+ didThrow = true;
+}
+assertTrue(didThrow);
+
+// Try deleting the property.
+assertFalse(delete format.formatter);
diff --git a/deps/v8/test/intl/number-format/resolved-options-is-method.js b/deps/v8/test/intl/number-format/resolved-options-is-method.js
new file mode 100644
index 0000000000..1b56716f79
--- /dev/null
+++ b/deps/v8/test/intl/number-format/resolved-options-is-method.js
@@ -0,0 +1,40 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Test that resolvedOptions is a method, not a property getter and that
+// the result is mutable.
+
+var nf = new Intl.NumberFormat();
+
+var result = nf.resolvedOptions();
+
+assertTrue(result instanceof Object);
+
+// Result should be mutable.
+result.locale = 'xx';
+
+assertEquals(result.locale, 'xx');
diff --git a/deps/v8/test/intl/number-format/wellformed-unsupported-locale.js b/deps/v8/test/intl/number-format/wellformed-unsupported-locale.js
new file mode 100644
index 0000000000..e3fe9cc087
--- /dev/null
+++ b/deps/v8/test/intl/number-format/wellformed-unsupported-locale.js
@@ -0,0 +1,32 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Passing a well formed but unsupported locale falls back to default.
+
+var nf = Intl.NumberFormat(['xx']);
+
+assertEquals(nf.resolvedOptions().locale, getDefaultLocale());
diff --git a/deps/v8/test/intl/overrides/caching.js b/deps/v8/test/intl/overrides/caching.js
new file mode 100644
index 0000000000..5ff3c390e7
--- /dev/null
+++ b/deps/v8/test/intl/overrides/caching.js
@@ -0,0 +1,60 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Performance test for overriden methods. Makes sure that default case
+// is faster (cached) than the general case.
+
+// Default, cached.
+var startTime = new Date();
+for (var i = 0; i < 1000; i++) {
+ 'a'.localeCompare('c');
+}
+var endTime = new Date();
+var cachedTime = endTime.getTime() - startTime.getTime();
+
+// Not cached.
+startTime = new Date();
+for (var i = 0; i < 1000; i++) {
+ 'a'.localeCompare('c', 'sr');
+}
+endTime = new Date();
+var nonCachedTime = endTime.getTime() - startTime.getTime();
+
+// Using collator. Faster than default, but not by much.
+var collator = Intl.Collator();
+startTime = new Date();
+for (var i = 0; i < 1000; i++) {
+ collator.compare('a', 'c');
+}
+endTime = new Date();
+collatorTime = endTime.getTime() - startTime.getTime();
+
+// Difference is within 20%.
+assertTrue(collatorTime < cachedTime);
+// Non-cached time is much slower, measured to 12.5 times.
+assertTrue(cachedTime < nonCachedTime);
+
diff --git a/deps/v8/test/intl/overrides/date.js b/deps/v8/test/intl/overrides/date.js
new file mode 100644
index 0000000000..a35d63d131
--- /dev/null
+++ b/deps/v8/test/intl/overrides/date.js
@@ -0,0 +1,65 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Tests Date.prototype.toLocaleXXXString method overrides.
+
+var date = new Date();
+
+
+// Defaults for toLocaleXXXString
+var dtfDate = new Intl.DateTimeFormat();
+var dtfTime = new Intl.DateTimeFormat(
+ [], {hour: 'numeric', minute: 'numeric', second: 'numeric'});
+var dtfAll = new Intl.DateTimeFormat(
+ [], {year: 'numeric', month: 'numeric', day: 'numeric',
+ hour: 'numeric', minute: 'numeric', second: 'numeric'});
+assertEquals(dtfAll.format(date), date.toLocaleString());
+assertEquals(dtfDate.format(date), date.toLocaleDateString());
+assertEquals(dtfTime.format(date), date.toLocaleTimeString());
+
+
+// Specify locale, default options for toLocaleXXXString
+var locale = ['sr'];
+dtfDate = new Intl.DateTimeFormat(locale);
+dtfTime = new Intl.DateTimeFormat(
+ locale, {hour: 'numeric', minute: 'numeric', second: 'numeric'});
+dtfAll = new Intl.DateTimeFormat(
+ locale, {year: 'numeric', month: 'numeric', day: 'numeric',
+ hour: 'numeric', minute: 'numeric', second: 'numeric'});
+assertEquals(dtfAll.format(date), date.toLocaleString(locale));
+assertEquals(dtfDate.format(date), date.toLocaleDateString(locale));
+assertEquals(dtfTime.format(date), date.toLocaleTimeString(locale));
+
+
+// Specify locale and options for toLocaleXXXString
+locale = ['ko'];
+var options = {year: 'numeric', month: 'long', day: 'numeric',
+ hour: 'numeric', minute: '2-digit', second: 'numeric'};
+var dtf = new Intl.DateTimeFormat(locale, options);
+assertEquals(dtf.format(date), date.toLocaleString(locale, options));
+assertEquals(dtf.format(date), date.toLocaleDateString(locale, options));
+assertEquals(dtf.format(date), date.toLocaleTimeString(locale, options));
diff --git a/deps/v8/test/intl/overrides/number.js b/deps/v8/test/intl/overrides/number.js
new file mode 100644
index 0000000000..11f41fd7ec
--- /dev/null
+++ b/deps/v8/test/intl/overrides/number.js
@@ -0,0 +1,53 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Tests Number.prototype.toLocaleString method override.
+
+var integer = 123456790;
+var float = 1234567890.123434;
+
+
+// Defaults
+var nf = new Intl.NumberFormat();
+assertEquals(nf.format(integer), integer.toLocaleString());
+assertEquals(nf.format(float), float.toLocaleString());
+
+
+// Specify locale, default options for toLocaleString method.
+var locale = ['sr'];
+nf = new Intl.NumberFormat(locale);
+assertEquals(nf.format(integer), integer.toLocaleString(locale));
+assertEquals(nf.format(float), float.toLocaleString(locale));
+
+
+// Specify locale and options for toLocaleString method.
+locale = ['ko'];
+var options = {minimumIntegerDigits: 8, useGroupingSeparator: true,
+ minimumFractionalDigits: 1, maximumFractionalDigits: 2};
+nf = new Intl.NumberFormat(locale, options);
+assertEquals(nf.format(integer), integer.toLocaleString(locale, options));
+assertEquals(nf.format(float), float.toLocaleString(locale, options));
diff --git a/deps/v8/test/intl/overrides/security.js b/deps/v8/test/intl/overrides/security.js
new file mode 100644
index 0000000000..e012753fa2
--- /dev/null
+++ b/deps/v8/test/intl/overrides/security.js
@@ -0,0 +1,50 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Test that we always use original Intl.Constructors for toLocaleString calls.
+
+function throwError() {
+ throw new Error('Malicious method invoked.');
+}
+
+Intl.Collator = Intl.NumberFormat = Intl.DateTimeFormat = throwError;
+
+Intl.Collator.prototype.compare = throwError;
+Intl.NumberFormat.prototype.format = throwError;
+Intl.DateTimeFormat.prototype.format = throwError;
+
+// Make sure constructors actually throw now.
+assertThrows('new Intl.Collator()');
+assertThrows('new Intl.NumberFormat()');
+assertThrows('new Intl.DateTimeFormat()');
+
+// None of these should throw.
+assertDoesNotThrow('new Date().toLocaleString()');
+assertDoesNotThrow('new Date().toLocaleDateString()');
+assertDoesNotThrow('new Date().toLocaleTimeString()');
+assertDoesNotThrow('new Number(12345.412).toLocaleString()');
+assertDoesNotThrow('new String(\'abc\').localeCompare(\'bcd\')');
diff --git a/deps/v8/test/intl/overrides/string.js b/deps/v8/test/intl/overrides/string.js
new file mode 100644
index 0000000000..9e9da4da1d
--- /dev/null
+++ b/deps/v8/test/intl/overrides/string.js
@@ -0,0 +1,69 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Tests String.prototype.localeCompare method override.
+
+var testData = {
+ 'en': ['blood', 'bull', 'ascend', 'zed', 'down'],
+ 'sr': ['новине', 'ограда', 'жирафа', 'Никола', 'Андрија', 'Стара Планина',
+ 'џак', 'алав', 'ћук', 'чука'],
+ 'de': ['März', 'Fuße', 'FUSSE', 'Fluße', 'Flusse', 'flusse', 'fluße',
+ 'flüße', 'flüsse']
+};
+
+
+function testArrays(locale) {
+ var data;
+ if (locale === undefined) {
+ data = testData['en'];
+ locale = [];
+ } else {
+ data = testData[locale];
+ }
+
+ var collator = new Intl.Collator(locale, options);
+ var collatorResult = data.sort(collator.compare);
+ var localeCompareResult = data.sort(function(a, b) {
+ return a.localeCompare(b, locale, options)
+ });
+ assertEquals(collatorResult, localeCompareResult);
+}
+
+
+// Defaults
+var options = undefined;
+testArrays();
+
+
+// Specify locale, keep default options.
+options = undefined;
+Object.keys(testData).forEach(testArrays);
+
+
+// Specify locale and options.
+options = {caseFirst: 'upper'};
+Object.keys(testData).forEach(testArrays);
diff --git a/deps/v8/test/intl/overrides/webkit-tests.js b/deps/v8/test/intl/overrides/webkit-tests.js
new file mode 100644
index 0000000000..1429de6217
--- /dev/null
+++ b/deps/v8/test/intl/overrides/webkit-tests.js
@@ -0,0 +1,32 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Makes sure we don't break affected WebKit tests.
+
+// Handles fast/js/string-prototype-properties.html
+assertThrows('String.prototype.localeCompare.call(undefined, \'1224\')');
+assertEquals(0, String.prototype.localeCompare.call(1224, '1224'));
diff --git a/deps/v8/test/intl/testcfg.py b/deps/v8/test/intl/testcfg.py
new file mode 100644
index 0000000000..d25683bed2
--- /dev/null
+++ b/deps/v8/test/intl/testcfg.py
@@ -0,0 +1,72 @@
+# Copyright 2013 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:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import os
+
+from testrunner.local import testsuite
+from testrunner.objects import testcase
+
+
+class IntlTestSuite(testsuite.TestSuite):
+
+ def __init__(self, name, root):
+ super(IntlTestSuite, self).__init__(name, root)
+
+ def ListTests(self, context):
+ tests = []
+ for dirname, dirs, files in os.walk(self.root):
+ for dotted in [x for x in dirs if x.startswith('.')]:
+ dirs.remove(dotted)
+ dirs.sort()
+ files.sort()
+ for filename in files:
+ if (filename.endswith(".js") and filename != "assert.js" and
+ filename != "utils.js"):
+ testname = os.path.join(dirname[len(self.root) + 1:], filename[:-3])
+ test = testcase.TestCase(self, testname)
+ tests.append(test)
+ return tests
+
+ def GetFlagsForTestCase(self, testcase, context):
+ flags = [] + context.mode_flags
+
+ files = []
+ files.append(os.path.join(self.root, "assert.js"))
+ files.append(os.path.join(self.root, "utils.js"))
+ files.append(os.path.join(self.root, "date-format", "utils.js"))
+ files.append(os.path.join(self.root, testcase.path + self.suffix()))
+
+ flags += files
+ if context.isolates:
+ flags.append("--isolate")
+ flags += files
+
+ return testcase.flags + flags
+
+
+def GetSuite(name, root):
+ return IntlTestSuite(name, root)
diff --git a/deps/v8/test/intl/utils.js b/deps/v8/test/intl/utils.js
new file mode 100644
index 0000000000..917359077d
--- /dev/null
+++ b/deps/v8/test/intl/utils.js
@@ -0,0 +1,40 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/**
+ * Taints properties on Object.prototype so we can find security issues.
+ */
+function taintProperties(properties) {
+ properties.forEach(function(property) {
+ Object.defineProperty(Object.prototype, property, {
+ set: function(value) {
+ throw new Error('Property ' + property + ' is compromised. ' +
+ 'Setting value: ' + value);
+ }
+ });
+ });
+}
diff --git a/deps/v8/test/mjsunit/allocation-folding.js b/deps/v8/test/mjsunit/allocation-folding.js
new file mode 100644
index 0000000000..a730bf12a0
--- /dev/null
+++ b/deps/v8/test/mjsunit/allocation-folding.js
@@ -0,0 +1,46 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --allow-natives-syntax --nouse-osr
+function f() {
+ var elem1 = [1,2,3];
+ for (var i=0; i < 100000; i++) {
+ var bar = [1];
+ }
+ var elem2 = [1,2,3];
+ return elem2;
+}
+
+f(); f(); f();
+%OptimizeFunctionOnNextCall(f);
+var result = f();
+
+for (var i=0; i < 100000; i++) {
+ var bar = [1];
+}
+
+assertEquals(result[2], 3);
diff --git a/deps/v8/test/mjsunit/allocation-site-info.js b/deps/v8/test/mjsunit/allocation-site-info.js
index 86c28aac63..5f6817b6d3 100644
--- a/deps/v8/test/mjsunit/allocation-site-info.js
+++ b/deps/v8/test/mjsunit/allocation-site-info.js
@@ -133,9 +133,7 @@ if (support_smi_only_arrays) {
obj = fastliteralcase(get_standard_literal(), 1.5);
assertKind(elements_kind.fast_double, obj);
obj = fastliteralcase(get_standard_literal(), 2);
- // TODO(hpayer): bring the following assert back as soon as allocation
- // sites work again for fast literals
- //assertKind(elements_kind.fast_double, obj);
+ assertKind(elements_kind.fast_double, obj);
// The test below is in a loop because arrays that live
// at global scope without the chance of being recreated
@@ -175,9 +173,21 @@ if (support_smi_only_arrays) {
obj = fastliteralcase_smifast("carter");
assertKind(elements_kind.fast, obj);
obj = fastliteralcase_smifast(2);
- // TODO(hpayer): bring the following assert back as soon as allocation
- // sites work again for fast literals
- //assertKind(elements_kind.fast, obj);
+ assertKind(elements_kind.fast, obj);
+
+ // Case: make sure transitions from packed to holey are tracked
+ function fastliteralcase_smiholey(index, value) {
+ var literal = [1, 2, 3, 4];
+ literal[index] = value;
+ return literal;
+ }
+
+ obj = fastliteralcase_smiholey(5, 1);
+ assertKind(elements_kind.fast_smi_only, obj);
+ assertHoley(obj);
+ obj = fastliteralcase_smiholey(0, 1);
+ assertKind(elements_kind.fast_smi_only, obj);
+ assertHoley(obj);
function newarraycase_smidouble(value) {
var a = new Array();
@@ -272,6 +282,32 @@ if (support_smi_only_arrays) {
obj = newarraycase_list_smiobj(2);
assertKind(elements_kind.fast, obj);
+ // Case: array constructor calls with out of date feedback.
+ // The boilerplate should incorporate all feedback, but the input array
+ // should be minimally transitioned based on immediate need.
+ (function() {
+ function foo(i) {
+ // We have two cases, one for literals one for constructed arrays.
+ var a = (i == 0)
+ ? [1, 2, 3]
+ : new Array(1, 2, 3);
+ return a;
+ }
+
+ for (i = 0; i < 2; i++) {
+ a = foo(i);
+ b = foo(i);
+ b[5] = 1; // boilerplate goes holey
+ assertHoley(foo(i));
+ a[0] = 3.5; // boilerplate goes holey double
+ assertKind(elements_kind.fast_double, a);
+ assertNotHoley(a);
+ c = foo(i);
+ assertKind(elements_kind.fast_double, c);
+ assertHoley(c);
+ }
+ })();
+
function newarraycase_onearg(len, value) {
var a = new Array(len);
a[0] = value;
@@ -301,17 +337,34 @@ if (support_smi_only_arrays) {
assertTrue(new type(1,2,3) instanceof type);
}
+ function instanceof_check2(type) {
+ assertTrue(new type() instanceof type);
+ assertTrue(new type(5) instanceof type);
+ assertTrue(new type(1,2,3) instanceof type);
+ }
+
var realmBArray = Realm.eval(realmB, "Array");
instanceof_check(Array);
instanceof_check(realmBArray);
+
+ // instanceof_check2 is here because the call site goes through a state.
+ // Since instanceof_check(Array) was first called with the current context
+ // Array function, it went from (uninit->Array) then (Array->megamorphic).
+ // We'll get a different state traversal if we start with realmBArray.
+ // It'll go (uninit->realmBArray) then (realmBArray->megamorphic). Recognize
+ // that state "Array" implies an AllocationSite is present, and code is
+ // configured to use it.
+ instanceof_check2(realmBArray);
+ instanceof_check2(Array);
+
%OptimizeFunctionOnNextCall(instanceof_check);
// No de-opt will occur because HCallNewArray wasn't selected, on account of
// the call site not being monomorphic to Array.
instanceof_check(Array);
- assertTrue(2 != %GetOptimizationStatus(instanceof_check));
+ assertOptimized(instanceof_check);
instanceof_check(realmBArray);
- assertTrue(2 != %GetOptimizationStatus(instanceof_check));
+ assertOptimized(instanceof_check);
// Try to optimize again, but first clear all type feedback, and allow it
// to be monomorphic on first call. Only after crankshafting do we introduce
@@ -322,8 +375,8 @@ if (support_smi_only_arrays) {
instanceof_check(Array);
%OptimizeFunctionOnNextCall(instanceof_check);
instanceof_check(Array);
- assertTrue(2 != %GetOptimizationStatus(instanceof_check));
+ assertOptimized(instanceof_check);
instanceof_check(realmBArray);
- assertTrue(1 != %GetOptimizationStatus(instanceof_check));
+ assertUnoptimized(instanceof_check);
}
diff --git a/deps/v8/test/mjsunit/array-bounds-check-removal.js b/deps/v8/test/mjsunit/array-bounds-check-removal.js
index 8ed7901d43..7b089eed3d 100644
--- a/deps/v8/test/mjsunit/array-bounds-check-removal.js
+++ b/deps/v8/test/mjsunit/array-bounds-check-removal.js
@@ -105,7 +105,7 @@ test_base(dictionary_map_array, 5, false);
test_base(dictionary_map_array, 6, false);
%OptimizeFunctionOnNextCall(test_base);
test_base(dictionary_map_array, -2, true);
-assertTrue(%GetOptimizationStatus(test_base) != 1);
+assertUnoptimized(test_base);
// Forget about the dictionary_map_array's map.
%ClearFunctionTypeFeedback(test_base);
@@ -116,7 +116,7 @@ test_base(a, 5, false);
test_base(a, 6, false);
%OptimizeFunctionOnNextCall(test_base);
test_base(a, 2048, true);
-assertTrue(%GetOptimizationStatus(test_base) != 1);
+assertUnoptimized(test_base);
function test_minus(base,cond) {
a[base - 1] = 1;
@@ -173,7 +173,7 @@ short_test(short_a, 50);
%OptimizeFunctionOnNextCall(short_test);
short_a.length = 10;
short_test(short_a, 0);
-assertTrue(%GetOptimizationStatus(short_test) != 1);
+assertUnoptimized(test_base);
// A test for when we would modify a phi index.
diff --git a/deps/v8/test/mjsunit/array-constructor-feedback.js b/deps/v8/test/mjsunit/array-constructor-feedback.js
index e29e769465..72ff12c08f 100644
--- a/deps/v8/test/mjsunit/array-constructor-feedback.js
+++ b/deps/v8/test/mjsunit/array-constructor-feedback.js
@@ -35,6 +35,11 @@
// in this test case. Depending on whether smi-only arrays are actually
// enabled, this test takes the appropriate code path to check smi-only arrays.
+// Reset the GC stress mode to be off. Needed because AllocationMementos only
+// live for one gc, so a gc that happens in certain fragile areas of the test
+// can break assumptions.
+%SetFlags("--gc-interval=-1")
+
// support_smi_only_arrays = %HasFastSmiElements(new Array(1,2,3,4,5,6,7,8));
support_smi_only_arrays = true;
@@ -115,10 +120,10 @@ if (support_smi_only_arrays) {
%OptimizeFunctionOnNextCall(bar0);
b = bar0(Array);
assertKind(elements_kind.fast_double, b);
- assertTrue(2 != %GetOptimizationStatus(bar0));
+ assertOptimized(bar0);
// bar0 should deopt
b = bar0(Object);
- assertTrue(1 != %GetOptimizationStatus(bar0));
+ assertUnoptimized(bar0)
// When it's re-optimized, we should call through the full stub
bar0(Array);
%OptimizeFunctionOnNextCall(bar0);
@@ -126,7 +131,7 @@ if (support_smi_only_arrays) {
// We also lost our ability to record kind feedback, as the site
// is megamorphic now.
assertKind(elements_kind.fast_smi_only, b);
- assertTrue(2 != %GetOptimizationStatus(bar0));
+ assertOptimized(bar0);
b[0] = 3.5;
c = bar0(Array);
assertKind(elements_kind.fast_smi_only, c);
@@ -146,15 +151,15 @@ if (support_smi_only_arrays) {
%OptimizeFunctionOnNextCall(bar);
a = bar(10);
assertKind(elements_kind.fast, a);
- assertTrue(2 != %GetOptimizationStatus(bar));
+ assertOptimized(bar);
// The stub bails out, but the method call should be fine.
a = bar(100000);
- assertTrue(2 != %GetOptimizationStatus(bar));
+ assertOptimized(bar);
assertKind(elements_kind.dictionary, a);
// If the argument isn't a smi, it bails out as well
a = bar("oops");
- assertTrue(2 != %GetOptimizationStatus(bar));
+ assertOptimized(bar);
assertKind(elements_kind.fast, a);
function barn(one, two, three) {
@@ -165,11 +170,11 @@ if (support_smi_only_arrays) {
barn(1, 2, 3);
%OptimizeFunctionOnNextCall(barn);
barn(1, 2, 3);
- assertTrue(2 != %GetOptimizationStatus(barn));
+ assertOptimized(barn);
a = barn(1, "oops", 3);
// The stub should bail out but the method should remain optimized.
assertKind(elements_kind.fast, a);
- assertTrue(2 != %GetOptimizationStatus(barn));
+ assertOptimized(barn);
})();
@@ -186,12 +191,12 @@ if (support_smi_only_arrays) {
b = bar();
// This only makes sense to test if we allow crankshafting
if (4 != %GetOptimizationStatus(bar)) {
- assertTrue(2 != %GetOptimizationStatus(bar));
+ assertOptimized(bar);
%DebugPrint(3);
b[0] = 3.5;
c = bar();
assertKind(elements_kind.fast_smi_only, c);
- assertTrue(2 != %GetOptimizationStatus(bar));
+ assertOptimized(bar);
}
})();
diff --git a/deps/v8/test/mjsunit/array-feedback.js b/deps/v8/test/mjsunit/array-feedback.js
index d1b3062eb0..6b1cbb3f5f 100644
--- a/deps/v8/test/mjsunit/array-feedback.js
+++ b/deps/v8/test/mjsunit/array-feedback.js
@@ -35,6 +35,11 @@
// in this test case. Depending on whether smi-only arrays are actually
// enabled, this test takes the appropriate code path to check smi-only arrays.
+// Reset the GC stress mode to be off. Needed because AllocationMementos only
+// live for one gc, so a gc that happens in certain fragile areas of the test
+// can break assumptions.
+%SetFlags("--gc-interval=-1")
+
// support_smi_only_arrays = %HasFastSmiElements(new Array(1,2,3,4,5,6,7,8));
support_smi_only_arrays = true;
@@ -187,7 +192,7 @@ if (support_smi_only_arrays) {
b[0] = 3.5;
c = create0();
assertKind(elements_kind.fast_double, c);
- assertTrue(2 != %GetOptimizationStatus(create0));
+ assertOptimized(create0);
}
})();
diff --git a/deps/v8/test/mjsunit/array-literal-feedback.js b/deps/v8/test/mjsunit/array-literal-feedback.js
index 8cc617e93f..3378394d90 100644
--- a/deps/v8/test/mjsunit/array-literal-feedback.js
+++ b/deps/v8/test/mjsunit/array-literal-feedback.js
@@ -55,7 +55,7 @@ if (support_smi_only_arrays) {
get_literal(3);
%OptimizeFunctionOnNextCall(get_literal);
a = get_literal(3);
- assertTrue(2 != %GetOptimizationStatus(get_literal));
+ assertOptimized(get_literal);
assertTrue(%HasFastSmiElements(a));
a[0] = 3.5;
@@ -64,12 +64,12 @@ if (support_smi_only_arrays) {
b = get_literal(3);
assertTrue(%HasFastDoubleElements(b));
assertEquals([1, 2, 3], b);
- assertTrue(1 != %GetOptimizationStatus(get_literal));
+ assertUnoptimized(get_literal);
// Optimize again
get_literal(3);
%OptimizeFunctionOnNextCall(get_literal);
b = get_literal(3);
assertTrue(%HasFastDoubleElements(b));
- assertTrue(2 != %GetOptimizationStatus(get_literal));
+ assertOptimized(get_literal);
}
diff --git a/deps/v8/test/mjsunit/array-literal-transitions.js b/deps/v8/test/mjsunit/array-literal-transitions.js
index d4c0c305fc..fab45ed720 100644
--- a/deps/v8/test/mjsunit/array-literal-transitions.js
+++ b/deps/v8/test/mjsunit/array-literal-transitions.js
@@ -26,7 +26,6 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --smi-only-arrays --expose-gc
-// Flags: --noparallel-recompilation
// Test element kind of objects.
// Since --smi-only-arrays affects builtins, its default setting at compile
@@ -144,11 +143,11 @@ if (support_smi_only_arrays) {
deopt_array(false);
%OptimizeFunctionOnNextCall(deopt_array);
var array = deopt_array(false);
- assertTrue(2 != %GetOptimizationStatus(deopt_array));
+ assertOptimized(deopt_array);
deopt_array(true);
- assertTrue(2 != %GetOptimizationStatus(deopt_array));
+ assertOptimized(deopt_array);
array = deopt_array(false);
- assertTrue(2 != %GetOptimizationStatus(deopt_array));
+ assertOptimized(deopt_array);
// Check that unexpected changes in the objects stored into the boilerplate
// also force a deopt.
@@ -166,13 +165,13 @@ if (support_smi_only_arrays) {
%OptimizeFunctionOnNextCall(deopt_array_literal_all_smis);
array = deopt_array_literal_all_smis(5);
array = deopt_array_literal_all_smis(6);
- assertTrue(2 != %GetOptimizationStatus(deopt_array_literal_all_smis));
+ assertOptimized(deopt_array_literal_all_smis);
assertEquals(0, array[0]);
assertEquals(1, array[1]);
assertEquals(6, array[2]);
array = deopt_array_literal_all_smis(.5);
- assertTrue(1 != %GetOptimizationStatus(deopt_array_literal_all_smis));
+ assertUnoptimized(deopt_array_literal_all_smis);
assertEquals(0, array[0]);
assertEquals(1, array[1]);
assertEquals(.5, array[2]);
@@ -191,14 +190,14 @@ if (support_smi_only_arrays) {
%OptimizeFunctionOnNextCall(deopt_array_literal_all_doubles);
array = deopt_array_literal_all_doubles(5);
array = deopt_array_literal_all_doubles(6);
- assertTrue(2 != %GetOptimizationStatus(deopt_array_literal_all_doubles));
+ assertOptimized(deopt_array_literal_all_doubles);
assertEquals(0.5, array[0]);
assertEquals(1, array[1]);
assertEquals(6, array[2]);
var foo = new Object();
array = deopt_array_literal_all_doubles(foo);
- assertTrue(1 != %GetOptimizationStatus(deopt_array_literal_all_doubles));
+ assertUnoptimized(deopt_array_literal_all_doubles);
assertEquals(0.5, array[0]);
assertEquals(1, array[1]);
assertEquals(foo, array[2]);
@@ -207,6 +206,6 @@ if (support_smi_only_arrays) {
(function literals_after_osr() {
var color = [0];
// Trigger OSR.
- while (%GetOptimizationStatus(literals_after_osr) == 2) {}
+ while (%GetOptimizationStatus(literals_after_osr, "no sync") == 2) {}
return [color[0]];
})();
diff --git a/deps/v8/test/mjsunit/array-natives-elements.js b/deps/v8/test/mjsunit/array-natives-elements.js
index b3a7141096..04c2f73d7e 100644
--- a/deps/v8/test/mjsunit/array-natives-elements.js
+++ b/deps/v8/test/mjsunit/array-natives-elements.js
@@ -26,7 +26,6 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --smi-only-arrays
-// Flags: --noparallel-recompilation
// Flags: --notrack-allocation-sites
// Test element kind of objects.
diff --git a/deps/v8/test/mjsunit/assert-opt-and-deopt.js b/deps/v8/test/mjsunit/assert-opt-and-deopt.js
index afba963fc7..bfd2f3f489 100644
--- a/deps/v8/test/mjsunit/assert-opt-and-deopt.js
+++ b/deps/v8/test/mjsunit/assert-opt-and-deopt.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --noparallel-recompilation
+// Flags: --allow-natives-syntax
if (%IsParallelRecompilationSupported()) {
print("Parallel recompilation is turned on after all. Skipping this test.");
diff --git a/deps/v8/test/mjsunit/bugs/bug-2758.js b/deps/v8/test/mjsunit/bugs/bug-2758.js
new file mode 100644
index 0000000000..ee78844400
--- /dev/null
+++ b/deps/v8/test/mjsunit/bugs/bug-2758.js
@@ -0,0 +1,49 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --allow-natives-syntax
+
+var functions = [
+ function() { var f = [].concat; f() },
+ function() { var f = [].push; f() },
+ function() { var f = [].shift; f() },
+ function() { (0, [].concat)() },
+ function() { (0, [].push)() },
+ function() { (0, [].shift)() }
+]
+
+for (var i = 0; i < 5; ++i) {
+ for (var j in functions) {
+ print(functions[i])
+ assertThrows(functions[j], TypeError)
+ }
+
+ if (i === 3) {
+ for (var j in functions)
+ %OptimizeFunctionOnNextCall(functions[j]);
+ }
+}
diff --git a/deps/v8/test/mjsunit/compiler/inline-arguments.js b/deps/v8/test/mjsunit/compiler/inline-arguments.js
index 75d01b5df3..1337ab237a 100644
--- a/deps/v8/test/mjsunit/compiler/inline-arguments.js
+++ b/deps/v8/test/mjsunit/compiler/inline-arguments.js
@@ -115,9 +115,9 @@ F4(1);
})();
// Test arguments access from the inlined function.
+%NeverOptimizeFunction(uninlinable);
function uninlinable(v) {
assertEquals(0, v);
- try { } catch (e) { }
return 0;
}
diff --git a/deps/v8/test/mjsunit/compiler/minus-zero.js b/deps/v8/test/mjsunit/compiler/minus-zero.js
new file mode 100644
index 0000000000..6efceb54e3
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/minus-zero.js
@@ -0,0 +1,37 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --allow-natives-syntax
+
+function add(x, y) {
+ return x + y;
+}
+
+assertEquals(0, add(0, 0));
+assertEquals(0, add(0, 0));
+%OptimizeFunctionOnNextCall(add);
+assertEquals(-0, add(-0, -0));
diff --git a/deps/v8/test/mjsunit/compiler/parallel-proto-change.js b/deps/v8/test/mjsunit/compiler/parallel-proto-change.js
index 2392a37c95..25ea3b59df 100644
--- a/deps/v8/test/mjsunit/compiler/parallel-proto-change.js
+++ b/deps/v8/test/mjsunit/compiler/parallel-proto-change.js
@@ -33,10 +33,6 @@ if (!%IsParallelRecompilationSupported()) {
quit();
}
-function assertUnoptimized(fun) {
- assertTrue(%GetOptimizationStatus(fun) != 1);
-}
-
function f(foo) { return foo.bar(); }
var o = {};
@@ -45,11 +41,14 @@ o.__proto__ = { __proto__: { bar: function() { return 1; } } };
assertEquals(1, f(o));
assertEquals(1, f(o));
+// Mark for parallel optimization.
%OptimizeFunctionOnNextCall(f, "parallel");
-assertEquals(1, f(o)); // Trigger optimization.
-assertUnoptimized(f); // Optimization not yet done.
+// Trigger optimization in the parallel thread.
+assertEquals(1, f(o));
+// While parallel recompilation is running, optimization not yet done.
+assertUnoptimized(f, "no sync");
// Change the prototype chain during optimization to trigger map invalidation.
o.__proto__.__proto__ = { bar: function() { return 2; } };
-%CompleteOptimization(f); // Conclude optimization with...
-assertUnoptimized(f); // ... bailing out due to map dependency.
+// Optimization eventually bails out due to map dependency.
+assertUnoptimized(f, "sync");
assertEquals(2, f(o));
diff --git a/deps/v8/test/mjsunit/compiler/phi-representations.js b/deps/v8/test/mjsunit/compiler/phi-representations.js
new file mode 100644
index 0000000000..6d11bb0d8e
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/phi-representations.js
@@ -0,0 +1,56 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --allow-natives-syntax
+
+function ar() {
+ var r = undefined;
+ var f = 1;
+ while (f--) {
+ r = (typeof r === 'undefined') ? 0.1 : r;
+ };
+ return (r - r);
+}
+
+assertEquals(0, ar());
+assertEquals(0, ar());
+%OptimizeFunctionOnNextCall(ar);
+assertEquals(0, ar());
+
+function ar2() {
+ var r = undefined;
+ var f = 1;
+ while (f--) {
+ r = r === undefined ? 0.1 : r;
+ };
+ return (r - r);
+}
+
+assertEquals(0, ar2());
+assertEquals(0, ar2());
+%OptimizeFunctionOnNextCall(ar2);
+assertEquals(0, ar2());
diff --git a/deps/v8/test/mjsunit/constant-folding-2.js b/deps/v8/test/mjsunit/constant-folding-2.js
index 4c50e30d54..9e6b2c6306 100644
--- a/deps/v8/test/mjsunit/constant-folding-2.js
+++ b/deps/v8/test/mjsunit/constant-folding-2.js
@@ -34,7 +34,7 @@ function test(f) {
%OptimizeFunctionOnNextCall(f);
f();
// Assert that there has been no deopt.
- assertTrue(%GetOptimizationStatus(f) != 2);
+ assertOptimized(f);
}
test(function add() {
diff --git a/deps/v8/test/mjsunit/count-based-osr.js b/deps/v8/test/mjsunit/count-based-osr.js
index fbff91e4a2..5ce4dc5cc4 100644
--- a/deps/v8/test/mjsunit/count-based-osr.js
+++ b/deps/v8/test/mjsunit/count-based-osr.js
@@ -26,14 +26,14 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --count-based-interrupts --interrupt-budget=10 --weighted-back-edges
-// Flags: --allow-natives-syntax --noparallel-recompilation
+// Flags: --allow-natives-syntax
// Test that OSR works properly when using count-based interrupting/profiling.
function osr_this() {
var a = 1;
// Trigger OSR.
- while (%GetOptimizationStatus(osr_this) == 2) {}
+ while (%GetOptimizationStatus(osr_this, "no sync") == 2) {}
return a;
}
assertEquals(1, osr_this());
diff --git a/deps/v8/test/mjsunit/date.js b/deps/v8/test/mjsunit/date.js
index a1b7871d60..3d72032ab8 100644
--- a/deps/v8/test/mjsunit/date.js
+++ b/deps/v8/test/mjsunit/date.js
@@ -333,11 +333,10 @@ date.getTime();
date.getTime();
%OptimizeFunctionOnNextCall(Date.prototype.getTime);
assertThrows(function() { Date.prototype.getTime.call(""); }, TypeError);
-assertTrue(%GetOptimizationStatus(Date.prototype.getTime) != 1);
+assertUnoptimized(Date.prototype.getTime);
date.getYear();
date.getYear();
%OptimizeFunctionOnNextCall(Date.prototype.getYear);
assertThrows(function() { Date.prototype.getYear.call(""); }, TypeError);
-opt_status = %GetOptimizationStatus(Date.prototype.getYear);
-assertTrue(%GetOptimizationStatus(Date.prototype.getTime) != 1);
+assertUnoptimized(Date.prototype.getYear);
diff --git a/deps/v8/test/mjsunit/debug-break-inline.js b/deps/v8/test/mjsunit/debug-break-inline.js
index 464cb73637..4418fa8d1b 100644
--- a/deps/v8/test/mjsunit/debug-break-inline.js
+++ b/deps/v8/test/mjsunit/debug-break-inline.js
@@ -26,7 +26,6 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --expose-debug-as debug --allow-natives-syntax
-// Flags: --noparallel-recompilation
// This test tests that deoptimization due to debug breaks works for
// inlined functions where the full-code is generated before the
diff --git a/deps/v8/test/mjsunit/debug-evaluate-closure.js b/deps/v8/test/mjsunit/debug-evaluate-closure.js
new file mode 100644
index 0000000000..778defd0ab
--- /dev/null
+++ b/deps/v8/test/mjsunit/debug-evaluate-closure.js
@@ -0,0 +1,91 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --expose-debug-as debug --allow-natives-syntax
+
+Debug = debug.Debug;
+var listened = false;
+
+function listener(event, exec_state, event_data, data) {
+ if (event != Debug.DebugEvent.Break) return;
+ try {
+ assertEquals("goo", exec_state.frame(0).evaluate("goo").value());
+ exec_state.frame(0).evaluate("goo = 'goo foo'");
+ assertEquals("bar return", exec_state.frame(0).evaluate("bar()").value());
+ assertEquals("inner bar", exec_state.frame(0).evaluate("inner").value());
+ assertEquals("outer bar", exec_state.frame(0).evaluate("outer").value());
+ assertEquals("baz inner", exec_state.frame(0).evaluate("baz").value());
+ assertEquals("baz outer", exec_state.frame(1).evaluate("baz").value());
+ exec_state.frame(0).evaluate("w = 'w foo'");
+ exec_state.frame(0).evaluate("inner = 'inner foo'");
+ exec_state.frame(0).evaluate("outer = 'outer foo'");
+ exec_state.frame(0).evaluate("baz = 'baz inner foo'");
+ exec_state.frame(1).evaluate("baz = 'baz outer foo'");
+ listened = true;
+ } catch (e) {
+ print(e);
+ print(e.stack);
+ }
+}
+
+Debug.setListener(listener);
+
+var outer = "outer";
+var baz = "baz outer";
+
+function foo() {
+ var inner = "inner";
+ var baz = "baz inner";
+ var goo = "goo";
+ var withw = { w: "w" };
+ var withv = { v: "v" };
+
+ with (withv) {
+ var bar = function bar() {
+ assertEquals("goo foo", goo);
+ inner = "inner bar";
+ outer = "outer bar";
+ v = "v bar";
+ return "bar return";
+ };
+ }
+
+ with (withw) {
+ debugger;
+ }
+
+ assertEquals("inner foo", inner);
+ assertEquals("baz inner foo", baz);
+ assertEquals("w foo", withw.w);
+ assertEquals("v bar", withv.v);
+}
+
+foo();
+assertEquals("outer foo", outer);
+assertEquals("baz outer foo", baz);
+assertTrue(listened);
+Debug.setListener(null);
diff --git a/deps/v8/test/mjsunit/debug-script.js b/deps/v8/test/mjsunit/debug-script.js
index c456e6bf57..6e673f71c0 100644
--- a/deps/v8/test/mjsunit/debug-script.js
+++ b/deps/v8/test/mjsunit/debug-script.js
@@ -25,8 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --expose-debug-as debug --expose-gc --noparallel-recompilation
-// Flags: --send-idle-notification
+// Flags: --expose-debug-as debug --expose-gc --send-idle-notification
// Get the Debug object exposed from the debug context global object.
Debug = debug.Debug;
diff --git a/deps/v8/test/mjsunit/deopt-minus-zero.js b/deps/v8/test/mjsunit/deopt-minus-zero.js
index ee0983127d..835494cfcf 100644
--- a/deps/v8/test/mjsunit/deopt-minus-zero.js
+++ b/deps/v8/test/mjsunit/deopt-minus-zero.js
@@ -27,17 +27,6 @@
// Flags: --allow-natives-syntax --expose-gc
-/**
- * The possible optimization states of a function. Must be in sync with the
- * return values of Runtime_GetOptimizationStatus() in runtime.cc!
- */
-var OptimizationState = {
- YES: 1,
- NO: 2,
- ALWAYS: 3,
- NEVER: 4
-};
-
function mul (a, b) {
return a * b;
}
@@ -50,7 +39,5 @@ mul(0, -1);
%OptimizeFunctionOnNextCall(mul);
mul(0, -1);
-var raw_optimized = %GetOptimizationStatus(mul);
-assertFalse(raw_optimized == OptimizationState.NO);
+assertOptimized(mul);
gc();
-
diff --git a/deps/v8/test/mjsunit/double-truncation.js b/deps/v8/test/mjsunit/double-truncation.js
new file mode 100644
index 0000000000..b43e1e6c63
--- /dev/null
+++ b/deps/v8/test/mjsunit/double-truncation.js
@@ -0,0 +1,78 @@
+// Copyright 2012 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --allow-natives-syntax
+
+function RunOneTruncationTest(a, b) {
+ var temp = a | 0;
+ assertEquals(b, temp);
+}
+
+function RunAllTruncationTests() {
+ RunOneTruncationTest(0, 0);
+ RunOneTruncationTest(0.5, 0);
+ RunOneTruncationTest(-0.5, 0);
+ RunOneTruncationTest(1.5, 1);
+ RunOneTruncationTest(-1.5, -1);
+ RunOneTruncationTest(5.5, 5);
+ RunOneTruncationTest(-5.0, -5);
+ RunOneTruncationTest(NaN, 0);
+ RunOneTruncationTest(Infinity, 0);
+ RunOneTruncationTest(-NaN, 0);
+ RunOneTruncationTest(-Infinity, 0);
+
+ RunOneTruncationTest(4.5036e+15, 0x1635E000);
+ RunOneTruncationTest(-4.5036e+15, -372629504);
+
+ RunOneTruncationTest(4503603922337791.0, -1);
+ RunOneTruncationTest(-4503603922337791.0, 1);
+ RunOneTruncationTest(4503601774854143.0, 2147483647);
+ RunOneTruncationTest(-4503601774854143.0, -2147483647);
+ RunOneTruncationTest(9007207844675582.0, -2);
+ RunOneTruncationTest(-9007207844675582.0, 2);
+
+ RunOneTruncationTest(2.4178527921507624e+24, -536870912);
+ RunOneTruncationTest(-2.4178527921507624e+24, 536870912);
+ RunOneTruncationTest(2.417853945072267e+24, -536870912);
+ RunOneTruncationTest(-2.417853945072267e+24, 536870912);
+
+ RunOneTruncationTest(4.8357055843015248e+24, -1073741824);
+ RunOneTruncationTest(-4.8357055843015248e+24, 1073741824);
+ RunOneTruncationTest(4.8357078901445341e+24, -1073741824);
+ RunOneTruncationTest(-4.8357078901445341e+24, 1073741824);
+
+ RunOneTruncationTest(9.6714111686030497e+24, -2147483648);
+ RunOneTruncationTest(-9.6714111686030497e+24, -2147483648);
+ RunOneTruncationTest(9.6714157802890681e+24, -2147483648);
+ RunOneTruncationTest(-9.6714157802890681e+24, -2147483648);
+}
+
+RunAllTruncationTests();
+RunAllTruncationTests();
+%OptimizeFunctionOnNextCall(RunOneTruncationTest);
+RunAllTruncationTests();
+RunAllTruncationTests();
diff --git a/deps/v8/test/mjsunit/elements-kind.js b/deps/v8/test/mjsunit/elements-kind.js
index 247aa89747..442d756ae9 100644
--- a/deps/v8/test/mjsunit/elements-kind.js
+++ b/deps/v8/test/mjsunit/elements-kind.js
@@ -170,22 +170,22 @@ for (var i = 0; i < 3; i++) monomorphic(smi_only);
monomorphic(smi_only);
if (support_smi_only_arrays) {
+ %NeverOptimizeFunction(construct_smis);
function construct_smis() {
- try {} catch (e) {} // TODO(titzer): DisableOptimization
var a = [0, 0, 0];
a[0] = 0; // Send the COW array map to the steak house.
assertKind(elements_kind.fast_smi_only, a);
return a;
}
+ %NeverOptimizeFunction(construct_doubles);
function construct_doubles() {
- try {} catch (e) {} // TODO(titzer): DisableOptimization
var a = construct_smis();
a[0] = 1.5;
assertKind(elements_kind.fast_double, a);
return a;
}
+ %NeverOptimizeFunction(construct_objects);
function construct_objects() {
- try {} catch (e) {} // TODO(titzer): DisableOptimization
var a = construct_smis();
a[0] = "one";
assertKind(elements_kind.fast, a);
@@ -193,8 +193,8 @@ if (support_smi_only_arrays) {
}
// Test crankshafted transition SMI->DOUBLE.
+ %NeverOptimizeFunction(convert_to_double);
function convert_to_double(array) {
- try {} catch (e) {} // TODO(titzer): DisableOptimization
array[1] = 2.5;
assertKind(elements_kind.fast_double, array);
assertEquals(2.5, array[1]);
@@ -205,8 +205,8 @@ if (support_smi_only_arrays) {
smis = construct_smis();
convert_to_double(smis);
// Test crankshafted transitions SMI->FAST and DOUBLE->FAST.
+ %NeverOptimizeFunction(convert_to_fast);
function convert_to_fast(array) {
- try {} catch (e) {} // TODO(titzer): DisableOptimization
array[1] = "two";
assertKind(elements_kind.fast, array);
assertEquals("two", array[1]);
@@ -222,8 +222,8 @@ if (support_smi_only_arrays) {
convert_to_fast(doubles);
// Test transition chain SMI->DOUBLE->FAST (crankshafted function will
// transition to FAST directly).
+ %NeverOptimizeFunction(convert_mixed);
function convert_mixed(array, value, kind) {
- try {} catch (e) {} // TODO(titzer): DisableOptimization
array[1] = value;
assertKind(kind, array);
assertEquals(value, array[1]);
diff --git a/deps/v8/test/mjsunit/elements-transition-and-store.js b/deps/v8/test/mjsunit/elements-transition-and-store.js
new file mode 100644
index 0000000000..78ca597ba9
--- /dev/null
+++ b/deps/v8/test/mjsunit/elements-transition-and-store.js
@@ -0,0 +1,41 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --compiled-transitions --notrack-allocation-sites
+
+function foo(a, v) {
+ a[0] = v;
+ return a;
+}
+
+for (var i = 0; i < 3; ++i) {
+ var a = Array();
+ a = foo(a, 1.5);
+ assertEquals(a[0], 1.5);
+ a = foo(a, 2);
+ assertEquals(a[0], 2);
+}
diff --git a/deps/v8/test/mjsunit/elements-transition-hoisting.js b/deps/v8/test/mjsunit/elements-transition-hoisting.js
index 40b25cd582..0295318f6a 100644
--- a/deps/v8/test/mjsunit/elements-transition-hoisting.js
+++ b/deps/v8/test/mjsunit/elements-transition-hoisting.js
@@ -25,8 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --smi-only-arrays --noparallel-recompilation
-// Flags: --notrack-allocation-sites
+// Flags: --allow-natives-syntax --smi-only-arrays --notrack-allocation-sites
// No tracking of allocation sites because it interfers with the semantics
// the test is trying to ensure.
@@ -63,7 +62,7 @@ if (support_smi_only_arrays) {
%OptimizeFunctionOnNextCall(testDoubleConversion4);
testDoubleConversion4(new Array(5));
testDoubleConversion4(new Array(5));
- assertTrue(2 != %GetOptimizationStatus(testDoubleConversion4));
+ assertOptimized(testDoubleConversion4);
%ClearFunctionTypeFeedback(testDoubleConversion4);
// Make sure that non-element related map checks that are not preceded by
@@ -89,7 +88,7 @@ if (support_smi_only_arrays) {
%OptimizeFunctionOnNextCall(testExactMapHoisting);
testExactMapHoisting(new Array(5));
testExactMapHoisting(new Array(5));
- assertTrue(2 != %GetOptimizationStatus(testExactMapHoisting));
+ assertOptimized(testExactMapHoisting);
%ClearFunctionTypeFeedback(testExactMapHoisting);
// Make sure that non-element related map checks do NOT get hoisted if they
@@ -121,7 +120,7 @@ if (support_smi_only_arrays) {
testExactMapHoisting2(new Array(5));
testExactMapHoisting2(new Array(5));
// Temporarily disabled - see bug 2176.
- // assertTrue(2 != %GetOptimizationStatus(testExactMapHoisting2));
+ // assertOptimized(testExactMapHoisting2);
%ClearFunctionTypeFeedback(testExactMapHoisting2);
// Make sure that non-element related map checks do get hoisted if they use
@@ -150,7 +149,7 @@ if (support_smi_only_arrays) {
%OptimizeFunctionOnNextCall(testExactMapHoisting3);
testExactMapHoisting3(new Array(5));
testExactMapHoisting3(new Array(5));
- assertTrue(2 != %GetOptimizationStatus(testExactMapHoisting3));
+ assertOptimized(testExactMapHoisting3);
%ClearFunctionTypeFeedback(testExactMapHoisting3);
function testDominatingTransitionHoisting1(a) {
@@ -177,7 +176,7 @@ if (support_smi_only_arrays) {
// TODO(verwaest) With current changes the elements transition gets hoisted
// above the access, causing a deopt. We should update the type of access
// rather than forbid hoisting the transition.
- assertTrue(2 != %GetOptimizationStatus(testDominatingTransitionHoisting1));
+ assertOptimized(testDominatingTransitionHoisting1);
%ClearFunctionTypeFeedback(testDominatingTransitionHoisting1);
*/
@@ -198,7 +197,7 @@ if (support_smi_only_arrays) {
%OptimizeFunctionOnNextCall(testHoistingWithSideEffect);
testHoistingWithSideEffect(new Array(5));
testHoistingWithSideEffect(new Array(5));
- assertTrue(2 != %GetOptimizationStatus(testHoistingWithSideEffect));
+ assertOptimized(testHoistingWithSideEffect);
%ClearFunctionTypeFeedback(testHoistingWithSideEffect);
function testStraightLineDupeElinination(a,b,c,d,e,f) {
@@ -237,6 +236,6 @@ if (support_smi_only_arrays) {
%OptimizeFunctionOnNextCall(testStraightLineDupeElinination);
testStraightLineDupeElinination(new Array(5),0,0,0,0,0);
testStraightLineDupeElinination(new Array(5),0,0,0,0,0);
- assertTrue(2 != %GetOptimizationStatus(testStraightLineDupeElinination));
+ assertOptimized(testStraightLineDupeElinination);
%ClearFunctionTypeFeedback(testStraightLineDupeElinination);
}
diff --git a/deps/v8/test/mjsunit/elide-double-hole-check-9.js b/deps/v8/test/mjsunit/elide-double-hole-check-9.js
index 4d277af695..88bbc7eaaa 100644
--- a/deps/v8/test/mjsunit/elide-double-hole-check-9.js
+++ b/deps/v8/test/mjsunit/elide-double-hole-check-9.js
@@ -29,8 +29,8 @@
var do_set = false;
+%NeverOptimizeFunction(set_proto_elements);
function set_proto_elements() {
- try {} catch (e) {} // Don't optimize or inline
if (do_set) Array.prototype[1] = 1.5;
}
diff --git a/deps/v8/test/mjsunit/external-array-no-sse2.js b/deps/v8/test/mjsunit/external-array-no-sse2.js
index cffcab8610..11e61ba186 100644
--- a/deps/v8/test/mjsunit/external-array-no-sse2.js
+++ b/deps/v8/test/mjsunit/external-array-no-sse2.js
@@ -606,8 +606,10 @@ a61.set(a62)
assertArrayPrefix([1, 12], a61)
// Invalid source
-assertThrows(function() { a.set(0) })
-assertThrows(function() { a.set({}) })
+assertThrows(function() { a.set(0); }, TypeError);
+assertArrayPrefix([1,2,3,4,5,6], a);
+a.set({}); // does not throw
+assertArrayPrefix([1,2,3,4,5,6], a);
// Test arraybuffer.slice
diff --git a/deps/v8/test/mjsunit/external-array.js b/deps/v8/test/mjsunit/external-array.js
index deb3c8659d..3fcd544ab6 100644
--- a/deps/v8/test/mjsunit/external-array.js
+++ b/deps/v8/test/mjsunit/external-array.js
@@ -605,8 +605,10 @@ a61.set(a62)
assertArrayPrefix([1, 12], a61)
// Invalid source
-assertThrows(function() { a.set(0) })
-assertThrows(function() { a.set({}) })
+assertThrows(function() { a.set(0); }, TypeError);
+assertArrayPrefix([1,2,3,4,5,6], a);
+a.set({}); // does not throw
+assertArrayPrefix([1,2,3,4,5,6], a);
// Test arraybuffer.slice
diff --git a/deps/v8/test/mjsunit/function-call.js b/deps/v8/test/mjsunit/function-call.js
index 38be10c48b..88df353a60 100644
--- a/deps/v8/test/mjsunit/function-call.js
+++ b/deps/v8/test/mjsunit/function-call.js
@@ -151,8 +151,8 @@ var reducing_functions =
function checkExpectedMessage(e) {
assertTrue(e.message.indexOf("called on null or undefined") >= 0 ||
- e.message.indexOf("invoked on undefined or null value") >= 0 ||
- e.message.indexOf("Cannot convert null to object") >= 0);
+ e.message.indexOf("invoked on undefined or null value") >= 0 ||
+ e.message.indexOf("Cannot convert undefined or null to object") >= 0);
}
// Test that all natives using the ToObject call throw the right exception.
diff --git a/deps/v8/test/mjsunit/generated-transition-stub.js b/deps/v8/test/mjsunit/generated-transition-stub.js
index 072ce9ce1c..8b890c0bad 100644
--- a/deps/v8/test/mjsunit/generated-transition-stub.js
+++ b/deps/v8/test/mjsunit/generated-transition-stub.js
@@ -27,192 +27,196 @@
// Flags: --allow-natives-syntax --compiled_transitions
-try {} catch (e) {}
+%NeverOptimizeFunction(test);
+function test() {
-var iteration_count = 1;
+ var iteration_count = 1;
-function transition1(a, i, v) {
- a[i] = v;
-}
-
-//
-// Test PACKED SMI -> PACKED DOUBLE
-//
+ function transition1(a, i, v) {
+ a[i] = v;
+ }
-var a1 = [0, 1, 2, 3, 4];
-transition1(a1, 0, 2.5);
-var a2 = [0, 1, 2, 3, 4];
-transition1(a2, 0, 2.5);
-assertFalse(%HasFastHoleyElements(a2));
-%OptimizeFunctionOnNextCall(transition1);
-
-var a3 = [0, 1, 2, 3, 4];
-assertTrue(%HasFastSmiElements(a3));
-transition1(a3, 0, 2.5);
-assertFalse(%HasFastHoleyElements(a3));
-assertEquals(4, a3[4]);
-assertEquals(2.5, a3[0]);
-
-// Test handling of hole.
-var a4 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
-a4.length = 7;
-assertTrue(%HasFastSmiElements(a4));
-transition1(a4, 0, 2.5);
-assertFalse(%HasFastHoleyElements(a4));
-assertEquals(2.5, a4[0]);
-assertEquals(undefined, a4[8]);
-
-// Large array should deopt to runtimea
-for (j = 0; j < iteration_count; ++j) {
- a5 = new Array();
- for (i = 0; i < 0x40000; ++i) {
- a5[i] = 0;
+ //
+ // Test PACKED SMI -> PACKED DOUBLE
+ //
+
+ var a1 = [0, 1, 2, 3, 4];
+ transition1(a1, 0, 2.5);
+ var a2 = [0, 1, 2, 3, 4];
+ transition1(a2, 0, 2.5);
+ assertFalse(%HasFastHoleyElements(a2));
+ %OptimizeFunctionOnNextCall(transition1);
+
+ var a3 = [0, 1, 2, 3, 4];
+ assertTrue(%HasFastSmiElements(a3));
+ transition1(a3, 0, 2.5);
+ assertFalse(%HasFastHoleyElements(a3));
+ assertEquals(4, a3[4]);
+ assertEquals(2.5, a3[0]);
+
+ // Test handling of hole.
+ var a4 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
+ a4.length = 7;
+ assertTrue(%HasFastSmiElements(a4));
+ transition1(a4, 0, 2.5);
+ assertFalse(%HasFastHoleyElements(a4));
+ assertEquals(2.5, a4[0]);
+ assertEquals(undefined, a4[8]);
+
+ // Large array should deopt to runtimea
+ for (j = 0; j < iteration_count; ++j) {
+ a5 = new Array();
+ for (i = 0; i < 0x40000; ++i) {
+ a5[i] = 0;
+ }
+ assertTrue(%HasFastSmiElements(a5) || %HasFastDoubleElements(a5));
+ transition1(a5, 0, 2.5);
+ assertEquals(2.5, a5[0]);
}
- assertTrue(%HasFastSmiElements(a5) || %HasFastDoubleElements(a5));
- transition1(a5, 0, 2.5);
- assertEquals(2.5, a5[0]);
-}
-//
-// Test HOLEY SMI -> HOLEY DOUBLE
-//
+ //
+ // Test HOLEY SMI -> HOLEY DOUBLE
+ //
-function transition2(a, i, v) {
- a[i] = v;
-}
+ function transition2(a, i, v) {
+ a[i] = v;
+ }
-var b1 = [0, 1, 2, , 4];
-transition2(b1, 0, 2.5);
-var b2 = [0, 1, 2, , 4];
-transition2(b2, 0, 2.5);
-assertTrue(%HasFastHoleyElements(b2));
-%OptimizeFunctionOnNextCall(transition2);
-
-var b3 = [0, 1, 2, , 4];
-assertTrue(%HasFastSmiElements(b3));
-assertTrue(%HasFastHoleyElements(b3));
-transition2(b3, 0, 2.5);
-assertTrue(%HasFastHoleyElements(b3));
-assertEquals(4, b3[4]);
-assertEquals(2.5, b3[0]);
-
-// Large array should deopt to runtime
-for (j = 0; j < iteration_count; ++j) {
- b4 = [0, ,0];
- for (i = 3; i < 0x40000; ++i) {
- b4[i] = 0;
+ var b1 = [0, 1, 2, , 4];
+ transition2(b1, 0, 2.5);
+ var b2 = [0, 1, 2, , 4];
+ transition2(b2, 0, 2.5);
+ assertTrue(%HasFastHoleyElements(b2));
+ %OptimizeFunctionOnNextCall(transition2);
+
+ var b3 = [0, 1, 2, , 4];
+ assertTrue(%HasFastSmiElements(b3));
+ assertTrue(%HasFastHoleyElements(b3));
+ transition2(b3, 0, 2.5);
+ assertTrue(%HasFastHoleyElements(b3));
+ assertEquals(4, b3[4]);
+ assertEquals(2.5, b3[0]);
+
+ // Large array should deopt to runtime
+ for (j = 0; j < iteration_count; ++j) {
+ b4 = [0, ,0];
+ for (i = 3; i < 0x40000; ++i) {
+ b4[i] = 0;
+ }
+ assertTrue(%HasFastSmiElements(b4));
+ transition2(b4, 0, 2.5);
+ assertEquals(2.5, b4[0]);
}
- assertTrue(%HasFastSmiElements(b4));
- transition2(b4, 0, 2.5);
- assertEquals(2.5, b4[0]);
-}
-//
-// Test PACKED DOUBLE -> PACKED OBJECT
-//
+ //
+ // Test PACKED DOUBLE -> PACKED OBJECT
+ //
-function transition3(a, i, v) {
- a[i] = v;
-}
+ function transition3(a, i, v) {
+ a[i] = v;
+ }
-var c1 = [0, 1, 2, 3.5, 4];
-transition3(c1, 0, new Object());
-var c2 = [0, 1, 2, 3.5, 4];
-transition3(c2, 0, new Object());
-assertTrue(%HasFastObjectElements(c2));
-assertTrue(!%HasFastHoleyElements(c2));
-%OptimizeFunctionOnNextCall(transition3);
-
-var c3 = [0, 1, 2, 3.5, 4];
-assertTrue(%HasFastDoubleElements(c3));
-assertTrue(!%HasFastHoleyElements(c3));
-transition3(c3, 0, new Array());
-assertTrue(!%HasFastHoleyElements(c3));
-assertTrue(%HasFastObjectElements(c3));
-assertEquals(4, c3[4]);
-assertEquals(0, c3[0].length);
-
-// Large array under the deopt threshold should be able to trigger GC without
-// causing crashes.
-for (j = 0; j < iteration_count; ++j) {
- c4 = [0, 2.5, 0];
- for (i = 3; i < 0xa000; ++i) {
- c4[i] = 0;
+ var c1 = [0, 1, 2, 3.5, 4];
+ transition3(c1, 0, new Object());
+ var c2 = [0, 1, 2, 3.5, 4];
+ transition3(c2, 0, new Object());
+ assertTrue(%HasFastObjectElements(c2));
+ assertTrue(!%HasFastHoleyElements(c2));
+ %OptimizeFunctionOnNextCall(transition3);
+
+ var c3 = [0, 1, 2, 3.5, 4];
+ assertTrue(%HasFastDoubleElements(c3));
+ assertTrue(!%HasFastHoleyElements(c3));
+ transition3(c3, 0, new Array());
+ assertTrue(!%HasFastHoleyElements(c3));
+ assertTrue(%HasFastObjectElements(c3));
+ assertEquals(4, c3[4]);
+ assertEquals(0, c3[0].length);
+
+ // Large array under the deopt threshold should be able to trigger GC without
+ // causing crashes.
+ for (j = 0; j < iteration_count; ++j) {
+ c4 = [0, 2.5, 0];
+ for (i = 3; i < 0xa000; ++i) {
+ c4[i] = 0;
+ }
+ assertTrue(%HasFastDoubleElements(c4));
+ assertTrue(!%HasFastHoleyElements(c4));
+ transition3(c4, 0, new Array(5));
+ assertTrue(!%HasFastHoleyElements(c4));
+ assertTrue(%HasFastObjectElements(c4));
+ assertEquals(5, c4[0].length);
}
- assertTrue(%HasFastDoubleElements(c4));
- assertTrue(!%HasFastHoleyElements(c4));
- transition3(c4, 0, new Array(5));
- assertTrue(!%HasFastHoleyElements(c4));
- assertTrue(%HasFastObjectElements(c4));
- assertEquals(5, c4[0].length);
-}
-// Large array should deopt to runtime
-for (j = 0; j < iteration_count; ++j) {
- c5 = [0, 2.5, 0];
- for (i = 3; i < 0x40000; ++i) {
- c5[i] = 0;
+ // Large array should deopt to runtime
+ for (j = 0; j < iteration_count; ++j) {
+ c5 = [0, 2.5, 0];
+ for (i = 3; i < 0x40000; ++i) {
+ c5[i] = 0;
+ }
+ assertTrue(%HasFastDoubleElements(c5));
+ assertTrue(!%HasFastHoleyElements(c5));
+ transition3(c5, 0, new Array(5));
+ assertTrue(!%HasFastHoleyElements(c5));
+ assertTrue(%HasFastObjectElements(c5));
+ assertEquals(5, c5[0].length);
}
- assertTrue(%HasFastDoubleElements(c5));
- assertTrue(!%HasFastHoleyElements(c5));
- transition3(c5, 0, new Array(5));
- assertTrue(!%HasFastHoleyElements(c5));
- assertTrue(%HasFastObjectElements(c5));
- assertEquals(5, c5[0].length);
-}
-//
-// Test HOLEY DOUBLE -> HOLEY OBJECT
-//
+ //
+ // Test HOLEY DOUBLE -> HOLEY OBJECT
+ //
-function transition4(a, i, v) {
- a[i] = v;
-}
+ function transition4(a, i, v) {
+ a[i] = v;
+ }
-var d1 = [0, 1, , 3.5, 4];
-transition4(d1, 0, new Object());
-var d2 = [0, 1, , 3.5, 4];
-transition4(d2, 0, new Object());
-assertTrue(%HasFastObjectElements(d2));
-assertTrue(%HasFastHoleyElements(d2));
-%OptimizeFunctionOnNextCall(transition4);
-
-var d3 = [0, 1, , 3.5, 4];
-assertTrue(%HasFastDoubleElements(d3));
-assertTrue(%HasFastHoleyElements(d3));
-transition4(d3, 0, new Array());
-assertTrue(%HasFastHoleyElements(d3));
-assertTrue(%HasFastObjectElements(d3));
-assertEquals(4, d3[4]);
-assertEquals(0, d3[0].length);
-
-// Large array under the deopt threshold should be able to trigger GC without
-// causing crashes.
-for (j = 0; j < iteration_count; ++j) {
- d4 = [, 2.5, ,];
- for (i = 3; i < 0xa000; ++i) {
- d4[i] = 0;
+ var d1 = [0, 1, , 3.5, 4];
+ transition4(d1, 0, new Object());
+ var d2 = [0, 1, , 3.5, 4];
+ transition4(d2, 0, new Object());
+ assertTrue(%HasFastObjectElements(d2));
+ assertTrue(%HasFastHoleyElements(d2));
+ %OptimizeFunctionOnNextCall(transition4);
+
+ var d3 = [0, 1, , 3.5, 4];
+ assertTrue(%HasFastDoubleElements(d3));
+ assertTrue(%HasFastHoleyElements(d3));
+ transition4(d3, 0, new Array());
+ assertTrue(%HasFastHoleyElements(d3));
+ assertTrue(%HasFastObjectElements(d3));
+ assertEquals(4, d3[4]);
+ assertEquals(0, d3[0].length);
+
+ // Large array under the deopt threshold should be able to trigger GC without
+ // causing crashes.
+ for (j = 0; j < iteration_count; ++j) {
+ d4 = [, 2.5, ,];
+ for (i = 3; i < 0xa000; ++i) {
+ d4[i] = 0;
+ }
+ assertTrue(%HasFastDoubleElements(d4));
+ assertTrue(%HasFastHoleyElements(d4));
+ transition4(d4, 0, new Array(5));
+ assertTrue(%HasFastHoleyElements(d4));
+ assertTrue(%HasFastObjectElements(d4));
+ assertEquals(5, d4[0].length);
+ assertEquals(undefined, d4[2]);
}
- assertTrue(%HasFastDoubleElements(d4));
- assertTrue(%HasFastHoleyElements(d4));
- transition4(d4, 0, new Array(5));
- assertTrue(%HasFastHoleyElements(d4));
- assertTrue(%HasFastObjectElements(d4));
- assertEquals(5, d4[0].length);
- assertEquals(undefined, d4[2]);
-}
-// Large array should deopt to runtime
-for (j = 0; j < iteration_count; ++j) {
- d5 = [, 2.5, ,];
- for (i = 3; i < 0x40000; ++i) {
- d5[i] = 0;
+ // Large array should deopt to runtime
+ for (j = 0; j < iteration_count; ++j) {
+ d5 = [, 2.5, ,];
+ for (i = 3; i < 0x40000; ++i) {
+ d5[i] = 0;
+ }
+ assertTrue(%HasFastDoubleElements(d5));
+ assertTrue(%HasFastHoleyElements(d5));
+ transition4(d5, 0, new Array(5));
+ assertTrue(%HasFastHoleyElements(d5));
+ assertTrue(%HasFastObjectElements(d5));
+ assertEquals(5, d5[0].length);
+ assertEquals(undefined, d5[2]);
}
- assertTrue(%HasFastDoubleElements(d5));
- assertTrue(%HasFastHoleyElements(d5));
- transition4(d5, 0, new Array(5));
- assertTrue(%HasFastHoleyElements(d5));
- assertTrue(%HasFastObjectElements(d5));
- assertEquals(5, d5[0].length);
- assertEquals(undefined, d5[2]);
+
}
+test();
diff --git a/deps/v8/test/mjsunit/harmony/array-iterator.js b/deps/v8/test/mjsunit/harmony/array-iterator.js
new file mode 100644
index 0000000000..f3a2627b57
--- /dev/null
+++ b/deps/v8/test/mjsunit/harmony/array-iterator.js
@@ -0,0 +1,195 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --harmony-iteration --allow-natives-syntax
+
+function TestArrayPrototype() {
+ assertTrue(Array.prototype.hasOwnProperty('entries'));
+ assertTrue(Array.prototype.hasOwnProperty('values'));
+ assertTrue(Array.prototype.hasOwnProperty('keys'));
+
+ assertFalse(Array.prototype.propertyIsEnumerable('entries'));
+ assertFalse(Array.prototype.propertyIsEnumerable('values'));
+ assertFalse(Array.prototype.propertyIsEnumerable('keys'));
+}
+TestArrayPrototype();
+
+function assertIteratorResult(value, done, result) {
+ assertEquals({ value: value, done: done}, result);
+}
+
+function TestValues() {
+ var array = ['a', 'b', 'c'];
+ var iterator = array.values();
+ assertIteratorResult('a', false, iterator.next());
+ assertIteratorResult('b', false, iterator.next());
+ assertIteratorResult('c', false, iterator.next());
+ assertIteratorResult(void 0, true, iterator.next());
+
+ array.push('d');
+ assertIteratorResult(void 0, true, iterator.next());
+}
+TestValues();
+
+function TestValuesMutate() {
+ var array = ['a', 'b', 'c'];
+ var iterator = array.values();
+ assertIteratorResult('a', false, iterator.next());
+ assertIteratorResult('b', false, iterator.next());
+ assertIteratorResult('c', false, iterator.next());
+ array.push('d');
+ assertIteratorResult('d', false, iterator.next());
+ assertIteratorResult(void 0, true, iterator.next());
+}
+TestValuesMutate();
+
+function TestKeys() {
+ var array = ['a', 'b', 'c'];
+ var iterator = array.keys();
+ assertIteratorResult('0', false, iterator.next());
+ assertIteratorResult('1', false, iterator.next());
+ assertIteratorResult('2', false, iterator.next());
+ assertIteratorResult(void 0, true, iterator.next());
+
+ array.push('d');
+ assertIteratorResult(void 0, true, iterator.next());
+}
+TestKeys();
+
+function TestKeysMutate() {
+ var array = ['a', 'b', 'c'];
+ var iterator = array.keys();
+ assertIteratorResult('0', false, iterator.next());
+ assertIteratorResult('1', false, iterator.next());
+ assertIteratorResult('2', false, iterator.next());
+ array.push('d');
+ assertIteratorResult('3', false, iterator.next());
+ assertIteratorResult(void 0, true, iterator.next());
+}
+TestKeysMutate();
+
+function TestEntries() {
+ var array = ['a', 'b', 'c'];
+ var iterator = array.entries();
+ assertIteratorResult(['0', 'a'], false, iterator.next());
+ assertIteratorResult(['1', 'b'], false, iterator.next());
+ assertIteratorResult(['2', 'c'], false, iterator.next());
+ assertIteratorResult(void 0, true, iterator.next());
+
+ array.push('d');
+ assertIteratorResult(void 0, true, iterator.next());
+}
+TestEntries();
+
+function TestEntriesMutate() {
+ var array = ['a', 'b', 'c'];
+ var iterator = array.entries();
+ assertIteratorResult(['0', 'a'], false, iterator.next());
+ assertIteratorResult(['1', 'b'], false, iterator.next());
+ assertIteratorResult(['2', 'c'], false, iterator.next());
+ array.push('d');
+ assertIteratorResult(['3', 'd'], false, iterator.next());
+ assertIteratorResult(void 0, true, iterator.next());
+}
+TestEntriesMutate();
+
+function TestArrayIteratorPrototype() {
+ var array = [];
+ var iterator = array.values();
+
+ var ArrayIterator = iterator.constructor;
+ assertEquals(ArrayIterator.prototype, array.values().__proto__);
+ assertEquals(ArrayIterator.prototype, array.keys().__proto__);
+ assertEquals(ArrayIterator.prototype, array.entries().__proto__);
+
+ assertEquals(Object.prototype, ArrayIterator.prototype.__proto__);
+
+ assertEquals('Array Iterator', %_ClassOf(array.values()));
+ assertEquals('Array Iterator', %_ClassOf(array.keys()));
+ assertEquals('Array Iterator', %_ClassOf(array.entries()));
+
+ var prototypeDescriptor =
+ Object.getOwnPropertyDescriptor(ArrayIterator, 'prototype');
+ assertFalse(prototypeDescriptor.configurable);
+ assertFalse(prototypeDescriptor.enumerable);
+ assertFalse(prototypeDescriptor.writable);
+}
+TestArrayIteratorPrototype();
+
+function TestForArrayValues() {
+ var buffer = [];
+ var array = [0, 'a', true, false, null, /* hole */, undefined, NaN];
+ var i = 0;
+ for (var value of array.values()) {
+ buffer[i++] = value;
+ }
+
+ assertEquals(8, buffer.length);
+
+ for (var i = 0; i < buffer.length - 1; i++) {
+ assertEquals(array[i], buffer[i]);
+ }
+ assertTrue(isNaN(buffer[buffer.length - 1]));
+}
+TestForArrayValues();
+
+function TestForArrayKeys() {
+ var buffer = [];
+ var array = [0, 'a', true, false, null, /* hole */, undefined, NaN];
+ var i = 0;
+ for (var key of array.keys()) {
+ buffer[i++] = key;
+ }
+
+ assertEquals(8, buffer.length);
+
+ for (var i = 0; i < buffer.length; i++) {
+ assertEquals(String(i), buffer[i]);
+ }
+}
+TestForArrayKeys();
+
+function TestForArrayEntries() {
+ var buffer = [];
+ var array = [0, 'a', true, false, null, /* hole */, undefined, NaN];
+ var i = 0;
+ for (var entry of array.entries()) {
+ buffer[i++] = entry;
+ }
+
+ assertEquals(8, buffer.length);
+
+ for (var i = 0; i < buffer.length - 1; i++) {
+ assertEquals(array[i], buffer[i][1]);
+ }
+ assertTrue(isNaN(buffer[buffer.length - 1][1]));
+
+ for (var i = 0; i < buffer.length; i++) {
+ assertEquals(String(i), buffer[i][0]);
+ }
+}
+TestForArrayEntries();
diff --git a/deps/v8/test/mjsunit/harmony/block-let-crankshaft.js b/deps/v8/test/mjsunit/harmony/block-let-crankshaft.js
index d01e5c08ab..5888fd24f5 100644
--- a/deps/v8/test/mjsunit/harmony/block-let-crankshaft.js
+++ b/deps/v8/test/mjsunit/harmony/block-let-crankshaft.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --harmony-scoping --allow-natives-syntax --noparallel-recompilation
+// Flags: --harmony-scoping --allow-natives-syntax
// TODO(ES6): properly activate extended mode
"use strict";
@@ -43,7 +43,7 @@ for (var i = 0; i < functions.length; ++i) {
}
%OptimizeFunctionOnNextCall(func);
func(12);
- assertTrue(%GetOptimizationStatus(func) != 2);
+ assertOptimized(func);
}
function f1() { }
diff --git a/deps/v8/test/mjsunit/harmony/collections.js b/deps/v8/test/mjsunit/harmony/collections.js
index cf18745ae8..67f91a8ad4 100644
--- a/deps/v8/test/mjsunit/harmony/collections.js
+++ b/deps/v8/test/mjsunit/harmony/collections.js
@@ -35,6 +35,7 @@ function TestValidSetCalls(m) {
assertDoesNotThrow(function () { m.delete(new Object) });
}
TestValidSetCalls(new Set);
+TestValidSetCalls(new WeakSet);
// Test valid getter and setter calls on Maps and WeakMaps
@@ -85,6 +86,7 @@ function TestSetBehavior(set) {
}
}
TestSetBehavior(new Set);
+TestSet(new WeakSet, new Object);
// Test expected mapping behavior for Maps and WeakMaps
@@ -185,6 +187,7 @@ function TestEnumerable(func) {
TestEnumerable(Set);
TestEnumerable(Map);
TestEnumerable(WeakMap);
+TestEnumerable(WeakSet);
// Test arbitrary properties on Maps and WeakMaps
@@ -207,6 +210,7 @@ TestArbitrary(new WeakMap);
assertTrue(Set() instanceof Set);
assertTrue(Map() instanceof Map);
assertTrue(WeakMap() instanceof WeakMap);
+assertTrue(WeakSet() instanceof WeakSet);
// Test whether NaN values as keys are treated correctly.
@@ -234,6 +238,7 @@ assertTrue(s instanceof Set);
assertTrue(Set.prototype.add instanceof Function)
assertTrue(Set.prototype.has instanceof Function)
assertTrue(Set.prototype.delete instanceof Function)
+assertTrue(Set.prototype.clear instanceof Function)
// Test some common JavaScript idioms for Maps
@@ -243,6 +248,7 @@ assertTrue(Map.prototype.set instanceof Function)
assertTrue(Map.prototype.get instanceof Function)
assertTrue(Map.prototype.has instanceof Function)
assertTrue(Map.prototype.delete instanceof Function)
+assertTrue(Map.prototype.clear instanceof Function)
// Test some common JavaScript idioms for WeakMaps
@@ -252,18 +258,37 @@ assertTrue(WeakMap.prototype.set instanceof Function)
assertTrue(WeakMap.prototype.get instanceof Function)
assertTrue(WeakMap.prototype.has instanceof Function)
assertTrue(WeakMap.prototype.delete instanceof Function)
+assertTrue(WeakMap.prototype.clear instanceof Function)
-// Test class of the Set, Map and WeakMap instance and prototype.
+// Test some common JavaScript idioms for WeakSets
+var s = new WeakSet;
+assertTrue(s instanceof WeakSet);
+assertTrue(WeakSet.prototype.add instanceof Function)
+assertTrue(WeakSet.prototype.has instanceof Function)
+assertTrue(WeakSet.prototype.delete instanceof Function)
+assertTrue(WeakSet.prototype.clear instanceof Function)
+
+
+// Test class of instance and prototype.
assertEquals("Set", %_ClassOf(new Set))
assertEquals("Object", %_ClassOf(Set.prototype))
assertEquals("Map", %_ClassOf(new Map))
assertEquals("Object", %_ClassOf(Map.prototype))
assertEquals("WeakMap", %_ClassOf(new WeakMap))
assertEquals("Object", %_ClassOf(WeakMap.prototype))
+assertEquals("WeakSet", %_ClassOf(new WeakSet))
+assertEquals("Object", %_ClassOf(WeakMap.prototype))
+
+
+// Test name of constructor.
+assertEquals("Set", Set.name);
+assertEquals("Map", Map.name);
+assertEquals("WeakMap", WeakMap.name);
+assertEquals("WeakSet", WeakSet.name);
-// Test constructor property of the Set, Map and WeakMap prototype.
+// Test constructor property of the Set, Map, WeakMap and WeakSet prototype.
function TestConstructor(C) {
assertFalse(C === Object.prototype.constructor);
assertSame(C, C.prototype.constructor);
@@ -273,6 +298,21 @@ function TestConstructor(C) {
TestConstructor(Set);
TestConstructor(Map);
TestConstructor(WeakMap);
+TestConstructor(WeakSet);
+
+
+function TestDescriptor(global, C) {
+ assertEquals({
+ value: C,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ }, Object.getOwnPropertyDescriptor(global, C.name));
+}
+TestDescriptor(this, Set);
+TestDescriptor(this, Map);
+TestDescriptor(this, WeakMap);
+TestDescriptor(this, WeakSet);
// Regression test for WeakMap prototype.
@@ -304,15 +344,19 @@ var alwaysBogus = [ undefined, null, true, "x", 23, {} ];
var bogusReceiversTestSet = [
{ proto: Set.prototype,
funcs: [ 'add', 'has', 'delete' ],
- receivers: alwaysBogus.concat([ new Map, new WeakMap ]),
+ receivers: alwaysBogus.concat([ new Map, new WeakMap, new WeakSet ]),
},
{ proto: Map.prototype,
funcs: [ 'get', 'set', 'has', 'delete' ],
- receivers: alwaysBogus.concat([ new Set, new WeakMap ]),
+ receivers: alwaysBogus.concat([ new Set, new WeakMap, new WeakSet ]),
},
{ proto: WeakMap.prototype,
funcs: [ 'get', 'set', 'has', 'delete' ],
- receivers: alwaysBogus.concat([ new Set, new Map ]),
+ receivers: alwaysBogus.concat([ new Set, new Map, new WeakSet ]),
+ },
+ { proto: WeakSet.prototype,
+ funcs: [ 'add', 'has', 'delete' ],
+ receivers: alwaysBogus.concat([ new Set, new Map, new WeakMap ]),
},
];
function TestBogusReceivers(testSet) {
@@ -413,3 +457,14 @@ for (var i = 9; i >= 0; i--) {
assertFalse(w.has(k));
assertEquals(undefined, w.get(k));
})();
+
+
+// Test WeakSet clear
+(function() {
+ var k = new Object();
+ var w = new WeakSet();
+ w.add(k);
+ assertTrue(w.has(k));
+ w.clear();
+ assertFalse(w.has(k));
+})(); \ No newline at end of file
diff --git a/deps/v8/test/mjsunit/harmony/dataview-accessors.js b/deps/v8/test/mjsunit/harmony/dataview-accessors.js
index 9dd8fe35e0..c57841c494 100644
--- a/deps/v8/test/mjsunit/harmony/dataview-accessors.js
+++ b/deps/v8/test/mjsunit/harmony/dataview-accessors.js
@@ -62,7 +62,10 @@ function getElementSize(func) {
function checkGet(func, index, expected, littleEndian) {
function doGet() {
- return view["get" + func](index, littleEndian);
+ if (littleEndian != undefined)
+ return view["get" + func](index, littleEndian);
+ else
+ return view["get" + func](index);
}
if (index >=0 && index + getElementSize(func) - 1 < view.byteLength)
assertSame(expected, doGet());
@@ -72,7 +75,10 @@ function checkGet(func, index, expected, littleEndian) {
function checkSet(func, index, value, littleEndian) {
function doSet() {
- view["set" + func](index, value, littleEndian);
+ if (littleEndian != undefined)
+ view["set" + func](index, value, littleEndian);
+ else
+ view["set" + func](index, value);
}
if (index >= 0 &&
index + getElementSize(func) - 1 < view.byteLength) {
@@ -105,39 +111,46 @@ function runIntegerTestCases(isTestingGet, array, start, length) {
createDataView(array, 0, true, start, length);
test(isTestingGet, "Int8", 0, 0);
+ test(isTestingGet, "Int8", undefined, 0);
test(isTestingGet, "Int8", 8, -128);
test(isTestingGet, "Int8", 15, -1);
test(isTestingGet, "Uint8", 0, 0);
+ test(isTestingGet, "Uint8", undefined, 0);
test(isTestingGet, "Uint8", 8, 128);
test(isTestingGet, "Uint8", 15, 255);
// Little endian.
test(isTestingGet, "Int16", 0, 256, true);
+ test(isTestingGet, "Int16", undefined, 256, true);
test(isTestingGet, "Int16", 5, 26213, true);
test(isTestingGet, "Int16", 9, -32127, true);
test(isTestingGet, "Int16", 14, -2, true);
// Big endian.
test(isTestingGet, "Int16", 0, 1);
+ test(isTestingGet, "Int16", undefined, 1);
test(isTestingGet, "Int16", 5, 25958);
test(isTestingGet, "Int16", 9, -32382);
test(isTestingGet, "Int16", 14, -257);
// Little endian.
test(isTestingGet, "Uint16", 0, 256, true);
+ test(isTestingGet, "Uint16", undefined, 256, true);
test(isTestingGet, "Uint16", 5, 26213, true);
test(isTestingGet, "Uint16", 9, 33409, true);
test(isTestingGet, "Uint16", 14, 65534, true);
// Big endian.
test(isTestingGet, "Uint16", 0, 1);
+ test(isTestingGet, "Uint16", undefined, 1);
test(isTestingGet, "Uint16", 5, 25958);
test(isTestingGet, "Uint16", 9, 33154);
test(isTestingGet, "Uint16", 14, 65279);
// Little endian.
test(isTestingGet, "Int32", 0, 50462976, true);
+ test(isTestingGet, "Int32", undefined, 50462976, true);
test(isTestingGet, "Int32", 3, 1717920771, true);
test(isTestingGet, "Int32", 6, -2122291354, true);
test(isTestingGet, "Int32", 9, -58490239, true);
@@ -145,6 +158,7 @@ function runIntegerTestCases(isTestingGet, array, start, length) {
// Big endian.
test(isTestingGet, "Int32", 0, 66051);
+ test(isTestingGet, "Int32", undefined, 66051);
test(isTestingGet, "Int32", 3, 56911206);
test(isTestingGet, "Int32", 6, 1718059137);
test(isTestingGet, "Int32", 9, -2122152964);
@@ -152,6 +166,7 @@ function runIntegerTestCases(isTestingGet, array, start, length) {
// Little endian.
test(isTestingGet, "Uint32", 0, 50462976, true);
+ test(isTestingGet, "Uint32", undefined, 50462976, true);
test(isTestingGet, "Uint32", 3, 1717920771, true);
test(isTestingGet, "Uint32", 6, 2172675942, true);
test(isTestingGet, "Uint32", 9, 4236477057, true);
@@ -159,6 +174,7 @@ function runIntegerTestCases(isTestingGet, array, start, length) {
// Big endian.
test(isTestingGet, "Uint32", 0, 66051);
+ test(isTestingGet, "Uint32", undefined, 66051);
test(isTestingGet, "Uint32", 3, 56911206);
test(isTestingGet, "Uint32", 6, 1718059137);
test(isTestingGet, "Uint32", 9, 2172814332);
@@ -169,6 +185,7 @@ function testFloat(isTestingGet, func, array, start, expected) {
// Little endian.
createDataView(array, 0, true, start);
test(isTestingGet, func, 0, expected, true);
+ test(isTestingGet, func, undefined, expected, true);
createDataView(array, 3, true, start);
test(isTestingGet, func, 3, expected, true);
createDataView(array, 7, true, start);
@@ -179,6 +196,7 @@ function testFloat(isTestingGet, func, array, start, expected) {
// Big endian.
createDataView(array, 0, false);
test(isTestingGet, func, 0, expected, false);
+ test(isTestingGet, func, undefined, expected, false);
createDataView(array, 3, false);
test(isTestingGet, func, 3, expected, false);
createDataView(array, 7, false);
@@ -276,18 +294,101 @@ function TestSetters() {
runFloatTestCases(false, 7);
runNegativeIndexTests(false);
-
}
TestGetters();
TestSetters();
+function CheckOutOfRangeInt8(value, expected) {
+ var view = new DataView(new ArrayBuffer(100));
+ assertSame(undefined, view.setInt8(0, value));
+ assertSame(expected, view.getInt8(0));
+ assertSame(undefined, view.setInt8(0, value, true));
+ assertSame(expected, view.getInt8(0, true));
+}
+
+function CheckOutOfRangeUint8(value, expected) {
+ var view = new DataView(new ArrayBuffer(100));
+ assertSame(undefined, view.setUint8(0, value));
+ assertSame(expected, view.getUint8(0));
+ assertSame(undefined, view.setUint8(0, value, true));
+ assertSame(expected, view.getUint8(0, true));
+}
+
+function CheckOutOfRangeInt16(value, expected) {
+ var view = new DataView(new ArrayBuffer(100));
+ assertSame(undefined, view.setInt16(0, value));
+ assertSame(expected, view.getInt16(0));
+ assertSame(undefined, view.setInt16(0, value, true));
+ assertSame(expected, view.getInt16(0, true));
+}
+
+function CheckOutOfRangeUint16(value, expected) {
+ var view = new DataView(new ArrayBuffer(100));
+ assertSame(undefined, view.setUint16(0, value));
+ assertSame(expected, view.getUint16(0));
+ assertSame(undefined, view.setUint16(0, value, true));
+ assertSame(expected, view.getUint16(0, true));
+}
+
+function CheckOutOfRangeInt32(value, expected) {
+ var view = new DataView(new ArrayBuffer(100));
+ assertSame(undefined, view.setInt32(0, value));
+ assertSame(expected, view.getInt32(0));
+ assertSame(undefined, view.setInt32(0, value, true));
+ assertSame(expected, view.getInt32(0, true));
+}
+
+function CheckOutOfRangeUint32(value, expected) {
+ var view = new DataView(new ArrayBuffer(100));
+ assertSame(undefined, view.setUint32(0, value));
+ assertSame(expected, view.getUint32(0));
+ assertSame(undefined, view.setUint32(0, value, true));
+ assertSame(expected, view.getUint32(0, true));
+}
+
+function TestOutOfRange() {
+ CheckOutOfRangeInt8(0x80, -0x80);
+ CheckOutOfRangeInt8(0x1000, 0);
+ CheckOutOfRangeInt8(-0x81, 0x7F);
+
+ CheckOutOfRangeUint8(0x100, 0);
+ CheckOutOfRangeUint8(0x1000, 0);
+ CheckOutOfRangeUint8(-0x80, 0x80);
+ CheckOutOfRangeUint8(-1, 0xFF);
+ CheckOutOfRangeUint8(-0xFF, 1);
+
+ CheckOutOfRangeInt16(0x8000, -0x8000);
+ CheckOutOfRangeInt16(0x10000, 0);
+ CheckOutOfRangeInt16(-0x8001, 0x7FFF);
+
+ CheckOutOfRangeUint16(0x10000, 0);
+ CheckOutOfRangeUint16(0x100000, 0);
+ CheckOutOfRangeUint16(-0x8000, 0x8000);
+ CheckOutOfRangeUint16(-1, 0xFFFF);
+ CheckOutOfRangeUint16(-0xFFFF, 1);
+
+ CheckOutOfRangeInt32(0x80000000, -0x80000000);
+ CheckOutOfRangeInt32(0x100000000, 0);
+ CheckOutOfRangeInt32(-0x80000001, 0x7FFFFFFF);
+
+ CheckOutOfRangeUint32(0x100000000, 0);
+ CheckOutOfRangeUint32(0x1000000000, 0);
+ CheckOutOfRangeUint32(-0x80000000, 0x80000000);
+ CheckOutOfRangeUint32(-1, 0xFFFFFFFF);
+ CheckOutOfRangeUint32(-0xFFFFFFFF, 1);
+}
+
+TestOutOfRange();
+
function TestGeneralAccessors() {
var a = new DataView(new ArrayBuffer(256));
function CheckAccessor(name) {
var f = a[name];
+ assertThrows(function() { f(); }, TypeError);
f.call(a, 0, 0); // should not throw
assertThrows(function() { f.call({}, 0, 0); }, TypeError);
+ assertThrows(function() { f.call(a); }, TypeError);
}
CheckAccessor("getUint8");
CheckAccessor("setUint8");
diff --git a/deps/v8/test/mjsunit/harmony/numeric-literals-off.js b/deps/v8/test/mjsunit/harmony/numeric-literals-off.js
new file mode 100644
index 0000000000..37204ed9d7
--- /dev/null
+++ b/deps/v8/test/mjsunit/harmony/numeric-literals-off.js
@@ -0,0 +1,41 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// This is to ensure that we do not support 0b and 0o in Number when
+// the --harmony-numeric-literals flag is not set.
+
+
+function TestOctalLiteralUsingNumberFunction() {
+ assertEquals(NaN, Number('0o0'));
+}
+TestOctalLiteralUsingNumberFunction();
+
+
+function TestBinaryLiteralUsingNumberFunction() {
+ assertEquals(NaN, Number('0b0'));
+}
+TestBinaryLiteralUsingNumberFunction();
diff --git a/deps/v8/test/mjsunit/harmony/numeric-literals.js b/deps/v8/test/mjsunit/harmony/numeric-literals.js
new file mode 100644
index 0000000000..7300f3e47e
--- /dev/null
+++ b/deps/v8/test/mjsunit/harmony/numeric-literals.js
@@ -0,0 +1,87 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --harmony-numeric-literals
+
+function TestOctalLiteral() {
+ assertEquals(0, 0o0);
+ assertEquals(0, 0O0);
+ assertEquals(1, 0o1);
+ assertEquals(7, 0o7);
+ assertEquals(8, 0o10);
+ assertEquals(63, 0o77);
+}
+TestOctalLiteral();
+
+
+function TestOctalLiteralUsingNumberFunction() {
+ assertEquals(0, Number('0o0'));
+ assertEquals(0, Number('0O0'));
+ assertEquals(1, Number('0o1'));
+ assertEquals(7, Number('0o7'));
+ assertEquals(8, Number('0o10'));
+ assertEquals(63, Number('0o77'));
+}
+TestOctalLiteralUsingNumberFunction();
+
+
+function TestBinaryLiteral() {
+ assertEquals(0, 0b0);
+ assertEquals(0, 0B0);
+ assertEquals(1, 0b1);
+ assertEquals(2, 0b10);
+ assertEquals(3, 0b11);
+}
+TestBinaryLiteral();
+
+
+function TestBinaryLiteralUsingNumberFunction() {
+ assertEquals(0, Number('0b0'));
+ assertEquals(0, Number('0B0'));
+ assertEquals(1, Number('0b1'));
+ assertEquals(2, Number('0b10'));
+ assertEquals(3, Number('0b11'));
+}
+TestBinaryLiteralUsingNumberFunction();
+
+
+// parseInt should (probably) not support 0b and 0o.
+// https://bugs.ecmascript.org/show_bug.cgi?id=1585
+function TestParseIntDoesNotSupportOctalNorBinary() {
+ assertEquals(0, parseInt('0o77'));
+ assertEquals(0, parseInt('0o77', 8));
+ assertEquals(0, parseInt('0b11'));
+ assertEquals(0, parseInt('0b11', 2));
+}
+TestParseIntDoesNotSupportOctalNorBinary();
+
+
+function TestParseFloatDoesNotSupportOctalNorBinary() {
+ assertEquals(0, parseFloat('0o77'));
+ assertEquals(0, parseFloat('0b11'));
+}
+TestParseFloatDoesNotSupportOctalNorBinary();
diff --git a/deps/v8/test/mjsunit/harmony/object-observe.js b/deps/v8/test/mjsunit/harmony/object-observe.js
index 0434ccdcb6..103dda6567 100644
--- a/deps/v8/test/mjsunit/harmony/object-observe.js
+++ b/deps/v8/test/mjsunit/harmony/object-observe.js
@@ -637,7 +637,8 @@ Object.observe(obj1, recursiveObserver2);
Object.observe(obj2, recursiveObserver2);
++obj1.a;
Object.deliverChangeRecords(recursiveObserver2);
-assertEquals(199, recordCount);
+// TODO(verwaest): Disabled because of bug 2774.
+// assertEquals(199, recordCount);
// Observing named properties.
diff --git a/deps/v8/test/mjsunit/harmony/proxies-for.js b/deps/v8/test/mjsunit/harmony/proxies-for.js
index 3d419c6dca..d0f2a022fd 100644
--- a/deps/v8/test/mjsunit/harmony/proxies-for.js
+++ b/deps/v8/test/mjsunit/harmony/proxies-for.js
@@ -62,10 +62,10 @@ TestForIn(["b", "d"], {
getPropertyNames: function() { return ["a", "b", "c", "d", "e"] },
getPropertyDescriptor: function(k) {
switch (k) {
- case "a": return {enumerable: false, value: "3"};
- case "b": return {enumerable: true, get get() {}};
- case "c": return {value: 4};
- case "d": return {get enumerable() { return true }};
+ case "a": return {enumerable: false, value: "3", configurable: true};
+ case "b": return {enumerable: true, get get() {}, configurable: true};
+ case "c": return {value: 4, configurable: true};
+ case "d": return {get enumerable() { return true }, configurable: true};
default: return undefined;
}
}
@@ -103,7 +103,7 @@ function TestForInDerived2(create, properties, handler) {
TestForInDerived(["0", "a"], {
enumerate: function() { return [0, "a"] },
getPropertyDescriptor: function(k) {
- return k == "0" || k == "a" ? {} : undefined
+ return k == "0" || k == "a" ? {configurable: true} : undefined
}
})
@@ -111,7 +111,7 @@ TestForInDerived(["null", "a"], {
enumerate: function() { return this.enumerate2() },
enumerate2: function() { return [null, "a"] },
getPropertyDescriptor: function(k) {
- return k == "null" || k == "a" ? {} : undefined
+ return k == "null" || k == "a" ? {configurable: true} : undefined
}
})
@@ -119,10 +119,10 @@ TestForInDerived(["b", "d"], {
getPropertyNames: function() { return ["a", "b", "c", "d", "e"] },
getPropertyDescriptor: function(k) {
switch (k) {
- case "a": return {enumerable: false, value: "3"};
- case "b": return {enumerable: true, get get() {}};
- case "c": return {value: 4};
- case "d": return {get enumerable() { return true }};
+ case "a": return {enumerable: false, value: "3", configurable: true};
+ case "b": return {enumerable: true, get get() {}, configurable: true};
+ case "c": return {value: 4, configurable: true};
+ case "d": return {get enumerable() { return true }, configurable: true};
default: return undefined;
}
}
diff --git a/deps/v8/test/mjsunit/harmony/proxies-with.js b/deps/v8/test/mjsunit/harmony/proxies-with.js
new file mode 100644
index 0000000000..94de25e3ea
--- /dev/null
+++ b/deps/v8/test/mjsunit/harmony/proxies-with.js
@@ -0,0 +1,446 @@
+// Copyright 2011 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --harmony-proxies
+
+
+// Helper.
+
+function TestWithProxies(test, x, y, z) {
+ test(Proxy.create, x, y, z)
+ test(function(h) {return Proxy.createFunction(h, function() {})}, x, y, z)
+}
+
+
+
+// Getting.
+
+function TestWithGet(handler) {
+ TestWithProxies(TestWithGet2, handler)
+}
+
+var c = "global"
+var key = ""
+
+function TestWithGet2(create, handler) {
+ var b = "local"
+
+ var p = create(handler)
+ with (p) {
+ assertEquals("onproxy", a)
+ assertEquals("local", b)
+ assertEquals("global", c)
+ }
+
+ var o = Object.create(p, {d: {value: "own"}})
+ with (o) {
+ assertEquals("onproxy", a)
+ assertEquals("local", b)
+ assertEquals("global", c)
+ assertEquals("own", d)
+ }
+}
+
+TestWithGet({
+ get: function(r, k) { key = k; return k === "a" ? "onproxy" : undefined },
+ getPropertyDescriptor: function(k) {
+ key = k;
+ return k === "a" ? {value: "onproxy", configurable: true} : undefined
+ }
+})
+
+TestWithGet({
+ get: function(r, k) { return this.get2(r, k) },
+ get2: function(r, k) { key = k; return k === "a" ? "onproxy" : undefined },
+ getPropertyDescriptor: function(k) {
+ key = k;
+ return k === "a" ? {value: "onproxy", configurable: true} : undefined
+ }
+})
+
+TestWithGet({
+ getPropertyDescriptor: function(k) {
+ key = k;
+ return k === "a" ? {value: "onproxy", configurable: true} : undefined
+ }
+})
+
+TestWithGet({
+ getPropertyDescriptor: function(k) { return this.getPropertyDescriptor2(k) },
+ getPropertyDescriptor2: function(k) {
+ key = k;
+ return k === "a" ? {value: "onproxy", configurable: true} : undefined
+ }
+})
+
+TestWithGet({
+ getPropertyDescriptor: function(k) {
+ key = k;
+ return k === "a" ?
+ {get value() { return "onproxy" }, configurable: true} : undefined
+ }
+})
+
+TestWithGet({
+ get: undefined,
+ getPropertyDescriptor: function(k) {
+ key = k;
+ return k === "a" ? {value: "onproxy", configurable: true} : undefined
+ }
+})
+
+
+
+// Invoking.
+
+function TestWithGetCall(handler) {
+ TestWithProxies(TestWithGetCall2, handler)
+}
+
+var receiver = null
+var c = function() { return "global" }
+
+function TestWithGetCall2(create, handler) {
+ var b = function() { return "local" }
+
+ var p = create(handler)
+ with (p) {
+ receiver = null
+ assertEquals("onproxy", a())
+ assertSame(p, receiver)
+ assertEquals("local", b())
+ assertEquals("global", c())
+ }
+
+ var o = Object.create(p, {d: {value: function() { return "own" }}})
+ with (o) {
+ receiver = null
+ assertEquals("onproxy", a())
+ assertSame(o, receiver)
+ assertEquals("local", b())
+ assertEquals("global", c())
+ assertEquals("own", d())
+ }
+}
+
+function onproxy() { receiver = this; return "onproxy" }
+
+TestWithGetCall({
+ get: function(r, k) { key = k; return k === "a" ? onproxy : undefined },
+ getPropertyDescriptor: function(k) {
+ key = k;
+ return k === "a" ? {value: onproxy, configurable: true} : undefined
+ }
+})
+
+TestWithGetCall({
+ get: function(r, k) { return this.get2(r, k) },
+ get2: function(r, k) { key = k; return k === "a" ? onproxy : undefined },
+ getPropertyDescriptor: function(k) {
+ key = k;
+ return k === "a" ? {value: onproxy, configurable: true} : undefined
+ }
+})
+
+TestWithGetCall({
+ getPropertyDescriptor: function(k) {
+ key = k;
+ return k === "a" ? {value: onproxy, configurable: true} : undefined
+ }
+})
+
+TestWithGetCall({
+ getPropertyDescriptor: function(k) { return this.getPropertyDescriptor2(k) },
+ getPropertyDescriptor2: function(k) {
+ key = k;
+ return k === "a" ? {value: onproxy, configurable: true} : undefined
+ }
+})
+
+TestWithGetCall({
+ getPropertyDescriptor: function(k) {
+ key = k;
+ return k === "a" ?
+ {get value() { return onproxy }, configurable: true} : undefined
+ }
+})
+
+TestWithGetCall({
+ get: undefined,
+ getPropertyDescriptor: function(k) {
+ key = k;
+ return k === "a" ? {value: onproxy, configurable: true} : undefined
+ }
+})
+
+
+function TestWithGetCallThrow(handler) {
+ TestWithProxies(TestWithGetCallThrow2, handler)
+}
+
+function TestWithGetCallThrow2(create, handler) {
+ var b = function() { return "local" }
+
+ var p = create(handler)
+ with (p) {
+ assertThrows(function(){ a() }, "myexn")
+ assertEquals("local", b())
+ assertEquals("global", c())
+ }
+
+ var o = Object.create(p, {d: {value: function() { return "own" }}})
+ with (o) {
+ assertThrows(function(){ a() }, "myexn")
+ assertEquals("local", b())
+ assertEquals("global", c())
+ assertEquals("own", d())
+ }
+}
+
+function onproxythrow() { throw "myexn" }
+
+TestWithGetCallThrow({
+ get: function(r, k) { key = k; return k === "a" ? onproxythrow : undefined },
+ getPropertyDescriptor: function(k) {
+ key = k;
+ return k === "a" ? {value: onproxythrow, configurable: true} : undefined
+ }
+})
+
+TestWithGetCallThrow({
+ get: function(r, k) { return this.get2(r, k) },
+ get2: function(r, k) { key = k; return k === "a" ? onproxythrow : undefined },
+ getPropertyDescriptor: function(k) {
+ key = k;
+ return k === "a" ? {value: onproxythrow, configurable: true} : undefined
+ }
+})
+
+TestWithGetCallThrow({
+ getPropertyDescriptor: function(k) {
+ key = k;
+ return k === "a" ? {value: onproxythrow, configurable: true} : undefined
+ }
+})
+
+TestWithGetCallThrow({
+ getPropertyDescriptor: function(k) { return this.getPropertyDescriptor2(k) },
+ getPropertyDescriptor2: function(k) {
+ key = k;
+ return k === "a" ? {value: onproxythrow, configurable: true} : undefined
+ }
+})
+
+TestWithGetCallThrow({
+ getPropertyDescriptor: function(k) {
+ key = k;
+ return k === "a" ?
+ {get value() { return onproxythrow }, configurable: true} : undefined
+ }
+})
+
+TestWithGetCallThrow({
+ get: undefined,
+ getPropertyDescriptor: function(k) {
+ key = k;
+ return k === "a" ? {value: onproxythrow, configurable: true} : undefined
+ }
+})
+
+
+
+// Setting.
+
+var key
+var val
+
+function TestWithSet(handler, hasSetter) {
+ TestWithProxies(TestWithSet2, handler, hasSetter)
+}
+
+var c = "global"
+
+function TestWithSet2(create, handler, hasSetter) {
+ var b = "local"
+
+ var p = create(handler)
+ key = val = undefined
+ with (p) {
+ a = "set"
+ assertEquals("a", key)
+ assertEquals("set", val)
+ assertEquals("local", b)
+ assertEquals("global", c)
+ b = "local"
+ c = "global"
+ assertEquals("a", key)
+ assertEquals("set", val)
+ }
+
+ if (!hasSetter) return
+
+ var o = Object.create(p, {d: {value: "own"}})
+ key = val = undefined
+ with (o) {
+ a = "set"
+ assertEquals("a", key)
+ assertEquals("set", val)
+ assertEquals("local", b)
+ assertEquals("global", c)
+ assertEquals("own", d)
+ b = "local"
+ c = "global"
+ d = "own"
+ assertEquals("a", key)
+ assertEquals("set", val)
+ }
+}
+
+TestWithSet({
+ set: function(r, k, v) { key = k; val = v; return true },
+ getPropertyDescriptor: function(k) {
+ return k === "a" ? {writable: true, configurable: true} : undefined
+ }
+})
+
+TestWithSet({
+ set: function(r, k, v) { return this.set2(r, k, v) },
+ set2: function(r, k, v) { key = k; val = v; return true },
+ getPropertyDescriptor: function(k) {
+ return k === "a" ? {writable: true, configurable: true} : undefined
+ }
+})
+
+TestWithSet({
+ getPropertyDescriptor: function(k) {
+ return this.getOwnPropertyDescriptor(k)
+ },
+ getOwnPropertyDescriptor: function(k) {
+ return k === "a" ? {writable: true, configurable: true} : undefined
+ },
+ defineProperty: function(k, desc) { key = k; val = desc.value }
+})
+
+TestWithSet({
+ getOwnPropertyDescriptor: function(k) {
+ return this.getPropertyDescriptor2(k)
+ },
+ getPropertyDescriptor: function(k) { return this.getPropertyDescriptor2(k) },
+ getPropertyDescriptor2: function(k) {
+ return k === "a" ? {writable: true, configurable: true} : undefined
+ },
+ defineProperty: function(k, desc) { this.defineProperty2(k, desc) },
+ defineProperty2: function(k, desc) { key = k; val = desc.value }
+})
+
+TestWithSet({
+ getOwnPropertyDescriptor: function(k) {
+ return this.getPropertyDescriptor(k)
+ },
+ getPropertyDescriptor: function(k) {
+ return k === "a" ?
+ {get writable() { return true }, configurable: true} : undefined
+ },
+ defineProperty: function(k, desc) { key = k; val = desc.value }
+})
+
+TestWithSet({
+ getOwnPropertyDescriptor: function(k) {
+ return this.getPropertyDescriptor(k)
+ },
+ getPropertyDescriptor: function(k) {
+ return k === "a" ?
+ {set: function(v) { key = k; val = v }, configurable: true} : undefined
+ }
+}, true)
+
+TestWithSet({
+ getOwnPropertyDescriptor: function(k) {
+ return this.getPropertyDescriptor(k)
+ },
+ getPropertyDescriptor: function(k) { return this.getPropertyDescriptor2(k) },
+ getPropertyDescriptor2: function(k) {
+ return k === "a" ?
+ {set: function(v) { key = k; val = v }, configurable: true} : undefined
+ }
+}, true)
+
+TestWithSet({
+ getOwnPropertyDescriptor: function(k) { return null },
+ getPropertyDescriptor: function(k) {
+ return k === "a" ? {writable: true, configurable: true} : undefined
+ },
+ defineProperty: function(k, desc) { key = k; val = desc.value }
+})
+
+
+function TestWithSetThrow(handler, hasSetter) {
+ TestWithProxies(TestWithSetThrow2, handler, hasSetter)
+}
+
+function TestWithSetThrow2(create, handler, hasSetter) {
+ var p = create(handler)
+ assertThrows(function(){
+ with (p) {
+ a = 1
+ }
+ }, "myexn")
+
+ if (!hasSetter) return
+
+ var o = Object.create(p, {})
+ assertThrows(function(){
+ with (o) {
+ a = 1
+ }
+ }, "myexn")
+}
+
+TestWithSetThrow({
+ set: function(r, k, v) { throw "myexn" },
+ getPropertyDescriptor: function(k) {
+ return k === "a" ? {writable: true, configurable: true} : undefined
+ }
+})
+
+TestWithSetThrow({
+ getPropertyDescriptor: function(k) { throw "myexn" },
+})
+
+TestWithSetThrow({
+ getPropertyDescriptor: function(k) {
+ return k === "a" ? {writable: true, configurable: true} : undefined
+ },
+ defineProperty: function(k, desc) { throw "myexn" }
+})
+
+TestWithSetThrow({
+ getPropertyDescriptor: function(k) {
+ return k === "a" ?
+ {set: function() { throw "myexn" }, configurable: true} : undefined
+ }
+}, true)
diff --git a/deps/v8/test/mjsunit/harmony/typedarrays.js b/deps/v8/test/mjsunit/harmony/typedarrays.js
index e1b0e653d6..c6d130fc0c 100644
--- a/deps/v8/test/mjsunit/harmony/typedarrays.js
+++ b/deps/v8/test/mjsunit/harmony/typedarrays.js
@@ -117,31 +117,33 @@ TestArrayBufferSlice();
// Typed arrays
-function TestTypedArray(proto, elementSize, typicalElement) {
+function TestTypedArray(constr, elementSize, typicalElement) {
+ assertSame(elementSize, constr.BYTES_PER_ELEMENT);
+
var ab = new ArrayBuffer(256*elementSize);
- var a0 = new proto(30);
+ var a0 = new constr(30);
assertSame(elementSize, a0.BYTES_PER_ELEMENT);
assertSame(30, a0.length);
assertSame(30*elementSize, a0.byteLength);
assertSame(0, a0.byteOffset);
assertSame(30*elementSize, a0.buffer.byteLength);
- var aLen0 = new proto(0);
+ var aLen0 = new constr(0);
assertSame(elementSize, aLen0.BYTES_PER_ELEMENT);
assertSame(0, aLen0.length);
assertSame(0, aLen0.byteLength);
assertSame(0, aLen0.byteOffset);
assertSame(0, aLen0.buffer.byteLength);
- var aOverBufferLen0 = new proto(ab, 128*elementSize, 0);
+ var aOverBufferLen0 = new constr(ab, 128*elementSize, 0);
assertSame(ab, aOverBufferLen0.buffer);
assertSame(elementSize, aOverBufferLen0.BYTES_PER_ELEMENT);
assertSame(0, aOverBufferLen0.length);
assertSame(0, aOverBufferLen0.byteLength);
assertSame(128*elementSize, aOverBufferLen0.byteOffset);
- var a1 = new proto(ab, 128*elementSize, 128);
+ var a1 = new constr(ab, 128*elementSize, 128);
assertSame(ab, a1.buffer);
assertSame(elementSize, a1.BYTES_PER_ELEMENT);
assertSame(128, a1.length);
@@ -149,20 +151,20 @@ function TestTypedArray(proto, elementSize, typicalElement) {
assertSame(128*elementSize, a1.byteOffset);
- var a2 = new proto(ab, 64*elementSize, 128);
+ var a2 = new constr(ab, 64*elementSize, 128);
assertSame(ab, a2.buffer);
assertSame(elementSize, a2.BYTES_PER_ELEMENT);
assertSame(128, a2.length);
assertSame(128*elementSize, a2.byteLength);
assertSame(64*elementSize, a2.byteOffset);
- var a3 = new proto(ab, 192*elementSize);
+ var a3 = new constr(ab, 192*elementSize);
assertSame(ab, a3.buffer);
assertSame(64, a3.length);
assertSame(64*elementSize, a3.byteLength);
assertSame(192*elementSize, a3.byteOffset);
- var a4 = new proto(ab);
+ var a4 = new constr(ab);
assertSame(ab, a4.buffer);
assertSame(256, a4.length);
assertSame(256*elementSize, a4.byteLength);
@@ -198,31 +200,30 @@ function TestTypedArray(proto, elementSize, typicalElement) {
assertSame(typicalElement, a4[i]);
}
- var aAtTheEnd = new proto(ab, 256*elementSize);
+ var aAtTheEnd = new constr(ab, 256*elementSize);
assertSame(elementSize, aAtTheEnd.BYTES_PER_ELEMENT);
assertSame(0, aAtTheEnd.length);
assertSame(0, aAtTheEnd.byteLength);
assertSame(256*elementSize, aAtTheEnd.byteOffset);
- assertThrows(function () { new proto(ab, 257*elementSize); }, RangeError);
+ assertThrows(function () { new constr(ab, 257*elementSize); }, RangeError);
assertThrows(
- function () { new proto(ab, 128*elementSize, 192); },
+ function () { new constr(ab, 128*elementSize, 192); },
RangeError);
if (elementSize !== 1) {
- assertThrows(function() { new proto(ab, 128*elementSize - 1, 10); },
+ assertThrows(function() { new constr(ab, 128*elementSize - 1, 10); },
RangeError);
var unalignedArrayBuffer = new ArrayBuffer(10*elementSize + 1);
- var goodArray = new proto(unalignedArrayBuffer, 0, 10);
+ var goodArray = new constr(unalignedArrayBuffer, 0, 10);
assertSame(10, goodArray.length);
assertSame(10*elementSize, goodArray.byteLength);
- assertThrows(function() { new proto(unalignedArrayBuffer)}, RangeError);
- assertThrows(function() { new proto(unalignedArrayBuffer, 5*elementSize)},
+ assertThrows(function() { new constr(unalignedArrayBuffer)}, RangeError);
+ assertThrows(function() { new constr(unalignedArrayBuffer, 5*elementSize)},
RangeError);
- assertThrows(function() { new proto() }, TypeError);
}
- var aFromString = new proto("30");
+ var aFromString = new constr("30");
assertSame(elementSize, aFromString.BYTES_PER_ELEMENT);
assertSame(30, aFromString.length);
assertSame(30*elementSize, aFromString.byteLength);
@@ -233,7 +234,7 @@ function TestTypedArray(proto, elementSize, typicalElement) {
for (i = 0; i < 30; i++) {
jsArray.push(typicalElement);
}
- var aFromArray = new proto(jsArray);
+ var aFromArray = new constr(jsArray);
assertSame(elementSize, aFromArray.BYTES_PER_ELEMENT);
assertSame(30, aFromArray.length);
assertSame(30*elementSize, aFromArray.byteLength);
@@ -244,12 +245,18 @@ function TestTypedArray(proto, elementSize, typicalElement) {
}
var abLen0 = new ArrayBuffer(0);
- var aOverAbLen0 = new proto(abLen0);
+ var aOverAbLen0 = new constr(abLen0);
assertSame(abLen0, aOverAbLen0.buffer);
assertSame(elementSize, aOverAbLen0.BYTES_PER_ELEMENT);
assertSame(0, aOverAbLen0.length);
assertSame(0, aOverAbLen0.byteLength);
assertSame(0, aOverAbLen0.byteOffset);
+
+ var aNoParam = new constr();
+ assertSame(elementSize, aNoParam.BYTES_PER_ELEMENT);
+ assertSame(0, aNoParam.length);
+ assertSame(0, aNoParam.byteLength);
+ assertSame(0, aNoParam.byteOffset);
}
TestTypedArray(Uint8Array, 1, 0xFF);
@@ -448,10 +455,18 @@ function TestTypedArraySet() {
// Invalid source
var a = new Uint16Array(50);
- assertThrows(function() { a.set(0) }, TypeError);
- assertThrows(function() { a.set({}) }, TypeError);
+ var expected = [];
+ for (i = 0; i < 50; i++) {
+ a[i] = i;
+ expected.push(i);
+ }
+ a.set({});
+ assertArrayPrefix(expected, a);
assertThrows(function() { a.set.call({}) }, TypeError);
assertThrows(function() { a.set.call([]) }, TypeError);
+
+ assertThrows(function() { a.set(0); }, TypeError);
+ assertThrows(function() { a.set(0, 1); }, TypeError);
}
TestTypedArraySet();
diff --git a/deps/v8/test/mjsunit/manual-parallel-recompile.js b/deps/v8/test/mjsunit/manual-parallel-recompile.js
index b502fb19ad..84bfff1a57 100644
--- a/deps/v8/test/mjsunit/manual-parallel-recompile.js
+++ b/deps/v8/test/mjsunit/manual-parallel-recompile.js
@@ -33,14 +33,6 @@ if (!%IsParallelRecompilationSupported()) {
quit();
}
-function assertUnoptimized(fun) {
- assertTrue(%GetOptimizationStatus(fun) != 1);
-}
-
-function assertOptimized(fun) {
- assertTrue(%GetOptimizationStatus(fun) != 2);
-}
-
function f(x) {
var xx = x * x;
var xxstr = xx.toString();
@@ -65,11 +57,8 @@ assertUnoptimized(g);
%OptimizeFunctionOnNextCall(g, "parallel");
f(g(2)); // Trigger optimization.
-assertUnoptimized(f); // Not yet optimized.
-assertUnoptimized(g);
-
-%CompleteOptimization(f); // Wait till optimized code is installed.
-%CompleteOptimization(g);
+assertUnoptimized(f, "no sync"); // Not yet optimized while parallel thread
+assertUnoptimized(g, "no sync"); // is running.
-assertOptimized(f); // Optimized now.
-assertOptimized(g);
+assertOptimized(f, "sync"); // Optimized once we sync with the parallel thread.
+assertOptimized(g, "sync");
diff --git a/deps/v8/test/mjsunit/math-floor-of-div-minus-zero.js b/deps/v8/test/mjsunit/math-floor-of-div-minus-zero.js
index 7349165854..269e96f50b 100644
--- a/deps/v8/test/mjsunit/math-floor-of-div-minus-zero.js
+++ b/deps/v8/test/mjsunit/math-floor-of-div-minus-zero.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --nouse_inlining --noparallel-recompilation
+// Flags: --allow-natives-syntax --nouse_inlining
// Test for negative zero that doesn't need bail out
@@ -38,4 +38,4 @@ test_div_no_deopt_minus_zero();
test_div_no_deopt_minus_zero();
%OptimizeFunctionOnNextCall(test_div_no_deopt_minus_zero);
test_div_no_deopt_minus_zero();
-assertTrue(2 != %GetOptimizationStatus(test_div_no_deopt_minus_zero));
+assertOptimized(test_div_no_deopt_minus_zero);
diff --git a/deps/v8/test/mjsunit/md5.js b/deps/v8/test/mjsunit/md5.js
new file mode 100644
index 0000000000..38dc802312
--- /dev/null
+++ b/deps/v8/test/mjsunit/md5.js
@@ -0,0 +1,211 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
+// Digest Algorithm, as defined in RFC 1321.
+// Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.
+// Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+// Distributed under the BSD License
+// See http://pajhome.org.uk/crypt/md5 for more info.
+//
+
+function hex_md5(s) {
+ return binl2hex(core_md5(str2binl(s), s.length * 8));
+}
+
+function core_md5(x, len) {
+ /* append padding */
+ x[len >> 5] |= 0x80 << ((len) % 32);
+ x[(((len + 64) >>> 9) << 4) + 14] = len;
+
+ var a = 1732584193;
+ var b = -271733879;
+ var c = -1732584194;
+ var d = 271733878;
+
+ for (var i = 0; i < x.length; i += 16) {
+ var olda = a;
+ var oldb = b;
+ var oldc = c;
+ var oldd = d;
+
+ a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);
+ d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);
+ c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);
+ b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);
+ a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);
+ d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);
+ c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);
+ b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);
+ a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);
+ d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);
+ c = md5_ff(c, d, a, b, x[i+10], 17, -42063);
+ b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);
+ a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);
+ d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);
+ c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);
+ b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);
+
+ a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);
+ d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);
+ c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);
+ b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);
+ a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);
+ d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);
+ c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);
+ b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);
+ a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);
+ d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);
+ c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);
+ b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);
+ a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);
+ d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);
+ c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);
+ b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);
+
+ a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);
+ d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);
+ c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);
+ b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);
+ a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);
+ d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);
+ c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);
+ b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);
+ a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);
+ d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);
+ c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);
+ b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);
+ a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);
+ d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);
+ c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);
+ b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);
+
+ a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);
+ d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);
+ c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);
+ b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);
+ a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);
+ d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);
+ c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);
+ b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);
+ a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);
+ d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);
+ c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);
+ b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);
+ a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);
+ d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);
+ c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);
+ b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);
+
+ a = safe_add(a, olda);
+ b = safe_add(b, oldb);
+ c = safe_add(c, oldc);
+ d = safe_add(d, oldd);
+ }
+ return Array(a, b, c, d);
+}
+
+function md5_cmn(q, a, b, x, s, t) {
+ return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);
+}
+
+function md5_ff(a, b, c, d, x, s, t) {
+ return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
+}
+
+function md5_gg(a, b, c, d, x, s, t) {
+ return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
+}
+
+function md5_hh(a, b, c, d, x, s, t) {
+ return md5_cmn(b ^ c ^ d, a, b, x, s, t);
+}
+
+function md5_ii(a, b, c, d, x, s, t) {
+ return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
+}
+
+function safe_add(x, y) {
+ var lsw = (x & 0xFFFF) + (y & 0xFFFF);
+ var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+ return (msw << 16) | (lsw & 0xFFFF);
+}
+
+function bit_rol(num, cnt) {
+ return (num << cnt) | (num >>> (32 - cnt));
+}
+
+function str2binl(str) {
+ var bin = Array();
+ var mask = (1 << 8) - 1;
+ for(var i = 0; i < str.length * 8; i += 8)
+ bin[i>>5] |= (str.charCodeAt(i / 8) & mask) << (i%32);
+ return bin;
+}
+
+function binl2hex(binarray) {
+ var hex_tab = "0123456789abcdef";
+ var str = "";
+ for(var i = 0; i < binarray.length * 4; i++) {
+ str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) +
+ hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF);
+ }
+ return str;
+}
+
+var plainText = "Rebellious subjects, enemies to peace,\n\
+Profaners of this neighbour-stained steel,--\n\
+Will they not hear? What, ho! you men, you beasts,\n\
+That quench the fire of your pernicious rage\n\
+With purple fountains issuing from your veins,\n\
+On pain of torture, from those bloody hands\n\
+Throw your mistemper'd weapons to the ground,\n\
+And hear the sentence of your moved prince.\n\
+Three civil brawls, bred of an airy word,\n\
+By thee, old Capulet, and Montague,\n\
+Have thrice disturb'd the quiet of our streets,\n\
+And made Verona's ancient citizens\n\
+Cast by their grave beseeming ornaments,\n\
+To wield old partisans, in hands as old,\n\
+Canker'd with peace, to part your canker'd hate:\n\
+If ever you disturb our streets again,\n\
+Your lives shall pay the forfeit of the peace.\n\
+For this time, all the rest depart away:\n\
+You Capulet; shall go along with me:\n\
+And, Montague, come you this afternoon,\n\
+To know our further pleasure in this case,\n\
+To old Free-town, our common judgment-place.\n\
+Once more, on pain of death, all men depart.\n"
+
+for (var i = 0; i < 4; ++i) {
+ plainText += plainText;
+}
+
+assertEquals(hex_md5("abc"), "900150983cd24fb0d6963f7d28e17f72");
+for (var i = 0; i < 11; ++i) {
+ assertEquals(hex_md5(plainText), "1b8719c72d5d8bfd06e096ef6c6288c5");
+}
diff --git a/deps/v8/test/mjsunit/mjsunit.js b/deps/v8/test/mjsunit/mjsunit.js
index 25d7c00432..83449cc1e6 100644
--- a/deps/v8/test/mjsunit/mjsunit.js
+++ b/deps/v8/test/mjsunit/mjsunit.js
@@ -99,6 +99,14 @@ var assertInstanceof;
// Assert that this code is never executed (i.e., always fails if executed).
var assertUnreachable;
+// Assert that the function code is (not) optimized. If "no sync" is passed
+// as second argument, we do not wait for the parallel optimization thread to
+// finish when polling for optimization status.
+// Only works with --allow-natives-syntax.
+var assertOptimized;
+var assertUnoptimized;
+
+
(function () { // Scope for utility functions.
function classOf(object) {
@@ -353,5 +361,26 @@ var assertUnreachable;
throw new MjsUnitAssertionError(message);
};
+
+ var OptimizationStatus;
+ try {
+ OptimizationStatus =
+ new Function("fun", "sync", "return %GetOptimizationStatus(fun, sync);");
+ } catch (e) {
+ OptimizationStatus = function() {
+ throw new Error("natives syntax not allowed");
+ }
+ }
+
+ assertUnoptimized = function assertUnoptimized(fun, sync_opt, name_opt) {
+ if (sync_opt === undefined) sync_opt = "";
+ assertTrue(OptimizationStatus(fun, sync_opt) != 1, name_opt);
+ }
+
+ assertOptimized = function assertOptimized(fun, sync_opt, name_opt) {
+ if (sync_opt === undefined) sync_opt = "";
+ assertTrue(OptimizationStatus(fun, sync_opt) != 2, name_opt);
+ }
+
})();
diff --git a/deps/v8/test/mjsunit/mjsunit.status b/deps/v8/test/mjsunit/mjsunit.status
index 7e8d5b9584..50a4c7090f 100644
--- a/deps/v8/test/mjsunit/mjsunit.status
+++ b/deps/v8/test/mjsunit/mjsunit.status
@@ -228,6 +228,10 @@ debug-liveedit-double-call: SKIP
# As noted above none of them are run in the arm.debug case.
fuzz-natives-part4: SKIP
+# NaCl builds have problems with this test since Pepper_28.
+# V8 Issue 2786
+math-exp-precision: SKIP
+
# Requires bigger stack size in the Genesis and if stack size is increased,
# the test requires too much time to run. However, the problem test covers
# should be platform-independent.
diff --git a/deps/v8/test/mjsunit/never-optimize.js b/deps/v8/test/mjsunit/never-optimize.js
new file mode 100644
index 0000000000..55b1f11981
--- /dev/null
+++ b/deps/v8/test/mjsunit/never-optimize.js
@@ -0,0 +1,63 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --allow-natives-syntax
+
+function o1() {
+}
+
+if (%GetOptimizationStatus(o1) != 4) {
+ // 4 == optimization disabled.
+ o1(); o1();
+ %OptimizeFunctionOnNextCall(o1);
+ o1();
+
+ // Check that the given function was optimized.
+ assertOptimized(o1);
+
+ // Test the %NeverOptimizeFunction runtime call.
+ %NeverOptimizeFunction(u1);
+ function u1() {
+ }
+
+ function u2() {
+ u1();
+ }
+
+ u1(); u1();
+ u2(); u2();
+
+ %OptimizeFunctionOnNextCall(u1);
+ %OptimizeFunctionOnNextCall(u2);
+
+ u1(); u1();
+ u2(); u2();
+
+ // 2 => not optimized.
+ assertUnoptimized(u1);
+ assertOptimized(u2);
+} \ No newline at end of file
diff --git a/deps/v8/test/mjsunit/opt-elements-kind.js b/deps/v8/test/mjsunit/opt-elements-kind.js
index 3df1d9ba2b..83ad702c2d 100644
--- a/deps/v8/test/mjsunit/opt-elements-kind.js
+++ b/deps/v8/test/mjsunit/opt-elements-kind.js
@@ -108,24 +108,24 @@ function assertKind(expected, obj, name_opt) {
assertEquals(expected, getKind(obj), name_opt);
}
+%NeverOptimizeFunction(construct_smis);
function construct_smis() {
- try {} catch (e) {} // TODO(titzer): DisableOptimization
var a = [0, 0, 0];
a[0] = 0; // Send the COW array map to the steak house.
assertKind(elements_kind.fast_smi_only, a);
return a;
}
+%NeverOptimizeFunction(construct_doubles);
function construct_doubles() {
- try {} catch (e) {} // TODO(titzer): DisableOptimization
var a = construct_smis();
a[0] = 1.5;
assertKind(elements_kind.fast_double, a);
return a;
}
+%NeverOptimizeFunction(convert_mixed);
function convert_mixed(array, value, kind) {
- try {} catch (e) {} // TODO(titzer): DisableOptimization
array[1] = value;
assertKind(kind, array);
assertEquals(value, array[1]);
diff --git a/deps/v8/test/mjsunit/osr-elements-kind.js b/deps/v8/test/mjsunit/osr-elements-kind.js
index 9b0f506b48..6d3c8176af 100644
--- a/deps/v8/test/mjsunit/osr-elements-kind.js
+++ b/deps/v8/test/mjsunit/osr-elements-kind.js
@@ -109,18 +109,19 @@ function assertKind(expected, obj, name_opt) {
}
// long-running loop forces OSR.
+%NeverOptimizeFunction(construct_smis);
+%NeverOptimizeFunction(construct_doubles);
+%NeverOptimizeFunction(convert_mixed);
for (var i = 0; i < 1000000; i++) { }
if (support_smi_only_arrays) {
function construct_smis() {
- try {} catch (e) {} // TODO(titzer): DisableOptimization
var a = [0, 0, 0];
a[0] = 0; // Send the COW array map to the steak house.
assertKind(elements_kind.fast_smi_only, a);
return a;
}
function construct_doubles() {
- try {} catch (e) {} // TODO(titzer): DisableOptimization
var a = construct_smis();
a[0] = 1.5;
assertKind(elements_kind.fast_double, a);
@@ -130,7 +131,6 @@ if (support_smi_only_arrays) {
// Test transition chain SMI->DOUBLE->FAST (crankshafted function will
// transition to FAST directly).
function convert_mixed(array, value, kind) {
- try {} catch (e) {} // TODO(titzer): DisableOptimization
array[1] = value;
assertKind(kind, array);
assertEquals(value, array[1]);
diff --git a/deps/v8/test/mjsunit/parallel-initial-prototype-change.js b/deps/v8/test/mjsunit/parallel-initial-prototype-change.js
index 9f698bae63..942d9abc3c 100644
--- a/deps/v8/test/mjsunit/parallel-initial-prototype-change.js
+++ b/deps/v8/test/mjsunit/parallel-initial-prototype-change.js
@@ -26,17 +26,13 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
-// Flags: --parallel-recompilation --parallel-recompilation-delay=50
+// Flags: --parallel-recompilation --parallel-recompilation-delay=100
if (!%IsParallelRecompilationSupported()) {
print("Parallel recompilation is disabled. Skipping this test.");
quit();
}
-function assertUnoptimized(fun) {
- assertTrue(%GetOptimizationStatus(fun) != 1);
-}
-
function f1(a, i) {
return a[i] + 0.5;
}
@@ -47,9 +43,12 @@ assertEquals(0.5, f1(arr, 0));
// Optimized code of f1 depends on initial object and array maps.
%OptimizeFunctionOnNextCall(f1, "parallel");
+// Trigger optimization in the background thread
assertEquals(0.5, f1(arr, 0));
-assertUnoptimized(f1); // Not yet optimized.
Object.prototype[1] = 1.5; // Invalidate current initial object map.
assertEquals(2, f1(arr, 1));
-%CompleteOptimization(f1); // Conclude optimization with...
-assertUnoptimized(f1); // ... bailing out due to map dependency.
+// Not yet optimized while background thread is running.
+assertUnoptimized(f1, "no sync");
+// Sync with background thread to conclude optimization, which bails out
+// due to map dependency.
+assertUnoptimized(f1, "sync");
diff --git a/deps/v8/test/mjsunit/parallel-invalidate-transition-map.js b/deps/v8/test/mjsunit/parallel-invalidate-transition-map.js
index 2a2276f1e2..716f63198c 100644
--- a/deps/v8/test/mjsunit/parallel-invalidate-transition-map.js
+++ b/deps/v8/test/mjsunit/parallel-invalidate-transition-map.js
@@ -26,17 +26,13 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --track-fields --track-double-fields --allow-natives-syntax
-// Flags: --parallel-recompilation --parallel-recompilation-delay=50
+// Flags: --parallel-recompilation --parallel-recompilation-delay=100
if (!%IsParallelRecompilationSupported()) {
print("Parallel recompilation is disabled. Skipping this test.");
quit();
}
-function assertUnoptimized(fun) {
- assertTrue(%GetOptimizationStatus(fun) != 1);
-}
-
function new_object() {
var o = {};
o.a = 1;
@@ -53,9 +49,9 @@ add_field(new_object());
%OptimizeFunctionOnNextCall(add_field, "parallel");
var o = new_object();
-add_field(o); // Trigger optimization.
-assertUnoptimized(add_field); // Not yet optimized.
-o.c = 2.2; // Invalidate transition map.
-%CompleteOptimization(add_field); // Conclude optimization with...
-assertUnoptimized(add_field); // ... bailing out due to map dependency.
-
+// Trigger optimization in the background thread.
+add_field(o);
+// Invalidate transition map while optimization is underway.
+o.c = 2.2;
+// Sync with background thread to conclude optimization that bailed out.
+assertUnoptimized(add_field, "sync");
diff --git a/deps/v8/test/mjsunit/parallel-optimize-disabled.js b/deps/v8/test/mjsunit/parallel-optimize-disabled.js
index b56303e08f..e19dbd095b 100644
--- a/deps/v8/test/mjsunit/parallel-optimize-disabled.js
+++ b/deps/v8/test/mjsunit/parallel-optimize-disabled.js
@@ -48,4 +48,4 @@ f();
%OptimizeFunctionOnNextCall(g, "parallel");
f(0); // g() is disabled for optimization on inlining attempt.
// Attempt to optimize g() should not run into any assertion.
-%CompleteOptimization(g);
+assertUnoptimized(g, "sync");
diff --git a/deps/v8/test/mjsunit/regress/poly_count_operation.js b/deps/v8/test/mjsunit/regress/poly_count_operation.js
new file mode 100644
index 0000000000..a8a1ed2ebc
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/poly_count_operation.js
@@ -0,0 +1,155 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --allow-natives-syntax
+
+var o1 = {x:1};
+var o2 = {};
+var deopt_getter = false;
+var deopt_setter = false;
+
+function f_mono(o) {
+ return 5 + o.x++;
+}
+
+var to_deopt = f_mono;
+
+var v = 1;
+var g = 0;
+var s = 0;
+
+Object.defineProperty(o2, "x",
+ {get:function() {
+ g++;
+ if (deopt_getter) {
+ deopt_getter = false;
+ %DeoptimizeFunction(to_deopt);
+ }
+ return v;
+ },
+ set:function(new_v) {
+ v = new_v;
+ s++;
+ if (deopt_setter) {
+ deopt_setter = false;
+ %DeoptimizeFunction(to_deopt);
+ }
+ }});
+
+assertEquals(6, f_mono(o2));
+assertEquals(1, g);
+assertEquals(1, s);
+assertEquals(7, f_mono(o2));
+assertEquals(2, g);
+assertEquals(2, s);
+%OptimizeFunctionOnNextCall(f_mono);
+deopt_setter = true;
+assertEquals(8, f_mono(o2));
+assertEquals(3, g);
+assertEquals(3, s);
+
+function f_poly(o) {
+ return 5 + o.x++;
+}
+
+v = 1;
+to_deopt = f_poly;
+
+f_poly(o1);
+f_poly(o1);
+assertEquals(6, f_poly(o2));
+assertEquals(4, g);
+assertEquals(4, s);
+assertEquals(7, f_poly(o2));
+assertEquals(5, g);
+assertEquals(5, s);
+%OptimizeFunctionOnNextCall(f_poly);
+deopt_setter = true;
+assertEquals(8, f_poly(o2));
+assertEquals(6, g);
+assertEquals(6, s);
+
+%OptimizeFunctionOnNextCall(f_poly);
+v = undefined;
+assertEquals(NaN, f_poly(o2));
+assertEquals(7, g);
+assertEquals(7, s);
+
+function f_pre(o) {
+ return 5 + ++o.x;
+}
+
+v = 1;
+to_deopt = f_pre;
+
+f_pre(o1);
+f_pre(o1);
+assertEquals(7, f_pre(o2));
+assertEquals(8, g);
+assertEquals(8, s);
+assertEquals(8, f_pre(o2));
+assertEquals(9, g);
+assertEquals(9, s);
+%OptimizeFunctionOnNextCall(f_pre);
+deopt_setter = true;
+assertEquals(9, f_pre(o2));
+assertEquals(10, g);
+assertEquals(10, s);
+
+%OptimizeFunctionOnNextCall(f_pre);
+v = undefined;
+assertEquals(NaN, f_pre(o2));
+assertEquals(11, g);
+assertEquals(11, s);
+
+
+function f_get(o) {
+ return 5 + o.x++;
+}
+
+v = 1;
+to_deopt = f_get;
+
+f_get(o1);
+f_get(o1);
+assertEquals(6, f_get(o2));
+assertEquals(12, g);
+assertEquals(12, s);
+assertEquals(7, f_get(o2));
+assertEquals(13, g);
+assertEquals(13, s);
+%OptimizeFunctionOnNextCall(f_get);
+deopt_getter = true;
+assertEquals(8, f_get(o2));
+assertEquals(14, g);
+assertEquals(14, s);
+
+%OptimizeFunctionOnNextCall(f_get);
+v = undefined;
+assertEquals(NaN, f_get(o2));
+assertEquals(15, g);
+assertEquals(15, s);
diff --git a/deps/v8/test/mjsunit/regress/regress-1118.js b/deps/v8/test/mjsunit/regress/regress-1118.js
index 3e3920f3dc..4d27963779 100644
--- a/deps/v8/test/mjsunit/regress/regress-1118.js
+++ b/deps/v8/test/mjsunit/regress/regress-1118.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --noparallel-recompilation
+// Flags: --allow-natives-syntax
// An exception thrown in a function optimized by on-stack replacement (OSR)
// should be able to construct a receiver from all optimized stack frames.
@@ -52,7 +52,7 @@ function h() {
g();
} else {
// Run for a bit as long as h is unoptimized.
- while (%GetOptimizationStatus(h) == 2) {
+ while (%GetOptimizationStatus(h, "no sync") == 2) {
for (var j = 0; j < 100; j++) g();
}
g();
diff --git a/deps/v8/test/mjsunit/regress/regress-1713b.js b/deps/v8/test/mjsunit/regress/regress-1713b.js
new file mode 100644
index 0000000000..cc16bf5119
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-1713b.js
@@ -0,0 +1,126 @@
+// Copyright 2011 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --allow-natives-syntax --always-compact --expose-gc
+
+var O = { get f() { return 0; } };
+
+var CODE = [];
+
+var R = [];
+
+function Allocate4Kb(N) {
+ var arr = [];
+ do {arr.push(new Array(1024));} while (--N > 0);
+ return arr;
+}
+
+function AllocateXMb(X) {
+ return Allocate4Kb((1024 * X) / 4);
+}
+
+function Node(v, next) { this.v = v; this.next = next; }
+
+Node.prototype.execute = function (O) {
+ var n = this;
+ while (n.next !== null) n = n.next;
+ n.v(O);
+};
+
+function LongList(N, x) {
+ if (N == 0) return new Node(x, null);
+ return new Node(new Array(1024), LongList(N - 1, x));
+}
+
+var L = LongList(1024, function (O) {
+ for (var i = 0; i < 5; i++) O.f;
+});
+
+
+
+%NeverOptimizeFunction(Incremental);
+function Incremental(O, x) {
+ if (!x) {
+ return;
+ }
+ function CreateCode(i) {
+ var f = new Function("return O.f_" + i);
+ CODE.push(f);
+ f(); // compile
+ f(); // compile
+ f(); // compile
+ }
+
+ for (var i = 0; i < 1e4; i++) CreateCode(i);
+ gc();
+ gc();
+ gc();
+
+ print(">>> 1 <<<");
+
+ L.execute(O);
+
+ L = null;
+ print(">>> 2 <<<");
+ AllocateXMb(8);
+ //rint("1");
+ //llocateXMb(8);
+ //rint("1");
+ //llocateXMb(8);
+
+}
+
+function foo(O, x) {
+ Incremental(O, x);
+
+ print('f');
+
+ for (var i = 0; i < 5; i++) O.f;
+
+
+ print('g');
+
+ bar(x);
+}
+
+function bar(x) {
+ if (!x) return;
+ %DeoptimizeFunction(foo);
+ AllocateXMb(8);
+ AllocateXMb(8);
+}
+
+var O1 = {};
+var O2 = {};
+var O3 = {};
+var O4 = {f:0};
+
+foo(O1, false);
+foo(O2, false);
+foo(O3, false);
+%OptimizeFunctionOnNextCall(foo);
+foo(O4, true);
diff --git a/deps/v8/test/mjsunit/regress/regress-173361.js b/deps/v8/test/mjsunit/regress/regress-173361.js
new file mode 100644
index 0000000000..f9cfb6684c
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-173361.js
@@ -0,0 +1,33 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --harmony
+
+const x = 7;
+
+function f() { const y = 8; }
+f();
diff --git a/deps/v8/test/mjsunit/regress/regress-2132.js b/deps/v8/test/mjsunit/regress/regress-2132.js
index d8987a554a..9eb2dc5b07 100644
--- a/deps/v8/test/mjsunit/regress/regress-2132.js
+++ b/deps/v8/test/mjsunit/regress/regress-2132.js
@@ -35,7 +35,7 @@ mul(0, 0);
mul(0, 0);
%OptimizeFunctionOnNextCall(mul);
assertEquals(0, mul(0, -1));
-assertTrue(%GetOptimizationStatus(mul) != 2);
+assertOptimized(mul);
function div(x, y) {
return (x / y) | 0;
@@ -45,4 +45,4 @@ div(4, 2);
div(4, 2);
%OptimizeFunctionOnNextCall(div);
assertEquals(1, div(5, 3));
-assertTrue(%GetOptimizationStatus(div) != 2);
+assertOptimized(div);
diff --git a/deps/v8/test/mjsunit/regress/regress-2250.js b/deps/v8/test/mjsunit/regress/regress-2250.js
index b3b0db3fc3..9d2fd4412f 100644
--- a/deps/v8/test/mjsunit/regress/regress-2250.js
+++ b/deps/v8/test/mjsunit/regress/regress-2250.js
@@ -64,5 +64,5 @@ test();
// Second compilation should have noticed that LICM wasn't a good idea, and now
// function should no longer deopt when called.
test();
-assertTrue(2 != %GetOptimizationStatus(test));
+assertOptimized(test);
diff --git a/deps/v8/test/mjsunit/regress/regress-2315.js b/deps/v8/test/mjsunit/regress/regress-2315.js
index a3f9182c95..28c78eae48 100644
--- a/deps/v8/test/mjsunit/regress/regress-2315.js
+++ b/deps/v8/test/mjsunit/regress/regress-2315.js
@@ -36,5 +36,4 @@ foo();
%OptimizeFunctionOnNextCall(foo);
foo();
-// Function should be optimized now.
-assertTrue(%GetOptimizationStatus(foo) != 2);
+assertOptimized(foo);
diff --git a/deps/v8/test/mjsunit/regress/regress-2339.js b/deps/v8/test/mjsunit/regress/regress-2339.js
index b16821dbad..8355446cfc 100644
--- a/deps/v8/test/mjsunit/regress/regress-2339.js
+++ b/deps/v8/test/mjsunit/regress/regress-2339.js
@@ -27,18 +27,6 @@
// Flags: --allow-natives-syntax --expose-gc
-/**
- * The possible optimization states of a function. Must be in sync with the
- * return values of Runtime_GetOptimizationStatus() in runtime.cc!
- */
-
-var OptimizationState = {
- YES: 1,
- NO: 2,
- ALWAYS: 3,
- NEVER: 4
-};
-
function simple() {
return simple_two_args(0, undefined);
}
@@ -53,7 +41,5 @@ simple();
simple();
%OptimizeFunctionOnNextCall(simple);
simple();
-var raw_optimized = %GetOptimizationStatus(simple);
-assertFalse(raw_optimized == OptimizationState.NO);
+assertOptimized(simple);
gc();
-
diff --git a/deps/v8/test/mjsunit/regress/regress-2451.js b/deps/v8/test/mjsunit/regress/regress-2451.js
index 465e4e68c2..c1749b178f 100644
--- a/deps/v8/test/mjsunit/regress/regress-2451.js
+++ b/deps/v8/test/mjsunit/regress/regress-2451.js
@@ -37,5 +37,4 @@ f();
f();
%OptimizeFunctionOnNextCall(f);
f();
-assertTrue(%GetOptimizationStatus(f) != 2);
-
+assertOptimized(f);
diff --git a/deps/v8/test/mjsunit/regress/regress-252797.js b/deps/v8/test/mjsunit/regress/regress-252797.js
new file mode 100644
index 0000000000..379205f599
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-252797.js
@@ -0,0 +1,57 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --allow-natives-syntax
+
+// The type feedback oracle had a bug when retrieving the map from an IC
+// starting with a negative lookup.
+
+// Create a holder in fast mode.
+var holder = Object.create(null, {
+ holderMethod: {value: function() {}}
+});
+assertTrue(%HasFastProperties(holder));
+
+// Create a receiver into dictionary mode.
+var receiver = Object.create(holder, {
+ killMe: {value: 0, configurable: true},
+});
+delete receiver.killMe;
+assertFalse(%HasFastProperties(receiver));
+
+// The actual function to test, triggering the retrieval of the wrong map.
+function callConstantFunctionOnPrototype(obj) {
+ obj.holderMethod();
+}
+
+callConstantFunctionOnPrototype(receiver);
+callConstantFunctionOnPrototype(receiver);
+%OptimizeFunctionOnNextCall(callConstantFunctionOnPrototype);
+callConstantFunctionOnPrototype(receiver);
+
+// Make sure that the function is still optimized.
+assertOptimized(callConstantFunctionOnPrototype);
diff --git a/deps/v8/test/mjsunit/regress/regress-2537.js b/deps/v8/test/mjsunit/regress/regress-2537.js
index c6b5af9490..1a86000619 100644
--- a/deps/v8/test/mjsunit/regress/regress-2537.js
+++ b/deps/v8/test/mjsunit/regress/regress-2537.js
@@ -31,7 +31,8 @@ var large_int = 0x40000000;
function foo(x, expected) {
assertEquals(expected, x); // This succeeds.
- x += 0; // Force int32 representation so that CompareIDAndBranch is used.
+ x += 0; // Force int32 representation so that
+ // CompareNumericAndBranch is used.
if (3 != x) {
x += 0; // Poor man's "iDef".
// Fails due to Smi-tagging without overflow check.
diff --git a/deps/v8/test/mjsunit/regress/regress-2618.js b/deps/v8/test/mjsunit/regress/regress-2618.js
index 638b71e622..3509db2d45 100644
--- a/deps/v8/test/mjsunit/regress/regress-2618.js
+++ b/deps/v8/test/mjsunit/regress/regress-2618.js
@@ -30,7 +30,7 @@
function f() {
do {
do {
- for (i = 0; i < 10000000; i++) {
+ for (var i = 0; i < 10000000; i++) {
// This should run long enough to trigger OSR.
}
} while (false);
@@ -38,7 +38,7 @@ function f() {
}
f();
-assertTrue(%GetOptimizationStatus(f) != 2);
+assertOptimized(f);
function g() {
@@ -46,7 +46,7 @@ function g() {
do {
do {
- for (i = 0; i < 1; i++) { }
+ for (var i = 0; i < 1; i++) { }
} while (false);
} while (false);
@@ -58,7 +58,7 @@ function g() {
do {
do {
do {
- for (i = 0; i < 10000000; i++) { }
+ for (var i = 0; i < 10000000; i++) { }
} while (false);
} while (false);
} while (false);
@@ -70,5 +70,4 @@ function g() {
}
g();
-assertTrue(%GetOptimizationStatus(g) != 2);
-
+assertOptimized(g);
diff --git a/deps/v8/test/mjsunit/regress/regress-2711.js b/deps/v8/test/mjsunit/regress/regress-2711.js
new file mode 100644
index 0000000000..a58e789745
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-2711.js
@@ -0,0 +1,33 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Test that frozen arrays don't let their length change
+var a = Object.freeze([1]);
+a.push(2);
+assertEquals(1, a.length);
+a.push(2);
+assertEquals(1, a.length);
diff --git a/deps/v8/test/mjsunit/regress/regress-97116b.js b/deps/v8/test/mjsunit/regress/regress-97116b.js
new file mode 100644
index 0000000000..91e7d6e0ca
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-97116b.js
@@ -0,0 +1,50 @@
+// Copyright 2011 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --expose-gc --allow-natives-syntax
+
+// Check that we are not flushing code for inlined functions that
+// have a pending lazy deoptimization on the stack.
+
+%NeverOptimizeFunction(deopt);
+function deopt() {
+ %DeoptimizeFunction(outer);
+ for (var i = 0; i < 10; i++) gc(); // Force code flushing.
+}
+
+function outer(should_deopt) {
+ inner(should_deopt);
+}
+
+function inner(should_deopt) {
+ if (should_deopt) deopt();
+}
+
+outer(false);
+outer(false);
+%OptimizeFunctionOnNextCall(outer);
+outer(true);
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-150545.js b/deps/v8/test/mjsunit/regress/regress-crbug-150545.js
index 68efdbf2d7..19f7e68250 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-150545.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-150545.js
@@ -46,7 +46,7 @@
function outer() {
inner(1,2,3);
// Trigger OSR.
- while (%GetOptimizationStatus(outer) == 2) {}
+ while (%GetOptimizationStatus(outer, "no sync") == 2) {}
}
outer();
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-173907b.js b/deps/v8/test/mjsunit/regress/regress-crbug-173907b.js
new file mode 100644
index 0000000000..4ecfd64eaf
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-173907b.js
@@ -0,0 +1,88 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --allow-natives-syntax
+
+var X = 1.1;
+var K = 0.5;
+
+var O = 0;
+var result = new Float64Array(2);
+
+%NeverOptimizeFunction(spill);
+function spill() {
+}
+
+function buggy() {
+ var v = X;
+ var phi1 = v + K;
+ var phi2 = v - K;
+
+ spill(); // At this point initial values for phi1 and phi2 are spilled.
+
+ var xmm1 = v;
+ var xmm2 = v*v*v;
+ var xmm3 = v*v*v*v;
+ var xmm4 = v*v*v*v*v;
+ var xmm5 = v*v*v*v*v*v;
+ var xmm6 = v*v*v*v*v*v*v;
+ var xmm7 = v*v*v*v*v*v*v*v;
+ var xmm8 = v*v*v*v*v*v*v*v*v;
+
+ // All registers are blocked and phis for phi1 and phi2 are spilled because
+ // their left (incoming) value is spilled, there are no free registers,
+ // and phis themselves have only ANY-policy uses.
+
+ for (var x = 0; x < 2; x++) {
+ xmm1 += xmm1 * xmm6;
+ xmm2 += xmm1 * xmm5;
+ xmm3 += xmm1 * xmm4;
+ xmm4 += xmm1 * xmm3;
+ xmm5 += xmm1 * xmm2;
+
+ // Now swap values of phi1 and phi2 to create cycle between phis.
+ var t = phi1;
+ phi1 = phi2;
+ phi2 = t;
+ }
+
+ // Now we want to get values of phi1 and phi2. However we would like to
+ // do it in a way that does not produce any uses of phi1&phi2 that have
+ // a register beneficial policy. How? We just hide these uses behind phis.
+ result[0] = (O === 0) ? phi1 : phi2;
+ result[1] = (O !== 0) ? phi1 : phi2;
+}
+
+function test() {
+ buggy();
+ assertArrayEquals([X + K, X - K], result);
+}
+
+test();
+test();
+%OptimizeFunctionOnNextCall(buggy);
+test();
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-259300.js b/deps/v8/test/mjsunit/regress/regress-crbug-259300.js
new file mode 100644
index 0000000000..c57b0e6f91
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-259300.js
@@ -0,0 +1,49 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --expose-debug-as debug
+
+Debug = debug.Debug;
+var listened = false;
+var recursion_depth = 0;
+
+function listener(event, exec_state, event_data, data) {
+ if (event == Debug.DebugEvent.Break) {
+ recursion_depth++;
+ var disable_break = (recursion_depth > 2);
+ for (var i = 0; i < exec_state.frameCount(); i++) {
+ exec_state.frame(i).evaluate("debugger", disable_break);
+ }
+ }
+ listened = true;
+}
+
+Debug.setListener(listener);
+eval("debugger");
+Debug.setListener(null);
+assertTrue(listened);
+
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-260345.js b/deps/v8/test/mjsunit/regress/regress-crbug-260345.js
new file mode 100644
index 0000000000..75832ab4be
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-260345.js
@@ -0,0 +1,59 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+var steps = 100000;
+var undefined_values = [undefined, "go on"];
+var null_values = [null, "go on"];
+
+function get_undefined_object(i) {
+ return undefined_values[(i / steps) | 0];
+}
+
+function test_undefined() {
+ var objects = 0;
+ for (var i = 0; i < 2 * steps; i++) {
+ undefined == get_undefined_object(i) && objects++;
+ }
+ return objects;
+}
+
+assertEquals(steps, test_undefined());
+
+
+function get_null_object(i) {
+ return null_values[(i / steps) | 0];
+}
+
+function test_null() {
+ var objects = 0;
+ for (var i = 0; i < 2 * steps; i++) {
+ null == get_null_object(i) && objects++;
+ }
+ return objects;
+}
+
+assertEquals(steps, test_null());
diff --git a/deps/v8/test/mjsunit/regress/regress-deopt-gcb.js b/deps/v8/test/mjsunit/regress/regress-deopt-gcb.js
new file mode 100644
index 0000000000..fed92b424f
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-deopt-gcb.js
@@ -0,0 +1,49 @@
+// Copyright 2011 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --allow-natives-syntax --expose-gc
+
+// This tests that we can correctly handle a GC immediately after a function
+// has been deoptimized, even when we have an activation of this function on
+// the stack.
+
+// Ensure that there is code objects before the code for the opt_me function.
+(function() { var a = 10; a++; })();
+
+function opt_me() {
+ deopt();
+}
+
+// Make sure we don't inline this function
+%NeverOptimizeFunction(deopt);
+function deopt() {
+ %DeoptimizeFunction(opt_me);
+ gc();
+}
+
+
+opt_me();
diff --git a/deps/v8/test/mjsunit/regress/regress-deopt-store-effect.js b/deps/v8/test/mjsunit/regress/regress-deopt-store-effect.js
new file mode 100644
index 0000000000..59094d3aeb
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-deopt-store-effect.js
@@ -0,0 +1,82 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --allow-natives-syntax
+
+// Test deopt after generic store with effect context.
+var pro = { x : 1 }
+var a = {}
+a.__proto__ = pro
+delete pro.x
+
+function g(o) {
+ return 7 + (o.z = 1, 20);
+}
+
+g(a);
+g(a);
+%OptimizeFunctionOnNextCall(g);
+Object.defineProperty(pro, "z", {
+ set: function(v) { %DeoptimizeFunction(g); },
+ get: function() { return 20; }
+});
+
+assertEquals(27, g(a));
+
+// Test deopt after polymorphic as monomorphic store with effect context.
+
+var i = { z : 2, r : 1 }
+var j = { z : 2 }
+var p = { a : 10 }
+var pp = { a : 20, b : 1 }
+
+function bar(o, p) {
+ return 7 + (o.z = 1, p.a);
+}
+
+bar(i, p);
+bar(i, p);
+bar(j, p);
+%OptimizeFunctionOnNextCall(bar);
+assertEquals(27, bar(i, pp));
+
+// Test deopt after polymorphic store with effect context.
+
+var i = { r : 1, z : 2 }
+var j = { z : 2 }
+var p = { a : 10 }
+var pp = { a : 20, b : 1 }
+
+function bar1(o, p) {
+ return 7 + (o.z = 1, p.a);
+}
+
+bar1(i, p);
+bar1(i, p);
+bar1(j, p);
+%OptimizeFunctionOnNextCall(bar1);
+assertEquals(27, bar1(i, pp));
diff --git a/deps/v8/test/mjsunit/regress/regress-embedded-cons-string.js b/deps/v8/test/mjsunit/regress/regress-embedded-cons-string.js
index afb3835688..6a63da2fde 100644
--- a/deps/v8/test/mjsunit/regress/regress-embedded-cons-string.js
+++ b/deps/v8/test/mjsunit/regress/regress-embedded-cons-string.js
@@ -34,19 +34,21 @@ if (!%IsParallelRecompilationSupported()) {
quit();
}
-function assertUnoptimized(fun) {
- assertTrue(%GetOptimizationStatus(fun) != 1);
-}
-
function test(fun) {
fun();
fun();
+ // Mark for parallel optimization.
%OptimizeFunctionOnNextCall(fun, "parallel");
- fun(); // Trigger optimization in the background.
- gc(); // Tenure cons string.
- assertUnoptimized(fun); // Compilation not complete yet.
- %CompleteOptimization(fun); // Compilation embeds tenured cons string.
- gc(); // Visit embedded cons string during mark compact.
+ //Trigger optimization in the background.
+ fun();
+ //Tenure cons string.
+ gc();
+ // In the mean time, parallel recompiling is not complete yet.
+ assertUnoptimized(fun, "no sync");
+ // Parallel recompilation eventually finishes and embeds tenured cons string.
+ assertOptimized(fun, "sync");
+ //Visit embedded cons string during mark compact.
+ gc();
}
function f() {
diff --git a/deps/v8/test/mjsunit/regress/regress-frame-details-null-receiver.js b/deps/v8/test/mjsunit/regress/regress-frame-details-null-receiver.js
new file mode 100644
index 0000000000..d15ed4d00a
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-frame-details-null-receiver.js
@@ -0,0 +1,52 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --expose-debug-as debug --allow-natives-syntax
+
+Debug = debug.Debug;
+var listened = false;
+
+function listener(event, exec_state, event_data, data) {
+ if (event == Debug.DebugEvent.Exception) {
+ for (var i = 0; i < exec_state.frameCount(); i++) {
+ print(exec_state.frame(i).receiver());
+ print(exec_state.frame(i).func().name());
+ }
+ }
+ listened = true;
+}
+
+Debug.setListener(listener);
+Debug.setBreakOnException();
+
+assertThrows(function() { delete null['foo']; });
+
+Debug.clearBreakOnException();
+Debug.setListener(null);
+
+assertTrue(listened);
+
diff --git a/deps/v8/test/mjsunit/regress/regress-mul-canoverflowb.js b/deps/v8/test/mjsunit/regress/regress-mul-canoverflowb.js
new file mode 100644
index 0000000000..4203ac48da
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-mul-canoverflowb.js
@@ -0,0 +1,45 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --allow-natives-syntax
+
+function boom(a) {
+ return ((a | 0) * (a | 0)) | 0;
+}
+%NeverOptimizeFunction(boom_unoptimized);
+function boom_unoptimized(a) {
+ return ((a | 0) * (a | 0)) | 0;
+}
+
+boom(1, 1);
+boom(2, 2);
+
+%OptimizeFunctionOnNextCall(boom);
+var big_int = 0x5F00000F;
+var expected = boom_unoptimized(big_int);
+var actual = boom(big_int)
+assertEquals(expected, actual);
diff --git a/deps/v8/test/mjsunit/regress/regress-opt-after-debug-deopt.js b/deps/v8/test/mjsunit/regress/regress-opt-after-debug-deopt.js
index be12cc56fd..3de0217c81 100644
--- a/deps/v8/test/mjsunit/regress/regress-opt-after-debug-deopt.js
+++ b/deps/v8/test/mjsunit/regress/regress-opt-after-debug-deopt.js
@@ -26,7 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --expose-debug-as debug --allow-natives-syntax
-// Flags: --parallel-recompilation --parallel-recompilation-delay=300
+// Flags: --parallel-recompilation --parallel-recompilation-delay=100
if (!%IsParallelRecompilationSupported()) {
print("Parallel recompilation is disabled. Skipping this test.");
@@ -62,7 +62,8 @@ f(); // Kick off parallel recompilation.
Debug.setListener(listener); // Activate debugger.
Debug.setBreakPoint(f, 2, 0); // Force deopt.
-%CompleteOptimization(f); // Install optimized code.
+// Sync with parallel optimization thread. But no optimized code is installed.
+assertUnoptimized(f, "sync");
f(); // Trigger break point.
assertEquals(1, listened);
diff --git a/deps/v8/test/mjsunit/tools/profviz-test.default b/deps/v8/test/mjsunit/tools/profviz-test.default
new file mode 100644
index 0000000000..04185a260c
--- /dev/null
+++ b/deps/v8/test/mjsunit/tools/profviz-test.default
@@ -0,0 +1,1566 @@
+[
+ "set yrange [0:24.5]",
+ "set xlabel \"execution time in ms\"",
+ "set xrange [2.4204999999999997:141.1669999999999]",
+ "set style fill pattern 2 bo 1",
+ "set style rect fs solid 1 noborder",
+ "set style line 1 lt 1 lw 1 lc rgb \"#000000\"",
+ "set border 15 lw 0.2",
+ "set style line 2 lt 1 lw 1 lc rgb \"#9944CC\"",
+ "set xtics out nomirror",
+ "unset key",
+ "set object 1 rect from 87.51699999999991, 7 to 87.60371656249991, 3 fc rgb \"#9944CC\"",
+ "set object 2 rect from 110.7114999999999, 7 to 110.7982165624999, 3 fc rgb \"#9944CC\"",
+ "set object 3 rect from 133.5129999999999, 7 to 133.59971656249988, 3 fc rgb \"#9944CC\"",
+ "set object 4 rect from 61.49249999999995, 7 to 61.57921656249995, 5.020618556701031 fc rgb \"#9944CC\"",
+ "set object 5 rect from 101.40849999999992, 7 to 101.49521656249992, 5.103092783505154 fc rgb \"#9944CC\"",
+ "set object 6 rect from 57.242999999999974, 7 to 57.329716562499975, 6.766323024054983 fc rgb \"#9944CC\"",
+ "set object 7 rect from 58.751499999999965, 7 to 58.838216562499966, 6.766323024054983 fc rgb \"#9944CC\"",
+ "set object 8 rect from 60.72499999999996, 7 to 60.81171656249996, 6.766323024054983 fc rgb \"#9944CC\"",
+ "set ytics out nomirror (\"execution (59.6%%)\" 12.5, \"external (0.2%%)\" 13.5, \"compile unopt (3.1%%)\" 14.5, \"recompile sync (6.7%%)\" 15.5, \"recompile async (11.6%%)\" 16.5, \"compile eval (0.0%%)\" 17.5, \"parse (10.0%%)\" 18.5, \"preparse (0.8%%)\" 19.5, \"lazy parse (2.9%%)\" 20.5, \"gc scavenge (1.7%%)\" 21.5, \"gc compaction (3.3%%)\" 22.5, \"gc context (0.0%%)\" 23.5, \"code kind color coding\" 11, \"code kind in execution\" 10, \"top 8 js stack frames\" 9, \"pause times\" 0, \"max deopt size: 9.1 kB\" 7)",
+ "set object 9 rect from 42.11000000000001, 12.83 to 42.28050000000001, 12.17 fc rgb \"#000000\"",
+ "set object 10 rect from 42.298000000000016, 12.83 to 42.30000000000002, 12.17 fc rgb \"#000000\"",
+ "set object 11 rect from 42.31450000000002, 12.83 to 42.62700000000002, 12.17 fc rgb \"#000000\"",
+ "set object 12 rect from 42.656500000000015, 12.83 to 42.66150000000002, 12.17 fc rgb \"#000000\"",
+ "set object 13 rect from 42.70600000000002, 12.83 to 42.747000000000014, 12.17 fc rgb \"#000000\"",
+ "set object 14 rect from 42.763500000000015, 12.83 to 42.76550000000001, 12.17 fc rgb \"#000000\"",
+ "set object 15 rect from 42.795000000000016, 12.83 to 42.812500000000014, 12.17 fc rgb \"#000000\"",
+ "set object 16 rect from 42.83300000000001, 12.83 to 42.844000000000015, 12.17 fc rgb \"#000000\"",
+ "set object 17 rect from 42.858500000000014, 12.83 to 42.85950000000001, 12.17 fc rgb \"#000000\"",
+ "set object 18 rect from 42.88200000000001, 12.83 to 43.60550000000001, 12.17 fc rgb \"#000000\"",
+ "set object 19 rect from 43.62000000000002, 12.83 to 43.622000000000014, 12.17 fc rgb \"#000000\"",
+ "set object 20 rect from 43.632500000000014, 12.83 to 44.796000000000014, 12.17 fc rgb \"#000000\"",
+ "set object 21 rect from 44.81150000000002, 12.83 to 44.812500000000014, 12.17 fc rgb \"#000000\"",
+ "set object 22 rect from 44.82200000000002, 12.83 to 44.84500000000001, 12.17 fc rgb \"#000000\"",
+ "set object 23 rect from 44.87150000000002, 12.83 to 44.87550000000002, 12.17 fc rgb \"#000000\"",
+ "set object 24 rect from 44.917000000000016, 12.83 to 44.996000000000016, 12.17 fc rgb \"#000000\"",
+ "set object 25 rect from 45.00850000000001, 12.83 to 45.01150000000001, 12.17 fc rgb \"#000000\"",
+ "set object 26 rect from 45.02900000000001, 12.83 to 45.04700000000001, 12.17 fc rgb \"#000000\"",
+ "set object 27 rect from 45.06450000000002, 12.83 to 45.068500000000014, 12.17 fc rgb \"#000000\"",
+ "set object 28 rect from 45.08700000000001, 12.83 to 45.09600000000001, 12.17 fc rgb \"#000000\"",
+ "set object 29 rect from 45.107500000000016, 12.83 to 45.110500000000016, 12.17 fc rgb \"#000000\"",
+ "set object 30 rect from 45.13500000000002, 12.83 to 45.14400000000002, 12.17 fc rgb \"#000000\"",
+ "set object 31 rect from 45.16150000000002, 12.83 to 45.32050000000002, 12.17 fc rgb \"#000000\"",
+ "set object 32 rect from 45.33700000000002, 12.83 to 45.34000000000002, 12.17 fc rgb \"#000000\"",
+ "set object 33 rect from 45.361500000000014, 12.83 to 45.38750000000002, 12.17 fc rgb \"#000000\"",
+ "set object 34 rect from 45.402000000000015, 12.83 to 45.405000000000015, 12.17 fc rgb \"#000000\"",
+ "set object 35 rect from 45.41750000000002, 12.83 to 45.43250000000002, 12.17 fc rgb \"#000000\"",
+ "set object 36 rect from 45.442000000000014, 12.83 to 45.49750000000001, 12.17 fc rgb \"#000000\"",
+ "set object 37 rect from 45.55900000000001, 12.83 to 45.56900000000001, 12.17 fc rgb \"#000000\"",
+ "set object 38 rect from 45.626500000000014, 12.83 to 45.66050000000001, 12.17 fc rgb \"#000000\"",
+ "set object 39 rect from 45.70300000000001, 12.83 to 45.71200000000001, 12.17 fc rgb \"#000000\"",
+ "set object 40 rect from 45.76150000000001, 12.83 to 45.79350000000001, 12.17 fc rgb \"#000000\"",
+ "set object 41 rect from 45.81700000000001, 12.83 to 45.82000000000001, 12.17 fc rgb \"#000000\"",
+ "set object 42 rect from 45.84850000000001, 12.83 to 45.86950000000001, 12.17 fc rgb \"#000000\"",
+ "set object 43 rect from 45.92300000000001, 12.83 to 45.93000000000001, 12.17 fc rgb \"#000000\"",
+ "set object 44 rect from 45.97850000000001, 12.83 to 45.99450000000001, 12.17 fc rgb \"#000000\"",
+ "set object 45 rect from 46.060500000000005, 12.83 to 46.08650000000001, 12.17 fc rgb \"#000000\"",
+ "set object 46 rect from 46.13100000000001, 12.83 to 46.18500000000001, 12.17 fc rgb \"#000000\"",
+ "set object 47 rect from 46.28150000000001, 12.83 to 46.291500000000006, 12.17 fc rgb \"#000000\"",
+ "set object 48 rect from 46.37200000000001, 12.83 to 46.550000000000004, 12.17 fc rgb \"#000000\"",
+ "set object 49 rect from 46.5915, 12.83 to 46.59550000000001, 12.17 fc rgb \"#000000\"",
+ "set object 50 rect from 46.621, 12.83 to 46.65500000000001, 12.17 fc rgb \"#000000\"",
+ "set object 51 rect from 46.691500000000005, 12.83 to 46.694500000000005, 12.17 fc rgb \"#000000\"",
+ "set object 52 rect from 46.74, 12.83 to 46.861000000000004, 12.17 fc rgb \"#000000\"",
+ "set object 53 rect from 46.8935, 12.83 to 46.8975, 12.17 fc rgb \"#000000\"",
+ "set object 54 rect from 46.9925, 12.83 to 47.039500000000004, 12.17 fc rgb \"#000000\"",
+ "set object 55 rect from 47.049, 12.83 to 47.0765, 12.17 fc rgb \"#000000\"",
+ "set object 56 rect from 47.135000000000005, 12.83 to 47.141, 12.17 fc rgb \"#000000\"",
+ "set object 57 rect from 47.3935, 12.83 to 47.4125, 12.17 fc rgb \"#000000\"",
+ "set object 58 rect from 47.465, 12.83 to 47.472, 12.17 fc rgb \"#000000\"",
+ "set object 59 rect from 47.5235, 12.83 to 49.454499999999996, 12.17 fc rgb \"#000000\"",
+ "set object 60 rect from 49.467, 12.83 to 49.469, 12.17 fc rgb \"#000000\"",
+ "set object 61 rect from 49.4955, 12.83 to 49.6855, 12.17 fc rgb \"#000000\"",
+ "set object 62 rect from 49.726, 12.83 to 49.732, 12.17 fc rgb \"#000000\"",
+ "set object 63 rect from 49.780499999999996, 12.83 to 49.799499999999995, 12.17 fc rgb \"#000000\"",
+ "set object 64 rect from 49.812999999999995, 12.83 to 49.814, 12.17 fc rgb \"#000000\"",
+ "set object 65 rect from 49.82449999999999, 12.83 to 49.851, 12.17 fc rgb \"#000000\"",
+ "set object 66 rect from 49.8685, 12.83 to 49.894499999999994, 12.17 fc rgb \"#000000\"",
+ "set object 67 rect from 49.9695, 12.83 to 50.083999999999996, 12.17 fc rgb \"#000000\"",
+ "set object 68 rect from 50.14149999999999, 12.83 to 50.147499999999994, 12.17 fc rgb \"#000000\"",
+ "set object 69 rect from 50.20799999999999, 12.83 to 50.29299999999999, 12.17 fc rgb \"#000000\"",
+ "set object 70 rect from 50.31249999999999, 12.83 to 50.314499999999995, 12.17 fc rgb \"#000000\"",
+ "set object 71 rect from 50.32899999999999, 12.83 to 50.36699999999999, 12.17 fc rgb \"#000000\"",
+ "set object 72 rect from 50.39849999999999, 12.83 to 50.40249999999999, 12.17 fc rgb \"#000000\"",
+ "set object 73 rect from 50.43099999999999, 12.83 to 50.54899999999999, 12.17 fc rgb \"#000000\"",
+ "set object 74 rect from 50.62049999999999, 12.83 to 50.62949999999999, 12.17 fc rgb \"#000000\"",
+ "set object 75 rect from 51.02349999999999, 12.83 to 51.27549999999999, 12.17 fc rgb \"#000000\"",
+ "set object 76 rect from 51.29099999999999, 12.83 to 51.292999999999985, 12.17 fc rgb \"#000000\"",
+ "set object 77 rect from 51.30249999999999, 12.83 to 51.52249999999999, 12.17 fc rgb \"#000000\"",
+ "set object 78 rect from 51.56899999999999, 12.83 to 51.57499999999999, 12.17 fc rgb \"#000000\"",
+ "set object 79 rect from 51.78349999999999, 12.83 to 51.87299999999998, 12.17 fc rgb \"#000000\"",
+ "set object 80 rect from 51.89049999999999, 12.83 to 51.89349999999999, 12.17 fc rgb \"#000000\"",
+ "set object 81 rect from 51.91599999999998, 12.83 to 52.115999999999985, 12.17 fc rgb \"#000000\"",
+ "set object 82 rect from 52.13449999999999, 12.83 to 52.13749999999999, 12.17 fc rgb \"#000000\"",
+ "set object 83 rect from 52.15399999999998, 12.83 to 52.286999999999985, 12.17 fc rgb \"#000000\"",
+ "set object 84 rect from 52.300499999999985, 12.83 to 52.30249999999998, 12.17 fc rgb \"#000000\"",
+ "set object 85 rect from 52.31499999999998, 12.83 to 52.362999999999985, 12.17 fc rgb \"#000000\"",
+ "set object 86 rect from 52.404499999999985, 12.83 to 52.40949999999998, 12.17 fc rgb \"#000000\"",
+ "set object 87 rect from 52.448999999999984, 12.83 to 54.55999999999998, 12.17 fc rgb \"#000000\"",
+ "set object 88 rect from 54.951999999999984, 12.83 to 55.48599999999998, 12.17 fc rgb \"#000000\"",
+ "set object 89 rect from 55.66249999999998, 12.83 to 55.79999999999998, 12.17 fc rgb \"#000000\"",
+ "set object 90 rect from 56.198999999999984, 12.83 to 56.25149999999998, 12.17 fc rgb \"#000000\"",
+ "set object 91 rect from 56.52499999999998, 12.83 to 56.55699999999998, 12.17 fc rgb \"#000000\"",
+ "set object 92 rect from 56.634499999999974, 12.83 to 56.63999999999998, 12.17 fc rgb \"#000000\"",
+ "set object 93 rect from 56.69449999999998, 12.83 to 56.746499999999976, 12.17 fc rgb \"#000000\"",
+ "set object 94 rect from 56.845999999999975, 12.83 to 56.85849999999998, 12.17 fc rgb \"#000000\"",
+ "set object 95 rect from 56.97649999999997, 12.83 to 57.03599999999997, 12.17 fc rgb \"#000000\"",
+ "set object 96 rect from 57.205999999999975, 12.83 to 57.27249999999997, 12.17 fc rgb \"#000000\"",
+ "set object 97 rect from 57.33299999999997, 12.83 to 57.565999999999974, 12.17 fc rgb \"#000000\"",
+ "set object 98 rect from 57.64849999999997, 12.83 to 57.878499999999974, 12.17 fc rgb \"#000000\"",
+ "set object 99 rect from 57.934999999999974, 12.83 to 57.97299999999997, 12.17 fc rgb \"#000000\"",
+ "set object 100 rect from 58.07699999999997, 12.83 to 58.09149999999997, 12.17 fc rgb \"#000000\"",
+ "set object 101 rect from 58.12149999999997, 12.83 to 58.14299999999997, 12.17 fc rgb \"#000000\"",
+ "set object 102 rect from 58.17349999999997, 12.83 to 58.17499999999997, 12.17 fc rgb \"#000000\"",
+ "set object 103 rect from 58.21549999999997, 12.83 to 58.23599999999997, 12.17 fc rgb \"#000000\"",
+ "set object 104 rect from 58.275499999999965, 12.83 to 58.27599999999997, 12.17 fc rgb \"#000000\"",
+ "set object 105 rect from 58.300499999999964, 12.83 to 58.30299999999997, 12.17 fc rgb \"#000000\"",
+ "set object 106 rect from 58.316999999999965, 12.83 to 58.409499999999966, 12.17 fc rgb \"#000000\"",
+ "set object 107 rect from 58.58699999999997, 12.83 to 58.589499999999965, 12.17 fc rgb \"#000000\"",
+ "set object 108 rect from 58.65749999999996, 12.83 to 58.92499999999996, 12.17 fc rgb \"#000000\"",
+ "set object 109 rect from 59.02199999999996, 12.83 to 59.02349999999996, 12.17 fc rgb \"#000000\"",
+ "set object 110 rect from 59.042999999999964, 12.83 to 59.641499999999965, 12.17 fc rgb \"#000000\"",
+ "set object 111 rect from 59.69699999999996, 12.83 to 59.89099999999996, 12.17 fc rgb \"#000000\"",
+ "set object 112 rect from 59.93649999999996, 12.83 to 60.04699999999996, 12.17 fc rgb \"#000000\"",
+ "set object 113 rect from 60.08349999999996, 12.83 to 60.17149999999996, 12.17 fc rgb \"#000000\"",
+ "set object 114 rect from 60.54849999999996, 12.83 to 60.55099999999995, 12.17 fc rgb \"#000000\"",
+ "set object 115 rect from 60.65699999999996, 12.83 to 60.91649999999996, 12.17 fc rgb \"#000000\"",
+ "set object 116 rect from 61.253999999999955, 12.83 to 61.31249999999996, 12.17 fc rgb \"#000000\"",
+ "set object 117 rect from 61.464999999999954, 12.83 to 62.16149999999996, 12.17 fc rgb \"#000000\"",
+ "set object 118 rect from 62.548999999999964, 12.83 to 62.62699999999996, 12.17 fc rgb \"#000000\"",
+ "set object 119 rect from 63.024999999999956, 12.83 to 63.14749999999995, 12.17 fc rgb \"#000000\"",
+ "set object 120 rect from 63.41299999999995, 12.83 to 64.40899999999996, 12.17 fc rgb \"#000000\"",
+ "set object 121 rect from 64.61749999999995, 12.83 to 65.56449999999995, 12.17 fc rgb \"#000000\"",
+ "set object 122 rect from 65.61699999999995, 12.83 to 67.34249999999994, 12.17 fc rgb \"#000000\"",
+ "set object 123 rect from 67.45099999999994, 12.83 to 67.45549999999994, 12.17 fc rgb \"#000000\"",
+ "set object 124 rect from 67.48749999999995, 12.83 to 67.53599999999994, 12.17 fc rgb \"#000000\"",
+ "set object 125 rect from 67.57649999999995, 12.83 to 67.57799999999995, 12.17 fc rgb \"#000000\"",
+ "set object 126 rect from 67.59199999999996, 12.83 to 68.70599999999996, 12.17 fc rgb \"#000000\"",
+ "set object 127 rect from 68.76649999999995, 12.83 to 69.10849999999995, 12.17 fc rgb \"#000000\"",
+ "set object 128 rect from 69.49599999999995, 12.83 to 70.31749999999994, 12.17 fc rgb \"#000000\"",
+ "set object 129 rect from 70.33949999999994, 12.83 to 70.34449999999994, 12.17 fc rgb \"#000000\"",
+ "set object 130 rect from 70.35799999999995, 12.83 to 70.40899999999993, 12.17 fc rgb \"#000000\"",
+ "set object 131 rect from 70.58649999999994, 12.83 to 72.22199999999995, 12.17 fc rgb \"#000000\"",
+ "set object 132 rect from 72.28049999999995, 12.83 to 74.40699999999995, 12.17 fc rgb \"#000000\"",
+ "set object 133 rect from 74.63849999999994, 12.83 to 75.04799999999994, 12.17 fc rgb \"#000000\"",
+ "set object 134 rect from 75.20099999999994, 12.83 to 75.41849999999994, 12.17 fc rgb \"#000000\"",
+ "set object 135 rect from 75.46799999999995, 12.83 to 78.16449999999993, 12.17 fc rgb \"#000000\"",
+ "set object 136 rect from 78.23649999999994, 12.83 to 80.90399999999994, 12.17 fc rgb \"#000000\"",
+ "set object 137 rect from 80.95049999999993, 12.83 to 83.58349999999993, 12.17 fc rgb \"#000000\"",
+ "set object 138 rect from 83.63999999999993, 12.83 to 84.09549999999993, 12.17 fc rgb \"#000000\"",
+ "set object 139 rect from 84.84549999999993, 12.83 to 84.91749999999993, 12.17 fc rgb \"#000000\"",
+ "set object 140 rect from 85.13799999999992, 12.83 to 85.37849999999993, 12.17 fc rgb \"#000000\"",
+ "set object 141 rect from 86.05649999999993, 12.83 to 86.75549999999993, 12.17 fc rgb \"#000000\"",
+ "set object 142 rect from 87.27399999999992, 12.83 to 87.27549999999992, 12.17 fc rgb \"#000000\"",
+ "set object 143 rect from 87.36899999999991, 12.83 to 88.75199999999992, 12.17 fc rgb \"#000000\"",
+ "set object 144 rect from 88.82299999999992, 12.83 to 88.83949999999992, 12.17 fc rgb \"#000000\"",
+ "set object 145 rect from 89.21399999999991, 12.83 to 91.90999999999991, 12.17 fc rgb \"#000000\"",
+ "set object 146 rect from 91.96649999999993, 12.83 to 94.55599999999993, 12.17 fc rgb \"#000000\"",
+ "set object 147 rect from 94.6054999999999, 12.83 to 97.20749999999991, 12.17 fc rgb \"#000000\"",
+ "set object 148 rect from 97.26099999999992, 12.83 to 99.86649999999992, 12.17 fc rgb \"#000000\"",
+ "set object 149 rect from 99.92199999999991, 12.83 to 102.56049999999992, 12.17 fc rgb \"#000000\"",
+ "set object 150 rect from 102.61199999999991, 12.83 to 102.74149999999992, 12.17 fc rgb \"#000000\"",
+ "set object 151 rect from 102.99499999999992, 12.83 to 104.13299999999992, 12.17 fc rgb \"#000000\"",
+ "set object 152 rect from 104.4429999999999, 12.83 to 105.88099999999991, 12.17 fc rgb \"#000000\"",
+ "set object 153 rect from 105.93349999999991, 12.83 to 107.51699999999991, 12.17 fc rgb \"#000000\"",
+ "set object 154 rect from 108.09449999999991, 12.83 to 109.2659999999999, 12.17 fc rgb \"#000000\"",
+ "set object 155 rect from 109.41799999999989, 12.83 to 110.0909999999999, 12.17 fc rgb \"#000000\"",
+ "set object 156 rect from 110.4839999999999, 12.83 to 112.6029999999999, 12.17 fc rgb \"#000000\"",
+ "set object 157 rect from 112.6564999999999, 12.83 to 115.36399999999989, 12.17 fc rgb \"#000000\"",
+ "set object 158 rect from 115.4124999999999, 12.83 to 118.1434999999999, 12.17 fc rgb \"#000000\"",
+ "set object 159 rect from 118.19199999999991, 12.83 to 120.9194999999999, 12.17 fc rgb \"#000000\"",
+ "set object 160 rect from 121.0314999999999, 12.83 to 123.77499999999989, 12.17 fc rgb \"#000000\"",
+ "set object 161 rect from 123.8254999999999, 12.83 to 126.55149999999989, 12.17 fc rgb \"#000000\"",
+ "set object 162 rect from 126.59899999999989, 12.83 to 129.3344999999999, 12.17 fc rgb \"#000000\"",
+ "set object 163 rect from 129.48849999999987, 12.83 to 130.5424999999999, 12.17 fc rgb \"#000000\"",
+ "set object 164 rect from 131.1209999999999, 12.83 to 132.8659999999999, 12.17 fc rgb \"#000000\"",
+ "set object 165 rect from 132.92249999999987, 12.83 to 133.04349999999988, 12.17 fc rgb \"#000000\"",
+ "set object 166 rect from 133.4079999999999, 12.83 to 136.14449999999988, 12.17 fc rgb \"#000000\"",
+ "set object 167 rect from 136.19799999999987, 12.83 to 138.9289999999999, 12.17 fc rgb \"#000000\"",
+ "set object 168 rect from 138.98049999999986, 12.83 to 140.86699999999988, 12.17 fc rgb \"#000000\"",
+ "set object 169 rect from 140.8814999999999, 12.83 to 140.88349999999988, 12.17 fc rgb \"#000000\"",
+ "set object 170 rect from 140.89599999999987, 12.83 to 140.9319999999999, 12.17 fc rgb \"#000000\"",
+ "set object 171 rect from 140.9574999999999, 12.83 to 140.96249999999986, 12.17 fc rgb \"#000000\"",
+ "set object 172 rect from 140.9779999999999, 12.83 to 141.0599999999999, 12.17 fc rgb \"#000000\"",
+ "set object 173 rect from 141.0984999999999, 12.83 to 141.09999999999988, 12.17 fc rgb \"#000000\"",
+ "set object 174 rect from 2.4490000000000003, 13.83 to 2.4545, 13.17 fc rgb \"#3399FF\"",
+ "set object 175 rect from 3.7920000000000003, 13.83 to 3.8075, 13.17 fc rgb \"#3399FF\"",
+ "set object 176 rect from 6.276000000000001, 13.83 to 6.2805, 13.17 fc rgb \"#3399FF\"",
+ "set object 177 rect from 7.373, 13.83 to 7.3865, 13.17 fc rgb \"#3399FF\"",
+ "set object 178 rect from 9.299, 13.83 to 9.302499999999998, 13.17 fc rgb \"#3399FF\"",
+ "set object 179 rect from 10.405000000000001, 13.83 to 10.4235, 13.17 fc rgb \"#3399FF\"",
+ "set object 180 rect from 12.882, 13.83 to 12.8865, 13.17 fc rgb \"#3399FF\"",
+ "set object 181 rect from 13.897, 13.83 to 13.910499999999999, 13.17 fc rgb \"#3399FF\"",
+ "set object 182 rect from 55.80349999999998, 13.83 to 55.80399999999998, 13.17 fc rgb \"#3399FF\"",
+ "set object 183 rect from 56.19399999999998, 13.83 to 56.19849999999998, 13.17 fc rgb \"#3399FF\"",
+ "set object 184 rect from 62.16599999999996, 13.83 to 62.166499999999964, 13.17 fc rgb \"#3399FF\"",
+ "set object 185 rect from 62.54499999999995, 13.83 to 62.54849999999996, 13.17 fc rgb \"#3399FF\"",
+ "set object 186 rect from 65.56999999999996, 13.83 to 65.57049999999997, 13.17 fc rgb \"#3399FF\"",
+ "set object 187 rect from 65.61499999999995, 13.83 to 65.61649999999995, 13.17 fc rgb \"#3399FF\"",
+ "set object 188 rect from 68.71249999999995, 13.83 to 68.71399999999994, 13.17 fc rgb \"#3399FF\"",
+ "set object 189 rect from 68.76249999999995, 13.83 to 68.76599999999993, 13.17 fc rgb \"#3399FF\"",
+ "set object 190 rect from 72.22849999999994, 13.83 to 72.22899999999994, 13.17 fc rgb \"#3399FF\"",
+ "set object 191 rect from 72.27749999999995, 13.83 to 72.27999999999994, 13.17 fc rgb \"#3399FF\"",
+ "set object 192 rect from 75.42299999999994, 13.83 to 75.42349999999995, 13.17 fc rgb \"#3399FF\"",
+ "set object 193 rect from 75.46599999999995, 13.83 to 75.46749999999994, 13.17 fc rgb \"#3399FF\"",
+ "set object 194 rect from 78.17099999999994, 13.83 to 78.17149999999994, 13.17 fc rgb \"#3399FF\"",
+ "set object 195 rect from 78.23049999999994, 13.83 to 78.23599999999993, 13.17 fc rgb \"#3399FF\"",
+ "set object 196 rect from 80.91049999999994, 13.83 to 80.91099999999994, 13.17 fc rgb \"#3399FF\"",
+ "set object 197 rect from 80.94849999999994, 13.83 to 80.94999999999993, 13.17 fc rgb \"#3399FF\"",
+ "set object 198 rect from 83.58999999999995, 13.83 to 83.59049999999995, 13.17 fc rgb \"#3399FF\"",
+ "set object 199 rect from 83.63699999999994, 13.83 to 83.63949999999993, 13.17 fc rgb \"#3399FF\"",
+ "set object 200 rect from 88.75849999999993, 13.83 to 88.75899999999993, 13.17 fc rgb \"#3399FF\"",
+ "set object 201 rect from 88.81899999999993, 13.83 to 88.82249999999992, 13.17 fc rgb \"#3399FF\"",
+ "set object 202 rect from 91.91649999999991, 13.83 to 91.91699999999992, 13.17 fc rgb \"#3399FF\"",
+ "set object 203 rect from 91.96349999999993, 13.83 to 91.96599999999992, 13.17 fc rgb \"#3399FF\"",
+ "set object 204 rect from 94.56249999999991, 13.83 to 94.56299999999992, 13.17 fc rgb \"#3399FF\"",
+ "set object 205 rect from 94.60349999999991, 13.83 to 94.6049999999999, 13.17 fc rgb \"#3399FF\"",
+ "set object 206 rect from 97.21399999999991, 13.83 to 97.21449999999992, 13.17 fc rgb \"#3399FF\"",
+ "set object 207 rect from 97.25899999999993, 13.83 to 97.26049999999992, 13.17 fc rgb \"#3399FF\"",
+ "set object 208 rect from 99.87599999999992, 13.83 to 99.87649999999992, 13.17 fc rgb \"#3399FF\"",
+ "set object 209 rect from 99.91899999999993, 13.83 to 99.92149999999991, 13.17 fc rgb \"#3399FF\"",
+ "set object 210 rect from 102.56599999999992, 13.83 to 102.56649999999992, 13.17 fc rgb \"#3399FF\"",
+ "set object 211 rect from 102.6099999999999, 13.83 to 102.61149999999991, 13.17 fc rgb \"#3399FF\"",
+ "set object 212 rect from 105.88749999999992, 13.83 to 105.88799999999992, 13.17 fc rgb \"#3399FF\"",
+ "set object 213 rect from 105.93149999999991, 13.83 to 105.93299999999991, 13.17 fc rgb \"#3399FF\"",
+ "set object 214 rect from 109.27249999999991, 13.83 to 109.27299999999991, 13.17 fc rgb \"#3399FF\"",
+ "set object 215 rect from 109.38599999999991, 13.83 to 109.4024999999999, 13.17 fc rgb \"#3399FF\"",
+ "set object 216 rect from 112.6104999999999, 13.83 to 112.6109999999999, 13.17 fc rgb \"#3399FF\"",
+ "set object 217 rect from 112.6544999999999, 13.83 to 112.65599999999989, 13.17 fc rgb \"#3399FF\"",
+ "set object 218 rect from 115.37049999999991, 13.83 to 115.37099999999991, 13.17 fc rgb \"#3399FF\"",
+ "set object 219 rect from 115.4104999999999, 13.83 to 115.41199999999989, 13.17 fc rgb \"#3399FF\"",
+ "set object 220 rect from 118.14999999999989, 13.83 to 118.1504999999999, 13.17 fc rgb \"#3399FF\"",
+ "set object 221 rect from 118.18999999999991, 13.83 to 118.1914999999999, 13.17 fc rgb \"#3399FF\"",
+ "set object 222 rect from 120.9319999999999, 13.83 to 120.9324999999999, 13.17 fc rgb \"#3399FF\"",
+ "set object 223 rect from 121.0104999999999, 13.83 to 121.0259999999999, 13.17 fc rgb \"#3399FF\"",
+ "set object 224 rect from 123.78149999999991, 13.83 to 123.78199999999991, 13.17 fc rgb \"#3399FF\"",
+ "set object 225 rect from 123.8234999999999, 13.83 to 123.8249999999999, 13.17 fc rgb \"#3399FF\"",
+ "set object 226 rect from 126.5569999999999, 13.83 to 126.5574999999999, 13.17 fc rgb \"#3399FF\"",
+ "set object 227 rect from 126.5969999999999, 13.83 to 126.59849999999989, 13.17 fc rgb \"#3399FF\"",
+ "set object 228 rect from 129.4124999999999, 13.83 to 129.4249999999999, 13.17 fc rgb \"#3399FF\"",
+ "set object 229 rect from 129.4864999999999, 13.83 to 129.4879999999999, 13.17 fc rgb \"#3399FF\"",
+ "set object 230 rect from 132.87149999999988, 13.83 to 132.87199999999987, 13.17 fc rgb \"#3399FF\"",
+ "set object 231 rect from 132.9204999999999, 13.83 to 132.92199999999988, 13.17 fc rgb \"#3399FF\"",
+ "set object 232 rect from 136.15099999999987, 13.83 to 136.15149999999986, 13.17 fc rgb \"#3399FF\"",
+ "set object 233 rect from 136.19599999999988, 13.83 to 136.19749999999988, 13.17 fc rgb \"#3399FF\"",
+ "set object 234 rect from 138.93549999999988, 13.83 to 138.93599999999986, 13.17 fc rgb \"#3399FF\"",
+ "set object 235 rect from 138.97849999999988, 13.83 to 138.97999999999988, 13.17 fc rgb \"#3399FF\"",
+ "set object 236 rect from 141.0599999999999, 13.83 to 141.0984999999999, 13.17 fc rgb \"#3399FF\"",
+ "set object 237 rect from 16.9945, 14.83 to 17.7705, 14.17 fc rgb \"#CC0000\"",
+ "set object 238 rect from 18.046, 14.83 to 18.1735, 14.17 fc rgb \"#CC0000\"",
+ "set object 239 rect from 19.0915, 14.83 to 19.152, 14.17 fc rgb \"#CC0000\"",
+ "set object 240 rect from 20.624499999999998, 14.83 to 21.063999999999997, 14.17 fc rgb \"#CC0000\"",
+ "set object 241 rect from 21.148500000000002, 14.83 to 21.175, 14.17 fc rgb \"#CC0000\"",
+ "set object 242 rect from 21.2875, 14.83 to 21.363, 14.17 fc rgb \"#CC0000\"",
+ "set object 243 rect from 21.505, 14.83 to 21.525499999999997, 14.17 fc rgb \"#CC0000\"",
+ "set object 244 rect from 21.604000000000003, 14.83 to 21.619500000000002, 14.17 fc rgb \"#CC0000\"",
+ "set object 245 rect from 21.747, 14.83 to 21.8475, 14.17 fc rgb \"#CC0000\"",
+ "set object 246 rect from 22.400499999999997, 14.83 to 22.416999999999998, 14.17 fc rgb \"#CC0000\"",
+ "set object 247 rect from 22.4715, 14.83 to 22.486, 14.17 fc rgb \"#CC0000\"",
+ "set object 248 rect from 22.517500000000002, 14.83 to 22.528, 14.17 fc rgb \"#CC0000\"",
+ "set object 249 rect from 22.5655, 14.83 to 22.570999999999998, 14.17 fc rgb \"#CC0000\"",
+ "set object 250 rect from 23.1575, 14.83 to 23.189, 14.17 fc rgb \"#CC0000\"",
+ "set object 251 rect from 23.376, 14.83 to 23.3945, 14.17 fc rgb \"#CC0000\"",
+ "set object 252 rect from 23.518, 14.83 to 23.5775, 14.17 fc rgb \"#CC0000\"",
+ "set object 253 rect from 23.617, 14.83 to 23.8365, 14.17 fc rgb \"#CC0000\"",
+ "set object 254 rect from 23.912000000000003, 14.83 to 23.9205, 14.17 fc rgb \"#CC0000\"",
+ "set object 255 rect from 24.4405, 14.83 to 24.458, 14.17 fc rgb \"#CC0000\"",
+ "set object 256 rect from 24.5085, 14.83 to 24.544000000000004, 14.17 fc rgb \"#CC0000\"",
+ "set object 257 rect from 41.91250000000001, 14.83 to 42.05100000000001, 14.17 fc rgb \"#CC0000\"",
+ "set object 258 rect from 42.30000000000002, 14.83 to 42.31450000000002, 14.17 fc rgb \"#CC0000\"",
+ "set object 259 rect from 42.66150000000002, 14.83 to 42.70600000000002, 14.17 fc rgb \"#CC0000\"",
+ "set object 260 rect from 42.76550000000001, 14.83 to 42.795000000000016, 14.17 fc rgb \"#CC0000\"",
+ "set object 261 rect from 42.812500000000014, 14.83 to 42.83300000000001, 14.17 fc rgb \"#CC0000\"",
+ "set object 262 rect from 42.85950000000001, 14.83 to 42.88200000000001, 14.17 fc rgb \"#CC0000\"",
+ "set object 263 rect from 43.622000000000014, 14.83 to 43.632500000000014, 14.17 fc rgb \"#CC0000\"",
+ "set object 264 rect from 44.812500000000014, 14.83 to 44.82200000000002, 14.17 fc rgb \"#CC0000\"",
+ "set object 265 rect from 44.87550000000002, 14.83 to 44.917000000000016, 14.17 fc rgb \"#CC0000\"",
+ "set object 266 rect from 45.01150000000001, 14.83 to 45.02900000000001, 14.17 fc rgb \"#CC0000\"",
+ "set object 267 rect from 45.068500000000014, 14.83 to 45.08700000000001, 14.17 fc rgb \"#CC0000\"",
+ "set object 268 rect from 45.110500000000016, 14.83 to 45.13500000000002, 14.17 fc rgb \"#CC0000\"",
+ "set object 269 rect from 45.16350000000002, 14.83 to 45.17200000000002, 14.17 fc rgb \"#CC0000\"",
+ "set object 270 rect from 45.34000000000002, 14.83 to 45.361500000000014, 14.17 fc rgb \"#CC0000\"",
+ "set object 271 rect from 45.405000000000015, 14.83 to 45.41750000000002, 14.17 fc rgb \"#CC0000\"",
+ "set object 272 rect from 45.44250000000002, 14.83 to 45.44850000000002, 14.17 fc rgb \"#CC0000\"",
+ "set object 273 rect from 45.466000000000015, 14.83 to 45.470500000000015, 14.17 fc rgb \"#CC0000\"",
+ "set object 274 rect from 45.484000000000016, 14.83 to 45.489500000000014, 14.17 fc rgb \"#CC0000\"",
+ "set object 275 rect from 45.56900000000001, 14.83 to 45.626500000000014, 14.17 fc rgb \"#CC0000\"",
+ "set object 276 rect from 45.71200000000001, 14.83 to 45.76150000000001, 14.17 fc rgb \"#CC0000\"",
+ "set object 277 rect from 45.82000000000001, 14.83 to 45.84850000000001, 14.17 fc rgb \"#CC0000\"",
+ "set object 278 rect from 45.93000000000001, 14.83 to 45.97850000000001, 14.17 fc rgb \"#CC0000\"",
+ "set object 279 rect from 46.08650000000001, 14.83 to 46.13100000000001, 14.17 fc rgb \"#CC0000\"",
+ "set object 280 rect from 46.291500000000006, 14.83 to 46.37200000000001, 14.17 fc rgb \"#CC0000\"",
+ "set object 281 rect from 46.59550000000001, 14.83 to 46.621, 14.17 fc rgb \"#CC0000\"",
+ "set object 282 rect from 46.694500000000005, 14.83 to 46.74, 14.17 fc rgb \"#CC0000\"",
+ "set object 283 rect from 46.8975, 14.83 to 46.9925, 14.17 fc rgb \"#CC0000\"",
+ "set object 284 rect from 47.050000000000004, 14.83 to 47.057500000000005, 14.17 fc rgb \"#CC0000\"",
+ "set object 285 rect from 47.141, 14.83 to 47.3935, 14.17 fc rgb \"#CC0000\"",
+ "set object 286 rect from 47.472, 14.83 to 47.5235, 14.17 fc rgb \"#CC0000\"",
+ "set object 287 rect from 49.469, 14.83 to 49.4955, 14.17 fc rgb \"#CC0000\"",
+ "set object 288 rect from 49.732, 14.83 to 49.780499999999996, 14.17 fc rgb \"#CC0000\"",
+ "set object 289 rect from 49.814, 14.83 to 49.82449999999999, 14.17 fc rgb \"#CC0000\"",
+ "set object 290 rect from 49.851, 14.83 to 49.8685, 14.17 fc rgb \"#CC0000\"",
+ "set object 291 rect from 49.99849999999999, 14.83 to 50.007, 14.17 fc rgb \"#CC0000\"",
+ "set object 292 rect from 50.147499999999994, 14.83 to 50.20799999999999, 14.17 fc rgb \"#CC0000\"",
+ "set object 293 rect from 50.314499999999995, 14.83 to 50.32899999999999, 14.17 fc rgb \"#CC0000\"",
+ "set object 294 rect from 50.40249999999999, 14.83 to 50.43099999999999, 14.17 fc rgb \"#CC0000\"",
+ "set object 295 rect from 50.52949999999999, 14.83 to 50.53499999999999, 14.17 fc rgb \"#CC0000\"",
+ "set object 296 rect from 50.62949999999999, 14.83 to 51.02349999999999, 14.17 fc rgb \"#CC0000\"",
+ "set object 297 rect from 51.292999999999985, 14.83 to 51.30249999999999, 14.17 fc rgb \"#CC0000\"",
+ "set object 298 rect from 51.57499999999999, 14.83 to 51.78349999999999, 14.17 fc rgb \"#CC0000\"",
+ "set object 299 rect from 51.89349999999999, 14.83 to 51.91599999999998, 14.17 fc rgb \"#CC0000\"",
+ "set object 300 rect from 52.13749999999999, 14.83 to 52.15399999999998, 14.17 fc rgb \"#CC0000\"",
+ "set object 301 rect from 52.30249999999998, 14.83 to 52.31499999999998, 14.17 fc rgb \"#CC0000\"",
+ "set object 302 rect from 52.331499999999984, 14.83 to 52.338999999999984, 14.17 fc rgb \"#CC0000\"",
+ "set object 303 rect from 52.40949999999998, 14.83 to 52.448999999999984, 14.17 fc rgb \"#CC0000\"",
+ "set object 304 rect from 70.34449999999994, 14.83 to 70.35799999999995, 14.17 fc rgb \"#CC0000\"",
+ "set object 305 rect from 140.88349999999988, 14.83 to 140.89599999999987, 14.17 fc rgb \"#CC0000\"",
+ "set object 306 rect from 140.96249999999986, 14.83 to 140.9779999999999, 14.17 fc rgb \"#CC0000\"",
+ "set object 307 rect from 141.0404999999999, 14.83 to 141.04699999999988, 14.17 fc rgb \"#CC0000\"",
+ "set object 308 rect from 25.285, 15.83 to 25.4055, 15.17 fc rgb \"#CC0044\"",
+ "set object 309 rect from 25.428000000000004, 15.83 to 25.507500000000004, 15.17 fc rgb \"#CC0044\"",
+ "set object 310 rect from 25.526500000000002, 15.83 to 25.591500000000003, 15.17 fc rgb \"#CC0044\"",
+ "set object 311 rect from 54.55999999999998, 15.83 to 54.566499999999984, 15.17 fc rgb \"#CC0044\"",
+ "set object 312 rect from 54.64299999999998, 15.83 to 54.951999999999984, 15.17 fc rgb \"#CC0044\"",
+ "set object 313 rect from 55.48599999999998, 15.83 to 55.49149999999998, 15.17 fc rgb \"#CC0044\"",
+ "set object 314 rect from 55.53099999999998, 15.83 to 55.66249999999998, 15.17 fc rgb \"#CC0044\"",
+ "set object 315 rect from 56.25149999999998, 15.83 to 56.52499999999998, 15.17 fc rgb \"#CC0044\"",
+ "set object 316 rect from 56.55699999999998, 15.83 to 56.64049999999998, 15.17 fc rgb \"#CC0044\"",
+ "set object 317 rect from 56.64999999999998, 15.83 to 56.69449999999998, 15.17 fc rgb \"#CC0044\"",
+ "set object 318 rect from 56.746499999999976, 15.83 to 56.750999999999976, 15.17 fc rgb \"#CC0044\"",
+ "set object 319 rect from 56.76449999999998, 15.83 to 56.845999999999975, 15.17 fc rgb \"#CC0044\"",
+ "set object 320 rect from 56.85849999999998, 15.83 to 56.97649999999997, 15.17 fc rgb \"#CC0044\"",
+ "set object 321 rect from 57.03599999999997, 15.83 to 57.039499999999975, 15.17 fc rgb \"#CC0044\"",
+ "set object 322 rect from 57.076499999999974, 15.83 to 57.205999999999975, 15.17 fc rgb \"#CC0044\"",
+ "set object 323 rect from 57.27249999999997, 15.83 to 57.33299999999997, 15.17 fc rgb \"#CC0044\"",
+ "set object 324 rect from 57.565999999999974, 15.83 to 57.64849999999997, 15.17 fc rgb \"#CC0044\"",
+ "set object 325 rect from 57.878499999999974, 15.83 to 57.934999999999974, 15.17 fc rgb \"#CC0044\"",
+ "set object 326 rect from 57.97299999999997, 15.83 to 57.97749999999997, 15.17 fc rgb \"#CC0044\"",
+ "set object 327 rect from 57.99099999999997, 15.83 to 58.04499999999997, 15.17 fc rgb \"#CC0044\"",
+ "set object 328 rect from 58.055499999999974, 15.83 to 58.07699999999997, 15.17 fc rgb \"#CC0044\"",
+ "set object 329 rect from 58.09149999999997, 15.83 to 58.12149999999997, 15.17 fc rgb \"#CC0044\"",
+ "set object 330 rect from 58.14299999999997, 15.83 to 58.21549999999997, 15.17 fc rgb \"#CC0044\"",
+ "set object 331 rect from 58.23599999999997, 15.83 to 58.316999999999965, 15.17 fc rgb \"#CC0044\"",
+ "set object 332 rect from 58.409499999999966, 15.83 to 58.40999999999997, 15.17 fc rgb \"#CC0044\"",
+ "set object 333 rect from 58.431499999999964, 15.83 to 58.51699999999997, 15.17 fc rgb \"#CC0044\"",
+ "set object 334 rect from 58.53049999999997, 15.83 to 58.590999999999966, 15.17 fc rgb \"#CC0044\"",
+ "set object 335 rect from 58.60049999999997, 15.83 to 58.65749999999996, 15.17 fc rgb \"#CC0044\"",
+ "set object 336 rect from 58.92499999999996, 15.83 to 59.042999999999964, 15.17 fc rgb \"#CC0044\"",
+ "set object 337 rect from 59.641499999999965, 15.83 to 59.65599999999996, 15.17 fc rgb \"#CC0044\"",
+ "set object 338 rect from 59.669499999999964, 15.83 to 59.69699999999996, 15.17 fc rgb \"#CC0044\"",
+ "set object 339 rect from 59.89099999999996, 15.83 to 59.93649999999996, 15.17 fc rgb \"#CC0044\"",
+ "set object 340 rect from 60.04699999999996, 15.83 to 60.05149999999996, 15.17 fc rgb \"#CC0044\"",
+ "set object 341 rect from 60.060999999999964, 15.83 to 60.08349999999996, 15.17 fc rgb \"#CC0044\"",
+ "set object 342 rect from 60.17149999999996, 15.83 to 60.176999999999964, 15.17 fc rgb \"#CC0044\"",
+ "set object 343 rect from 60.19499999999996, 15.83 to 60.26949999999996, 15.17 fc rgb \"#CC0044\"",
+ "set object 344 rect from 60.27999999999996, 15.83 to 60.31149999999996, 15.17 fc rgb \"#CC0044\"",
+ "set object 345 rect from 60.34699999999996, 15.83 to 60.471499999999956, 15.17 fc rgb \"#CC0044\"",
+ "set object 346 rect from 60.48399999999996, 15.83 to 60.508499999999955, 15.17 fc rgb \"#CC0044\"",
+ "set object 347 rect from 60.51999999999996, 15.83 to 60.65699999999996, 15.17 fc rgb \"#CC0044\"",
+ "set object 348 rect from 60.91649999999996, 15.83 to 60.92099999999996, 15.17 fc rgb \"#CC0044\"",
+ "set object 349 rect from 60.98249999999996, 15.83 to 61.253999999999955, 15.17 fc rgb \"#CC0044\"",
+ "set object 350 rect from 61.31249999999996, 15.83 to 61.464999999999954, 15.17 fc rgb \"#CC0044\"",
+ "set object 351 rect from 62.62699999999996, 15.83 to 63.024999999999956, 15.17 fc rgb \"#CC0044\"",
+ "set object 352 rect from 63.14749999999995, 15.83 to 63.15199999999995, 15.17 fc rgb \"#CC0044\"",
+ "set object 353 rect from 63.228499999999954, 15.83 to 63.41299999999995, 15.17 fc rgb \"#CC0044\"",
+ "set object 354 rect from 64.40899999999996, 15.83 to 64.61749999999995, 15.17 fc rgb \"#CC0044\"",
+ "set object 355 rect from 67.34249999999994, 15.83 to 67.34999999999994, 15.17 fc rgb \"#CC0044\"",
+ "set object 356 rect from 67.36349999999995, 15.83 to 67.45699999999994, 15.17 fc rgb \"#CC0044\"",
+ "set object 357 rect from 67.46599999999995, 15.83 to 67.48749999999995, 15.17 fc rgb \"#CC0044\"",
+ "set object 358 rect from 67.53599999999994, 15.83 to 67.59199999999996, 15.17 fc rgb \"#CC0044\"",
+ "set object 359 rect from 69.10849999999995, 15.83 to 69.11299999999994, 15.17 fc rgb \"#CC0044\"",
+ "set object 360 rect from 69.12949999999995, 15.83 to 69.19199999999995, 15.17 fc rgb \"#CC0044\"",
+ "set object 361 rect from 69.22649999999994, 15.83 to 69.30799999999994, 15.17 fc rgb \"#CC0044\"",
+ "set object 362 rect from 69.31949999999995, 15.83 to 69.34699999999995, 15.17 fc rgb \"#CC0044\"",
+ "set object 363 rect from 69.35749999999994, 15.83 to 69.38399999999996, 15.17 fc rgb \"#CC0044\"",
+ "set object 364 rect from 69.40549999999995, 15.83 to 69.45099999999994, 15.17 fc rgb \"#CC0044\"",
+ "set object 365 rect from 69.46349999999994, 15.83 to 69.49599999999995, 15.17 fc rgb \"#CC0044\"",
+ "set object 366 rect from 70.40899999999993, 15.83 to 70.58649999999994, 15.17 fc rgb \"#CC0044\"",
+ "set object 367 rect from 74.40699999999995, 15.83 to 74.41449999999995, 15.17 fc rgb \"#CC0044\"",
+ "set object 368 rect from 74.43899999999994, 15.83 to 74.52049999999994, 15.17 fc rgb \"#CC0044\"",
+ "set object 369 rect from 74.54499999999993, 15.83 to 74.59549999999994, 15.17 fc rgb \"#CC0044\"",
+ "set object 370 rect from 74.60899999999995, 15.83 to 74.63849999999994, 15.17 fc rgb \"#CC0044\"",
+ "set object 371 rect from 75.04799999999994, 15.83 to 75.20099999999994, 15.17 fc rgb \"#CC0044\"",
+ "set object 372 rect from 84.09549999999993, 15.83 to 84.09999999999994, 15.17 fc rgb \"#CC0044\"",
+ "set object 373 rect from 84.15349999999994, 15.83 to 84.26099999999994, 15.17 fc rgb \"#CC0044\"",
+ "set object 374 rect from 84.27549999999994, 15.83 to 84.34199999999993, 15.17 fc rgb \"#CC0044\"",
+ "set object 375 rect from 84.35349999999993, 15.83 to 84.37299999999993, 15.17 fc rgb \"#CC0044\"",
+ "set object 376 rect from 84.40149999999993, 15.83 to 84.43999999999994, 15.17 fc rgb \"#CC0044\"",
+ "set object 377 rect from 84.46149999999993, 15.83 to 84.53049999999993, 15.17 fc rgb \"#CC0044\"",
+ "set object 378 rect from 84.60099999999994, 15.83 to 84.68049999999992, 15.17 fc rgb \"#CC0044\"",
+ "set object 379 rect from 84.69199999999992, 15.83 to 84.71649999999993, 15.17 fc rgb \"#CC0044\"",
+ "set object 380 rect from 84.72799999999992, 15.83 to 84.84549999999993, 15.17 fc rgb \"#CC0044\"",
+ "set object 381 rect from 84.91749999999993, 15.83 to 84.92199999999994, 15.17 fc rgb \"#CC0044\"",
+ "set object 382 rect from 84.93849999999993, 15.83 to 84.99799999999993, 15.17 fc rgb \"#CC0044\"",
+ "set object 383 rect from 85.01049999999992, 15.83 to 85.06199999999993, 15.17 fc rgb \"#CC0044\"",
+ "set object 384 rect from 85.07249999999993, 15.83 to 85.13799999999992, 15.17 fc rgb \"#CC0044\"",
+ "set object 385 rect from 85.37849999999993, 15.83 to 85.38399999999993, 15.17 fc rgb \"#CC0044\"",
+ "set object 386 rect from 85.43999999999994, 15.83 to 85.59949999999992, 15.17 fc rgb \"#CC0044\"",
+ "set object 387 rect from 85.61599999999993, 15.83 to 85.63749999999993, 15.17 fc rgb \"#CC0044\"",
+ "set object 388 rect from 85.65899999999993, 15.83 to 85.69649999999993, 15.17 fc rgb \"#CC0044\"",
+ "set object 389 rect from 85.70599999999993, 15.83 to 85.73249999999993, 15.17 fc rgb \"#CC0044\"",
+ "set object 390 rect from 85.76899999999992, 15.83 to 85.86549999999993, 15.17 fc rgb \"#CC0044\"",
+ "set object 391 rect from 85.87599999999992, 15.83 to 85.91149999999992, 15.17 fc rgb \"#CC0044\"",
+ "set object 392 rect from 85.92499999999993, 15.83 to 86.05649999999993, 15.17 fc rgb \"#CC0044\"",
+ "set object 393 rect from 86.75549999999993, 15.83 to 87.36899999999991, 15.17 fc rgb \"#CC0044\"",
+ "set object 394 rect from 88.83949999999992, 15.83 to 89.21399999999991, 15.17 fc rgb \"#CC0044\"",
+ "set object 395 rect from 102.74149999999992, 15.83 to 102.74599999999992, 15.17 fc rgb \"#CC0044\"",
+ "set object 396 rect from 102.80749999999992, 15.83 to 102.99499999999992, 15.17 fc rgb \"#CC0044\"",
+ "set object 397 rect from 104.13299999999992, 15.83 to 104.4429999999999, 15.17 fc rgb \"#CC0044\"",
+ "set object 398 rect from 107.51699999999991, 15.83 to 107.5244999999999, 15.17 fc rgb \"#CC0044\"",
+ "set object 399 rect from 107.57199999999992, 15.83 to 107.62449999999991, 15.17 fc rgb \"#CC0044\"",
+ "set object 400 rect from 107.6389999999999, 15.83 to 107.69849999999991, 15.17 fc rgb \"#CC0044\"",
+ "set object 401 rect from 107.70999999999992, 15.83 to 107.7294999999999, 15.17 fc rgb \"#CC0044\"",
+ "set object 402 rect from 107.7469999999999, 15.83 to 107.7834999999999, 15.17 fc rgb \"#CC0044\"",
+ "set object 403 rect from 107.79299999999992, 15.83 to 107.82049999999991, 15.17 fc rgb \"#CC0044\"",
+ "set object 404 rect from 107.8529999999999, 15.83 to 107.9294999999999, 15.17 fc rgb \"#CC0044\"",
+ "set object 405 rect from 107.94099999999992, 15.83 to 107.9654999999999, 15.17 fc rgb \"#CC0044\"",
+ "set object 406 rect from 107.97599999999991, 15.83 to 108.09449999999991, 15.17 fc rgb \"#CC0044\"",
+ "set object 407 rect from 110.0909999999999, 15.83 to 110.4839999999999, 15.17 fc rgb \"#CC0044\"",
+ "set object 408 rect from 130.5424999999999, 15.83 to 130.5489999999999, 15.17 fc rgb \"#CC0044\"",
+ "set object 409 rect from 130.5954999999999, 15.83 to 130.6469999999999, 15.17 fc rgb \"#CC0044\"",
+ "set object 410 rect from 130.6614999999999, 15.83 to 130.68999999999988, 15.17 fc rgb \"#CC0044\"",
+ "set object 411 rect from 130.6994999999999, 15.83 to 130.7219999999999, 15.17 fc rgb \"#CC0044\"",
+ "set object 412 rect from 130.7324999999999, 15.83 to 130.7519999999999, 15.17 fc rgb \"#CC0044\"",
+ "set object 413 rect from 130.76949999999988, 15.83 to 130.8059999999999, 15.17 fc rgb \"#CC0044\"",
+ "set object 414 rect from 130.8154999999999, 15.83 to 130.84299999999988, 15.17 fc rgb \"#CC0044\"",
+ "set object 415 rect from 130.87549999999987, 15.83 to 130.95199999999988, 15.17 fc rgb \"#CC0044\"",
+ "set object 416 rect from 130.9644999999999, 15.83 to 130.99099999999987, 15.17 fc rgb \"#CC0044\"",
+ "set object 417 rect from 131.00249999999988, 15.83 to 131.1209999999999, 15.17 fc rgb \"#CC0044\"",
+ "set object 418 rect from 133.04349999999988, 15.83 to 133.4079999999999, 15.17 fc rgb \"#CC0044\"",
+ "set object 419 rect from 54.97249999999998, 16.83 to 56.20849999999998, 16.17 fc rgb \"#CC4499\"",
+ "set object 420 rect from 56.238999999999976, 16.83 to 56.53849999999998, 16.17 fc rgb \"#CC4499\"",
+ "set object 421 rect from 56.71599999999998, 16.83 to 56.830999999999975, 16.17 fc rgb \"#CC4499\"",
+ "set object 422 rect from 56.84349999999998, 16.83 to 57.062999999999974, 16.17 fc rgb \"#CC4499\"",
+ "set object 423 rect from 57.228499999999976, 16.83 to 57.545499999999976, 16.17 fc rgb \"#CC4499\"",
+ "set object 424 rect from 57.957499999999975, 16.83 to 58.00149999999997, 16.17 fc rgb \"#CC4499\"",
+ "set object 425 rect from 58.09499999999997, 16.83 to 58.30249999999997, 16.17 fc rgb \"#CC4499\"",
+ "set object 426 rect from 58.603999999999964, 16.83 to 58.964499999999965, 16.17 fc rgb \"#CC4499\"",
+ "set object 427 rect from 59.773999999999965, 16.83 to 59.88149999999996, 16.17 fc rgb \"#CC4499\"",
+ "set object 428 rect from 60.106999999999964, 16.83 to 60.18549999999996, 16.17 fc rgb \"#CC4499\"",
+ "set object 429 rect from 60.56649999999996, 16.83 to 62.55849999999995, 16.17 fc rgb \"#CC4499\"",
+ "set object 430 rect from 63.43549999999995, 16.83 to 64.39649999999995, 16.17 fc rgb \"#CC4499\"",
+ "set object 431 rect from 67.45849999999994, 16.83 to 67.57949999999995, 16.17 fc rgb \"#CC4499\"",
+ "set object 432 rect from 69.52049999999994, 16.83 to 70.32799999999995, 16.17 fc rgb \"#CC4499\"",
+ "set object 433 rect from 74.66299999999993, 16.83 to 75.03649999999993, 16.17 fc rgb \"#CC4499\"",
+ "set object 434 rect from 84.86699999999993, 16.83 to 88.80849999999992, 16.17 fc rgb \"#CC4499\"",
+ "set object 435 rect from 103.02549999999991, 16.83 to 104.04749999999991, 16.17 fc rgb \"#CC4499\"",
+ "set object 436 rect from 108.1159999999999, 16.83 to 110.07649999999991, 16.17 fc rgb \"#CC4499\"",
+ "set object 437 rect from 131.1424999999999, 16.83 to 133.02899999999988, 16.17 fc rgb \"#CC4499\"",
+ "set object 438 rect from 141.13349999999986, 16.83 to 141.1669999999999, 16.17 fc rgb \"#CC4499\"",
+ "set object 439 rect from 22.2675, 18.83 to 22.3815, 18.17 fc rgb \"#00CC00\"",
+ "set object 440 rect from 22.665, 18.83 to 23.1135, 18.17 fc rgb \"#00CC00\"",
+ "set object 441 rect from 27.951000000000004, 18.83 to 27.972500000000004, 18.17 fc rgb \"#00CC00\"",
+ "set object 442 rect from 27.993000000000002, 18.83 to 28.013500000000004, 18.17 fc rgb \"#00CC00\"",
+ "set object 443 rect from 28.043000000000003, 18.83 to 28.063500000000005, 18.17 fc rgb \"#00CC00\"",
+ "set object 444 rect from 28.085000000000004, 18.83 to 28.087500000000002, 18.17 fc rgb \"#00CC00\"",
+ "set object 445 rect from 28.115000000000002, 18.83 to 28.139500000000005, 18.17 fc rgb \"#00CC00\"",
+ "set object 446 rect from 28.154000000000007, 18.83 to 28.260000000000005, 18.17 fc rgb \"#00CC00\"",
+ "set object 447 rect from 28.309500000000003, 18.83 to 28.374000000000006, 18.17 fc rgb \"#00CC00\"",
+ "set object 448 rect from 28.383500000000005, 18.83 to 28.385000000000005, 18.17 fc rgb \"#00CC00\"",
+ "set object 449 rect from 28.396500000000003, 18.83 to 28.445000000000007, 18.17 fc rgb \"#00CC00\"",
+ "set object 450 rect from 28.459500000000006, 18.83 to 28.463000000000005, 18.17 fc rgb \"#00CC00\"",
+ "set object 451 rect from 28.489500000000007, 18.83 to 28.499000000000006, 18.17 fc rgb \"#00CC00\"",
+ "set object 452 rect from 28.512500000000006, 18.83 to 28.516000000000005, 18.17 fc rgb \"#00CC00\"",
+ "set object 453 rect from 28.529500000000006, 18.83 to 28.533000000000005, 18.17 fc rgb \"#00CC00\"",
+ "set object 454 rect from 28.554500000000004, 18.83 to 28.557000000000006, 18.17 fc rgb \"#00CC00\"",
+ "set object 455 rect from 28.573500000000006, 18.83 to 28.579000000000008, 18.17 fc rgb \"#00CC00\"",
+ "set object 456 rect from 28.59950000000001, 18.83 to 28.602000000000007, 18.17 fc rgb \"#00CC00\"",
+ "set object 457 rect from 28.623500000000007, 18.83 to 28.625000000000007, 18.17 fc rgb \"#00CC00\"",
+ "set object 458 rect from 28.637500000000006, 18.83 to 28.647000000000006, 18.17 fc rgb \"#00CC00\"",
+ "set object 459 rect from 28.657500000000006, 18.83 to 28.669000000000008, 18.17 fc rgb \"#00CC00\"",
+ "set object 460 rect from 28.682500000000005, 18.83 to 28.686000000000007, 18.17 fc rgb \"#00CC00\"",
+ "set object 461 rect from 28.695500000000006, 18.83 to 28.701000000000008, 18.17 fc rgb \"#00CC00\"",
+ "set object 462 rect from 28.72450000000001, 18.83 to 28.811000000000007, 18.17 fc rgb \"#00CC00\"",
+ "set object 463 rect from 28.83250000000001, 18.83 to 28.907500000000006, 18.17 fc rgb \"#00CC00\"",
+ "set object 464 rect from 28.97100000000001, 18.83 to 28.97450000000001, 18.17 fc rgb \"#00CC00\"",
+ "set object 465 rect from 28.99600000000001, 18.83 to 28.99850000000001, 18.17 fc rgb \"#00CC00\"",
+ "set object 466 rect from 29.01200000000001, 18.83 to 29.01350000000001, 18.17 fc rgb \"#00CC00\"",
+ "set object 467 rect from 29.02600000000001, 18.83 to 29.056500000000007, 18.17 fc rgb \"#00CC00\"",
+ "set object 468 rect from 29.06900000000001, 18.83 to 29.159500000000012, 18.17 fc rgb \"#00CC00\"",
+ "set object 469 rect from 29.17100000000001, 18.83 to 29.18450000000001, 18.17 fc rgb \"#00CC00\"",
+ "set object 470 rect from 29.19400000000001, 18.83 to 41.84850000000001, 18.17 fc rgb \"#00CC00\"",
+ "set object 471 rect from 41.87900000000001, 18.83 to 41.88650000000001, 18.17 fc rgb \"#00CC00\"",
+ "set object 472 rect from 27.972500000000004, 19.83 to 28.053000000000004, 19.17 fc rgb \"#44CC00\"",
+ "set object 473 rect from 28.063500000000005, 19.83 to 28.169000000000004, 19.17 fc rgb \"#44CC00\"",
+ "set object 474 rect from 28.260000000000005, 19.83 to 28.489500000000007, 19.17 fc rgb \"#44CC00\"",
+ "set object 475 rect from 28.499000000000006, 19.83 to 28.761500000000005, 19.17 fc rgb \"#44CC00\"",
+ "set object 476 rect from 28.78900000000001, 19.83 to 28.847500000000007, 19.17 fc rgb \"#44CC00\"",
+ "set object 477 rect from 28.907500000000006, 19.83 to 29.047000000000008, 19.17 fc rgb \"#44CC00\"",
+ "set object 478 rect from 29.056500000000007, 19.83 to 29.111000000000008, 19.17 fc rgb \"#44CC00\"",
+ "set object 479 rect from 29.12350000000001, 19.83 to 29.21900000000001, 19.17 fc rgb \"#44CC00\"",
+ "set object 480 rect from 41.82650000000001, 19.83 to 41.83500000000001, 19.17 fc rgb \"#44CC00\"",
+ "set object 481 rect from 41.84850000000001, 19.83 to 41.87900000000001, 19.17 fc rgb \"#44CC00\"",
+ "set object 482 rect from 16.737, 20.83 to 16.9595, 20.17 fc rgb \"#00CC44\"",
+ "set object 483 rect from 17.8715, 20.83 to 18.017000000000003, 20.17 fc rgb \"#00CC44\"",
+ "set object 484 rect from 18.992, 20.83 to 19.0685, 20.17 fc rgb \"#00CC44\"",
+ "set object 485 rect from 20.52, 20.83 to 20.5975, 20.17 fc rgb \"#00CC44\"",
+ "set object 486 rect from 21.109, 20.83 to 21.1335, 20.17 fc rgb \"#00CC44\"",
+ "set object 487 rect from 21.212, 20.83 to 21.2695, 20.17 fc rgb \"#00CC44\"",
+ "set object 488 rect from 21.4595, 20.83 to 21.49, 20.17 fc rgb \"#00CC44\"",
+ "set object 489 rect from 21.566499999999998, 20.83 to 21.588, 20.17 fc rgb \"#00CC44\"",
+ "set object 490 rect from 21.6535, 20.83 to 21.727, 20.17 fc rgb \"#00CC44\"",
+ "set object 491 rect from 22.445, 20.83 to 22.4625, 20.17 fc rgb \"#00CC44\"",
+ "set object 492 rect from 22.502000000000002, 20.83 to 22.5165, 20.17 fc rgb \"#00CC44\"",
+ "set object 493 rect from 22.553, 20.83 to 22.5645, 20.17 fc rgb \"#00CC44\"",
+ "set object 494 rect from 23.233, 20.83 to 23.336000000000002, 20.17 fc rgb \"#00CC44\"",
+ "set object 495 rect from 23.4255, 20.83 to 23.506, 20.17 fc rgb \"#00CC44\"",
+ "set object 496 rect from 23.5895, 20.83 to 23.613, 20.17 fc rgb \"#00CC44\"",
+ "set object 497 rect from 23.870500000000003, 20.83 to 23.907, 20.17 fc rgb \"#00CC44\"",
+ "set object 498 rect from 24.393, 20.83 to 24.430500000000002, 20.17 fc rgb \"#00CC44\"",
+ "set object 499 rect from 24.470000000000002, 20.83 to 24.504500000000004, 20.17 fc rgb \"#00CC44\"",
+ "set object 500 rect from 25.267500000000002, 20.83 to 25.283, 20.17 fc rgb \"#00CC44\"",
+ "set object 501 rect from 25.4195, 20.83 to 25.427, 20.17 fc rgb \"#00CC44\"",
+ "set object 502 rect from 25.519500000000004, 20.83 to 25.526000000000003, 20.17 fc rgb \"#00CC44\"",
+ "set object 503 rect from 42.28050000000001, 20.83 to 42.298000000000016, 20.17 fc rgb \"#00CC44\"",
+ "set object 504 rect from 42.62700000000002, 20.83 to 42.656500000000015, 20.17 fc rgb \"#00CC44\"",
+ "set object 505 rect from 42.747000000000014, 20.83 to 42.763500000000015, 20.17 fc rgb \"#00CC44\"",
+ "set object 506 rect from 42.80300000000001, 20.83 to 42.81050000000001, 20.17 fc rgb \"#00CC44\"",
+ "set object 507 rect from 42.844000000000015, 20.83 to 42.858500000000014, 20.17 fc rgb \"#00CC44\"",
+ "set object 508 rect from 43.60550000000001, 20.83 to 43.62000000000002, 20.17 fc rgb \"#00CC44\"",
+ "set object 509 rect from 44.796000000000014, 20.83 to 44.81150000000002, 20.17 fc rgb \"#00CC44\"",
+ "set object 510 rect from 44.84500000000001, 20.83 to 44.87150000000002, 20.17 fc rgb \"#00CC44\"",
+ "set object 511 rect from 44.996000000000016, 20.83 to 45.00850000000001, 20.17 fc rgb \"#00CC44\"",
+ "set object 512 rect from 45.04700000000001, 20.83 to 45.06450000000002, 20.17 fc rgb \"#00CC44\"",
+ "set object 513 rect from 45.09600000000001, 20.83 to 45.107500000000016, 20.17 fc rgb \"#00CC44\"",
+ "set object 514 rect from 45.14400000000002, 20.83 to 45.16150000000002, 20.17 fc rgb \"#00CC44\"",
+ "set object 515 rect from 45.32050000000002, 20.83 to 45.33700000000002, 20.17 fc rgb \"#00CC44\"",
+ "set object 516 rect from 45.38750000000002, 20.83 to 45.402000000000015, 20.17 fc rgb \"#00CC44\"",
+ "set object 517 rect from 45.43250000000002, 20.83 to 45.442000000000014, 20.17 fc rgb \"#00CC44\"",
+ "set object 518 rect from 45.46050000000002, 20.83 to 45.46500000000002, 20.17 fc rgb \"#00CC44\"",
+ "set object 519 rect from 45.47750000000001, 20.83 to 45.48300000000001, 20.17 fc rgb \"#00CC44\"",
+ "set object 520 rect from 45.49750000000001, 20.83 to 45.55900000000001, 20.17 fc rgb \"#00CC44\"",
+ "set object 521 rect from 45.66050000000001, 20.83 to 45.70300000000001, 20.17 fc rgb \"#00CC44\"",
+ "set object 522 rect from 45.79350000000001, 20.83 to 45.81700000000001, 20.17 fc rgb \"#00CC44\"",
+ "set object 523 rect from 45.86950000000001, 20.83 to 45.92300000000001, 20.17 fc rgb \"#00CC44\"",
+ "set object 524 rect from 45.99450000000001, 20.83 to 46.060500000000005, 20.17 fc rgb \"#00CC44\"",
+ "set object 525 rect from 46.18500000000001, 20.83 to 46.28150000000001, 20.17 fc rgb \"#00CC44\"",
+ "set object 526 rect from 46.550000000000004, 20.83 to 46.5915, 20.17 fc rgb \"#00CC44\"",
+ "set object 527 rect from 46.65500000000001, 20.83 to 46.691500000000005, 20.17 fc rgb \"#00CC44\"",
+ "set object 528 rect from 46.861000000000004, 20.83 to 46.8935, 20.17 fc rgb \"#00CC44\"",
+ "set object 529 rect from 47.039500000000004, 20.83 to 47.049, 20.17 fc rgb \"#00CC44\"",
+ "set object 530 rect from 47.0765, 20.83 to 47.135000000000005, 20.17 fc rgb \"#00CC44\"",
+ "set object 531 rect from 47.4125, 20.83 to 47.465, 20.17 fc rgb \"#00CC44\"",
+ "set object 532 rect from 49.454499999999996, 20.83 to 49.467, 20.17 fc rgb \"#00CC44\"",
+ "set object 533 rect from 49.6855, 20.83 to 49.726, 20.17 fc rgb \"#00CC44\"",
+ "set object 534 rect from 49.799499999999995, 20.83 to 49.812999999999995, 20.17 fc rgb \"#00CC44\"",
+ "set object 535 rect from 49.841499999999996, 20.83 to 49.849999999999994, 20.17 fc rgb \"#00CC44\"",
+ "set object 536 rect from 49.894499999999994, 20.83 to 49.9695, 20.17 fc rgb \"#00CC44\"",
+ "set object 537 rect from 50.083999999999996, 20.83 to 50.14149999999999, 20.17 fc rgb \"#00CC44\"",
+ "set object 538 rect from 50.29299999999999, 20.83 to 50.31249999999999, 20.17 fc rgb \"#00CC44\"",
+ "set object 539 rect from 50.36699999999999, 20.83 to 50.39849999999999, 20.17 fc rgb \"#00CC44\"",
+ "set object 540 rect from 50.520999999999994, 20.83 to 50.528499999999994, 20.17 fc rgb \"#00CC44\"",
+ "set object 541 rect from 50.54899999999999, 20.83 to 50.62049999999999, 20.17 fc rgb \"#00CC44\"",
+ "set object 542 rect from 51.27549999999999, 20.83 to 51.29099999999999, 20.17 fc rgb \"#00CC44\"",
+ "set object 543 rect from 51.52249999999999, 20.83 to 51.56899999999999, 20.17 fc rgb \"#00CC44\"",
+ "set object 544 rect from 51.87299999999998, 20.83 to 51.89049999999999, 20.17 fc rgb \"#00CC44\"",
+ "set object 545 rect from 52.115999999999985, 20.83 to 52.13449999999999, 20.17 fc rgb \"#00CC44\"",
+ "set object 546 rect from 52.286999999999985, 20.83 to 52.300499999999985, 20.17 fc rgb \"#00CC44\"",
+ "set object 547 rect from 52.326999999999984, 20.83 to 52.33049999999999, 20.17 fc rgb \"#00CC44\"",
+ "set object 548 rect from 52.362999999999985, 20.83 to 52.404499999999985, 20.17 fc rgb \"#00CC44\"",
+ "set object 549 rect from 54.566499999999984, 20.83 to 54.64299999999998, 20.17 fc rgb \"#00CC44\"",
+ "set object 550 rect from 55.49149999999998, 20.83 to 55.53099999999998, 20.17 fc rgb \"#00CC44\"",
+ "set object 551 rect from 56.64049999999998, 20.83 to 56.64999999999998, 20.17 fc rgb \"#00CC44\"",
+ "set object 552 rect from 56.750999999999976, 20.83 to 56.76449999999998, 20.17 fc rgb \"#00CC44\"",
+ "set object 553 rect from 57.039499999999975, 20.83 to 57.076499999999974, 20.17 fc rgb \"#00CC44\"",
+ "set object 554 rect from 57.885999999999974, 20.83 to 57.893499999999975, 20.17 fc rgb \"#00CC44\"",
+ "set object 555 rect from 57.97749999999997, 20.83 to 57.99099999999997, 20.17 fc rgb \"#00CC44\"",
+ "set object 556 rect from 58.04499999999997, 20.83 to 58.055499999999974, 20.17 fc rgb \"#00CC44\"",
+ "set object 557 rect from 58.14549999999997, 20.83 to 58.15399999999997, 20.17 fc rgb \"#00CC44\"",
+ "set object 558 rect from 58.17549999999997, 20.83 to 58.18399999999997, 20.17 fc rgb \"#00CC44\"",
+ "set object 559 rect from 58.40999999999997, 20.83 to 58.431499999999964, 20.17 fc rgb \"#00CC44\"",
+ "set object 560 rect from 58.51699999999997, 20.83 to 58.53049999999997, 20.17 fc rgb \"#00CC44\"",
+ "set object 561 rect from 58.590999999999966, 20.83 to 58.60049999999997, 20.17 fc rgb \"#00CC44\"",
+ "set object 562 rect from 59.65599999999996, 20.83 to 59.669499999999964, 20.17 fc rgb \"#00CC44\"",
+ "set object 563 rect from 60.05149999999996, 20.83 to 60.060999999999964, 20.17 fc rgb \"#00CC44\"",
+ "set object 564 rect from 60.176999999999964, 20.83 to 60.19499999999996, 20.17 fc rgb \"#00CC44\"",
+ "set object 565 rect from 60.26949999999996, 20.83 to 60.27999999999996, 20.17 fc rgb \"#00CC44\"",
+ "set object 566 rect from 60.31149999999996, 20.83 to 60.34699999999996, 20.17 fc rgb \"#00CC44\"",
+ "set object 567 rect from 60.471499999999956, 20.83 to 60.48399999999996, 20.17 fc rgb \"#00CC44\"",
+ "set object 568 rect from 60.508499999999955, 20.83 to 60.51999999999996, 20.17 fc rgb \"#00CC44\"",
+ "set object 569 rect from 60.92099999999996, 20.83 to 60.98249999999996, 20.17 fc rgb \"#00CC44\"",
+ "set object 570 rect from 63.15199999999995, 20.83 to 63.228499999999954, 20.17 fc rgb \"#00CC44\"",
+ "set object 571 rect from 67.34999999999994, 20.83 to 67.36349999999995, 20.17 fc rgb \"#00CC44\"",
+ "set object 572 rect from 67.40699999999995, 20.83 to 67.41249999999995, 20.17 fc rgb \"#00CC44\"",
+ "set object 573 rect from 67.45699999999994, 20.83 to 67.46599999999995, 20.17 fc rgb \"#00CC44\"",
+ "set object 574 rect from 69.11299999999994, 20.83 to 69.12949999999995, 20.17 fc rgb \"#00CC44\"",
+ "set object 575 rect from 69.19199999999995, 20.83 to 69.22649999999994, 20.17 fc rgb \"#00CC44\"",
+ "set object 576 rect from 69.30799999999994, 20.83 to 69.31949999999995, 20.17 fc rgb \"#00CC44\"",
+ "set object 577 rect from 69.34699999999995, 20.83 to 69.35749999999994, 20.17 fc rgb \"#00CC44\"",
+ "set object 578 rect from 69.38399999999996, 20.83 to 69.40549999999995, 20.17 fc rgb \"#00CC44\"",
+ "set object 579 rect from 69.45099999999994, 20.83 to 69.46349999999994, 20.17 fc rgb \"#00CC44\"",
+ "set object 580 rect from 70.31749999999994, 20.83 to 70.33949999999994, 20.17 fc rgb \"#00CC44\"",
+ "set object 581 rect from 74.41449999999995, 20.83 to 74.43899999999994, 20.17 fc rgb \"#00CC44\"",
+ "set object 582 rect from 74.52049999999994, 20.83 to 74.54499999999993, 20.17 fc rgb \"#00CC44\"",
+ "set object 583 rect from 74.59549999999994, 20.83 to 74.60899999999995, 20.17 fc rgb \"#00CC44\"",
+ "set object 584 rect from 84.09999999999994, 20.83 to 84.15349999999994, 20.17 fc rgb \"#00CC44\"",
+ "set object 585 rect from 84.26099999999994, 20.83 to 84.27549999999994, 20.17 fc rgb \"#00CC44\"",
+ "set object 586 rect from 84.31099999999992, 20.83 to 84.31949999999993, 20.17 fc rgb \"#00CC44\"",
+ "set object 587 rect from 84.34199999999993, 20.83 to 84.35349999999993, 20.17 fc rgb \"#00CC44\"",
+ "set object 588 rect from 84.37299999999993, 20.83 to 84.40149999999993, 20.17 fc rgb \"#00CC44\"",
+ "set object 589 rect from 84.43999999999994, 20.83 to 84.46149999999993, 20.17 fc rgb \"#00CC44\"",
+ "set object 590 rect from 84.53049999999993, 20.83 to 84.60099999999994, 20.17 fc rgb \"#00CC44\"",
+ "set object 591 rect from 84.68049999999992, 20.83 to 84.69199999999992, 20.17 fc rgb \"#00CC44\"",
+ "set object 592 rect from 84.71649999999993, 20.83 to 84.72799999999992, 20.17 fc rgb \"#00CC44\"",
+ "set object 593 rect from 84.92199999999994, 20.83 to 84.93849999999993, 20.17 fc rgb \"#00CC44\"",
+ "set object 594 rect from 84.99799999999993, 20.83 to 85.01049999999992, 20.17 fc rgb \"#00CC44\"",
+ "set object 595 rect from 85.03599999999992, 20.83 to 85.04449999999993, 20.17 fc rgb \"#00CC44\"",
+ "set object 596 rect from 85.06199999999993, 20.83 to 85.07249999999993, 20.17 fc rgb \"#00CC44\"",
+ "set object 597 rect from 85.09499999999994, 20.83 to 85.10249999999992, 20.17 fc rgb \"#00CC44\"",
+ "set object 598 rect from 85.38399999999993, 20.83 to 85.43999999999994, 20.17 fc rgb \"#00CC44\"",
+ "set object 599 rect from 85.59949999999992, 20.83 to 85.61599999999993, 20.17 fc rgb \"#00CC44\"",
+ "set object 600 rect from 85.63749999999993, 20.83 to 85.65899999999993, 20.17 fc rgb \"#00CC44\"",
+ "set object 601 rect from 85.69649999999993, 20.83 to 85.70599999999993, 20.17 fc rgb \"#00CC44\"",
+ "set object 602 rect from 85.73249999999993, 20.83 to 85.76899999999992, 20.17 fc rgb \"#00CC44\"",
+ "set object 603 rect from 85.86549999999993, 20.83 to 85.87599999999992, 20.17 fc rgb \"#00CC44\"",
+ "set object 604 rect from 85.91149999999992, 20.83 to 85.92499999999993, 20.17 fc rgb \"#00CC44\"",
+ "set object 605 rect from 102.74599999999992, 20.83 to 102.80749999999992, 20.17 fc rgb \"#00CC44\"",
+ "set object 606 rect from 107.5244999999999, 20.83 to 107.57199999999992, 20.17 fc rgb \"#00CC44\"",
+ "set object 607 rect from 107.62449999999991, 20.83 to 107.6389999999999, 20.17 fc rgb \"#00CC44\"",
+ "set object 608 rect from 107.6674999999999, 20.83 to 107.6759999999999, 20.17 fc rgb \"#00CC44\"",
+ "set object 609 rect from 107.69849999999991, 20.83 to 107.70999999999992, 20.17 fc rgb \"#00CC44\"",
+ "set object 610 rect from 107.7294999999999, 20.83 to 107.7469999999999, 20.17 fc rgb \"#00CC44\"",
+ "set object 611 rect from 107.7834999999999, 20.83 to 107.79299999999992, 20.17 fc rgb \"#00CC44\"",
+ "set object 612 rect from 107.82049999999991, 20.83 to 107.8529999999999, 20.17 fc rgb \"#00CC44\"",
+ "set object 613 rect from 107.9294999999999, 20.83 to 107.94099999999992, 20.17 fc rgb \"#00CC44\"",
+ "set object 614 rect from 107.9654999999999, 20.83 to 107.97599999999991, 20.17 fc rgb \"#00CC44\"",
+ "set object 615 rect from 130.5489999999999, 20.83 to 130.5954999999999, 20.17 fc rgb \"#00CC44\"",
+ "set object 616 rect from 130.6469999999999, 20.83 to 130.6614999999999, 20.17 fc rgb \"#00CC44\"",
+ "set object 617 rect from 130.68999999999988, 20.83 to 130.6994999999999, 20.17 fc rgb \"#00CC44\"",
+ "set object 618 rect from 130.7219999999999, 20.83 to 130.7324999999999, 20.17 fc rgb \"#00CC44\"",
+ "set object 619 rect from 130.7519999999999, 20.83 to 130.76949999999988, 20.17 fc rgb \"#00CC44\"",
+ "set object 620 rect from 130.8059999999999, 20.83 to 130.8154999999999, 20.17 fc rgb \"#00CC44\"",
+ "set object 621 rect from 130.84299999999988, 20.83 to 130.87549999999987, 20.17 fc rgb \"#00CC44\"",
+ "set object 622 rect from 130.95199999999988, 20.83 to 130.9644999999999, 20.17 fc rgb \"#00CC44\"",
+ "set object 623 rect from 130.99099999999987, 20.83 to 131.00249999999988, 20.17 fc rgb \"#00CC44\"",
+ "set object 624 rect from 140.86699999999988, 20.83 to 140.8814999999999, 20.17 fc rgb \"#00CC44\"",
+ "set object 625 rect from 140.9319999999999, 20.83 to 140.9574999999999, 20.17 fc rgb \"#00CC44\"",
+ "set object 626 rect from 141.0299999999999, 20.83 to 141.03849999999989, 20.17 fc rgb \"#00CC44\"",
+ "set object 627 rect from 55.79999999999998, 21.83 to 56.198999999999984, 21.17 fc rgb \"#0044CC\"",
+ "set object 628 rect from 62.16149999999996, 21.83 to 62.548999999999964, 21.17 fc rgb \"#0044CC\"",
+ "set object 629 rect from 65.56449999999995, 21.83 to 65.61699999999995, 21.17 fc rgb \"#0044CC\"",
+ "set object 630 rect from 68.70599999999996, 21.83 to 68.76649999999995, 21.17 fc rgb \"#0044CC\"",
+ "set object 631 rect from 72.22199999999995, 21.83 to 72.28049999999995, 21.17 fc rgb \"#0044CC\"",
+ "set object 632 rect from 75.41849999999994, 21.83 to 75.46799999999995, 21.17 fc rgb \"#0044CC\"",
+ "set object 633 rect from 78.16449999999993, 21.83 to 78.23649999999994, 21.17 fc rgb \"#0044CC\"",
+ "set object 634 rect from 80.90399999999994, 21.83 to 80.95049999999993, 21.17 fc rgb \"#0044CC\"",
+ "set object 635 rect from 83.58349999999993, 21.83 to 83.63999999999993, 21.17 fc rgb \"#0044CC\"",
+ "set object 636 rect from 88.75199999999992, 21.83 to 88.82299999999992, 21.17 fc rgb \"#0044CC\"",
+ "set object 637 rect from 91.90999999999991, 21.83 to 91.96649999999993, 21.17 fc rgb \"#0044CC\"",
+ "set object 638 rect from 94.55599999999993, 21.83 to 94.6054999999999, 21.17 fc rgb \"#0044CC\"",
+ "set object 639 rect from 97.20749999999991, 21.83 to 97.26099999999992, 21.17 fc rgb \"#0044CC\"",
+ "set object 640 rect from 99.86649999999992, 21.83 to 99.92199999999991, 21.17 fc rgb \"#0044CC\"",
+ "set object 641 rect from 102.56049999999992, 21.83 to 102.61199999999991, 21.17 fc rgb \"#0044CC\"",
+ "set object 642 rect from 105.88099999999991, 21.83 to 105.93349999999991, 21.17 fc rgb \"#0044CC\"",
+ "set object 643 rect from 109.2659999999999, 21.83 to 109.38599999999991, 21.17 fc rgb \"#0044CC\"",
+ "set object 644 rect from 109.4024999999999, 21.83 to 109.41799999999989, 21.17 fc rgb \"#0044CC\"",
+ "set object 645 rect from 112.6029999999999, 21.83 to 112.6564999999999, 21.17 fc rgb \"#0044CC\"",
+ "set object 646 rect from 115.36399999999989, 21.83 to 115.4124999999999, 21.17 fc rgb \"#0044CC\"",
+ "set object 647 rect from 118.1434999999999, 21.83 to 118.19199999999991, 21.17 fc rgb \"#0044CC\"",
+ "set object 648 rect from 120.9194999999999, 21.83 to 121.0104999999999, 21.17 fc rgb \"#0044CC\"",
+ "set object 649 rect from 121.0259999999999, 21.83 to 121.0314999999999, 21.17 fc rgb \"#0044CC\"",
+ "set object 650 rect from 123.77499999999989, 21.83 to 123.8254999999999, 21.17 fc rgb \"#0044CC\"",
+ "set object 651 rect from 126.55149999999989, 21.83 to 126.59899999999989, 21.17 fc rgb \"#0044CC\"",
+ "set object 652 rect from 129.3344999999999, 21.83 to 129.4124999999999, 21.17 fc rgb \"#0044CC\"",
+ "set object 653 rect from 129.4249999999999, 21.83 to 129.48849999999987, 21.17 fc rgb \"#0044CC\"",
+ "set object 654 rect from 132.8659999999999, 21.83 to 132.92249999999987, 21.17 fc rgb \"#0044CC\"",
+ "set object 655 rect from 136.14449999999988, 21.83 to 136.19799999999987, 21.17 fc rgb \"#0044CC\"",
+ "set object 656 rect from 138.9289999999999, 21.83 to 138.98049999999986, 21.17 fc rgb \"#0044CC\"",
+ "set object 657 rect from 2.4204999999999997, 22.83 to 3.7920000000000003, 22.17 fc rgb \"#4444CC\"",
+ "set object 658 rect from 3.8075, 22.83 to 3.8129999999999997, 22.17 fc rgb \"#4444CC\"",
+ "set object 659 rect from 6.2695, 22.83 to 7.373, 22.17 fc rgb \"#4444CC\"",
+ "set object 660 rect from 7.3865, 22.83 to 7.3919999999999995, 22.17 fc rgb \"#4444CC\"",
+ "set object 661 rect from 9.2915, 22.83 to 10.405000000000001, 22.17 fc rgb \"#4444CC\"",
+ "set object 662 rect from 10.4235, 22.83 to 10.43, 22.17 fc rgb \"#4444CC\"",
+ "set object 663 rect from 12.8765, 22.83 to 13.897, 22.17 fc rgb \"#4444CC\"",
+ "set object 664 rect from 13.910499999999999, 22.83 to 13.915999999999999, 22.17 fc rgb \"#4444CC\"",
+ "set object 665 rect from 18.803, 10.2 to 19.803, 9.8 fc rgb \"#000000\"",
+ "set object 666 rect from 19.8815, 10.2 to 20.8815, 9.8 fc rgb \"#000000\"",
+ "set object 667 rect from 20.910999999999998, 10.2 to 21.910999999999998, 9.8 fc rgb \"#000000\"",
+ "set object 668 rect from 28.357000000000006, 10.2 to 30.17350000000001, 9.8 fc rgb \"#000000\"",
+ "set object 669 rect from 30.235000000000014, 10.2 to 31.235000000000014, 9.8 fc rgb \"#000000\"",
+ "set object 670 rect from 31.28350000000001, 10.2 to 32.28350000000001, 9.8 fc rgb \"#000000\"",
+ "set object 671 rect from 32.353000000000016, 10.2 to 33.353000000000016, 9.8 fc rgb \"#000000\"",
+ "set object 672 rect from 33.42150000000001, 10.2 to 34.42150000000001, 9.8 fc rgb \"#000000\"",
+ "set object 673 rect from 34.47700000000001, 10.2 to 35.47700000000001, 9.8 fc rgb \"#000000\"",
+ "set object 674 rect from 35.531500000000015, 10.2 to 36.531500000000015, 9.8 fc rgb \"#000000\"",
+ "set object 675 rect from 36.59600000000001, 10.2 to 37.59600000000001, 9.8 fc rgb \"#000000\"",
+ "set object 676 rect from 37.65150000000001, 10.2 to 38.65150000000001, 9.8 fc rgb \"#000000\"",
+ "set object 677 rect from 38.70800000000001, 10.2 to 39.70800000000001, 9.8 fc rgb \"#000000\"",
+ "set object 678 rect from 39.76650000000001, 10.2 to 40.76650000000001, 9.8 fc rgb \"#000000\"",
+ "set object 679 rect from 40.82900000000001, 10.2 to 42.82200000000002, 9.8 fc rgb \"#000000\"",
+ "set object 680 rect from 43.79150000000001, 10.2 to 44.79150000000001, 9.8 fc rgb \"#000000\"",
+ "set object 681 rect from 45.50300000000001, 10.2 to 48.4035, 9.8 fc rgb \"#000000\"",
+ "set object 682 rect from 48.49, 10.2 to 53.228999999999985, 9.8 fc rgb \"#000000\"",
+ "set object 683 rect from 54.33049999999998, 10.2 to 55.33049999999998, 9.8 fc rgb \"#000000\"",
+ "set object 684 rect from 55.37549999999998, 10.2 to 56.37549999999998, 9.8 fc rgb \"#000000\"",
+ "set object 685 rect from 58.19399999999997, 10.2 to 59.19399999999997, 9.8 fc rgb \"#000000\"",
+ "set object 686 rect from 62.20049999999995, 10.2 to 63.20049999999995, 9.8 fc rgb \"#000000\"",
+ "set object 687 rect from 65.31249999999996, 10.2 to 66.31249999999996, 9.8 fc rgb \"#000000\"",
+ "set object 688 rect from 66.37099999999995, 10.2 to 67.37099999999995, 9.8 fc rgb \"#000000\"",
+ "set object 689 rect from 68.37699999999995, 10.2 to 70.37999999999994, 9.8 fc rgb \"#000000\"",
+ "set object 690 rect from 72.48699999999994, 10.2 to 73.48699999999994, 9.8 fc rgb \"#000000\"",
+ "set object 691 rect from 73.55549999999994, 10.2 to 74.55549999999994, 9.8 fc rgb \"#000000\"",
+ "set object 692 rect from 76.64899999999994, 10.2 to 77.64899999999994, 9.8 fc rgb \"#000000\"",
+ "set object 693 rect from 79.81349999999993, 10.2 to 80.81349999999993, 9.8 fc rgb \"#000000\"",
+ "set object 694 rect from 81.90449999999993, 10.2 to 82.90449999999993, 9.8 fc rgb \"#000000\"",
+ "set object 695 rect from 83.96999999999994, 10.2 to 85.90049999999992, 9.8 fc rgb \"#000000\"",
+ "set object 696 rect from 90.04699999999991, 10.2 to 91.04699999999991, 9.8 fc rgb \"#000000\"",
+ "set object 697 rect from 91.11749999999992, 10.2 to 92.11749999999992, 9.8 fc rgb \"#000000\"",
+ "set object 698 rect from 94.24599999999992, 10.2 to 95.24599999999992, 9.8 fc rgb \"#000000\"",
+ "set object 699 rect from 96.36399999999992, 10.2 to 97.36399999999992, 9.8 fc rgb \"#000000\"",
+ "set object 700 rect from 108.83549999999991, 10.2 to 109.83549999999991, 9.8 fc rgb \"#000000\"",
+ "set object 701 rect from 109.87949999999991, 10.2 to 110.87949999999991, 9.8 fc rgb \"#000000\"",
+ "set object 702 rect from 112.9859999999999, 10.2 to 113.9859999999999, 9.8 fc rgb \"#000000\"",
+ "set object 703 rect from 114.0484999999999, 10.2 to 115.0484999999999, 9.8 fc rgb \"#000000\"",
+ "set object 704 rect from 119.3669999999999, 10.2 to 120.3669999999999, 9.8 fc rgb \"#000000\"",
+ "set object 705 rect from 120.4439999999999, 10.2 to 121.4439999999999, 9.8 fc rgb \"#000000\"",
+ "set object 706 rect from 121.46899999999991, 10.2 to 122.46899999999991, 9.8 fc rgb \"#000000\"",
+ "set object 707 rect from 126.7234999999999, 10.2 to 127.7234999999999, 9.8 fc rgb \"#000000\"",
+ "set object 708 rect from 127.77299999999991, 10.2 to 128.7729999999999, 9.8 fc rgb \"#000000\"",
+ "set object 709 rect from 132.9344999999999, 10.2 to 133.9344999999999, 9.8 fc rgb \"#000000\"",
+ "set object 710 rect from 135.0459999999999, 10.2 to 136.0459999999999, 9.8 fc rgb \"#000000\"",
+ "set object 711 rect from 137.1609999999999, 10.2 to 138.1609999999999, 9.8 fc rgb \"#000000\"",
+ "set object 712 rect from 139.24899999999988, 10.2 to 140.24899999999988, 9.8 fc rgb \"#000000\"",
+ "set object 713 rect from 61.17299999999995, 10.2 to 62.17299999999995, 9.8 fc rgb \"#DD0000\"",
+ "set object 714 rect from 63.23999999999996, 10.2 to 64.23999999999995, 9.8 fc rgb \"#DD0000\"",
+ "set object 715 rect from 88.98349999999992, 10.2 to 89.98349999999992, 9.8 fc rgb \"#DD0000\"",
+ "set object 716 rect from 106.85949999999991, 10.2 to 107.85949999999991, 9.8 fc rgb \"#DD0000\"",
+ "set object 717 rect from 18.803, 9.399999999999999 to 19.803, 9.2 fc rgb \"#DD0000\"",
+ "set object 718 rect from 19.8815, 9.399999999999999 to 20.8815, 9.2 fc rgb \"#DD0000\"",
+ "set object 719 rect from 20.910999999999998, 9.399999999999999 to 21.910999999999998, 9.2 fc rgb \"#DD0000\"",
+ "set object 720 rect from 41.82200000000002, 9.399999999999999 to 42.82200000000002, 9.2 fc rgb \"#DD0000\"",
+ "set object 721 rect from 43.79150000000001, 9.399999999999999 to 44.79150000000001, 9.2 fc rgb \"#DD0000\"",
+ "set object 722 rect from 45.50300000000001, 9.399999999999999 to 48.4035, 9.2 fc rgb \"#DD0000\"",
+ "set object 723 rect from 48.49, 9.399999999999999 to 53.228999999999985, 9.2 fc rgb \"#DD0000\"",
+ "set object 724 rect from 54.33049999999998, 9.399999999999999 to 55.33049999999998, 9.2 fc rgb \"#DD0000\"",
+ "set object 725 rect from 57.33799999999997, 9.399999999999999 to 59.19399999999997, 9.2 fc rgb \"#DD0000\"",
+ "set object 726 rect from 62.20049999999995, 9.399999999999999 to 63.20049999999995, 9.2 fc rgb \"#DD0000\"",
+ "set object 727 rect from 64.28099999999995, 9.399999999999999 to 65.28099999999995, 9.2 fc rgb \"#DD0000\"",
+ "set object 728 rect from 67.35049999999995, 9.399999999999999 to 68.35049999999995, 9.2 fc rgb \"#DD0000\"",
+ "set object 729 rect from 71.44949999999994, 9.399999999999999 to 72.44949999999994, 9.2 fc rgb \"#DD0000\"",
+ "set object 730 rect from 75.59449999999994, 9.399999999999999 to 76.59449999999994, 9.2 fc rgb \"#DD0000\"",
+ "set object 731 rect from 77.68599999999995, 9.399999999999999 to 78.68599999999995, 9.2 fc rgb \"#DD0000\"",
+ "set object 732 rect from 78.74099999999993, 9.399999999999999 to 79.74099999999993, 9.2 fc rgb \"#DD0000\"",
+ "set object 733 rect from 82.96499999999995, 9.399999999999999 to 84.96999999999994, 9.2 fc rgb \"#DD0000\"",
+ "set object 734 rect from 88.98349999999992, 9.399999999999999 to 89.98349999999992, 9.2 fc rgb \"#DD0000\"",
+ "set object 735 rect from 90.04699999999991, 9.399999999999999 to 91.04699999999991, 9.2 fc rgb \"#DD0000\"",
+ "set object 736 rect from 91.11749999999992, 9.399999999999999 to 92.11749999999992, 9.2 fc rgb \"#DD0000\"",
+ "set object 737 rect from 94.24599999999992, 9.399999999999999 to 95.24599999999992, 9.2 fc rgb \"#DD0000\"",
+ "set object 738 rect from 98.46299999999991, 9.399999999999999 to 99.46299999999991, 9.2 fc rgb \"#DD0000\"",
+ "set object 739 rect from 106.85949999999991, 9.399999999999999 to 108.7474999999999, 9.2 fc rgb \"#DD0000\"",
+ "set object 740 rect from 109.87949999999991, 9.399999999999999 to 110.87949999999991, 9.2 fc rgb \"#DD0000\"",
+ "set object 741 rect from 115.0789999999999, 9.399999999999999 to 116.0789999999999, 9.2 fc rgb \"#DD0000\"",
+ "set object 742 rect from 119.3669999999999, 9.399999999999999 to 120.3669999999999, 9.2 fc rgb \"#DD0000\"",
+ "set object 743 rect from 123.56399999999988, 9.399999999999999 to 124.56399999999988, 9.2 fc rgb \"#DD0000\"",
+ "set object 744 rect from 127.77299999999991, 9.399999999999999 to 128.7729999999999, 9.2 fc rgb \"#DD0000\"",
+ "set object 745 rect from 128.8479999999999, 9.399999999999999 to 129.8479999999999, 9.2 fc rgb \"#DD0000\"",
+ "set object 746 rect from 131.90949999999987, 9.399999999999999 to 132.90949999999987, 9.2 fc rgb \"#DD0000\"",
+ "set object 747 rect from 132.9344999999999, 9.399999999999999 to 133.9344999999999, 9.2 fc rgb \"#DD0000\"",
+ "set object 748 rect from 138.2054999999999, 9.399999999999999 to 139.2054999999999, 9.2 fc rgb \"#DD0000\"",
+ "set object 749 rect from 18.803, 9.149999999999999 to 19.803, 8.95 fc rgb \"#DD0000\"",
+ "set object 750 rect from 19.8815, 9.149999999999999 to 20.8815, 8.95 fc rgb \"#DD0000\"",
+ "set object 751 rect from 20.910999999999998, 9.149999999999999 to 21.910999999999998, 8.95 fc rgb \"#DD0000\"",
+ "set object 752 rect from 45.50300000000001, 9.149999999999999 to 48.4035, 8.95 fc rgb \"#DD0000\"",
+ "set object 753 rect from 48.49, 9.149999999999999 to 53.228999999999985, 8.95 fc rgb \"#DD0000\"",
+ "set object 754 rect from 54.33049999999998, 9.149999999999999 to 55.33049999999998, 8.95 fc rgb \"#DD0000\"",
+ "set object 755 rect from 57.33799999999997, 9.149999999999999 to 59.19399999999997, 8.95 fc rgb \"#DD0000\"",
+ "set object 756 rect from 61.17299999999995, 9.149999999999999 to 62.17299999999995, 8.95 fc rgb \"#DD0000\"",
+ "set object 757 rect from 62.20049999999995, 9.149999999999999 to 63.20049999999995, 8.95 fc rgb \"#DD0000\"",
+ "set object 758 rect from 63.23999999999996, 9.149999999999999 to 64.23999999999995, 8.95 fc rgb \"#DD0000\"",
+ "set object 759 rect from 64.28099999999995, 9.149999999999999 to 65.28099999999995, 8.95 fc rgb \"#DD0000\"",
+ "set object 760 rect from 65.31249999999996, 9.149999999999999 to 66.31249999999996, 8.95 fc rgb \"#DD0000\"",
+ "set object 761 rect from 66.37099999999995, 9.149999999999999 to 68.35049999999995, 8.95 fc rgb \"#DD0000\"",
+ "set object 762 rect from 68.37699999999995, 9.149999999999999 to 70.37999999999994, 8.95 fc rgb \"#DD0000\"",
+ "set object 763 rect from 70.39199999999994, 9.149999999999999 to 71.39199999999994, 8.95 fc rgb \"#DD0000\"",
+ "set object 764 rect from 71.44949999999994, 9.149999999999999 to 72.44949999999994, 8.95 fc rgb \"#DD0000\"",
+ "set object 765 rect from 72.48699999999994, 9.149999999999999 to 73.48699999999994, 8.95 fc rgb \"#DD0000\"",
+ "set object 766 rect from 73.55549999999994, 9.149999999999999 to 75.56249999999994, 8.95 fc rgb \"#DD0000\"",
+ "set object 767 rect from 75.59449999999994, 9.149999999999999 to 76.59449999999994, 8.95 fc rgb \"#DD0000\"",
+ "set object 768 rect from 76.64899999999994, 9.149999999999999 to 77.64899999999994, 8.95 fc rgb \"#DD0000\"",
+ "set object 769 rect from 77.68599999999995, 9.149999999999999 to 78.68599999999995, 8.95 fc rgb \"#DD0000\"",
+ "set object 770 rect from 78.74099999999993, 9.149999999999999 to 79.74099999999993, 8.95 fc rgb \"#DD0000\"",
+ "set object 771 rect from 79.81349999999993, 9.149999999999999 to 80.81349999999993, 8.95 fc rgb \"#DD0000\"",
+ "set object 772 rect from 80.83699999999993, 9.149999999999999 to 81.83699999999993, 8.95 fc rgb \"#DD0000\"",
+ "set object 773 rect from 81.90449999999993, 9.149999999999999 to 82.90449999999993, 8.95 fc rgb \"#DD0000\"",
+ "set object 774 rect from 82.96499999999995, 9.149999999999999 to 84.96999999999994, 8.95 fc rgb \"#DD0000\"",
+ "set object 775 rect from 85.90099999999993, 9.149999999999999 to 86.90099999999993, 8.95 fc rgb \"#DD0000\"",
+ "set object 776 rect from 87.97249999999993, 9.149999999999999 to 88.97249999999993, 8.95 fc rgb \"#DD0000\"",
+ "set object 777 rect from 88.98349999999992, 9.149999999999999 to 89.98349999999992, 8.95 fc rgb \"#DD0000\"",
+ "set object 778 rect from 90.04699999999991, 9.149999999999999 to 91.04699999999991, 8.95 fc rgb \"#DD0000\"",
+ "set object 779 rect from 91.11749999999992, 9.149999999999999 to 92.11749999999992, 8.95 fc rgb \"#DD0000\"",
+ "set object 780 rect from 92.14499999999992, 9.149999999999999 to 93.14499999999992, 8.95 fc rgb \"#DD0000\"",
+ "set object 781 rect from 93.21149999999992, 9.149999999999999 to 94.21149999999992, 8.95 fc rgb \"#DD0000\"",
+ "set object 782 rect from 96.36399999999992, 9.149999999999999 to 97.36399999999992, 8.95 fc rgb \"#DD0000\"",
+ "set object 783 rect from 98.46299999999991, 9.149999999999999 to 99.46299999999991, 8.95 fc rgb \"#DD0000\"",
+ "set object 784 rect from 101.62199999999993, 9.149999999999999 to 102.62199999999993, 8.95 fc rgb \"#DD0000\"",
+ "set object 785 rect from 102.63099999999991, 9.149999999999999 to 103.63099999999991, 8.95 fc rgb \"#DD0000\"",
+ "set object 786 rect from 104.73949999999991, 9.149999999999999 to 105.73949999999991, 8.95 fc rgb \"#DD0000\"",
+ "set object 787 rect from 106.85949999999991, 9.149999999999999 to 108.7474999999999, 8.95 fc rgb \"#DD0000\"",
+ "set object 788 rect from 109.87949999999991, 9.149999999999999 to 110.87949999999991, 8.95 fc rgb \"#DD0000\"",
+ "set object 789 rect from 110.93299999999991, 9.149999999999999 to 111.93299999999991, 8.95 fc rgb \"#DD0000\"",
+ "set object 790 rect from 112.00149999999991, 9.149999999999999 to 113.9859999999999, 8.95 fc rgb \"#DD0000\"",
+ "set object 791 rect from 115.0789999999999, 9.149999999999999 to 116.0789999999999, 8.95 fc rgb \"#DD0000\"",
+ "set object 792 rect from 117.26799999999992, 9.149999999999999 to 118.26799999999992, 8.95 fc rgb \"#DD0000\"",
+ "set object 793 rect from 120.4439999999999, 9.149999999999999 to 121.4439999999999, 8.95 fc rgb \"#DD0000\"",
+ "set object 794 rect from 121.46899999999991, 9.149999999999999 to 122.46899999999991, 8.95 fc rgb \"#DD0000\"",
+ "set object 795 rect from 122.52449999999989, 9.149999999999999 to 123.52449999999989, 8.95 fc rgb \"#DD0000\"",
+ "set object 796 rect from 123.56399999999988, 9.149999999999999 to 124.56399999999988, 8.95 fc rgb \"#DD0000\"",
+ "set object 797 rect from 126.7234999999999, 9.149999999999999 to 127.7234999999999, 8.95 fc rgb \"#DD0000\"",
+ "set object 798 rect from 127.77299999999991, 9.149999999999999 to 128.7729999999999, 8.95 fc rgb \"#DD0000\"",
+ "set object 799 rect from 128.8479999999999, 9.149999999999999 to 129.8479999999999, 8.95 fc rgb \"#DD0000\"",
+ "set object 800 rect from 131.90949999999987, 9.149999999999999 to 132.90949999999987, 8.95 fc rgb \"#DD0000\"",
+ "set object 801 rect from 132.9344999999999, 9.149999999999999 to 133.9344999999999, 8.95 fc rgb \"#DD0000\"",
+ "set object 802 rect from 133.9804999999999, 9.149999999999999 to 134.9804999999999, 8.95 fc rgb \"#DD0000\"",
+ "set object 803 rect from 137.1609999999999, 9.149999999999999 to 138.1609999999999, 8.95 fc rgb \"#DD0000\"",
+ "set object 804 rect from 138.2054999999999, 9.149999999999999 to 139.2054999999999, 8.95 fc rgb \"#DD0000\"",
+ "set object 805 rect from 140.3004999999999, 9.149999999999999 to 141.3004999999999, 8.95 fc rgb \"#DD0000\"",
+ "set object 806 rect from 18.803, 8.899999999999999 to 19.803, 8.7 fc rgb \"#DD0000\"",
+ "set object 807 rect from 19.8815, 8.899999999999999 to 20.8815, 8.7 fc rgb \"#DD0000\"",
+ "set object 808 rect from 20.910999999999998, 8.899999999999999 to 21.910999999999998, 8.7 fc rgb \"#DD0000\"",
+ "set object 809 rect from 45.50300000000001, 8.899999999999999 to 48.4035, 8.7 fc rgb \"#DD0000\"",
+ "set object 810 rect from 48.49, 8.899999999999999 to 53.228999999999985, 8.7 fc rgb \"#DD0000\"",
+ "set object 811 rect from 54.33049999999998, 8.899999999999999 to 55.33049999999998, 8.7 fc rgb \"#DD0000\"",
+ "set object 812 rect from 57.33799999999997, 8.899999999999999 to 59.19399999999997, 8.7 fc rgb \"#DD0000\"",
+ "set object 813 rect from 61.17299999999995, 8.899999999999999 to 62.17299999999995, 8.7 fc rgb \"#DD0000\"",
+ "set object 814 rect from 62.20049999999995, 8.899999999999999 to 63.20049999999995, 8.7 fc rgb \"#DD0000\"",
+ "set object 815 rect from 63.23999999999996, 8.899999999999999 to 64.23999999999995, 8.7 fc rgb \"#DD0000\"",
+ "set object 816 rect from 64.28099999999995, 8.899999999999999 to 65.28099999999995, 8.7 fc rgb \"#DD0000\"",
+ "set object 817 rect from 65.31249999999996, 8.899999999999999 to 66.31249999999996, 8.7 fc rgb \"#DD0000\"",
+ "set object 818 rect from 66.37099999999995, 8.899999999999999 to 68.35049999999995, 8.7 fc rgb \"#DD0000\"",
+ "set object 819 rect from 68.37699999999995, 8.899999999999999 to 70.37999999999994, 8.7 fc rgb \"#DD0000\"",
+ "set object 820 rect from 70.39199999999994, 8.899999999999999 to 71.39199999999994, 8.7 fc rgb \"#DD0000\"",
+ "set object 821 rect from 71.44949999999994, 8.899999999999999 to 72.44949999999994, 8.7 fc rgb \"#DD0000\"",
+ "set object 822 rect from 72.48699999999994, 8.899999999999999 to 73.48699999999994, 8.7 fc rgb \"#DD0000\"",
+ "set object 823 rect from 73.55549999999994, 8.899999999999999 to 75.56249999999994, 8.7 fc rgb \"#DD0000\"",
+ "set object 824 rect from 75.59449999999994, 8.899999999999999 to 76.59449999999994, 8.7 fc rgb \"#DD0000\"",
+ "set object 825 rect from 76.64899999999994, 8.899999999999999 to 77.64899999999994, 8.7 fc rgb \"#DD0000\"",
+ "set object 826 rect from 77.68599999999995, 8.899999999999999 to 78.68599999999995, 8.7 fc rgb \"#DD0000\"",
+ "set object 827 rect from 78.74099999999993, 8.899999999999999 to 79.74099999999993, 8.7 fc rgb \"#DD0000\"",
+ "set object 828 rect from 79.81349999999993, 8.899999999999999 to 80.81349999999993, 8.7 fc rgb \"#DD0000\"",
+ "set object 829 rect from 80.83699999999993, 8.899999999999999 to 81.83699999999993, 8.7 fc rgb \"#DD0000\"",
+ "set object 830 rect from 81.90449999999993, 8.899999999999999 to 82.90449999999993, 8.7 fc rgb \"#DD0000\"",
+ "set object 831 rect from 82.96499999999995, 8.899999999999999 to 86.90099999999993, 8.7 fc rgb \"#DD0000\"",
+ "set object 832 rect from 87.97249999999993, 8.899999999999999 to 88.97249999999993, 8.7 fc rgb \"#DD0000\"",
+ "set object 833 rect from 88.98349999999992, 8.899999999999999 to 89.98349999999992, 8.7 fc rgb \"#DD0000\"",
+ "set object 834 rect from 90.04699999999991, 8.899999999999999 to 91.04699999999991, 8.7 fc rgb \"#DD0000\"",
+ "set object 835 rect from 91.11749999999992, 8.899999999999999 to 92.11749999999992, 8.7 fc rgb \"#DD0000\"",
+ "set object 836 rect from 92.14499999999992, 8.899999999999999 to 93.14499999999992, 8.7 fc rgb \"#DD0000\"",
+ "set object 837 rect from 93.21149999999992, 8.899999999999999 to 94.21149999999992, 8.7 fc rgb \"#DD0000\"",
+ "set object 838 rect from 94.24599999999992, 8.899999999999999 to 95.24599999999992, 8.7 fc rgb \"#DD0000\"",
+ "set object 839 rect from 95.31249999999991, 8.899999999999999 to 96.31249999999991, 8.7 fc rgb \"#DD0000\"",
+ "set object 840 rect from 96.36399999999992, 8.899999999999999 to 97.36399999999992, 8.7 fc rgb \"#DD0000\"",
+ "set object 841 rect from 97.39349999999992, 8.899999999999999 to 98.39349999999992, 8.7 fc rgb \"#DD0000\"",
+ "set object 842 rect from 98.46299999999991, 8.899999999999999 to 99.46299999999991, 8.7 fc rgb \"#DD0000\"",
+ "set object 843 rect from 99.48249999999992, 8.899999999999999 to 100.48249999999992, 8.7 fc rgb \"#DD0000\"",
+ "set object 844 rect from 100.56199999999993, 8.899999999999999 to 101.56199999999993, 8.7 fc rgb \"#DD0000\"",
+ "set object 845 rect from 101.62199999999993, 8.899999999999999 to 102.62199999999993, 8.7 fc rgb \"#DD0000\"",
+ "set object 846 rect from 102.63099999999991, 8.899999999999999 to 103.63099999999991, 8.7 fc rgb \"#DD0000\"",
+ "set object 847 rect from 103.67849999999991, 8.899999999999999 to 104.67849999999991, 8.7 fc rgb \"#DD0000\"",
+ "set object 848 rect from 104.73949999999991, 8.899999999999999 to 105.73949999999991, 8.7 fc rgb \"#DD0000\"",
+ "set object 849 rect from 105.77499999999992, 8.899999999999999 to 106.77499999999992, 8.7 fc rgb \"#DD0000\"",
+ "set object 850 rect from 106.85949999999991, 8.899999999999999 to 108.7474999999999, 8.7 fc rgb \"#DD0000\"",
+ "set object 851 rect from 109.87949999999991, 8.899999999999999 to 110.87949999999991, 8.7 fc rgb \"#DD0000\"",
+ "set object 852 rect from 110.93299999999991, 8.899999999999999 to 111.93299999999991, 8.7 fc rgb \"#DD0000\"",
+ "set object 853 rect from 112.00149999999991, 8.899999999999999 to 113.9859999999999, 8.7 fc rgb \"#DD0000\"",
+ "set object 854 rect from 114.0484999999999, 8.899999999999999 to 115.0484999999999, 8.7 fc rgb \"#DD0000\"",
+ "set object 855 rect from 115.0789999999999, 8.899999999999999 to 116.0789999999999, 8.7 fc rgb \"#DD0000\"",
+ "set object 856 rect from 116.14449999999991, 8.899999999999999 to 117.14449999999991, 8.7 fc rgb \"#DD0000\"",
+ "set object 857 rect from 117.26799999999992, 8.899999999999999 to 118.26799999999992, 8.7 fc rgb \"#DD0000\"",
+ "set object 858 rect from 118.3064999999999, 8.899999999999999 to 119.3064999999999, 8.7 fc rgb \"#DD0000\"",
+ "set object 859 rect from 119.3669999999999, 8.899999999999999 to 120.3669999999999, 8.7 fc rgb \"#DD0000\"",
+ "set object 860 rect from 120.4439999999999, 8.899999999999999 to 121.4439999999999, 8.7 fc rgb \"#DD0000\"",
+ "set object 861 rect from 121.46899999999991, 8.899999999999999 to 122.46899999999991, 8.7 fc rgb \"#DD0000\"",
+ "set object 862 rect from 122.52449999999989, 8.899999999999999 to 123.52449999999989, 8.7 fc rgb \"#DD0000\"",
+ "set object 863 rect from 123.56399999999988, 8.899999999999999 to 124.56399999999988, 8.7 fc rgb \"#DD0000\"",
+ "set object 864 rect from 124.6324999999999, 8.899999999999999 to 125.6324999999999, 8.7 fc rgb \"#DD0000\"",
+ "set object 865 rect from 125.6929999999999, 8.899999999999999 to 126.6929999999999, 8.7 fc rgb \"#DD0000\"",
+ "set object 866 rect from 126.7234999999999, 8.899999999999999 to 127.7234999999999, 8.7 fc rgb \"#DD0000\"",
+ "set object 867 rect from 127.77299999999991, 8.899999999999999 to 128.7729999999999, 8.7 fc rgb \"#DD0000\"",
+ "set object 868 rect from 128.8479999999999, 8.899999999999999 to 129.8479999999999, 8.7 fc rgb \"#DD0000\"",
+ "set object 869 rect from 129.8879999999999, 8.899999999999999 to 131.8519999999999, 8.7 fc rgb \"#DD0000\"",
+ "set object 870 rect from 131.90949999999987, 8.899999999999999 to 132.90949999999987, 8.7 fc rgb \"#DD0000\"",
+ "set object 871 rect from 132.9344999999999, 8.899999999999999 to 133.9344999999999, 8.7 fc rgb \"#DD0000\"",
+ "set object 872 rect from 133.9804999999999, 8.899999999999999 to 134.9804999999999, 8.7 fc rgb \"#DD0000\"",
+ "set object 873 rect from 135.0459999999999, 8.899999999999999 to 136.0459999999999, 8.7 fc rgb \"#DD0000\"",
+ "set object 874 rect from 136.08249999999987, 8.899999999999999 to 137.08249999999987, 8.7 fc rgb \"#DD0000\"",
+ "set object 875 rect from 137.1609999999999, 8.899999999999999 to 138.1609999999999, 8.7 fc rgb \"#DD0000\"",
+ "set object 876 rect from 138.2054999999999, 8.899999999999999 to 139.2054999999999, 8.7 fc rgb \"#DD0000\"",
+ "set object 877 rect from 139.24899999999988, 8.899999999999999 to 140.24899999999988, 8.7 fc rgb \"#DD0000\"",
+ "set object 878 rect from 140.3004999999999, 8.899999999999999 to 141.3004999999999, 8.7 fc rgb \"#DD0000\"",
+ "set object 879 rect from 18.803, 8.649999999999999 to 19.803, 8.45 fc rgb \"#DD0000\"",
+ "set object 880 rect from 19.8815, 8.649999999999999 to 20.8815, 8.45 fc rgb \"#DD0000\"",
+ "set object 881 rect from 20.910999999999998, 8.649999999999999 to 21.910999999999998, 8.45 fc rgb \"#DD0000\"",
+ "set object 882 rect from 45.50300000000001, 8.649999999999999 to 48.4035, 8.45 fc rgb \"#DD0000\"",
+ "set object 883 rect from 48.49, 8.649999999999999 to 53.228999999999985, 8.45 fc rgb \"#DD0000\"",
+ "set object 884 rect from 54.33049999999998, 8.649999999999999 to 55.33049999999998, 8.45 fc rgb \"#DD0000\"",
+ "set object 885 rect from 57.33799999999997, 8.649999999999999 to 59.19399999999997, 8.45 fc rgb \"#DD0000\"",
+ "set object 886 rect from 61.17299999999995, 8.649999999999999 to 62.17299999999995, 8.45 fc rgb \"#DD0000\"",
+ "set object 887 rect from 62.20049999999995, 8.649999999999999 to 63.20049999999995, 8.45 fc rgb \"#DD0000\"",
+ "set object 888 rect from 63.23999999999996, 8.649999999999999 to 64.23999999999995, 8.45 fc rgb \"#DD0000\"",
+ "set object 889 rect from 64.28099999999995, 8.649999999999999 to 65.28099999999995, 8.45 fc rgb \"#DD0000\"",
+ "set object 890 rect from 65.31249999999996, 8.649999999999999 to 66.31249999999996, 8.45 fc rgb \"#DD0000\"",
+ "set object 891 rect from 66.37099999999995, 8.649999999999999 to 68.35049999999995, 8.45 fc rgb \"#DD0000\"",
+ "set object 892 rect from 68.37699999999995, 8.649999999999999 to 70.37999999999994, 8.45 fc rgb \"#DD0000\"",
+ "set object 893 rect from 70.39199999999994, 8.649999999999999 to 71.39199999999994, 8.45 fc rgb \"#DD0000\"",
+ "set object 894 rect from 71.44949999999994, 8.649999999999999 to 72.44949999999994, 8.45 fc rgb \"#DD0000\"",
+ "set object 895 rect from 72.48699999999994, 8.649999999999999 to 73.48699999999994, 8.45 fc rgb \"#DD0000\"",
+ "set object 896 rect from 73.55549999999994, 8.649999999999999 to 75.56249999999994, 8.45 fc rgb \"#DD0000\"",
+ "set object 897 rect from 75.59449999999994, 8.649999999999999 to 76.59449999999994, 8.45 fc rgb \"#DD0000\"",
+ "set object 898 rect from 76.64899999999994, 8.649999999999999 to 77.64899999999994, 8.45 fc rgb \"#DD0000\"",
+ "set object 899 rect from 77.68599999999995, 8.649999999999999 to 78.68599999999995, 8.45 fc rgb \"#DD0000\"",
+ "set object 900 rect from 78.74099999999993, 8.649999999999999 to 79.74099999999993, 8.45 fc rgb \"#DD0000\"",
+ "set object 901 rect from 79.81349999999993, 8.649999999999999 to 80.81349999999993, 8.45 fc rgb \"#DD0000\"",
+ "set object 902 rect from 80.83699999999993, 8.649999999999999 to 81.83699999999993, 8.45 fc rgb \"#DD0000\"",
+ "set object 903 rect from 81.90449999999993, 8.649999999999999 to 82.90449999999993, 8.45 fc rgb \"#DD0000\"",
+ "set object 904 rect from 82.96499999999995, 8.649999999999999 to 86.90099999999993, 8.45 fc rgb \"#DD0000\"",
+ "set object 905 rect from 87.97249999999993, 8.649999999999999 to 88.97249999999993, 8.45 fc rgb \"#DD0000\"",
+ "set object 906 rect from 88.98349999999992, 8.649999999999999 to 89.98349999999992, 8.45 fc rgb \"#DD0000\"",
+ "set object 907 rect from 90.04699999999991, 8.649999999999999 to 91.04699999999991, 8.45 fc rgb \"#DD0000\"",
+ "set object 908 rect from 91.11749999999992, 8.649999999999999 to 92.11749999999992, 8.45 fc rgb \"#DD0000\"",
+ "set object 909 rect from 92.14499999999992, 8.649999999999999 to 93.14499999999992, 8.45 fc rgb \"#DD0000\"",
+ "set object 910 rect from 93.21149999999992, 8.649999999999999 to 94.21149999999992, 8.45 fc rgb \"#DD0000\"",
+ "set object 911 rect from 94.24599999999992, 8.649999999999999 to 95.24599999999992, 8.45 fc rgb \"#DD0000\"",
+ "set object 912 rect from 95.31249999999991, 8.649999999999999 to 96.31249999999991, 8.45 fc rgb \"#DD0000\"",
+ "set object 913 rect from 96.36399999999992, 8.649999999999999 to 97.36399999999992, 8.45 fc rgb \"#DD0000\"",
+ "set object 914 rect from 97.39349999999992, 8.649999999999999 to 98.39349999999992, 8.45 fc rgb \"#DD0000\"",
+ "set object 915 rect from 98.46299999999991, 8.649999999999999 to 99.46299999999991, 8.45 fc rgb \"#DD0000\"",
+ "set object 916 rect from 99.48249999999992, 8.649999999999999 to 100.48249999999992, 8.45 fc rgb \"#DD0000\"",
+ "set object 917 rect from 100.56199999999993, 8.649999999999999 to 101.56199999999993, 8.45 fc rgb \"#DD0000\"",
+ "set object 918 rect from 101.62199999999993, 8.649999999999999 to 102.62199999999993, 8.45 fc rgb \"#DD0000\"",
+ "set object 919 rect from 102.63099999999991, 8.649999999999999 to 103.63099999999991, 8.45 fc rgb \"#DD0000\"",
+ "set object 920 rect from 103.67849999999991, 8.649999999999999 to 104.67849999999991, 8.45 fc rgb \"#DD0000\"",
+ "set object 921 rect from 104.73949999999991, 8.649999999999999 to 105.73949999999991, 8.45 fc rgb \"#DD0000\"",
+ "set object 922 rect from 105.77499999999992, 8.649999999999999 to 106.77499999999992, 8.45 fc rgb \"#DD0000\"",
+ "set object 923 rect from 106.85949999999991, 8.649999999999999 to 108.7474999999999, 8.45 fc rgb \"#DD0000\"",
+ "set object 924 rect from 109.87949999999991, 8.649999999999999 to 110.87949999999991, 8.45 fc rgb \"#DD0000\"",
+ "set object 925 rect from 110.93299999999991, 8.649999999999999 to 111.93299999999991, 8.45 fc rgb \"#DD0000\"",
+ "set object 926 rect from 112.00149999999991, 8.649999999999999 to 113.9859999999999, 8.45 fc rgb \"#DD0000\"",
+ "set object 927 rect from 114.0484999999999, 8.649999999999999 to 115.0484999999999, 8.45 fc rgb \"#DD0000\"",
+ "set object 928 rect from 115.0789999999999, 8.649999999999999 to 116.0789999999999, 8.45 fc rgb \"#DD0000\"",
+ "set object 929 rect from 116.14449999999991, 8.649999999999999 to 117.14449999999991, 8.45 fc rgb \"#DD0000\"",
+ "set object 930 rect from 117.26799999999992, 8.649999999999999 to 118.26799999999992, 8.45 fc rgb \"#DD0000\"",
+ "set object 931 rect from 118.3064999999999, 8.649999999999999 to 119.3064999999999, 8.45 fc rgb \"#DD0000\"",
+ "set object 932 rect from 119.3669999999999, 8.649999999999999 to 120.3669999999999, 8.45 fc rgb \"#DD0000\"",
+ "set object 933 rect from 120.4439999999999, 8.649999999999999 to 121.4439999999999, 8.45 fc rgb \"#DD0000\"",
+ "set object 934 rect from 121.46899999999991, 8.649999999999999 to 122.46899999999991, 8.45 fc rgb \"#DD0000\"",
+ "set object 935 rect from 122.52449999999989, 8.649999999999999 to 123.52449999999989, 8.45 fc rgb \"#DD0000\"",
+ "set object 936 rect from 123.56399999999988, 8.649999999999999 to 124.56399999999988, 8.45 fc rgb \"#DD0000\"",
+ "set object 937 rect from 124.6324999999999, 8.649999999999999 to 125.6324999999999, 8.45 fc rgb \"#DD0000\"",
+ "set object 938 rect from 125.6929999999999, 8.649999999999999 to 126.6929999999999, 8.45 fc rgb \"#DD0000\"",
+ "set object 939 rect from 126.7234999999999, 8.649999999999999 to 127.7234999999999, 8.45 fc rgb \"#DD0000\"",
+ "set object 940 rect from 127.77299999999991, 8.649999999999999 to 128.7729999999999, 8.45 fc rgb \"#DD0000\"",
+ "set object 941 rect from 128.8479999999999, 8.649999999999999 to 129.8479999999999, 8.45 fc rgb \"#DD0000\"",
+ "set object 942 rect from 129.8879999999999, 8.649999999999999 to 131.8519999999999, 8.45 fc rgb \"#DD0000\"",
+ "set object 943 rect from 131.90949999999987, 8.649999999999999 to 132.90949999999987, 8.45 fc rgb \"#DD0000\"",
+ "set object 944 rect from 132.9344999999999, 8.649999999999999 to 133.9344999999999, 8.45 fc rgb \"#DD0000\"",
+ "set object 945 rect from 133.9804999999999, 8.649999999999999 to 134.9804999999999, 8.45 fc rgb \"#DD0000\"",
+ "set object 946 rect from 135.0459999999999, 8.649999999999999 to 136.0459999999999, 8.45 fc rgb \"#DD0000\"",
+ "set object 947 rect from 136.08249999999987, 8.649999999999999 to 137.08249999999987, 8.45 fc rgb \"#DD0000\"",
+ "set object 948 rect from 137.1609999999999, 8.649999999999999 to 138.1609999999999, 8.45 fc rgb \"#DD0000\"",
+ "set object 949 rect from 138.2054999999999, 8.649999999999999 to 139.2054999999999, 8.45 fc rgb \"#DD0000\"",
+ "set object 950 rect from 139.24899999999988, 8.649999999999999 to 140.24899999999988, 8.45 fc rgb \"#DD0000\"",
+ "set object 951 rect from 140.3004999999999, 8.649999999999999 to 141.3004999999999, 8.45 fc rgb \"#DD0000\"",
+ "set object 952 rect from 18.803, 8.399999999999999 to 19.803, 8.2 fc rgb \"#DD0000\"",
+ "set object 953 rect from 19.8815, 8.399999999999999 to 20.8815, 8.2 fc rgb \"#DD0000\"",
+ "set object 954 rect from 20.910999999999998, 8.399999999999999 to 21.910999999999998, 8.2 fc rgb \"#DD0000\"",
+ "set object 955 rect from 45.50300000000001, 8.399999999999999 to 48.4035, 8.2 fc rgb \"#DD0000\"",
+ "set object 956 rect from 48.49, 8.399999999999999 to 53.228999999999985, 8.2 fc rgb \"#DD0000\"",
+ "set object 957 rect from 54.33049999999998, 8.399999999999999 to 55.33049999999998, 8.2 fc rgb \"#DD0000\"",
+ "set object 958 rect from 57.33799999999997, 8.399999999999999 to 59.19399999999997, 8.2 fc rgb \"#DD0000\"",
+ "set object 959 rect from 61.17299999999995, 8.399999999999999 to 62.17299999999995, 8.2 fc rgb \"#DD0000\"",
+ "set object 960 rect from 62.20049999999995, 8.399999999999999 to 63.20049999999995, 8.2 fc rgb \"#DD0000\"",
+ "set object 961 rect from 63.23999999999996, 8.399999999999999 to 64.23999999999995, 8.2 fc rgb \"#DD0000\"",
+ "set object 962 rect from 64.28099999999995, 8.399999999999999 to 65.28099999999995, 8.2 fc rgb \"#DD0000\"",
+ "set object 963 rect from 65.31249999999996, 8.399999999999999 to 66.31249999999996, 8.2 fc rgb \"#DD0000\"",
+ "set object 964 rect from 66.37099999999995, 8.399999999999999 to 68.35049999999995, 8.2 fc rgb \"#DD0000\"",
+ "set object 965 rect from 68.37699999999995, 8.399999999999999 to 70.37999999999994, 8.2 fc rgb \"#DD0000\"",
+ "set object 966 rect from 70.39199999999994, 8.399999999999999 to 71.39199999999994, 8.2 fc rgb \"#DD0000\"",
+ "set object 967 rect from 71.44949999999994, 8.399999999999999 to 72.44949999999994, 8.2 fc rgb \"#DD0000\"",
+ "set object 968 rect from 72.48699999999994, 8.399999999999999 to 73.48699999999994, 8.2 fc rgb \"#DD0000\"",
+ "set object 969 rect from 73.55549999999994, 8.399999999999999 to 75.56249999999994, 8.2 fc rgb \"#DD0000\"",
+ "set object 970 rect from 75.59449999999994, 8.399999999999999 to 76.59449999999994, 8.2 fc rgb \"#DD0000\"",
+ "set object 971 rect from 76.64899999999994, 8.399999999999999 to 77.64899999999994, 8.2 fc rgb \"#DD0000\"",
+ "set object 972 rect from 77.68599999999995, 8.399999999999999 to 78.68599999999995, 8.2 fc rgb \"#DD0000\"",
+ "set object 973 rect from 78.74099999999993, 8.399999999999999 to 79.74099999999993, 8.2 fc rgb \"#DD0000\"",
+ "set object 974 rect from 79.81349999999993, 8.399999999999999 to 80.81349999999993, 8.2 fc rgb \"#DD0000\"",
+ "set object 975 rect from 80.83699999999993, 8.399999999999999 to 81.83699999999993, 8.2 fc rgb \"#DD0000\"",
+ "set object 976 rect from 81.90449999999993, 8.399999999999999 to 82.90449999999993, 8.2 fc rgb \"#DD0000\"",
+ "set object 977 rect from 82.96499999999995, 8.399999999999999 to 86.90099999999993, 8.2 fc rgb \"#DD0000\"",
+ "set object 978 rect from 87.97249999999993, 8.399999999999999 to 88.97249999999993, 8.2 fc rgb \"#DD0000\"",
+ "set object 979 rect from 88.98349999999992, 8.399999999999999 to 89.98349999999992, 8.2 fc rgb \"#DD0000\"",
+ "set object 980 rect from 90.04699999999991, 8.399999999999999 to 91.04699999999991, 8.2 fc rgb \"#DD0000\"",
+ "set object 981 rect from 91.11749999999992, 8.399999999999999 to 92.11749999999992, 8.2 fc rgb \"#DD0000\"",
+ "set object 982 rect from 92.14499999999992, 8.399999999999999 to 93.14499999999992, 8.2 fc rgb \"#DD0000\"",
+ "set object 983 rect from 93.21149999999992, 8.399999999999999 to 94.21149999999992, 8.2 fc rgb \"#DD0000\"",
+ "set object 984 rect from 94.24599999999992, 8.399999999999999 to 95.24599999999992, 8.2 fc rgb \"#DD0000\"",
+ "set object 985 rect from 95.31249999999991, 8.399999999999999 to 96.31249999999991, 8.2 fc rgb \"#DD0000\"",
+ "set object 986 rect from 96.36399999999992, 8.399999999999999 to 97.36399999999992, 8.2 fc rgb \"#DD0000\"",
+ "set object 987 rect from 97.39349999999992, 8.399999999999999 to 98.39349999999992, 8.2 fc rgb \"#DD0000\"",
+ "set object 988 rect from 98.46299999999991, 8.399999999999999 to 99.46299999999991, 8.2 fc rgb \"#DD0000\"",
+ "set object 989 rect from 99.48249999999992, 8.399999999999999 to 100.48249999999992, 8.2 fc rgb \"#DD0000\"",
+ "set object 990 rect from 100.56199999999993, 8.399999999999999 to 101.56199999999993, 8.2 fc rgb \"#DD0000\"",
+ "set object 991 rect from 101.62199999999993, 8.399999999999999 to 102.62199999999993, 8.2 fc rgb \"#DD0000\"",
+ "set object 992 rect from 102.63099999999991, 8.399999999999999 to 103.63099999999991, 8.2 fc rgb \"#DD0000\"",
+ "set object 993 rect from 103.67849999999991, 8.399999999999999 to 104.67849999999991, 8.2 fc rgb \"#DD0000\"",
+ "set object 994 rect from 104.73949999999991, 8.399999999999999 to 105.73949999999991, 8.2 fc rgb \"#DD0000\"",
+ "set object 995 rect from 105.77499999999992, 8.399999999999999 to 106.77499999999992, 8.2 fc rgb \"#DD0000\"",
+ "set object 996 rect from 106.85949999999991, 8.399999999999999 to 108.7474999999999, 8.2 fc rgb \"#DD0000\"",
+ "set object 997 rect from 109.87949999999991, 8.399999999999999 to 110.87949999999991, 8.2 fc rgb \"#DD0000\"",
+ "set object 998 rect from 110.93299999999991, 8.399999999999999 to 111.93299999999991, 8.2 fc rgb \"#DD0000\"",
+ "set object 999 rect from 112.00149999999991, 8.399999999999999 to 113.9859999999999, 8.2 fc rgb \"#DD0000\"",
+ "set object 1000 rect from 114.0484999999999, 8.399999999999999 to 115.0484999999999, 8.2 fc rgb \"#DD0000\"",
+ "set object 1001 rect from 115.0789999999999, 8.399999999999999 to 116.0789999999999, 8.2 fc rgb \"#DD0000\"",
+ "set object 1002 rect from 116.14449999999991, 8.399999999999999 to 117.14449999999991, 8.2 fc rgb \"#DD0000\"",
+ "set object 1003 rect from 117.26799999999992, 8.399999999999999 to 118.26799999999992, 8.2 fc rgb \"#DD0000\"",
+ "set object 1004 rect from 118.3064999999999, 8.399999999999999 to 119.3064999999999, 8.2 fc rgb \"#DD0000\"",
+ "set object 1005 rect from 119.3669999999999, 8.399999999999999 to 120.3669999999999, 8.2 fc rgb \"#DD0000\"",
+ "set object 1006 rect from 120.4439999999999, 8.399999999999999 to 121.4439999999999, 8.2 fc rgb \"#DD0000\"",
+ "set object 1007 rect from 121.46899999999991, 8.399999999999999 to 122.46899999999991, 8.2 fc rgb \"#DD0000\"",
+ "set object 1008 rect from 122.52449999999989, 8.399999999999999 to 123.52449999999989, 8.2 fc rgb \"#DD0000\"",
+ "set object 1009 rect from 123.56399999999988, 8.399999999999999 to 124.56399999999988, 8.2 fc rgb \"#DD0000\"",
+ "set object 1010 rect from 124.6324999999999, 8.399999999999999 to 125.6324999999999, 8.2 fc rgb \"#DD0000\"",
+ "set object 1011 rect from 125.6929999999999, 8.399999999999999 to 126.6929999999999, 8.2 fc rgb \"#DD0000\"",
+ "set object 1012 rect from 126.7234999999999, 8.399999999999999 to 127.7234999999999, 8.2 fc rgb \"#DD0000\"",
+ "set object 1013 rect from 127.77299999999991, 8.399999999999999 to 128.7729999999999, 8.2 fc rgb \"#DD0000\"",
+ "set object 1014 rect from 128.8479999999999, 8.399999999999999 to 129.8479999999999, 8.2 fc rgb \"#DD0000\"",
+ "set object 1015 rect from 129.8879999999999, 8.399999999999999 to 131.8519999999999, 8.2 fc rgb \"#DD0000\"",
+ "set object 1016 rect from 131.90949999999987, 8.399999999999999 to 132.90949999999987, 8.2 fc rgb \"#DD0000\"",
+ "set object 1017 rect from 132.9344999999999, 8.399999999999999 to 133.9344999999999, 8.2 fc rgb \"#DD0000\"",
+ "set object 1018 rect from 133.9804999999999, 8.399999999999999 to 134.9804999999999, 8.2 fc rgb \"#DD0000\"",
+ "set object 1019 rect from 135.0459999999999, 8.399999999999999 to 136.0459999999999, 8.2 fc rgb \"#DD0000\"",
+ "set object 1020 rect from 136.08249999999987, 8.399999999999999 to 137.08249999999987, 8.2 fc rgb \"#DD0000\"",
+ "set object 1021 rect from 137.1609999999999, 8.399999999999999 to 138.1609999999999, 8.2 fc rgb \"#DD0000\"",
+ "set object 1022 rect from 138.2054999999999, 8.399999999999999 to 139.2054999999999, 8.2 fc rgb \"#DD0000\"",
+ "set object 1023 rect from 139.24899999999988, 8.399999999999999 to 140.24899999999988, 8.2 fc rgb \"#DD0000\"",
+ "set object 1024 rect from 140.3004999999999, 8.399999999999999 to 141.3004999999999, 8.2 fc rgb \"#DD0000\"",
+ "set object 1025 rect from 19.8815, 8.149999999999999 to 20.8815, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1026 rect from 20.910999999999998, 8.149999999999999 to 21.910999999999998, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1027 rect from 45.50300000000001, 8.149999999999999 to 48.4035, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1028 rect from 48.49, 8.149999999999999 to 53.228999999999985, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1029 rect from 54.33049999999998, 8.149999999999999 to 55.33049999999998, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1030 rect from 57.33799999999997, 8.149999999999999 to 59.19399999999997, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1031 rect from 61.17299999999995, 8.149999999999999 to 62.17299999999995, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1032 rect from 62.20049999999995, 8.149999999999999 to 63.20049999999995, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1033 rect from 63.23999999999996, 8.149999999999999 to 64.23999999999995, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1034 rect from 64.28099999999995, 8.149999999999999 to 65.28099999999995, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1035 rect from 65.31249999999996, 8.149999999999999 to 66.31249999999996, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1036 rect from 66.37099999999995, 8.149999999999999 to 68.35049999999995, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1037 rect from 68.37699999999995, 8.149999999999999 to 70.37999999999994, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1038 rect from 70.39199999999994, 8.149999999999999 to 71.39199999999994, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1039 rect from 71.44949999999994, 8.149999999999999 to 72.44949999999994, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1040 rect from 72.48699999999994, 8.149999999999999 to 73.48699999999994, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1041 rect from 73.55549999999994, 8.149999999999999 to 75.56249999999994, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1042 rect from 75.59449999999994, 8.149999999999999 to 76.59449999999994, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1043 rect from 76.64899999999994, 8.149999999999999 to 77.64899999999994, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1044 rect from 77.68599999999995, 8.149999999999999 to 78.68599999999995, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1045 rect from 78.74099999999993, 8.149999999999999 to 79.74099999999993, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1046 rect from 79.81349999999993, 8.149999999999999 to 80.81349999999993, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1047 rect from 80.83699999999993, 8.149999999999999 to 81.83699999999993, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1048 rect from 81.90449999999993, 8.149999999999999 to 82.90449999999993, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1049 rect from 82.96499999999995, 8.149999999999999 to 86.90099999999993, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1050 rect from 87.97249999999993, 8.149999999999999 to 88.97249999999993, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1051 rect from 88.98349999999992, 8.149999999999999 to 89.98349999999992, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1052 rect from 90.04699999999991, 8.149999999999999 to 91.04699999999991, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1053 rect from 91.11749999999992, 8.149999999999999 to 92.11749999999992, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1054 rect from 92.14499999999992, 8.149999999999999 to 93.14499999999992, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1055 rect from 93.21149999999992, 8.149999999999999 to 94.21149999999992, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1056 rect from 94.24599999999992, 8.149999999999999 to 95.24599999999992, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1057 rect from 95.31249999999991, 8.149999999999999 to 96.31249999999991, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1058 rect from 96.36399999999992, 8.149999999999999 to 97.36399999999992, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1059 rect from 97.39349999999992, 8.149999999999999 to 98.39349999999992, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1060 rect from 98.46299999999991, 8.149999999999999 to 99.46299999999991, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1061 rect from 99.48249999999992, 8.149999999999999 to 100.48249999999992, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1062 rect from 100.56199999999993, 8.149999999999999 to 101.56199999999993, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1063 rect from 101.62199999999993, 8.149999999999999 to 102.62199999999993, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1064 rect from 102.63099999999991, 8.149999999999999 to 103.63099999999991, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1065 rect from 103.67849999999991, 8.149999999999999 to 104.67849999999991, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1066 rect from 104.73949999999991, 8.149999999999999 to 105.73949999999991, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1067 rect from 105.77499999999992, 8.149999999999999 to 106.77499999999992, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1068 rect from 106.85949999999991, 8.149999999999999 to 108.7474999999999, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1069 rect from 109.87949999999991, 8.149999999999999 to 110.87949999999991, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1070 rect from 110.93299999999991, 8.149999999999999 to 111.93299999999991, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1071 rect from 112.00149999999991, 8.149999999999999 to 113.9859999999999, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1072 rect from 114.0484999999999, 8.149999999999999 to 115.0484999999999, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1073 rect from 115.0789999999999, 8.149999999999999 to 116.0789999999999, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1074 rect from 116.14449999999991, 8.149999999999999 to 117.14449999999991, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1075 rect from 117.26799999999992, 8.149999999999999 to 118.26799999999992, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1076 rect from 118.3064999999999, 8.149999999999999 to 119.3064999999999, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1077 rect from 119.3669999999999, 8.149999999999999 to 120.3669999999999, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1078 rect from 120.4439999999999, 8.149999999999999 to 121.4439999999999, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1079 rect from 121.46899999999991, 8.149999999999999 to 122.46899999999991, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1080 rect from 122.52449999999989, 8.149999999999999 to 123.52449999999989, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1081 rect from 123.56399999999988, 8.149999999999999 to 124.56399999999988, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1082 rect from 124.6324999999999, 8.149999999999999 to 125.6324999999999, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1083 rect from 125.6929999999999, 8.149999999999999 to 126.6929999999999, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1084 rect from 126.7234999999999, 8.149999999999999 to 127.7234999999999, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1085 rect from 127.77299999999991, 8.149999999999999 to 128.7729999999999, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1086 rect from 128.8479999999999, 8.149999999999999 to 129.8479999999999, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1087 rect from 129.8879999999999, 8.149999999999999 to 131.8519999999999, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1088 rect from 131.90949999999987, 8.149999999999999 to 132.90949999999987, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1089 rect from 132.9344999999999, 8.149999999999999 to 133.9344999999999, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1090 rect from 133.9804999999999, 8.149999999999999 to 134.9804999999999, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1091 rect from 135.0459999999999, 8.149999999999999 to 136.0459999999999, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1092 rect from 136.08249999999987, 8.149999999999999 to 137.08249999999987, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1093 rect from 137.1609999999999, 8.149999999999999 to 138.1609999999999, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1094 rect from 138.2054999999999, 8.149999999999999 to 139.2054999999999, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1095 rect from 139.24899999999988, 8.149999999999999 to 140.24899999999988, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1096 rect from 140.3004999999999, 8.149999999999999 to 141.3004999999999, 7.949999999999999 fc rgb \"#DD0000\"",
+ "set object 1097 rect from 19.8815, 7.899999999999999 to 20.8815, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1098 rect from 20.910999999999998, 7.899999999999999 to 21.910999999999998, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1099 rect from 45.50300000000001, 7.899999999999999 to 48.4035, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1100 rect from 48.49, 7.899999999999999 to 53.228999999999985, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1101 rect from 54.33049999999998, 7.899999999999999 to 55.33049999999998, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1102 rect from 57.33799999999997, 7.899999999999999 to 59.19399999999997, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1103 rect from 61.17299999999995, 7.899999999999999 to 62.17299999999995, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1104 rect from 62.20049999999995, 7.899999999999999 to 63.20049999999995, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1105 rect from 63.23999999999996, 7.899999999999999 to 64.23999999999995, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1106 rect from 64.28099999999995, 7.899999999999999 to 65.28099999999995, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1107 rect from 65.31249999999996, 7.899999999999999 to 66.31249999999996, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1108 rect from 66.37099999999995, 7.899999999999999 to 68.35049999999995, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1109 rect from 68.37699999999995, 7.899999999999999 to 70.37999999999994, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1110 rect from 70.39199999999994, 7.899999999999999 to 71.39199999999994, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1111 rect from 71.44949999999994, 7.899999999999999 to 72.44949999999994, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1112 rect from 72.48699999999994, 7.899999999999999 to 73.48699999999994, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1113 rect from 73.55549999999994, 7.899999999999999 to 75.56249999999994, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1114 rect from 75.59449999999994, 7.899999999999999 to 76.59449999999994, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1115 rect from 76.64899999999994, 7.899999999999999 to 77.64899999999994, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1116 rect from 77.68599999999995, 7.899999999999999 to 78.68599999999995, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1117 rect from 78.74099999999993, 7.899999999999999 to 79.74099999999993, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1118 rect from 79.81349999999993, 7.899999999999999 to 80.81349999999993, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1119 rect from 80.83699999999993, 7.899999999999999 to 81.83699999999993, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1120 rect from 81.90449999999993, 7.899999999999999 to 82.90449999999993, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1121 rect from 82.96499999999995, 7.899999999999999 to 86.90099999999993, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1122 rect from 87.97249999999993, 7.899999999999999 to 88.97249999999993, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1123 rect from 88.98349999999992, 7.899999999999999 to 89.98349999999992, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1124 rect from 90.04699999999991, 7.899999999999999 to 91.04699999999991, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1125 rect from 91.11749999999992, 7.899999999999999 to 92.11749999999992, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1126 rect from 92.14499999999992, 7.899999999999999 to 93.14499999999992, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1127 rect from 93.21149999999992, 7.899999999999999 to 94.21149999999992, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1128 rect from 94.24599999999992, 7.899999999999999 to 95.24599999999992, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1129 rect from 95.31249999999991, 7.899999999999999 to 96.31249999999991, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1130 rect from 96.36399999999992, 7.899999999999999 to 97.36399999999992, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1131 rect from 97.39349999999992, 7.899999999999999 to 98.39349999999992, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1132 rect from 98.46299999999991, 7.899999999999999 to 99.46299999999991, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1133 rect from 99.48249999999992, 7.899999999999999 to 100.48249999999992, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1134 rect from 100.56199999999993, 7.899999999999999 to 101.56199999999993, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1135 rect from 101.62199999999993, 7.899999999999999 to 102.62199999999993, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1136 rect from 102.63099999999991, 7.899999999999999 to 103.63099999999991, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1137 rect from 103.67849999999991, 7.899999999999999 to 104.67849999999991, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1138 rect from 104.73949999999991, 7.899999999999999 to 105.73949999999991, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1139 rect from 105.77499999999992, 7.899999999999999 to 106.77499999999992, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1140 rect from 106.85949999999991, 7.899999999999999 to 108.7474999999999, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1141 rect from 109.87949999999991, 7.899999999999999 to 110.87949999999991, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1142 rect from 110.93299999999991, 7.899999999999999 to 111.93299999999991, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1143 rect from 112.00149999999991, 7.899999999999999 to 113.9859999999999, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1144 rect from 114.0484999999999, 7.899999999999999 to 115.0484999999999, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1145 rect from 115.0789999999999, 7.899999999999999 to 116.0789999999999, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1146 rect from 116.14449999999991, 7.899999999999999 to 117.14449999999991, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1147 rect from 117.26799999999992, 7.899999999999999 to 118.26799999999992, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1148 rect from 118.3064999999999, 7.899999999999999 to 119.3064999999999, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1149 rect from 119.3669999999999, 7.899999999999999 to 120.3669999999999, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1150 rect from 120.4439999999999, 7.899999999999999 to 121.4439999999999, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1151 rect from 121.46899999999991, 7.899999999999999 to 122.46899999999991, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1152 rect from 122.52449999999989, 7.899999999999999 to 123.52449999999989, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1153 rect from 123.56399999999988, 7.899999999999999 to 124.56399999999988, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1154 rect from 124.6324999999999, 7.899999999999999 to 125.6324999999999, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1155 rect from 125.6929999999999, 7.899999999999999 to 126.6929999999999, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1156 rect from 126.7234999999999, 7.899999999999999 to 127.7234999999999, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1157 rect from 127.77299999999991, 7.899999999999999 to 128.7729999999999, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1158 rect from 128.8479999999999, 7.899999999999999 to 129.8479999999999, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1159 rect from 129.8879999999999, 7.899999999999999 to 131.8519999999999, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1160 rect from 131.90949999999987, 7.899999999999999 to 132.90949999999987, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1161 rect from 132.9344999999999, 7.899999999999999 to 133.9344999999999, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1162 rect from 133.9804999999999, 7.899999999999999 to 134.9804999999999, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1163 rect from 135.0459999999999, 7.899999999999999 to 136.0459999999999, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1164 rect from 136.08249999999987, 7.899999999999999 to 137.08249999999987, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1165 rect from 137.1609999999999, 7.899999999999999 to 138.1609999999999, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1166 rect from 138.2054999999999, 7.899999999999999 to 139.2054999999999, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1167 rect from 139.24899999999988, 7.899999999999999 to 140.24899999999988, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1168 rect from 140.3004999999999, 7.899999999999999 to 141.3004999999999, 7.699999999999999 fc rgb \"#DD0000\"",
+ "set object 1169 rect from 19.8815, 7.649999999999999 to 20.8815, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1170 rect from 20.910999999999998, 7.649999999999999 to 21.910999999999998, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1171 rect from 45.50300000000001, 7.649999999999999 to 48.4035, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1172 rect from 48.49, 7.649999999999999 to 53.228999999999985, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1173 rect from 54.33049999999998, 7.649999999999999 to 55.33049999999998, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1174 rect from 57.33799999999997, 7.649999999999999 to 59.19399999999997, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1175 rect from 61.17299999999995, 7.649999999999999 to 62.17299999999995, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1176 rect from 62.20049999999995, 7.649999999999999 to 63.20049999999995, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1177 rect from 63.23999999999996, 7.649999999999999 to 64.23999999999995, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1178 rect from 64.28099999999995, 7.649999999999999 to 65.28099999999995, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1179 rect from 65.31249999999996, 7.649999999999999 to 66.31249999999996, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1180 rect from 66.37099999999995, 7.649999999999999 to 68.35049999999995, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1181 rect from 68.37699999999995, 7.649999999999999 to 70.37999999999994, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1182 rect from 70.39199999999994, 7.649999999999999 to 71.39199999999994, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1183 rect from 71.44949999999994, 7.649999999999999 to 72.44949999999994, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1184 rect from 72.48699999999994, 7.649999999999999 to 73.48699999999994, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1185 rect from 73.55549999999994, 7.649999999999999 to 75.56249999999994, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1186 rect from 75.59449999999994, 7.649999999999999 to 76.59449999999994, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1187 rect from 76.64899999999994, 7.649999999999999 to 77.64899999999994, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1188 rect from 77.68599999999995, 7.649999999999999 to 78.68599999999995, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1189 rect from 78.74099999999993, 7.649999999999999 to 79.74099999999993, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1190 rect from 79.81349999999993, 7.649999999999999 to 80.81349999999993, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1191 rect from 80.83699999999993, 7.649999999999999 to 81.83699999999993, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1192 rect from 81.90449999999993, 7.649999999999999 to 82.90449999999993, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1193 rect from 82.96499999999995, 7.649999999999999 to 86.90099999999993, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1194 rect from 87.97249999999993, 7.649999999999999 to 88.97249999999993, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1195 rect from 88.98349999999992, 7.649999999999999 to 89.98349999999992, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1196 rect from 90.04699999999991, 7.649999999999999 to 91.04699999999991, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1197 rect from 91.11749999999992, 7.649999999999999 to 92.11749999999992, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1198 rect from 92.14499999999992, 7.649999999999999 to 93.14499999999992, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1199 rect from 93.21149999999992, 7.649999999999999 to 94.21149999999992, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1200 rect from 94.24599999999992, 7.649999999999999 to 95.24599999999992, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1201 rect from 95.31249999999991, 7.649999999999999 to 96.31249999999991, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1202 rect from 96.36399999999992, 7.649999999999999 to 97.36399999999992, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1203 rect from 97.39349999999992, 7.649999999999999 to 98.39349999999992, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1204 rect from 98.46299999999991, 7.649999999999999 to 99.46299999999991, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1205 rect from 99.48249999999992, 7.649999999999999 to 100.48249999999992, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1206 rect from 100.56199999999993, 7.649999999999999 to 101.56199999999993, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1207 rect from 101.62199999999993, 7.649999999999999 to 102.62199999999993, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1208 rect from 102.63099999999991, 7.649999999999999 to 103.63099999999991, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1209 rect from 103.67849999999991, 7.649999999999999 to 104.67849999999991, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1210 rect from 104.73949999999991, 7.649999999999999 to 105.73949999999991, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1211 rect from 105.77499999999992, 7.649999999999999 to 106.77499999999992, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1212 rect from 106.85949999999991, 7.649999999999999 to 108.7474999999999, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1213 rect from 109.87949999999991, 7.649999999999999 to 110.87949999999991, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1214 rect from 110.93299999999991, 7.649999999999999 to 111.93299999999991, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1215 rect from 112.00149999999991, 7.649999999999999 to 113.9859999999999, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1216 rect from 114.0484999999999, 7.649999999999999 to 115.0484999999999, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1217 rect from 115.0789999999999, 7.649999999999999 to 116.0789999999999, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1218 rect from 116.14449999999991, 7.649999999999999 to 117.14449999999991, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1219 rect from 117.26799999999992, 7.649999999999999 to 118.26799999999992, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1220 rect from 118.3064999999999, 7.649999999999999 to 119.3064999999999, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1221 rect from 119.3669999999999, 7.649999999999999 to 120.3669999999999, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1222 rect from 120.4439999999999, 7.649999999999999 to 121.4439999999999, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1223 rect from 121.46899999999991, 7.649999999999999 to 122.46899999999991, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1224 rect from 122.52449999999989, 7.649999999999999 to 123.52449999999989, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1225 rect from 123.56399999999988, 7.649999999999999 to 124.56399999999988, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1226 rect from 124.6324999999999, 7.649999999999999 to 125.6324999999999, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1227 rect from 125.6929999999999, 7.649999999999999 to 126.6929999999999, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1228 rect from 126.7234999999999, 7.649999999999999 to 127.7234999999999, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1229 rect from 127.77299999999991, 7.649999999999999 to 128.7729999999999, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1230 rect from 128.8479999999999, 7.649999999999999 to 129.8479999999999, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1231 rect from 129.8879999999999, 7.649999999999999 to 131.8519999999999, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1232 rect from 131.90949999999987, 7.649999999999999 to 132.90949999999987, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1233 rect from 132.9344999999999, 7.649999999999999 to 133.9344999999999, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1234 rect from 133.9804999999999, 7.649999999999999 to 134.9804999999999, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1235 rect from 135.0459999999999, 7.649999999999999 to 136.0459999999999, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1236 rect from 136.08249999999987, 7.649999999999999 to 137.08249999999987, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1237 rect from 137.1609999999999, 7.649999999999999 to 138.1609999999999, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1238 rect from 138.2054999999999, 7.649999999999999 to 139.2054999999999, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1239 rect from 139.24899999999988, 7.649999999999999 to 140.24899999999988, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1240 rect from 140.3004999999999, 7.649999999999999 to 141.3004999999999, 7.449999999999999 fc rgb \"#DD0000\"",
+ "set object 1241 rect from 64.28099999999995, 10.2 to 65.28099999999995, 9.8 fc rgb \"#00EE00\"",
+ "set object 1242 rect from 70.39199999999994, 10.2 to 71.39199999999994, 9.8 fc rgb \"#00EE00\"",
+ "set object 1243 rect from 74.56249999999994, 10.2 to 75.56249999999994, 9.8 fc rgb \"#00EE00\"",
+ "set object 1244 rect from 75.59449999999994, 10.2 to 76.59449999999994, 9.8 fc rgb \"#00EE00\"",
+ "set object 1245 rect from 77.68599999999995, 10.2 to 78.68599999999995, 9.8 fc rgb \"#00EE00\"",
+ "set object 1246 rect from 82.96499999999995, 10.2 to 83.96499999999995, 9.8 fc rgb \"#00EE00\"",
+ "set object 1247 rect from 85.90099999999993, 10.2 to 86.90099999999993, 9.8 fc rgb \"#00EE00\"",
+ "set object 1248 rect from 87.97249999999993, 10.2 to 88.97249999999993, 9.8 fc rgb \"#00EE00\"",
+ "set object 1249 rect from 92.14499999999992, 10.2 to 93.14499999999992, 9.8 fc rgb \"#00EE00\"",
+ "set object 1250 rect from 95.31249999999991, 10.2 to 96.31249999999991, 9.8 fc rgb \"#00EE00\"",
+ "set object 1251 rect from 97.39349999999992, 10.2 to 98.39349999999992, 9.8 fc rgb \"#00EE00\"",
+ "set object 1252 rect from 98.46299999999991, 10.2 to 99.46299999999991, 9.8 fc rgb \"#00EE00\"",
+ "set object 1253 rect from 99.48249999999992, 10.2 to 100.48249999999992, 9.8 fc rgb \"#00EE00\"",
+ "set object 1254 rect from 100.56199999999993, 10.2 to 101.56199999999993, 9.8 fc rgb \"#00EE00\"",
+ "set object 1255 rect from 101.62199999999993, 10.2 to 102.62199999999993, 9.8 fc rgb \"#00EE00\"",
+ "set object 1256 rect from 102.63099999999991, 10.2 to 103.63099999999991, 9.8 fc rgb \"#00EE00\"",
+ "set object 1257 rect from 103.67849999999991, 10.2 to 104.67849999999991, 9.8 fc rgb \"#00EE00\"",
+ "set object 1258 rect from 104.73949999999991, 10.2 to 105.73949999999991, 9.8 fc rgb \"#00EE00\"",
+ "set object 1259 rect from 105.77499999999992, 10.2 to 106.77499999999992, 9.8 fc rgb \"#00EE00\"",
+ "set object 1260 rect from 107.7474999999999, 10.2 to 108.7474999999999, 9.8 fc rgb \"#00EE00\"",
+ "set object 1261 rect from 110.93299999999991, 10.2 to 111.93299999999991, 9.8 fc rgb \"#00EE00\"",
+ "set object 1262 rect from 115.0789999999999, 10.2 to 116.0789999999999, 9.8 fc rgb \"#00EE00\"",
+ "set object 1263 rect from 116.14449999999991, 10.2 to 117.14449999999991, 9.8 fc rgb \"#00EE00\"",
+ "set object 1264 rect from 117.26799999999992, 10.2 to 118.26799999999992, 9.8 fc rgb \"#00EE00\"",
+ "set object 1265 rect from 118.3064999999999, 10.2 to 119.3064999999999, 9.8 fc rgb \"#00EE00\"",
+ "set object 1266 rect from 122.52449999999989, 10.2 to 123.52449999999989, 9.8 fc rgb \"#00EE00\"",
+ "set object 1267 rect from 123.56399999999988, 10.2 to 124.56399999999988, 9.8 fc rgb \"#00EE00\"",
+ "set object 1268 rect from 124.6324999999999, 10.2 to 125.6324999999999, 9.8 fc rgb \"#00EE00\"",
+ "set object 1269 rect from 125.6929999999999, 10.2 to 126.6929999999999, 9.8 fc rgb \"#00EE00\"",
+ "set object 1270 rect from 128.8479999999999, 10.2 to 129.8479999999999, 9.8 fc rgb \"#00EE00\"",
+ "set object 1271 rect from 129.8879999999999, 10.2 to 131.8519999999999, 9.8 fc rgb \"#00EE00\"",
+ "set object 1272 rect from 131.90949999999987, 10.2 to 132.90949999999987, 9.8 fc rgb \"#00EE00\"",
+ "set object 1273 rect from 133.9804999999999, 10.2 to 134.9804999999999, 9.8 fc rgb \"#00EE00\"",
+ "set object 1274 rect from 136.08249999999987, 10.2 to 137.08249999999987, 9.8 fc rgb \"#00EE00\"",
+ "set object 1275 rect from 140.3004999999999, 10.2 to 141.3004999999999, 9.8 fc rgb \"#00EE00\"",
+ "set object 1276 rect from 61.17299999999995, 9.399999999999999 to 62.17299999999995, 9.2 fc rgb \"#00EE00\"",
+ "set object 1277 rect from 63.23999999999996, 9.399999999999999 to 64.23999999999995, 9.2 fc rgb \"#00EE00\"",
+ "set object 1278 rect from 65.31249999999996, 9.399999999999999 to 66.31249999999996, 9.2 fc rgb \"#00EE00\"",
+ "set object 1279 rect from 66.37099999999995, 9.399999999999999 to 67.37099999999995, 9.2 fc rgb \"#00EE00\"",
+ "set object 1280 rect from 68.37699999999995, 9.399999999999999 to 70.37999999999994, 9.2 fc rgb \"#00EE00\"",
+ "set object 1281 rect from 70.39199999999994, 9.399999999999999 to 71.39199999999994, 9.2 fc rgb \"#00EE00\"",
+ "set object 1282 rect from 72.48699999999994, 9.399999999999999 to 73.48699999999994, 9.2 fc rgb \"#00EE00\"",
+ "set object 1283 rect from 73.55549999999994, 9.399999999999999 to 75.56249999999994, 9.2 fc rgb \"#00EE00\"",
+ "set object 1284 rect from 76.64899999999994, 9.399999999999999 to 77.64899999999994, 9.2 fc rgb \"#00EE00\"",
+ "set object 1285 rect from 79.81349999999993, 9.399999999999999 to 80.81349999999993, 9.2 fc rgb \"#00EE00\"",
+ "set object 1286 rect from 80.83699999999993, 9.399999999999999 to 81.83699999999993, 9.2 fc rgb \"#00EE00\"",
+ "set object 1287 rect from 81.90449999999993, 9.399999999999999 to 82.90449999999993, 9.2 fc rgb \"#00EE00\"",
+ "set object 1288 rect from 84.90049999999992, 9.399999999999999 to 86.90099999999993, 9.2 fc rgb \"#00EE00\"",
+ "set object 1289 rect from 87.97249999999993, 9.399999999999999 to 88.97249999999993, 9.2 fc rgb \"#00EE00\"",
+ "set object 1290 rect from 92.14499999999992, 9.399999999999999 to 93.14499999999992, 9.2 fc rgb \"#00EE00\"",
+ "set object 1291 rect from 93.21149999999992, 9.399999999999999 to 94.21149999999992, 9.2 fc rgb \"#00EE00\"",
+ "set object 1292 rect from 95.31249999999991, 9.399999999999999 to 96.31249999999991, 9.2 fc rgb \"#00EE00\"",
+ "set object 1293 rect from 96.36399999999992, 9.399999999999999 to 97.36399999999992, 9.2 fc rgb \"#00EE00\"",
+ "set object 1294 rect from 97.39349999999992, 9.399999999999999 to 98.39349999999992, 9.2 fc rgb \"#00EE00\"",
+ "set object 1295 rect from 99.48249999999992, 9.399999999999999 to 100.48249999999992, 9.2 fc rgb \"#00EE00\"",
+ "set object 1296 rect from 100.56199999999993, 9.399999999999999 to 101.56199999999993, 9.2 fc rgb \"#00EE00\"",
+ "set object 1297 rect from 101.62199999999993, 9.399999999999999 to 102.62199999999993, 9.2 fc rgb \"#00EE00\"",
+ "set object 1298 rect from 102.63099999999991, 9.399999999999999 to 103.63099999999991, 9.2 fc rgb \"#00EE00\"",
+ "set object 1299 rect from 103.67849999999991, 9.399999999999999 to 104.67849999999991, 9.2 fc rgb \"#00EE00\"",
+ "set object 1300 rect from 104.73949999999991, 9.399999999999999 to 105.73949999999991, 9.2 fc rgb \"#00EE00\"",
+ "set object 1301 rect from 105.77499999999992, 9.399999999999999 to 106.77499999999992, 9.2 fc rgb \"#00EE00\"",
+ "set object 1302 rect from 110.93299999999991, 9.399999999999999 to 111.93299999999991, 9.2 fc rgb \"#00EE00\"",
+ "set object 1303 rect from 112.00149999999991, 9.399999999999999 to 113.9859999999999, 9.2 fc rgb \"#00EE00\"",
+ "set object 1304 rect from 114.0484999999999, 9.399999999999999 to 115.0484999999999, 9.2 fc rgb \"#00EE00\"",
+ "set object 1305 rect from 116.14449999999991, 9.399999999999999 to 117.14449999999991, 9.2 fc rgb \"#00EE00\"",
+ "set object 1306 rect from 117.26799999999992, 9.399999999999999 to 118.26799999999992, 9.2 fc rgb \"#00EE00\"",
+ "set object 1307 rect from 118.3064999999999, 9.399999999999999 to 119.3064999999999, 9.2 fc rgb \"#00EE00\"",
+ "set object 1308 rect from 120.4439999999999, 9.399999999999999 to 121.4439999999999, 9.2 fc rgb \"#00EE00\"",
+ "set object 1309 rect from 121.46899999999991, 9.399999999999999 to 122.46899999999991, 9.2 fc rgb \"#00EE00\"",
+ "set object 1310 rect from 122.52449999999989, 9.399999999999999 to 123.52449999999989, 9.2 fc rgb \"#00EE00\"",
+ "set object 1311 rect from 124.6324999999999, 9.399999999999999 to 125.6324999999999, 9.2 fc rgb \"#00EE00\"",
+ "set object 1312 rect from 125.6929999999999, 9.399999999999999 to 126.6929999999999, 9.2 fc rgb \"#00EE00\"",
+ "set object 1313 rect from 126.7234999999999, 9.399999999999999 to 127.7234999999999, 9.2 fc rgb \"#00EE00\"",
+ "set object 1314 rect from 129.8879999999999, 9.399999999999999 to 131.8519999999999, 9.2 fc rgb \"#00EE00\"",
+ "set object 1315 rect from 133.9804999999999, 9.399999999999999 to 134.9804999999999, 9.2 fc rgb \"#00EE00\"",
+ "set object 1316 rect from 135.0459999999999, 9.399999999999999 to 136.0459999999999, 9.2 fc rgb \"#00EE00\"",
+ "set object 1317 rect from 136.08249999999987, 9.399999999999999 to 137.08249999999987, 9.2 fc rgb \"#00EE00\"",
+ "set object 1318 rect from 137.1609999999999, 9.399999999999999 to 138.1609999999999, 9.2 fc rgb \"#00EE00\"",
+ "set object 1319 rect from 139.24899999999988, 9.399999999999999 to 140.24899999999988, 9.2 fc rgb \"#00EE00\"",
+ "set object 1320 rect from 140.3004999999999, 9.399999999999999 to 141.3004999999999, 9.2 fc rgb \"#00EE00\"",
+ "set object 1321 rect from 84.90049999999992, 9.149999999999999 to 85.90049999999992, 8.95 fc rgb \"#00EE00\"",
+ "set object 1322 rect from 94.24599999999992, 9.149999999999999 to 95.24599999999992, 8.95 fc rgb \"#00EE00\"",
+ "set object 1323 rect from 95.31249999999991, 9.149999999999999 to 96.31249999999991, 8.95 fc rgb \"#00EE00\"",
+ "set object 1324 rect from 97.39349999999992, 9.149999999999999 to 98.39349999999992, 8.95 fc rgb \"#00EE00\"",
+ "set object 1325 rect from 99.48249999999992, 9.149999999999999 to 100.48249999999992, 8.95 fc rgb \"#00EE00\"",
+ "set object 1326 rect from 100.56199999999993, 9.149999999999999 to 101.56199999999993, 8.95 fc rgb \"#00EE00\"",
+ "set object 1327 rect from 103.67849999999991, 9.149999999999999 to 104.67849999999991, 8.95 fc rgb \"#00EE00\"",
+ "set object 1328 rect from 105.77499999999992, 9.149999999999999 to 106.77499999999992, 8.95 fc rgb \"#00EE00\"",
+ "set object 1329 rect from 114.0484999999999, 9.149999999999999 to 115.0484999999999, 8.95 fc rgb \"#00EE00\"",
+ "set object 1330 rect from 116.14449999999991, 9.149999999999999 to 117.14449999999991, 8.95 fc rgb \"#00EE00\"",
+ "set object 1331 rect from 118.3064999999999, 9.149999999999999 to 119.3064999999999, 8.95 fc rgb \"#00EE00\"",
+ "set object 1332 rect from 119.3669999999999, 9.149999999999999 to 120.3669999999999, 8.95 fc rgb \"#00EE00\"",
+ "set object 1333 rect from 124.6324999999999, 9.149999999999999 to 125.6324999999999, 8.95 fc rgb \"#00EE00\"",
+ "set object 1334 rect from 125.6929999999999, 9.149999999999999 to 126.6929999999999, 8.95 fc rgb \"#00EE00\"",
+ "set object 1335 rect from 129.8879999999999, 9.149999999999999 to 131.8519999999999, 8.95 fc rgb \"#00EE00\"",
+ "set object 1336 rect from 135.0459999999999, 9.149999999999999 to 136.0459999999999, 8.95 fc rgb \"#00EE00\"",
+ "set object 1337 rect from 136.08249999999987, 9.149999999999999 to 137.08249999999987, 8.95 fc rgb \"#00EE00\"",
+ "set object 1338 rect from 139.24899999999988, 9.149999999999999 to 140.24899999999988, 8.95 fc rgb \"#00EE00\"",
+ "set object 1339 rect from 78.74099999999993, 10.2 to 79.74099999999993, 9.8 fc rgb \"#FF00FF\"",
+ "set object 1340 rect from 93.21149999999992, 10.2 to 94.21149999999992, 9.8 fc rgb \"#FF00FF\"",
+ "set object 1341 rect from 112.00149999999991, 10.2 to 113.00149999999991, 9.8 fc rgb \"#FF00FF\"",
+ "set object 1342 rect from 80.83699999999993, 10.2 to 81.83699999999993, 9.8 fc rgb \"#AA00AA\"",
+ "set object 1343 rect from 57.33799999999997, 10.2 to 58.33799999999997, 9.8 fc rgb \"#4444AA\"",
+ "set object 1344 rect from 67.35049999999995, 10.2 to 68.35049999999995, 9.8 fc rgb \"#4444AA\"",
+ "set object 1345 rect from 71.44949999999994, 10.2 to 72.44949999999994, 9.8 fc rgb \"#4444AA\"",
+ "set object 1346 rect from 138.2054999999999, 10.2 to 139.2054999999999, 9.8 fc rgb \"#4444AA\"",
+ "set label \"external \" at 11.092156249999992,11 textcolor rgb \"#3399FF\" font \"Helvetica,9'\"",
+ "set label \"runtime \" at 19.763812499999986,11 textcolor rgb \"#000000\" font \"Helvetica,9'\"",
+ "set label \"full code\" at 28.435468749999977,11 textcolor rgb \"#DD0000\" font \"Helvetica,9'\"",
+ "set label \"opt code \" at 37.10712499999997,11 textcolor rgb \"#00EE00\" font \"Helvetica,9'\"",
+ "set label \"code stub\" at 45.77878124999996,11 textcolor rgb \"#FF00FF\" font \"Helvetica,9'\"",
+ "set label \"built-in \" at 54.45043749999995,11 textcolor rgb \"#AA00AA\" font \"Helvetica,9'\"",
+ "set label \"inl.cache\" at 63.12209374999994,11 textcolor rgb \"#4444AA\" font \"Helvetica,9'\"",
+ "set label \"reg.exp. \" at 71.79374999999993,11 textcolor rgb \"#0000FF\" font \"Helvetica,9'\"",
+ "set label \"13 ms\" at 42.32008281250001,5.5 font \"Helvetica,7'\"",
+ "set label \"1 ms\" at 4.2255828125,1 font \"Helvetica,7'\"",
+ "set label \"1 ms\" at 10.8385828125,1 font \"Helvetica,7'\"",
+ "set label \"1 ms\" at 7.8065828125,1 font \"Helvetica,7'\"",
+ "set label \"1 ms\" at 14.3305828125,1 font \"Helvetica,7'\"",
+ "set label \"0 ms\" at 18.204082812499998,1 font \"Helvetica,7'\"",
+ "set label \"0 ms\" at 85.27908281249994,1 font \"Helvetica,7'\"",
+ "set y2range [0:59.54259090909095]",
+ "plot '-' using 1:2 axes x1y2 with impulses ls 1",
+ "41.88650000000001 13.935500000000008",
+ "3.7920000000000003 1.3375000000000004",
+ "10.405000000000001 1.113500000000002",
+ "7.373 1.1035000000000004",
+ "13.897 1.0205000000000002",
+ "17.7705 0.7759999999999998",
+ "84.84549999999993 0.75",
+ "86.05649999999993 0.6779999999999973",
+ "87.36899999999991 0.6134999999999877",
+ "131.1209999999999 0.5784999999999911",
+ "108.09449999999991 0.5775000000000006",
+ "60.65699999999996 0.4855000000000018",
+ "23.1135 0.44849999999999923",
+ "21.063999999999997 0.4394999999999989",
+ "56.198999999999984 0.3990000000000009",
+ "63.024999999999956 0.39799999999999613",
+ "51.02349999999999 0.39399999999999835",
+ "110.4839999999999 0.3930000000000007",
+ "54.951999999999984 0.392000000000003",
+ "69.49599999999995 0.38750000000000284",
+ "62.548999999999964 0.38750000000000284",
+ "89.21399999999991 0.3744999999999976",
+ "133.4079999999999 0.3645000000000209",
+ "61.253999999999955 0.3374999999999986",
+ "104.4429999999999 0.30999999999997385",
+ "56.52499999999998 0.2734999999999985",
+ "63.41299999999995 0.26549999999999585",
+ "102.99499999999992 0.2535000000000025",
+ "47.3935 0.25250000000000483",
+ "58.65749999999996 0.24799999999999756",
+ "23.8365 0.2469999999999999",
+ "74.63849999999994 0.23149999999998272",
+ "16.9595 0.22250000000000014",
+ "85.13799999999992 0.22049999999998704",
+ "51.78349999999999 0.2085000000000008",
+ "64.61749999999995 0.20849999999998658",
+ "70.58649999999994 0.1775000000000091",
+ "55.66249999999998 0.17649999999999721",
+ "57.205999999999975 0.1700000000000017",
+ "75.20099999999994 0.1529999999999916",
+ "61.464999999999954 0.1524999999999963",
+ "18.017000000000003 0.14550000000000196",
+ "67.48749999999995 0.14500000000001023",
+ "42.05100000000001 0.1385000000000005",
+ "25.4055 0.13799999999999812",
+ "46.9925 0.1314999999999955",
+ "18.1735 0.12750000000000128",
+ "109.38599999999991 0.12000000000000455",
+ "59.042999999999964 0.1180000000000021",
+ "56.97649999999997 0.117999999999995",
+ "22.3815 0.11400000000000077",
+ "58.07699999999997 0.1039999999999992",
+ "23.336000000000002 0.10300000000000153",
+ "21.8475 0.10050000000000026",
+ "56.845999999999975 0.09949999999999903",
+ "46.28150000000001 0.09649999999999892",
+ "121.0104999999999 0.09099999999999397",
+ "25.507500000000004 0.08800000000000452",
+ "52.448999999999984 0.08599999999999852",
+ "46.74 0.08499999999999375",
+ "57.64849999999997 0.08249999999999602",
+ "58.316999999999965 0.08099999999999596",
+ "23.506 0.08050000000000068",
+ "46.37200000000001 0.08050000000000068",
+ "42.70600000000002 0.07900000000000063",
+ "129.4124999999999 0.07800000000000296",
+ "20.5975 0.07750000000000057",
+ "56.634499999999974 0.07749999999999346",
+ "19.0685 0.07649999999999935",
+ "21.363 0.07549999999999812",
+ "49.9695 0.07500000000000284",
+ "24.544000000000004 0.07400000000000162",
+ "21.727 0.07349999999999923",
+ "58.21549999999997 0.07249999999999801",
+ "44.917000000000016 0.07200000000000273",
+ "25.591500000000003 0.07199999999999918",
+ "50.62049999999999 0.07150000000000034",
+ "46.621 0.07099999999999795",
+ "88.82299999999992 0.07099999999999795",
+ "78.23049999999994 0.0660000000000025",
+ "46.060500000000005 0.0659999999999954",
+ "50.43099999999999 0.06400000000000006",
+ "129.48849999999987 0.06349999999997635",
+ "45.55900000000001 0.06150000000000233",
+ "19.152 0.06050000000000111",
+ "50.20799999999999 0.060499999999997556",
+ "57.33299999999997 0.060499999999997556",
+ "68.76649999999995 0.06049999999999045",
+ "23.5775 0.059499999999999886",
+ "47.135000000000005 0.05850000000000222",
+ "72.28049999999995 0.05849999999999511",
+ "45.626500000000014 0.05750000000000455",
+ "21.2695 0.057500000000000995",
+ "50.14149999999999 0.05749999999999744",
+ "91.96649999999993 0.056500000000013983",
+ "57.934999999999974 0.05649999999999977",
+ "83.63999999999993 0.05649999999999977",
+ "132.92249999999987 0.05649999999997135",
+ "67.59199999999996 0.056000000000011596",
+ "99.92199999999991 0.055499999999995",
+ "59.69699999999996 0.055499999999995",
+ "45.84850000000001 0.054999999999999716",
+ "56.69449999999998 0.05449999999999733",
+ "97.26099999999992 0.05350000000001387",
+ "112.6564999999999 0.05349999999999966",
+ "45.92300000000001 0.05349999999999966",
+ "136.19799999999987 0.05349999999998545",
+ "47.465 0.05250000000000199",
+ "105.93349999999991 0.052499999999994884",
+ "65.61699999999995 0.052499999999994884",
+ "47.5235 0.051499999999997215",
+ "102.61199999999991 0.05149999999999011",
+ "138.98049999999986 0.0514999999999759",
+ "123.8254999999999 0.050500000000013756",
+ "75.46799999999995 0.04950000000000898",
+ "45.76150000000001 0.049500000000001876",
+ "94.6054999999999 0.04949999999998056",
+ "45.97850000000001 0.048500000000004206",
+ "115.4124999999999 0.048500000000004206",
+ "118.19199999999991 0.048500000000004206",
+ "49.780499999999996 0.0484999999999971",
+ "42.795000000000016 0.04800000000000182",
+ "126.59899999999989 0.04749999999999943",
+ "51.56899999999999 0.04650000000000176",
+ "80.95049999999993 0.04649999999999466",
+ "140.9779999999999 0.04599999999999227",
+ "59.93649999999996 0.04549999999999699",
+ "46.13100000000001 0.04449999999999932",
+ "51.91599999999998 0.04299999999999926",
+ "45.70300000000001 0.042499999999996874",
+ "49.4955 0.04100000000000392",
+ "45.361500000000014 0.04099999999999682",
+ "70.35799999999995 0.04050000000000864",
+ "49.726 0.040500000000001535",
+ "45.08700000000001 0.03999999999999915",
+ "45.13500000000002 0.03900000000000858",
+ "52.15399999999998 0.0379999999999967",
+ "42.88200000000001 0.0379999999999967",
+ "24.430500000000002 0.03750000000000142",
+ "23.907 0.036499999999996646",
+ "60.08349999999996 0.036499999999996646",
+ "50.32899999999999 0.036000000000001364",
+ "42.31450000000002 0.034000000000006025",
+ "45.02900000000001 0.032999999999994145",
+ "23.189 0.031500000000001194",
+ "21.49 0.03049999999999997",
+ "42.83300000000001 0.030000000000001137",
+ "58.12149999999997 0.030000000000001137",
+ "45.41750000000002 0.030000000000001137",
+ "140.89599999999987 0.028999999999996362",
+ "2.4490000000000003 0.028500000000000636",
+ "52.31499999999998 0.027999999999998693",
+ "45.17200000000002 0.027999999999998693",
+ "43.632500000000014 0.027000000000001023",
+ "49.8685 0.027000000000001023",
+ "51.30249999999999 0.027000000000001023",
+ "21.175 0.026499999999998636",
+ "44.82200000000002 0.026000000000003354",
+ "22.528 0.02599999999999625",
+ "49.82449999999999 0.02499999999999858",
+ "21.1335 0.024499999999999744",
+ "21.588 0.021500000000003183",
+ "21.525499999999997 0.02049999999999841",
+ "23.3945 0.018499999999999517",
+ "47.057500000000005 0.018000000000000682",
+ "22.570999999999998 0.01799999999999713",
+ "24.458 0.017499999999998295",
+ "22.4625 0.017499999999998295",
+ "141.04699999999988 0.016999999999995907",
+ "22.416999999999998 0.016500000000000625",
+ "45.44850000000002 0.015999999999998238",
+ "21.619500000000002 0.015499999999999403",
+ "109.41799999999989 0.015499999999988745",
+ "22.486 0.014500000000001734",
+ "50.53499999999999 0.013999999999995794",
+ "52.338999999999984 0.012000000000000455",
+ "45.489500000000014 0.012000000000000455",
+ "45.470500000000015 0.00999999999999801",
+ "50.007 0.008500000000005059",
+ "23.9205 0.008499999999997954",
+ "10.43 0.006499999999999062",
+ "13.915999999999999 0.005499999999999616",
+ "7.3919999999999995 0.005499999999999616",
+ "3.8129999999999997 0.005499999999999616",
+ "121.0314999999999 0.00549999999999784",
+ "78.23649999999994 0.0005000000000023874",
+ "e",
+ "# start: 2.4204999999999997",
+ "# end: 141.1669999999999",
+ "# objects: 1547"
+]
diff --git a/deps/v8/test/mjsunit/tools/profviz.js b/deps/v8/test/mjsunit/tools/profviz.js
new file mode 100644
index 0000000000..3a14f4e6be
--- /dev/null
+++ b/deps/v8/test/mjsunit/tools/profviz.js
@@ -0,0 +1,83 @@
+// Copyright 2009 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Load implementations from <project root>/tools.
+// Files: tools/csvparser.js tools/splaytree.js tools/codemap.js
+// Files: tools/consarray.js tools/profile.js tools/profile_view.js
+// Files: tools/logreader.js tools/tickprocessor.js
+// Files: tools/profviz/composer.js
+// Env: TEST_FILE_NAME
+
+assertEquals('string', typeof TEST_FILE_NAME);
+var path_length = TEST_FILE_NAME.lastIndexOf('/');
+if (path_length == -1) {
+ path_length = TEST_FILE_NAME.lastIndexOf('\\');
+}
+assertTrue(path_length != -1);
+
+var path = TEST_FILE_NAME.substr(0, path_length + 1);
+var input_file = path + "profviz-test.log";
+var reference_file = path + "profviz-test.default";
+
+var content_lines = read(input_file).split("\n");
+var line_cursor = 0;
+var output_lines = [];
+
+function input() {
+ return content_lines[line_cursor++];
+}
+
+function output(line) {
+ output_lines.push(line);
+}
+
+function set_range(start, end) {
+ range_start = start;
+ range_end = end;
+}
+
+var distortion = 4500 / 1000000;
+var resx = 1600;
+var resy = 600;
+
+var psc = new PlotScriptComposer(resx, resy);
+psc.collectData(input, distortion);
+psc.findPlotRange(undefined, undefined, set_range);
+var objects = psc.assembleOutput(output);
+
+output("# start: " + range_start);
+output("# end: " + range_end);
+output("# objects: " + objects);
+
+var create_baseline = false;
+
+if (create_baseline) {
+ print(JSON.stringify(output_lines, null, 2));
+} else {
+ assertArrayEquals(output_lines,
+ JSON.parse(read(reference_file)));
+}
diff --git a/deps/v8/test/mjsunit/transition-elements-kind.js b/deps/v8/test/mjsunit/transition-elements-kind.js
new file mode 100644
index 0000000000..ba05c950d9
--- /dev/null
+++ b/deps/v8/test/mjsunit/transition-elements-kind.js
@@ -0,0 +1,48 @@
+// Copyright 2013 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --allow-natives-syntax --compiled-transitions
+// Flags: --track-allocation-sites
+
+// Allocation site for empty double arrays.
+function foo() {
+ return new Array();
+}
+var a = foo();
+a[0] = 1.1;
+
+// Emit a TransitionElementsKindStub which transitions from double to object.
+function store(a,x) {
+ a[0] = x;
+}
+store([1.1], 'a');
+store([1.1], 1.1);
+%OptimizeFunctionOnNextCall(store);
+
+// Use the TransitionElementsKindStub to transition from double to object.
+var b = foo();
+store(b, 'a');
diff --git a/deps/v8/test/mjsunit/unbox-double-arrays.js b/deps/v8/test/mjsunit/unbox-double-arrays.js
index e773f4b0f7..4e8718eb3f 100644
--- a/deps/v8/test/mjsunit/unbox-double-arrays.js
+++ b/deps/v8/test/mjsunit/unbox-double-arrays.js
@@ -28,7 +28,6 @@
// Test dictionary -> double elements -> dictionary elements round trip
// Flags: --allow-natives-syntax --unbox-double-arrays --expose-gc
-// Flags: --noparallel-recompilation
var large_array_size = 100000;
var approx_dict_to_elements_threshold = 70000;
@@ -346,7 +345,7 @@ function testOneArrayType(allocator) {
-Infinity,
expected_array_value(7));
- assertTrue(%GetOptimizationStatus(test_various_stores) != 2);
+ assertOptimized(test_various_stores);
// Make sure that we haven't converted from fast double.
assertTrue(%HasFastDoubleElements(large_array));