A64: fix cctest/test-assembler-a64
authorjochen@chromium.org <jochen@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 28 Feb 2014 10:31:05 +0000 (10:31 +0000)
committerjochen@chromium.org <jochen@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 28 Feb 2014 10:31:05 +0000 (10:31 +0000)
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

test/cctest/test-assembler-a64.cc

index 08b3519..7e0ad37 100644 (file)
@@ -113,15 +113,16 @@ static void InitializeVM() {
 #ifdef USE_SIMULATOR
 
 // Run tests with the simulator.
-#define SETUP_SIZE(buf_size)                   \
-  Isolate* isolate = Isolate::Current();       \
-  HandleScope scope(isolate);                  \
-  ASSERT(isolate != NULL);                     \
-  byte* buf = new byte[buf_size];              \
-  MacroAssembler masm(isolate, buf, buf_size); \
-  Decoder<DispatchingDecoderVisitor> decoder;  \
-  Simulator simulator(&decoder);               \
-  PrintDisassembler* pdis = NULL;              \
+#define SETUP_SIZE(buf_size)                    \
+  Isolate* isolate = Isolate::Current();        \
+  HandleScope scope(isolate);                   \
+  ASSERT(isolate != NULL);                      \
+  byte* buf = new byte[buf_size];               \
+  MacroAssembler masm(isolate, buf, buf_size);  \
+  Decoder<DispatchingDecoderVisitor>* decoder = \
+      new Decoder<DispatchingDecoderVisitor>(); \
+  Simulator simulator(decoder);                 \
+  PrintDisassembler* pdis = NULL;               \
   RegisterDump core;
 
 /*  if (Cctest::trace_sim()) {                                                 \