diff options
author | Chris Dickinson <christopher.s.dickinson@gmail.com> | 2015-04-24 17:19:24 -0700 |
---|---|---|
committer | Chris Dickinson <christopher.s.dickinson@gmail.com> | 2015-04-28 14:38:32 -0700 |
commit | 01652c7709c7f5019cef1df9cdc859943db6e203 (patch) | |
tree | 019f6fd9dbf33729851f1e79b338163f383bd782 /deps/v8/test | |
parent | 01e6632d701363034f52c0c04e9106b37a58086c (diff) | |
download | node-new-01652c7709c7f5019cef1df9cdc859943db6e203.tar.gz |
deps: upgrade v8 to 4.2.77.18
This commit applies a secondary change in order to make `make test`
pass cleanly, specifically re-disabling post-mortem debugging in
common.gypi.
PR-URL: https://github.com/iojs/io.js/pull/1506
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'deps/v8/test')
3 files changed, 87 insertions, 70 deletions
diff --git a/deps/v8/test/cctest/test-api.cc b/deps/v8/test/cctest/test-api.cc index d963614a14..afb70ffeee 100644 --- a/deps/v8/test/cctest/test-api.cc +++ b/deps/v8/test/cctest/test-api.cc @@ -18883,38 +18883,6 @@ void CallCompletedCallbackException() { } -TEST(SealHandleScope) { - v8::Isolate* isolate = CcTest::isolate(); - v8::HandleScope handle_scope(isolate); - LocalContext env; - - v8::SealHandleScope seal(isolate); - - // Should fail - v8::Local<v8::Object> obj = v8::Object::New(isolate); - - USE(obj); -} - - -TEST(SealHandleScopeNested) { - v8::Isolate* isolate = CcTest::isolate(); - v8::HandleScope handle_scope(isolate); - LocalContext env; - - v8::SealHandleScope seal(isolate); - - { - v8::HandleScope handle_scope(isolate); - - // Should work - v8::Local<v8::Object> obj = v8::Object::New(isolate); - - USE(obj); - } -} - - TEST(CallCompletedCallbackOneException) { LocalContext env; v8::HandleScope scope(env->GetIsolate()); @@ -21978,3 +21946,35 @@ TEST(NewStringRangeError) { } free(buffer); } + + +TEST(SealHandleScope) { + v8::Isolate* isolate = CcTest::isolate(); + v8::HandleScope handle_scope(isolate); + LocalContext env; + + v8::SealHandleScope seal(isolate); + + // Should fail + v8::Local<v8::Object> obj = v8::Object::New(isolate); + + USE(obj); +} + + +TEST(SealHandleScopeNested) { + v8::Isolate* isolate = CcTest::isolate(); + v8::HandleScope handle_scope(isolate); + LocalContext env; + + v8::SealHandleScope seal(isolate); + + { + v8::HandleScope handle_scope(isolate); + + // Should work + v8::Local<v8::Object> obj = v8::Object::New(isolate); + + USE(obj); + } +} diff --git a/deps/v8/test/mjsunit/regress/regress-indirect-push-unchecked.js b/deps/v8/test/mjsunit/regress/regress-indirect-push-unchecked.js new file mode 100644 index 0000000000..dca7e96d4e --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-indirect-push-unchecked.js @@ -0,0 +1,20 @@ +// Copyright 2015 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Flags: --allow-natives-syntax + +var a = [1.5]; + +function p() { + Array.prototype.push.call(a, 1.7); +} + +p(); +p(); +p(); +%OptimizeFunctionOnNextCall(p); +p(); +a.push({}); +p(); +assertEquals(1.7, a[a.length - 1]); diff --git a/deps/v8/test/unittests/compiler/x64/instruction-selector-x64-unittest.cc b/deps/v8/test/unittests/compiler/x64/instruction-selector-x64-unittest.cc index e524764f82..1f374c0f85 100644 --- a/deps/v8/test/unittests/compiler/x64/instruction-selector-x64-unittest.cc +++ b/deps/v8/test/unittests/compiler/x64/instruction-selector-x64-unittest.cc @@ -63,6 +63,15 @@ TEST_F(InstructionSelectorTest, TruncateFloat64ToFloat32WithParameter) { } +TEST_F(InstructionSelectorTest, TruncateInt64ToInt32WithParameter) { + StreamBuilder m(this, kMachInt32, kMachInt64); + m.Return(m.TruncateInt64ToInt32(m.Parameter(0))); + Stream s = m.Build(); + ASSERT_EQ(1U, s.size()); + EXPECT_EQ(kX64Movl, s[0]->arch_opcode()); +} + + // ----------------------------------------------------------------------------- // Loads and stores @@ -197,49 +206,37 @@ INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, // TruncateInt64ToInt32. -TEST_F(InstructionSelectorTest, TruncateInt64ToInt32WithParameter) { +TEST_F(InstructionSelectorTest, TruncateInt64ToInt32WithWord64Sar) { StreamBuilder m(this, kMachInt32, kMachInt64); - m.Return(m.TruncateInt64ToInt32(m.Parameter(0))); + Node* const p = m.Parameter(0); + Node* const t = m.TruncateInt64ToInt32(m.Word64Sar(p, m.Int64Constant(32))); + m.Return(t); Stream s = m.Build(); - ASSERT_EQ(0U, s.size()); -} - - -TEST_F(InstructionSelectorTest, TruncateInt64ToInt32WithWord64Sar) { - TRACED_FORRANGE(int32_t, k, 1, 32) { - StreamBuilder m(this, kMachInt32, kMachInt64); - Node* const p = m.Parameter(0); - Node* const t = m.TruncateInt64ToInt32(m.Word64Sar(p, m.Int64Constant(k))); - m.Return(t); - Stream s = m.Build(); - ASSERT_EQ(1U, s.size()); - EXPECT_EQ(kX64Shr, s[0]->arch_opcode()); - ASSERT_EQ(2U, s[0]->InputCount()); - EXPECT_EQ(s.ToVreg(p), s.ToVreg(s[0]->InputAt(0))); - EXPECT_EQ(k, s.ToInt32(s[0]->InputAt(1))); - ASSERT_EQ(1U, s[0]->OutputCount()); - EXPECT_TRUE(s.IsSameAsFirst(s[0]->OutputAt(0))); - EXPECT_EQ(s.ToVreg(t), s.ToVreg(s[0]->OutputAt(0))); - } + ASSERT_EQ(1U, s.size()); + EXPECT_EQ(kX64Shr, s[0]->arch_opcode()); + ASSERT_EQ(2U, s[0]->InputCount()); + EXPECT_EQ(s.ToVreg(p), s.ToVreg(s[0]->InputAt(0))); + EXPECT_EQ(32, s.ToInt32(s[0]->InputAt(1))); + ASSERT_EQ(1U, s[0]->OutputCount()); + EXPECT_TRUE(s.IsSameAsFirst(s[0]->OutputAt(0))); + EXPECT_EQ(s.ToVreg(t), s.ToVreg(s[0]->OutputAt(0))); } -TEST_F(InstructionSelectorTest, TruncateInt64ToInt32WithWord64Shl) { - TRACED_FORRANGE(int32_t, k, 1, 31) { - StreamBuilder m(this, kMachInt32, kMachInt64); - Node* const p = m.Parameter(0); - Node* const t = m.TruncateInt64ToInt32(m.Word64Shl(p, m.Int64Constant(k))); - m.Return(t); - Stream s = m.Build(); - ASSERT_EQ(1U, s.size()); - EXPECT_EQ(kX64Shl32, s[0]->arch_opcode()); - ASSERT_EQ(2U, s[0]->InputCount()); - EXPECT_EQ(s.ToVreg(p), s.ToVreg(s[0]->InputAt(0))); - EXPECT_EQ(k, s.ToInt32(s[0]->InputAt(1))); - ASSERT_EQ(1U, s[0]->OutputCount()); - EXPECT_TRUE(s.IsSameAsFirst(s[0]->OutputAt(0))); - EXPECT_EQ(s.ToVreg(t), s.ToVreg(s[0]->OutputAt(0))); - } +TEST_F(InstructionSelectorTest, TruncateInt64ToInt32WithWord64Shr) { + StreamBuilder m(this, kMachInt32, kMachInt64); + Node* const p = m.Parameter(0); + Node* const t = m.TruncateInt64ToInt32(m.Word64Shr(p, m.Int64Constant(32))); + m.Return(t); + Stream s = m.Build(); + ASSERT_EQ(1U, s.size()); + EXPECT_EQ(kX64Shr, s[0]->arch_opcode()); + ASSERT_EQ(2U, s[0]->InputCount()); + EXPECT_EQ(s.ToVreg(p), s.ToVreg(s[0]->InputAt(0))); + EXPECT_EQ(32, s.ToInt32(s[0]->InputAt(1))); + ASSERT_EQ(1U, s[0]->OutputCount()); + EXPECT_TRUE(s.IsSameAsFirst(s[0]->OutputAt(0))); + EXPECT_EQ(s.ToVreg(t), s.ToVreg(s[0]->OutputAt(0))); } |