Index: test/cctest/test-assembler-x64.cc |
diff --git a/test/cctest/test-assembler-x64.cc b/test/cctest/test-assembler-x64.cc |
index eddc107a16e67ee760d810a44d1a8b307073d063..eb9fee85458b4cbe69bcf22574f9acbe51d6feb4 100644 |
--- a/test/cctest/test-assembler-x64.cc |
+++ b/test/cctest/test-assembler-x64.cc |
@@ -575,11 +575,8 @@ TEST(AssemblerMultiByteNop) { |
CodeDesc desc; |
assm.GetCode(&desc); |
- Code* code = Code::cast(isolate->heap()->CreateCode( |
- desc, |
- Code::ComputeFlags(Code::STUB), |
- Handle<Code>())->ToObjectChecked()); |
- CHECK(code->IsCode()); |
+ Handle<Code> code = isolate->factory()->NewCode( |
+ desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
F0 f = FUNCTION_CAST<F0>(code->entry()); |
int res = f(); |
@@ -627,11 +624,8 @@ void DoSSE2(const v8::FunctionCallbackInfo<v8::Value>& args) { |
CodeDesc desc; |
assm.GetCode(&desc); |
- Code* code = Code::cast(isolate->heap()->CreateCode( |
- desc, |
- Code::ComputeFlags(Code::STUB), |
- Handle<Code>())->ToObjectChecked()); |
- CHECK(code->IsCode()); |
+ Handle<Code> code = isolate->factory()->NewCode( |
+ desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
F0 f = FUNCTION_CAST<F0>(code->entry()); |
int res = f(); |
@@ -692,16 +686,13 @@ TEST(AssemblerX64Extractps) { |
CodeDesc desc; |
assm.GetCode(&desc); |
- Code* code = Code::cast(isolate->heap()->CreateCode( |
- desc, |
- Code::ComputeFlags(Code::STUB), |
- Handle<Code>())->ToObjectChecked()); |
- CHECK(code->IsCode()); |
+ Handle<Code> code = isolate->factory()->NewCode( |
+ desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
#ifdef OBJECT_PRINT |
- Code::cast(code)->Print(); |
+ code->Print(); |
#endif |
- F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); |
+ F3 f = FUNCTION_CAST<F3>(code->entry()); |
uint64_t value1 = V8_2PART_UINT64_C(0x12345678, 87654321); |
CHECK_EQ(0x12345678, f(uint64_to_double(value1))); |
uint64_t value2 = V8_2PART_UINT64_C(0x87654321, 12345678); |
@@ -731,16 +722,15 @@ TEST(AssemblerX64SSE) { |
CodeDesc desc; |
assm.GetCode(&desc); |
- Code* code = Code::cast(isolate->heap()->CreateCode( |
+ Handle<Code> code = isolate->factory()->NewCode( |
desc, |
Code::ComputeFlags(Code::STUB), |
- Handle<Code>())->ToObjectChecked()); |
- CHECK(code->IsCode()); |
+ Handle<Code>()); |
#ifdef OBJECT_PRINT |
- Code::cast(code)->Print(); |
+ code->Print(); |
#endif |
- F6 f = FUNCTION_CAST<F6>(Code::cast(code)->entry()); |
+ F6 f = FUNCTION_CAST<F6>(code->entry()); |
CHECK_EQ(2, f(1.0, 2.0)); |
} |
#undef __ |