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

Side by Side Diff: test/cctest/test-assembler-arm64.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-assembler-arm.cc ('k') | test/cctest/test-assembler-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 10919 matching lines...) Expand 10 before | Expand all | Expand 10 after
10930 __ dc32(0); 10930 __ dc32(0);
10931 } 10931 }
10932 10932
10933 __ RecordVeneerPool(masm.pc_offset(), veneer_pool_size); 10933 __ RecordVeneerPool(masm.pc_offset(), veneer_pool_size);
10934 for (unsigned i = 0; i < veneer_pool_size / kInstructionSize; ++i) { 10934 for (unsigned i = 0; i < veneer_pool_size / kInstructionSize; ++i) {
10935 __ nop(); 10935 __ nop();
10936 } 10936 }
10937 10937
10938 __ bind(&exit); 10938 __ bind(&exit);
10939 10939
10940 Heap* heap = isolate->heap(); 10940 HandleScope handle_scope(isolate);
10941 CodeDesc desc; 10941 CodeDesc desc;
10942 Object* code_object = NULL;
10943 Code* code;
10944 masm.GetCode(&desc); 10942 masm.GetCode(&desc);
10945 MaybeObject* maybe_code = heap->CreateCode(desc, 0, masm.CodeObject()); 10943 Handle<Code> code = isolate->factory()->NewCode(desc, 0, masm.CodeObject());
10946 maybe_code->ToObject(&code_object);
10947 code = Code::cast(code_object);
10948 10944
10949 unsigned pool_count = 0; 10945 unsigned pool_count = 0;
10950 int pool_mask = RelocInfo::ModeMask(RelocInfo::CONST_POOL) | 10946 int pool_mask = RelocInfo::ModeMask(RelocInfo::CONST_POOL) |
10951 RelocInfo::ModeMask(RelocInfo::VENEER_POOL); 10947 RelocInfo::ModeMask(RelocInfo::VENEER_POOL);
10952 for (RelocIterator it(code, pool_mask); !it.done(); it.next()) { 10948 for (RelocIterator it(*code, pool_mask); !it.done(); it.next()) {
10953 RelocInfo* info = it.rinfo(); 10949 RelocInfo* info = it.rinfo();
10954 if (RelocInfo::IsConstPool(info->rmode())) { 10950 if (RelocInfo::IsConstPool(info->rmode())) {
10955 ASSERT(info->data() == constant_pool_size); 10951 ASSERT(info->data() == constant_pool_size);
10956 ++pool_count; 10952 ++pool_count;
10957 } 10953 }
10958 if (RelocInfo::IsVeneerPool(info->rmode())) { 10954 if (RelocInfo::IsVeneerPool(info->rmode())) {
10959 ASSERT(info->data() == veneer_pool_size); 10955 ASSERT(info->data() == veneer_pool_size);
10960 ++pool_count; 10956 ++pool_count;
10961 } 10957 }
10962 } 10958 }
10963 10959
10964 ASSERT(pool_count == 2); 10960 ASSERT(pool_count == 2);
10965 10961
10966 TEARDOWN(); 10962 TEARDOWN();
10967 } 10963 }
OLDNEW
« no previous file with comments | « test/cctest/test-assembler-arm.cc ('k') | test/cctest/test-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698