| Index: test/cctest/test-assembler-x64.cc
|
| diff --git a/test/cctest/test-assembler-x64.cc b/test/cctest/test-assembler-x64.cc
|
| index cc87c4ebf6eb91bbc5f59f8faf99f46bc8f50717..1f56f8b5ce7a35e1cf27f98142cb35ffc71cd0e0 100644
|
| --- a/test/cctest/test-assembler-x64.cc
|
| +++ b/test/cctest/test-assembler-x64.cc
|
| @@ -25,6 +25,9 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| +// TODO(jochen): Remove this after the setting is turned on globally.
|
| +#define V8_IMMINENT_DEPRECATION_WARNINGS
|
| +
|
| #include <cstdlib>
|
| #include <iostream>
|
|
|
| @@ -591,6 +594,7 @@ TEST(AssemblerMultiByteNop) {
|
|
|
| void DoSSE2(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
| v8::HandleScope scope(CcTest::isolate());
|
| + v8::Local<v8::Context> context = CcTest::isolate()->GetCurrentContext();
|
| byte buffer[1024];
|
|
|
| CHECK(args[0]->IsArray());
|
| @@ -605,9 +609,15 @@ void DoSSE2(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
|
|
| // Store input vector on the stack.
|
| for (unsigned i = 0; i < ELEMENT_COUNT; i++) {
|
| - __ movl(rax, Immediate(vec->Get(i)->Int32Value()));
|
| + __ movl(rax, Immediate(vec->Get(context, i)
|
| + .ToLocalChecked()
|
| + ->Int32Value(context)
|
| + .FromJust()));
|
| __ shlq(rax, Immediate(0x20));
|
| - __ orq(rax, Immediate(vec->Get(++i)->Int32Value()));
|
| + __ orq(rax, Immediate(vec->Get(context, ++i)
|
| + .ToLocalChecked()
|
| + ->Int32Value(context)
|
| + .FromJust()));
|
| __ pushq(rax);
|
| }
|
|
|
| @@ -641,7 +651,7 @@ TEST(StackAlignmentForSSE2) {
|
|
|
| v8::Isolate* isolate = CcTest::isolate();
|
| v8::HandleScope handle_scope(isolate);
|
| - v8::Handle<v8::ObjectTemplate> global_template =
|
| + v8::Local<v8::ObjectTemplate> global_template =
|
| v8::ObjectTemplate::New(isolate);
|
| global_template->Set(v8_str("do_sse2"),
|
| v8::FunctionTemplate::New(isolate, DoSSE2));
|
| @@ -653,20 +663,21 @@ TEST(StackAlignmentForSSE2) {
|
| "}");
|
|
|
| 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::Function> foo = v8::Local<v8::Function>::Cast(
|
| + global_object->Get(env.local(), v8_str("foo")).ToLocalChecked());
|
|
|
| int32_t vec[ELEMENT_COUNT] = { -1, 1, 1, 1 };
|
| v8::Local<v8::Array> v8_vec = v8::Array::New(isolate, ELEMENT_COUNT);
|
| for (unsigned i = 0; i < ELEMENT_COUNT; i++) {
|
| - v8_vec->Set(i, v8_num(vec[i]));
|
| + v8_vec->Set(env.local(), i, v8_num(vec[i])).FromJust();
|
| }
|
|
|
| v8::Local<v8::Value> args[] = { v8_vec };
|
| - v8::Local<v8::Value> result = foo->Call(global_object, 1, args);
|
| + v8::Local<v8::Value> result =
|
| + foo->Call(env.local(), global_object, 1, args).ToLocalChecked();
|
|
|
| // The mask should be 0b1000.
|
| - CHECK_EQ(8, result->Int32Value());
|
| + CHECK_EQ(8, result->Int32Value(env.local()).FromJust());
|
| }
|
|
|
| #undef ELEMENT_COUNT
|
|
|