Commit 2aa5ac93 authored by jochen@chromium.org's avatar jochen@chromium.org

A64: fix cctest/test-assembler-a64

The simulator now deletes its decoder in its dtor. Therefore, we must
always allocate the decoder on the heap.

BUG=none
R=ulan@chromium.org, jacob.bramley@arm.com
LOG=n

Review URL: https://codereview.chromium.org/183893005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19596 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 98d1ceda
...@@ -113,15 +113,16 @@ static void InitializeVM() { ...@@ -113,15 +113,16 @@ static void InitializeVM() {
#ifdef USE_SIMULATOR #ifdef USE_SIMULATOR
// Run tests with the simulator. // Run tests with the simulator.
#define SETUP_SIZE(buf_size) \ #define SETUP_SIZE(buf_size) \
Isolate* isolate = Isolate::Current(); \ Isolate* isolate = Isolate::Current(); \
HandleScope scope(isolate); \ HandleScope scope(isolate); \
ASSERT(isolate != NULL); \ ASSERT(isolate != NULL); \
byte* buf = new byte[buf_size]; \ byte* buf = new byte[buf_size]; \
MacroAssembler masm(isolate, buf, buf_size); \ MacroAssembler masm(isolate, buf, buf_size); \
Decoder<DispatchingDecoderVisitor> decoder; \ Decoder<DispatchingDecoderVisitor>* decoder = \
Simulator simulator(&decoder); \ new Decoder<DispatchingDecoderVisitor>(); \
PrintDisassembler* pdis = NULL; \ Simulator simulator(decoder); \
PrintDisassembler* pdis = NULL; \
RegisterDump core; RegisterDump core;
/* if (Cctest::trace_sim()) { \ /* if (Cctest::trace_sim()) { \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment