Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: test/cctest/test-assembler-x64.cc

Issue 235153003: Handlify code allocation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-assembler-mips.cc ('k') | test/cctest/test-disasm-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 __
« no previous file with comments | « test/cctest/test-assembler-mips.cc ('k') | test/cctest/test-disasm-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698