diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2010-12-13 22:03:33 -0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-12-13 22:12:14 -0800 |
commit | 1d78159e8f8ad7f41167a38ebfa973ed055bc7b6 (patch) | |
tree | bb05356b1eee2278149dfb3d52c34272ef30f149 /deps/v8/test | |
parent | 3d0627dc6aae4937c7542243535cade959ced2ee (diff) | |
download | node-new-1d78159e8f8ad7f41167a38ebfa973ed055bc7b6.tar.gz |
Upgrade V8 to 3.0.1
Diffstat (limited to 'deps/v8/test')
-rw-r--r-- | deps/v8/test/cctest/cctest.status | 3 | ||||
-rw-r--r-- | deps/v8/test/cctest/test-heap-profiler.cc | 47 | ||||
-rw-r--r-- | deps/v8/test/cctest/test-log-utils.cc | 170 | ||||
-rwxr-xr-x | deps/v8/test/cctest/test-parsing.cc | 303 | ||||
-rw-r--r-- | deps/v8/test/cctest/test-profile-generator.cc | 11 | ||||
-rw-r--r-- | deps/v8/test/cctest/test-regexp.cc | 3 | ||||
-rw-r--r-- | deps/v8/test/mjsunit/mjsunit.status | 5 | ||||
-rw-r--r-- | deps/v8/test/mjsunit/object-define-property.js | 32 | ||||
-rw-r--r-- | deps/v8/test/mjsunit/regexp.js | 92 | ||||
-rw-r--r-- | deps/v8/test/mjsunit/regress/regress-962.js | 53 | ||||
-rw-r--r-- | deps/v8/test/mjsunit/regress/regress-969.js | 127 | ||||
-rw-r--r-- | deps/v8/test/mjsunit/third_party/regexp-pcre.js | 24 | ||||
-rw-r--r-- | deps/v8/test/mjsunit/tools/logreader.js | 82 | ||||
-rw-r--r-- | deps/v8/test/mozilla/mozilla.status | 7 | ||||
-rw-r--r-- | deps/v8/test/sputnik/README | 2 |
15 files changed, 635 insertions, 326 deletions
diff --git a/deps/v8/test/cctest/cctest.status b/deps/v8/test/cctest/cctest.status index 4f1bcdc8ad..d7f02b95d8 100644 --- a/deps/v8/test/cctest/cctest.status +++ b/deps/v8/test/cctest/cctest.status @@ -42,9 +42,6 @@ test-api/ApplyInterruption: PASS || TIMEOUT # when snapshot is on, so I am marking it PASS || FAIL test-heap-profiler/HeapSnapshotsDiff: PASS || FAIL -# BUG(3260336): Flaky test. May be timing related. -test-profile-generator/RecordStackTraceAtStartProfiling: PASS || FAIL - # These tests always fail. They are here to test test.py. If # they don't fail then test.py has failed. test-serialize/TestThatAlwaysFails: FAIL diff --git a/deps/v8/test/cctest/test-heap-profiler.cc b/deps/v8/test/cctest/test-heap-profiler.cc index ac4afb2517..ad242fe79c 100644 --- a/deps/v8/test/cctest/test-heap-profiler.cc +++ b/deps/v8/test/cctest/test-heap-profiler.cc @@ -1211,4 +1211,51 @@ TEST(HeapSnapshotGetNodeById) { CHECK_EQ(NULL, snapshot->GetNodeById(0x1000000UL)); } + +namespace { + +class TestActivityControl : public v8::ActivityControl { + public: + explicit TestActivityControl(int abort_count) + : done_(0), total_(0), abort_count_(abort_count) {} + ControlOption ReportProgressValue(int done, int total) { + done_ = done; + total_ = total; + return --abort_count_ != 0 ? kContinue : kAbort; + } + int done() { return done_; } + int total() { return total_; } + + private: + int done_; + int total_; + int abort_count_; +}; +} + +TEST(TakeHeapSnapshotAborting) { + v8::HandleScope scope; + LocalContext env; + + const int snapshots_count = v8::HeapProfiler::GetSnapshotsCount(); + TestActivityControl aborting_control(3); + const v8::HeapSnapshot* no_snapshot = + v8::HeapProfiler::TakeSnapshot(v8::String::New("abort"), + v8::HeapSnapshot::kFull, + &aborting_control); + CHECK_EQ(NULL, no_snapshot); + CHECK_EQ(snapshots_count, v8::HeapProfiler::GetSnapshotsCount()); + CHECK_GT(aborting_control.total(), aborting_control.done()); + + TestActivityControl control(-1); // Don't abort. + const v8::HeapSnapshot* snapshot = + v8::HeapProfiler::TakeSnapshot(v8::String::New("full"), + v8::HeapSnapshot::kFull, + &control); + CHECK_NE(NULL, snapshot); + CHECK_EQ(snapshots_count + 1, v8::HeapProfiler::GetSnapshotsCount()); + CHECK_EQ(control.total(), control.done()); + CHECK_GT(control.total(), 0); +} + #endif // ENABLE_LOGGING_AND_PROFILING diff --git a/deps/v8/test/cctest/test-log-utils.cc b/deps/v8/test/cctest/test-log-utils.cc index c99d770d42..861be12ce8 100644 --- a/deps/v8/test/cctest/test-log-utils.cc +++ b/deps/v8/test/cctest/test-log-utils.cc @@ -12,7 +12,6 @@ using v8::internal::CStrVector; using v8::internal::EmbeddedVector; using v8::internal::LogDynamicBuffer; -using v8::internal::LogRecordCompressor; using v8::internal::MutableCStrVector; using v8::internal::ScopedVector; using v8::internal::Vector; @@ -138,173 +137,4 @@ TEST(DynaBufSealing) { CHECK_EQ(0, ReadData(&dynabuf, 100 + seal_size, &buf)); } - -TEST(CompressorStore) { - LogRecordCompressor comp(2); - const Vector<const char> empty = CStrVector(""); - CHECK(comp.Store(empty)); - CHECK(!comp.Store(empty)); - CHECK(!comp.Store(empty)); - const Vector<const char> aaa = CStrVector("aaa"); - CHECK(comp.Store(aaa)); - CHECK(!comp.Store(aaa)); - CHECK(!comp.Store(aaa)); - CHECK(comp.Store(empty)); - CHECK(!comp.Store(empty)); - CHECK(!comp.Store(empty)); -} - - -void CheckCompression(LogRecordCompressor* comp, - const Vector<const char>& after) { - EmbeddedVector<char, 100> result; - CHECK(comp->RetrievePreviousCompressed(&result)); - CHECK_EQ(after, result); -} - - -void CheckCompression(LogRecordCompressor* comp, - const char* after) { - CheckCompression(comp, CStrVector(after)); -} - - -TEST(CompressorNonCompressed) { - LogRecordCompressor comp(0); - CHECK(!comp.RetrievePreviousCompressed(NULL)); - const Vector<const char> empty = CStrVector(""); - CHECK(comp.Store(empty)); - CHECK(!comp.RetrievePreviousCompressed(NULL)); - const Vector<const char> a_x_20 = CStrVector("aaaaaaaaaaaaaaaaaaaa"); - CHECK(comp.Store(a_x_20)); - CheckCompression(&comp, empty); - CheckCompression(&comp, empty); - CHECK(comp.Store(empty)); - CheckCompression(&comp, a_x_20); - CheckCompression(&comp, a_x_20); -} - - -TEST(CompressorSingleLine) { - LogRecordCompressor comp(1); - const Vector<const char> string_1 = CStrVector("eee,ddd,ccc,bbb,aaa"); - CHECK(comp.Store(string_1)); - const Vector<const char> string_2 = CStrVector("fff,ddd,ccc,bbb,aaa"); - CHECK(comp.Store(string_2)); - // string_1 hasn't been compressed. - CheckCompression(&comp, string_1); - CheckCompression(&comp, string_1); - const Vector<const char> string_3 = CStrVector("hhh,ggg,ccc,bbb,aaa"); - CHECK(comp.Store(string_3)); - // string_2 compressed using string_1. - CheckCompression(&comp, "fff#1:3"); - CheckCompression(&comp, "fff#1:3"); - CHECK(!comp.Store(string_3)); - // Expecting no changes. - CheckCompression(&comp, "fff#1:3"); - CHECK(!comp.Store(string_3)); - // Expecting no changes. - CheckCompression(&comp, "fff#1:3"); - const Vector<const char> string_4 = CStrVector("iii,hhh,ggg,ccc,bbb,aaa"); - CHECK(comp.Store(string_4)); - // string_3 compressed using string_2. - CheckCompression(&comp, "hhh,ggg#1:7"); - const Vector<const char> string_5 = CStrVector("nnn,mmm,lll,kkk,jjj"); - CHECK(comp.Store(string_5)); - // string_4 compressed using string_3. - CheckCompression(&comp, "iii,#1"); - const Vector<const char> string_6 = CStrVector("nnn,mmmmmm,lll,kkk,jjj"); - CHECK(comp.Store(string_6)); - // string_5 hasn't been compressed. - CheckCompression(&comp, string_5); - CHECK(comp.Store(string_5)); - // string_6 compressed using string_5. - CheckCompression(&comp, "nnn,mmm#1:4"); - const Vector<const char> string_7 = CStrVector("nnnnnn,mmm,lll,kkk,jjj"); - CHECK(comp.Store(string_7)); - // string_5 compressed using string_6. - CheckCompression(&comp, "nnn,#1:7"); - const Vector<const char> string_8 = CStrVector("xxn,mmm,lll,kkk,jjj"); - CHECK(comp.Store(string_8)); - // string_7 compressed using string_5. - CheckCompression(&comp, "nnn#1"); - const Vector<const char> string_9 = - CStrVector("aaaaaaaaaaaaa,bbbbbbbbbbbbbbbbb"); - CHECK(comp.Store(string_9)); - // string_8 compressed using string_7. - CheckCompression(&comp, "xx#1:5"); - const Vector<const char> string_10 = - CStrVector("aaaaaaaaaaaaa,cccccccbbbbbbbbbb"); - CHECK(comp.Store(string_10)); - // string_9 hasn't been compressed. - CheckCompression(&comp, string_9); - CHECK(comp.Store(string_1)); - // string_10 compressed using string_9. - CheckCompression(&comp, "aaaaaaaaaaaaa,ccccccc#1:21"); -} - - - -TEST(CompressorMultiLines) { - const int kWindowSize = 3; - LogRecordCompressor comp(kWindowSize); - const Vector<const char> string_1 = CStrVector("eee,ddd,ccc,bbb,aaa"); - CHECK(comp.Store(string_1)); - const Vector<const char> string_2 = CStrVector("iii,hhh,ggg,fff,aaa"); - CHECK(comp.Store(string_2)); - const Vector<const char> string_3 = CStrVector("mmm,lll,kkk,jjj,aaa"); - CHECK(comp.Store(string_3)); - const Vector<const char> string_4 = CStrVector("nnn,hhh,ggg,fff,aaa"); - CHECK(comp.Store(string_4)); - const Vector<const char> string_5 = CStrVector("ooo,lll,kkk,jjj,aaa"); - CHECK(comp.Store(string_5)); - // string_4 compressed using string_2. - CheckCompression(&comp, "nnn#2:3"); - CHECK(comp.Store(string_1)); - // string_5 compressed using string_3. - CheckCompression(&comp, "ooo#2:3"); - CHECK(comp.Store(string_4)); - // string_1 is out of buffer by now, so it shouldn't be compressed. - CHECK_GE(3, kWindowSize); - CheckCompression(&comp, string_1); - CHECK(comp.Store(string_2)); - // string_4 compressed using itself. - CheckCompression(&comp, "#3"); -} - - -TEST(CompressorBestSelection) { - LogRecordCompressor comp(3); - const Vector<const char> string_1 = CStrVector("eee,ddd,ccc,bbb,aaa"); - CHECK(comp.Store(string_1)); - const Vector<const char> string_2 = CStrVector("ddd,ccc,bbb,aaa"); - CHECK(comp.Store(string_2)); - const Vector<const char> string_3 = CStrVector("fff,eee,ddd,ccc,bbb,aaa"); - CHECK(comp.Store(string_3)); - // string_2 compressed using string_1. - CheckCompression(&comp, "#1:4"); - const Vector<const char> string_4 = CStrVector("nnn,hhh,ggg,fff,aaa"); - CHECK(comp.Store(string_4)); - // Compressing string_3 using string_1 gives a better compression than - // using string_2. - CheckCompression(&comp, "fff,#2"); -} - - -TEST(CompressorCompressibility) { - LogRecordCompressor comp(2); - const Vector<const char> string_1 = CStrVector("eee,ddd,ccc,bbb,aaa"); - CHECK(comp.Store(string_1)); - const Vector<const char> string_2 = CStrVector("ccc,bbb,aaa"); - CHECK(comp.Store(string_2)); - const Vector<const char> string_3 = CStrVector("aaa"); - CHECK(comp.Store(string_3)); - // string_2 compressed using string_1. - CheckCompression(&comp, "#1:8"); - const Vector<const char> string_4 = CStrVector("xxx"); - CHECK(comp.Store(string_4)); - // string_3 can't be compressed using string_2 --- too short. - CheckCompression(&comp, string_3); -} - #endif // ENABLE_LOGGING_AND_PROFILING diff --git a/deps/v8/test/cctest/test-parsing.cc b/deps/v8/test/cctest/test-parsing.cc index badbab5eeb..e642d1b622 100755 --- a/deps/v8/test/cctest/test-parsing.cc +++ b/deps/v8/test/cctest/test-parsing.cc @@ -260,10 +260,12 @@ TEST(StandAlonePreParser) { uintptr_t stack_limit = i::StackGuard::real_climit(); for (int i = 0; programs[i]; i++) { const char* program = programs[i]; - unibrow::Utf8InputBuffer<256> stream(program, strlen(program)); + i::Utf8ToUC16CharacterStream stream( + reinterpret_cast<const i::byte*>(program), + static_cast<unsigned>(strlen(program))); i::CompleteParserRecorder log; i::V8JavaScriptScanner scanner; - scanner.Initialize(i::Handle<i::String>::null(), &stream); + scanner.Initialize(&stream); v8::preparser::PreParser::PreParseResult result = v8::preparser::PreParser::PreParseProgram(&scanner, @@ -289,9 +291,10 @@ TEST(RegressChromium62639) { // and then used the invalid currently scanned literal. This always // failed in debug mode, and sometimes crashed in release mode. - unibrow::Utf8InputBuffer<256> stream(program, strlen(program)); + i::Utf8ToUC16CharacterStream stream(reinterpret_cast<const i::byte*>(program), + static_cast<unsigned>(strlen(program))); i::ScriptDataImpl* data = - i::ParserApi::PreParse(i::Handle<i::String>::null(), &stream, NULL); + i::ParserApi::PreParse(&stream, NULL); CHECK(data->HasError()); delete data; } @@ -310,10 +313,10 @@ TEST(Regress928) { "try { } catch (e) { var foo = function () { /* first */ } }" "var bar = function () { /* second */ }"; - unibrow::Utf8InputBuffer<256> stream(program, strlen(program)); + i::Utf8ToUC16CharacterStream stream(reinterpret_cast<const i::byte*>(program), + static_cast<unsigned>(strlen(program))); i::ScriptDataImpl* data = - i::ParserApi::PartialPreParse(i::Handle<i::String>::null(), - &stream, NULL); + i::ParserApi::PartialPreParse(&stream, NULL); CHECK(!data->HasError()); data->Initialize(); @@ -347,10 +350,12 @@ TEST(PreParseOverflow) { uintptr_t stack_limit = i::StackGuard::real_climit(); - unibrow::Utf8InputBuffer<256> stream(*program, strlen(*program)); + i::Utf8ToUC16CharacterStream stream( + reinterpret_cast<const i::byte*>(*program), + static_cast<unsigned>(kProgramSize)); i::CompleteParserRecorder log; i::V8JavaScriptScanner scanner; - scanner.Initialize(i::Handle<i::String>::null(), &stream); + scanner.Initialize(&stream); v8::preparser::PreParser::PreParseResult result = @@ -360,3 +365,283 @@ TEST(PreParseOverflow) { stack_limit); CHECK_EQ(v8::preparser::PreParser::kPreParseStackOverflow, result); } + + +class TestExternalResource: public v8::String::ExternalStringResource { + public: + explicit TestExternalResource(uint16_t* data, int length) + : data_(data), length_(static_cast<size_t>(length)) { } + + ~TestExternalResource() { } + + const uint16_t* data() const { + return data_; + } + + size_t length() const { + return length_; + } + private: + uint16_t* data_; + size_t length_; +}; + + +#define CHECK_EQU(v1, v2) CHECK_EQ(static_cast<int>(v1), static_cast<int>(v2)) + +void TestCharacterStream(const char* ascii_source, + unsigned length, + unsigned start = 0, + unsigned end = 0) { + if (end == 0) end = length; + unsigned sub_length = end - start; + i::HandleScope test_scope; + i::SmartPointer<i::uc16> uc16_buffer(new i::uc16[length]); + for (unsigned i = 0; i < length; i++) { + uc16_buffer[i] = static_cast<i::uc16>(ascii_source[i]); + } + i::Vector<const char> ascii_vector(ascii_source, static_cast<int>(length)); + i::Handle<i::String> ascii_string( + i::Factory::NewStringFromAscii(ascii_vector)); + TestExternalResource resource(*uc16_buffer, length); + i::Handle<i::String> uc16_string( + i::Factory::NewExternalStringFromTwoByte(&resource)); + + i::ExternalTwoByteStringUC16CharacterStream uc16_stream( + i::Handle<i::ExternalTwoByteString>::cast(uc16_string), start, end); + i::GenericStringUC16CharacterStream string_stream(ascii_string, start, end); + i::Utf8ToUC16CharacterStream utf8_stream( + reinterpret_cast<const i::byte*>(ascii_source), end); + utf8_stream.SeekForward(start); + + unsigned i = start; + while (i < end) { + // Read streams one char at a time + CHECK_EQU(i, uc16_stream.pos()); + CHECK_EQU(i, string_stream.pos()); + CHECK_EQU(i, utf8_stream.pos()); + int32_t c0 = ascii_source[i]; + int32_t c1 = uc16_stream.Advance(); + int32_t c2 = string_stream.Advance(); + int32_t c3 = utf8_stream.Advance(); + i++; + CHECK_EQ(c0, c1); + CHECK_EQ(c0, c2); + CHECK_EQ(c0, c3); + CHECK_EQU(i, uc16_stream.pos()); + CHECK_EQU(i, string_stream.pos()); + CHECK_EQU(i, utf8_stream.pos()); + } + while (i > start + sub_length / 4) { + // Pushback, re-read, pushback again. + int32_t c0 = ascii_source[i - 1]; + CHECK_EQU(i, uc16_stream.pos()); + CHECK_EQU(i, string_stream.pos()); + CHECK_EQU(i, utf8_stream.pos()); + uc16_stream.PushBack(c0); + string_stream.PushBack(c0); + utf8_stream.PushBack(c0); + i--; + CHECK_EQU(i, uc16_stream.pos()); + CHECK_EQU(i, string_stream.pos()); + CHECK_EQU(i, utf8_stream.pos()); + int32_t c1 = uc16_stream.Advance(); + int32_t c2 = string_stream.Advance(); + int32_t c3 = utf8_stream.Advance(); + i++; + CHECK_EQU(i, uc16_stream.pos()); + CHECK_EQU(i, string_stream.pos()); + CHECK_EQU(i, utf8_stream.pos()); + CHECK_EQ(c0, c1); + CHECK_EQ(c0, c2); + CHECK_EQ(c0, c3); + uc16_stream.PushBack(c0); + string_stream.PushBack(c0); + utf8_stream.PushBack(c0); + i--; + CHECK_EQU(i, uc16_stream.pos()); + CHECK_EQU(i, string_stream.pos()); + CHECK_EQU(i, utf8_stream.pos()); + } + unsigned halfway = start + sub_length / 2; + uc16_stream.SeekForward(halfway - i); + string_stream.SeekForward(halfway - i); + utf8_stream.SeekForward(halfway - i); + i = halfway; + CHECK_EQU(i, uc16_stream.pos()); + CHECK_EQU(i, string_stream.pos()); + CHECK_EQU(i, utf8_stream.pos()); + + while (i < end) { + // Read streams one char at a time + CHECK_EQU(i, uc16_stream.pos()); + CHECK_EQU(i, string_stream.pos()); + CHECK_EQU(i, utf8_stream.pos()); + int32_t c0 = ascii_source[i]; + int32_t c1 = uc16_stream.Advance(); + int32_t c2 = string_stream.Advance(); + int32_t c3 = utf8_stream.Advance(); + i++; + CHECK_EQ(c0, c1); + CHECK_EQ(c0, c2); + CHECK_EQ(c0, c3); + CHECK_EQU(i, uc16_stream.pos()); + CHECK_EQU(i, string_stream.pos()); + CHECK_EQU(i, utf8_stream.pos()); + } + + int32_t c1 = uc16_stream.Advance(); + int32_t c2 = string_stream.Advance(); + int32_t c3 = utf8_stream.Advance(); + CHECK_LT(c1, 0); + CHECK_LT(c2, 0); + CHECK_LT(c3, 0); +} + + +TEST(CharacterStreams) { + v8::HandleScope handles; + v8::Persistent<v8::Context> context = v8::Context::New(); + v8::Context::Scope context_scope(context); + + TestCharacterStream("abc\0\n\r\x7f", 7); + static const unsigned kBigStringSize = 4096; + char buffer[kBigStringSize + 1]; + for (unsigned i = 0; i < kBigStringSize; i++) { + buffer[i] = static_cast<char>(i & 0x7f); + } + TestCharacterStream(buffer, kBigStringSize); + + TestCharacterStream(buffer, kBigStringSize, 576, 3298); + + TestCharacterStream("\0", 1); + TestCharacterStream("", 0); +} + + +TEST(Utf8CharacterStream) { + static const unsigned kMaxUC16CharU = unibrow::Utf8::kMaxThreeByteChar; + static const int kMaxUC16Char = static_cast<int>(kMaxUC16CharU); + + static const int kAllUtf8CharsSize = + (unibrow::Utf8::kMaxOneByteChar + 1) + + (unibrow::Utf8::kMaxTwoByteChar - unibrow::Utf8::kMaxOneByteChar) * 2 + + (unibrow::Utf8::kMaxThreeByteChar - unibrow::Utf8::kMaxTwoByteChar) * 3; + static const unsigned kAllUtf8CharsSizeU = + static_cast<unsigned>(kAllUtf8CharsSize); + + char buffer[kAllUtf8CharsSizeU]; + unsigned cursor = 0; + for (int i = 0; i <= kMaxUC16Char; i++) { + cursor += unibrow::Utf8::Encode(buffer + cursor, i); + } + ASSERT(cursor == kAllUtf8CharsSizeU); + + i::Utf8ToUC16CharacterStream stream(reinterpret_cast<const i::byte*>(buffer), + kAllUtf8CharsSizeU); + for (int i = 0; i <= kMaxUC16Char; i++) { + CHECK_EQU(i, stream.pos()); + int32_t c = stream.Advance(); + CHECK_EQ(i, c); + CHECK_EQU(i + 1, stream.pos()); + } + for (int i = kMaxUC16Char; i >= 0; i--) { + CHECK_EQU(i + 1, stream.pos()); + stream.PushBack(i); + CHECK_EQU(i, stream.pos()); + } + int i = 0; + while (stream.pos() < kMaxUC16CharU) { + CHECK_EQU(i, stream.pos()); + unsigned progress = stream.SeekForward(12); + i += progress; + int32_t c = stream.Advance(); + if (i <= kMaxUC16Char) { + CHECK_EQ(i, c); + } else { + CHECK_EQ(-1, c); + } + i += 1; + CHECK_EQU(i, stream.pos()); + } +} + +#undef CHECK_EQU + +void TestStreamScanner(i::UC16CharacterStream* stream, + i::Token::Value* expected_tokens, + int skip_pos = 0, // Zero means not skipping. + int skip_to = 0) { + i::V8JavaScriptScanner scanner; + scanner.Initialize(stream, i::JavaScriptScanner::kAllLiterals); + + int i = 0; + do { + i::Token::Value expected = expected_tokens[i]; + i::Token::Value actual = scanner.Next(); + CHECK_EQ(i::Token::String(expected), i::Token::String(actual)); + if (scanner.location().end_pos == skip_pos) { + scanner.SeekForward(skip_to); + } + i++; + } while (expected_tokens[i] != i::Token::ILLEGAL); +} + +TEST(StreamScanner) { + const char* str1 = "{ foo get for : */ <- \n\n /*foo*/ bib"; + i::Utf8ToUC16CharacterStream stream1(reinterpret_cast<const i::byte*>(str1), + static_cast<unsigned>(strlen(str1))); + i::Token::Value expectations1[] = { + i::Token::LBRACE, + i::Token::IDENTIFIER, + i::Token::IDENTIFIER, + i::Token::FOR, + i::Token::COLON, + i::Token::MUL, + i::Token::DIV, + i::Token::LT, + i::Token::SUB, + i::Token::IDENTIFIER, + i::Token::EOS, + i::Token::ILLEGAL + }; + TestStreamScanner(&stream1, expectations1, 0, 0); + + const char* str2 = "case default const {THIS\nPART\nSKIPPED} do"; + i::Utf8ToUC16CharacterStream stream2(reinterpret_cast<const i::byte*>(str2), + static_cast<unsigned>(strlen(str2))); + i::Token::Value expectations2[] = { + i::Token::CASE, + i::Token::DEFAULT, + i::Token::CONST, + i::Token::LBRACE, + // Skipped part here + i::Token::RBRACE, + i::Token::DO, + i::Token::EOS, + i::Token::ILLEGAL + }; + ASSERT_EQ('{', str2[19]); + ASSERT_EQ('}', str2[37]); + TestStreamScanner(&stream2, expectations2, 20, 37); + + const char* str3 = "{}}}}"; + i::Token::Value expectations3[] = { + i::Token::LBRACE, + i::Token::RBRACE, + i::Token::RBRACE, + i::Token::RBRACE, + i::Token::RBRACE, + i::Token::EOS, + i::Token::ILLEGAL + }; + // Skip zero-four RBRACEs. + for (int i = 0; i <= 4; i++) { + expectations3[6 - i] = i::Token::ILLEGAL; + expectations3[5 - i] = i::Token::EOS; + i::Utf8ToUC16CharacterStream stream3( + reinterpret_cast<const i::byte*>(str3), + static_cast<unsigned>(strlen(str3))); + TestStreamScanner(&stream3, expectations3, 1, 1 + i); + } +} diff --git a/deps/v8/test/cctest/test-profile-generator.cc b/deps/v8/test/cctest/test-profile-generator.cc index a0733ef685..f849d404ae 100644 --- a/deps/v8/test/cctest/test-profile-generator.cc +++ b/deps/v8/test/cctest/test-profile-generator.cc @@ -782,12 +782,16 @@ TEST(RecordStackTraceAtStartProfiling) { CpuProfiler::GetProfile(NULL, 0); const ProfileTree* topDown = profile->top_down(); const ProfileNode* current = topDown->root(); + const_cast<ProfileNode*>(current)->Print(0); // The tree should look like this: // (root) // (anonymous function) // a // b // c + // There can also be: + // startProfiling + // if the sampler managed to get a tick. current = PickChild(current, "(anonymous function)"); CHECK_NE(NULL, const_cast<ProfileNode*>(current)); current = PickChild(current, "a"); @@ -796,7 +800,12 @@ TEST(RecordStackTraceAtStartProfiling) { CHECK_NE(NULL, const_cast<ProfileNode*>(current)); current = PickChild(current, "c"); CHECK_NE(NULL, const_cast<ProfileNode*>(current)); - CHECK_EQ(0, current->children()->length()); + CHECK(current->children()->length() == 0 || + current->children()->length() == 1); + if (current->children()->length() == 1) { + current = PickChild(current, "startProfiling"); + CHECK_EQ(0, current->children()->length()); + } } diff --git a/deps/v8/test/cctest/test-regexp.cc b/deps/v8/test/cctest/test-regexp.cc index 3bf24a8ab1..3e6709aef4 100644 --- a/deps/v8/test/cctest/test-regexp.cc +++ b/deps/v8/test/cctest/test-regexp.cc @@ -173,6 +173,9 @@ TEST(Parser) { CHECK_PARSE_EQ("[a-b-c]", "[a-b - c]"); CHECK_PARSE_EQ("[\\d]", "[0-9]"); CHECK_PARSE_EQ("[x\\dz]", "[x 0-9 z]"); + CHECK_PARSE_EQ("[\\d-z]", "[0-9 - z]"); + CHECK_PARSE_EQ("[\\d-\\d]", "[0-9 - 0-9]"); + CHECK_PARSE_EQ("[z-\\d]", "[z - 0-9]"); CHECK_PARSE_EQ("\\cj\\cJ\\ci\\cI\\ck\\cK", "'\\x0a\\x0a\\x09\\x09\\x0b\\x0b'"); CHECK_PARSE_EQ("\\c!", "'c!'"); diff --git a/deps/v8/test/mjsunit/mjsunit.status b/deps/v8/test/mjsunit/mjsunit.status index 24d9603b6b..75a5a02150 100644 --- a/deps/v8/test/mjsunit/mjsunit.status +++ b/deps/v8/test/mjsunit/mjsunit.status @@ -104,6 +104,11 @@ regress/regress-create-exception: SKIP regress/regress-3218915: SKIP regress/regress-3247124: SKIP +############################################################################## +[ $arch == arm && $crankshaft ] + +# Test that currently fail with crankshaft on ARM. +compiler/simple-osr: FAIL ############################################################################## [ $arch == mips ] diff --git a/deps/v8/test/mjsunit/object-define-property.js b/deps/v8/test/mjsunit/object-define-property.js index b258aa75bf..780c720b51 100644 --- a/deps/v8/test/mjsunit/object-define-property.js +++ b/deps/v8/test/mjsunit/object-define-property.js @@ -866,4 +866,36 @@ assertFalse(desc.writable); assertFalse(desc.enumerable); assertFalse(desc.configurable); +// See issue 968: http://code.google.com/p/v8/issues/detail?id=968 +var o = { x : 42 }; +Object.defineProperty(o, "x", { writable: false }); +assertEquals(42, o.x); +o.x = 37; +assertEquals(42, o.x); + +o = { x : 42 }; +Object.defineProperty(o, "x", {}); +assertEquals(42, o.x); +o.x = 37; +// Writability is preserved. +assertEquals(37, o.x); + +var o = { }; +Object.defineProperty(o, "x", { writable: false }); +assertEquals(undefined, o.x); +o.x = 37; +assertEquals(undefined, o.x); + +o = { get x() { return 87; } }; +Object.defineProperty(o, "x", { writable: false }); +assertEquals(undefined, o.x); +o.x = 37; +assertEquals(undefined, o.x); + +// Ignore inherited properties. +o = { __proto__ : { x : 87 } }; +Object.defineProperty(o, "x", { writable: false }); +assertEquals(undefined, o.x); +o.x = 37; +assertEquals(undefined, o.x); diff --git a/deps/v8/test/mjsunit/regexp.js b/deps/v8/test/mjsunit/regexp.js index 59c3ba8d28..4c1d2e315f 100644 --- a/deps/v8/test/mjsunit/regexp.js +++ b/deps/v8/test/mjsunit/regexp.js @@ -110,6 +110,44 @@ assertFalse(re.test("\\]")); assertFalse(re.test("\x03]")); // I.e., read as \cc +// Test that we handle \s and \S correctly inside some bizarre +// character classes. +re = /[\s-:]/; +assertTrue(re.test('-')); +assertTrue(re.test(':')); +assertTrue(re.test(' ')); +assertTrue(re.test('\t')); +assertTrue(re.test('\n')); +assertFalse(re.test('a')); +assertFalse(re.test('Z')); + +re = /[\S-:]/; +assertTrue(re.test('-')); +assertTrue(re.test(':')); +assertFalse(re.test(' ')); +assertFalse(re.test('\t')); +assertFalse(re.test('\n')); +assertTrue(re.test('a')); +assertTrue(re.test('Z')); + +re = /[^\s-:]/; +assertFalse(re.test('-')); +assertFalse(re.test(':')); +assertFalse(re.test(' ')); +assertFalse(re.test('\t')); +assertFalse(re.test('\n')); +assertTrue(re.test('a')); +assertTrue(re.test('Z')); + +re = /[^\S-:]/; +assertFalse(re.test('-')); +assertFalse(re.test(':')); +assertTrue(re.test(' ')); +assertTrue(re.test('\t')); +assertTrue(re.test('\n')); +assertFalse(re.test('a')); +assertFalse(re.test('Z')); + re = /[\s]/; assertFalse(re.test('-')); assertFalse(re.test(':')); @@ -164,6 +202,17 @@ assertFalse(re.test('\n')); assertFalse(re.test('a')); assertFalse(re.test('Z')); +// First - is treated as range operator, second as literal minus. +// This follows the specification in parsing, but doesn't throw on +// the \s at the beginning of the range. +re = /[\s-0-9]/; +assertTrue(re.test(' ')); +assertTrue(re.test('\xA0')); +assertTrue(re.test('-')); +assertTrue(re.test('0')); +assertTrue(re.test('9')); +assertFalse(re.test('1')); + // Test beginning and end of line assertions with or without the // multiline flag. re = /^\d+/; @@ -610,46 +659,3 @@ assertEquals(["bc"], re.exec("zimzomzumbc")); assertFalse(re.test("c")); assertFalse(re.test("")); - -function testInvalidRange(str) { - try { - RegExp(str).test("x"); - } catch (e) { - return; - } - assetUnreachable("Allowed invalid range in " + str); -} - -function testValidRange(str) { - try { - RegExp(str).test("x"); - } catch (e) { - assertUnreachable("Shouldn't fail parsing: " + str + ", was: " + e); - } -} - -testInvalidRange("[\\d-z]"); -testInvalidRange("[z-\\d]"); -testInvalidRange("[\\d-\\d]"); -testInvalidRange("[z-x]"); // Larger value first. -testInvalidRange("[x-\\d-\\d]"); - -testValidRange("[x-z]"); -testValidRange("[!--\d]"); // Second "-" is end of range. -testValidRange("[\d-]"); -testValidRange("[-\d]"); -testValidRange("[-\d-]"); -testValidRange("[^-\d-]"); -testValidRange("[^-\d-]"); -testValidRange("[0-9-\w]"); - -// Escaped dashes do not count as range operators. -testValidRange("[\\d\\-z]"); -testValidRange("[z\\-\\d]"); -testValidRange("[\\d\\-\\d]"); -testValidRange("[z\\-x]"); -testValidRange("[x\\-\\d\\-\\d]"); - - - - diff --git a/deps/v8/test/mjsunit/regress/regress-962.js b/deps/v8/test/mjsunit/regress/regress-962.js new file mode 100644 index 0000000000..c0a2fdc716 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-962.js @@ -0,0 +1,53 @@ +// Copyright 2010 the V8 project authors. All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * 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. + +function L(scope) { this.s = new Object(); } + +L.prototype.c = function() { return true; } + +function F() { + this.l = [new L, new L]; +} + +F.prototype.foo = function () { + var f, d = arguments, + e, b = this.l, + g; + for (e = 0; e < b.length; e++) { + g = b[e]; + f = g.c.apply(g.s, d); + if (f === false) { + break + } + } + return f +} + + +var ctx = new F; + +for (var i = 0; i < 10000000; i++) ctx.foo(); diff --git a/deps/v8/test/mjsunit/regress/regress-969.js b/deps/v8/test/mjsunit/regress/regress-969.js new file mode 100644 index 0000000000..c2ba0ac9e8 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-969.js @@ -0,0 +1,127 @@ +// Copyright 2010 the V8 project authors. All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * 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. + +// Regression test for bugs when deoptimizing after assignments in effect +// contexts. + +// Bug 989 is that there was an extra value on the expression stack when +// deoptimizing after an assignment in effect context (the value of the +// assignment was lingering). This is hard to observe in the unoptimized +// code. +// +// This test uses comma expressions to put assignments in effect contexts, +// references to deleted global variables to force deoptimization, and +// function calls to observe an extra value. + +function first(x, y) { return x; } +var y = 0; +var o = {}; +o.x = 0; +o[0] = 0; + +// Assignment to global variable. +x0 = 0; +function test0() { return first((y = 1, typeof x0), 2); } +// Call the function once to compile it. +assertEquals('number', test0()); +// Delete to force deoptimization on the next call. +delete x0; +assertEquals('undefined', test0()); + +// Compound assignment to global variable. +x1 = 0; +function test1() { return first((y += 1, typeof x1), 2); } +assertEquals('number', test1(), 'test1 before'); +delete x1; +assertEquals('undefined', test1(), 'test1 after'); + +// Pre and post-increment of global variable. +x2 = 0; +function test2() { return first((++y, typeof x2), 2); } +assertEquals('number', test2(), 'test2 before'); +delete x2; +assertEquals('undefined', test2(), 'test2 after'); + +x3 = 0; +function test3() { return first((y++, typeof x3), 2); } +assertEquals('number', test3(), 'test3 before'); +delete x3; +assertEquals('undefined', test3(), 'test3 after'); + + +// Assignment, compound assignment, and pre and post-increment of named +// properties. +x4 = 0; +function test4() { return first((o.x = 1, typeof x4), 2); } +assertEquals('number', test4()); +delete x4; +assertEquals('undefined', test4()); + +x5 = 0; +function test5() { return first((o.x += 1, typeof x5), 2); } +assertEquals('number', test5()); +delete x5; +assertEquals('undefined', test5()); + +x6 = 0; +function test6() { return first((++o.x, typeof x6), 2); } +assertEquals('number', test6()); +delete x6; +assertEquals('undefined', test6()); + +x7 = 0; +function test7() { return first((o.x++, typeof x7), 2); } +assertEquals('number', test7()); +delete x7; +assertEquals('undefined', test7()); + + +// Assignment, compound assignment, and pre and post-increment of indexed +// properties. +x8 = 0; +function test8(index) { return first((o[index] = 1, typeof x8), 2); } +assertEquals('number', test8()); +delete x8; +assertEquals('undefined', test8()); + +x9 = 0; +function test9(index) { return first((o[index] += 1, typeof x9), 2); } +assertEquals('number', test9()); +delete x9; +assertEquals('undefined', test9()); + +x10 = 0; +function test10(index) { return first((++o[index], typeof x10), 2); } +assertEquals('number', test10()); +delete x10; +assertEquals('undefined', test10()); + +x11 = 0; +function test11(index) { return first((o[index]++, typeof x11), 2); } +assertEquals('number', test11()); +delete x11; +assertEquals('undefined', test11()); diff --git a/deps/v8/test/mjsunit/third_party/regexp-pcre.js b/deps/v8/test/mjsunit/third_party/regexp-pcre.js index d9fa976855..dcb1b320fd 100644 --- a/deps/v8/test/mjsunit/third_party/regexp-pcre.js +++ b/deps/v8/test/mjsunit/third_party/regexp-pcre.js @@ -962,7 +962,7 @@ res[882] = /[az-]+/; res[883] = /[a\-z]+/; res[884] = /[a-z]+/; res[885] = /[\d-]+/; -// res[886] - Disabled after making [\d-z] invalid to be compatible with JSC. +res[886] = /[\d-z]+/; res[887] = /\x5c/; res[888] = /\x20Z/; res[889] = /ab{3cd/; @@ -1346,7 +1346,7 @@ res[1266] = /((Z)+|A)*/; res[1267] = /(Z()|A)*/; res[1268] = /(Z(())|A)*/; res[1269] = /a*/g; -// res[1270] disabled after making /^[\d-a]/ invalid to be compatible with JSC. +res[1270] = /^[\d-a]/; res[1271] = /[[:space:]]+/; res[1272] = /[[:blank:]]+/; res[1273] = /[\s]+/; @@ -2530,7 +2530,7 @@ assertEquals(null, res[431].exec("a\x0db ", 882)); assertEquals(null, res[431].exec("a\x85b", 883)); assertThrows("var re = /(?-+a)/;", 884); assertEquals(null, res[443].exec("aaaa", 885)); -// assertEquals(null, res[443].exec("bacxxx", 886)); +assertEquals(null, res[443].exec("bacxxx", 886)); assertEquals(null, res[443].exec("bbaccxxx ", 887)); assertEquals(null, res[443].exec("bbbacccxx", 888)); assertEquals(null, res[443].exec("aaaa", 889)); @@ -4391,10 +4391,9 @@ assertEquals("abcdxyz", res[884].exec("abcdxyz"), 2743); assertEquals("12-34", res[885].exec("12-34"), 2744); assertEquals(null, res[885].exec("*** Failers", 2745)); assertEquals(null, res[885].exec("aaa", 2746)); -// Disabled. To be compatible with JSC, the regexp is no longer valid. -// assertEquals("12-34z", res[886].exec("12-34z"), 2747); -// assertEquals(null, res[886].exec("*** Failers", 2748)); -// assertEquals(null, res[886].exec("aaa", 2749)); +assertEquals("12-34z", res[886].exec("12-34z"), 2747); +assertEquals(null, res[886].exec("*** Failers", 2748)); +assertEquals(null, res[886].exec("aaa", 2749)); assertEquals("\\", res[887].exec("\\\\"), 2750); assertEquals(" Z", res[888].exec("the Zoo"), 2751); assertEquals(null, res[888].exec("*** Failers", 2752)); @@ -5356,12 +5355,11 @@ assertEquals("", res[1269].exec("-things"), 3707); assertEquals("", res[1269].exec("0digit"), 3708); assertEquals("", res[1269].exec("*** Failers"), 3709); assertEquals("", res[1269].exec("bcdef "), 3710); -// Disabled. To be compatible with JSC, the RegExp is no longer valid. -// assertEquals("a", res[1270].exec("abcde"), 3711); -// assertEquals("-", res[1270].exec("-things"), 3712); -// assertEquals("0", res[1270].exec("0digit"), 3713); -// assertEquals(null, res[1270].exec("*** Failers", 3714)); -// assertEquals(null, res[1270].exec("bcdef ", 3715)); +assertEquals("a", res[1270].exec("abcde"), 3711); +assertEquals("-", res[1270].exec("-things"), 3712); +assertEquals("0", res[1270].exec("0digit"), 3713); +assertEquals(null, res[1270].exec("*** Failers", 3714)); +assertEquals(null, res[1270].exec("bcdef ", 3715)); assertEquals(null, res[1271].exec("> \x09\n\x0c\x0d\x0b<", 3716)); assertEquals(null, res[1271].exec(" ", 3717)); assertEquals(null, res[1272].exec("> \x09\n\x0c\x0d\x0b<", 3718)); diff --git a/deps/v8/test/mjsunit/tools/logreader.js b/deps/v8/test/mjsunit/tools/logreader.js deleted file mode 100644 index 485990eaa1..0000000000 --- a/deps/v8/test/mjsunit/tools/logreader.js +++ /dev/null @@ -1,82 +0,0 @@ -// 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 CSV Parser and Log Reader implementations from <project root>/tools. -// Files: tools/csvparser.js tools/logreader.js - - -(function testAddressParser() { - var reader = new devtools.profiler.LogReader({}); - var parser = reader.createAddressParser('test'); - - // Test that 0x values are parsed, and prevAddresses_ are untouched. - assertFalse('test' in reader.prevAddresses_); - assertEquals(0, parser('0x0')); - assertFalse('test' in reader.prevAddresses_); - assertEquals(0x100, parser('0x100')); - assertFalse('test' in reader.prevAddresses_); - assertEquals(0xffffffff, parser('0xffffffff')); - assertFalse('test' in reader.prevAddresses_); - - // Test that values that has no '+' or '-' prefix are parsed - // and saved to prevAddresses_. - assertEquals(0, parser('0')); - assertEquals(0, reader.prevAddresses_.test); - assertEquals(0x100, parser('100')); - assertEquals(0x100, reader.prevAddresses_.test); - assertEquals(0xffffffff, parser('ffffffff')); - assertEquals(0xffffffff, reader.prevAddresses_.test); - - // Test that values prefixed with '+' or '-' are treated as deltas, - // and prevAddresses_ is updated. - // Set base value. - assertEquals(0x100, parser('100')); - assertEquals(0x100, reader.prevAddresses_.test); - assertEquals(0x200, parser('+100')); - assertEquals(0x200, reader.prevAddresses_.test); - assertEquals(0x100, parser('-100')); - assertEquals(0x100, reader.prevAddresses_.test); -})(); - - -(function testAddressParser() { - var reader = new devtools.profiler.LogReader({}); - - assertEquals([0x10000000, 0x10001000, 0xffff000, 0x10000000], - reader.processStack(0x10000000, 0, ['overflow', - '+1000', '-2000', '+1000'])); -})(); - - -(function testExpandBackRef() { - var reader = new devtools.profiler.LogReader({}); - - assertEquals('aaaaaaaa', reader.expandBackRef_('aaaaaaaa')); - assertEquals('aaaaaaaa', reader.expandBackRef_('#1')); - assertEquals('bbbbaaaa', reader.expandBackRef_('bbbb#2:4')); - assertEquals('"#1:1"', reader.expandBackRef_('"#1:1"')); -})(); diff --git a/deps/v8/test/mozilla/mozilla.status b/deps/v8/test/mozilla/mozilla.status index b1e9ba7d4d..320efe7394 100644 --- a/deps/v8/test/mozilla/mozilla.status +++ b/deps/v8/test/mozilla/mozilla.status @@ -53,6 +53,9 @@ def FAIL_OK = FAIL, OKAY # time to do so. js1_5/Regress/regress-271716-n: SKIP +# BUG(960): This test has an insane amount of output when it times out, +# messing up ability to see other failures on the waterfall. +js1_5/extensions/regress-342960: SKIP # This test uses a unitialized variable. A Bug has been filed: # https://bugzilla.mozilla.org/show_bug.cgi?id=575575 @@ -289,10 +292,6 @@ js1_2/regexp/RegExp_multiline_as_array: FAIL_OK js1_2/regexp/beginLine: FAIL_OK js1_2/regexp/endLine: FAIL_OK -# To be compatible with JSC, we no longer accept [\d-x], [x-\d] or -# [\d-\d] as valid ranges. -ecma_3/RegExp/regress-375715-02: FAIL -js1_5/extensions/regress-351463-01: FAIL # To be compatible with safari typeof a regexp yields 'function'; # in firefox it yields 'object'. diff --git a/deps/v8/test/sputnik/README b/deps/v8/test/sputnik/README index 3d39a67e43..94c689bd28 100644 --- a/deps/v8/test/sputnik/README +++ b/deps/v8/test/sputnik/README @@ -1,6 +1,6 @@ To run the sputniktests you must check out the test suite from googlecode.com. The test expectations are currently relative to version 28. To get the tests run the following command within -v8/tests/sputnik/ +v8/test/sputnik/ svn co http://sputniktests.googlecode.com/svn/trunk/ -r28 sputniktests |