Delete the simulator when we don't need it anymore
authorjochen@chromium.org <jochen@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 28 Feb 2014 10:55:47 +0000 (10:55 +0000)
committerjochen@chromium.org <jochen@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 28 Feb 2014 10:55:47 +0000 (10:55 +0000)
BUG=none
R=svenpanne@chromium.org, ulan@chromium.org
LOG=n

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19598 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/arm/simulator-arm.cc
src/isolate.cc
src/isolate.h
src/mips/simulator-mips.cc

index ac36687..a7fccdd 100644 (file)
@@ -796,6 +796,10 @@ Simulator::Simulator(Isolate* isolate) : isolate_(isolate) {
 }
 
 
+Simulator::~Simulator() {
+}
+
+
 // When the generated code calls an external reference we need to catch that in
 // the simulator.  The external reference will be a function compiled for the
 // host architecture.  We need to call that function instead of trying to
index a9a5161..2d45d78 100644 (file)
@@ -1463,6 +1463,13 @@ Isolate::ThreadDataTable::~ThreadDataTable() {
 }
 
 
+Isolate::PerIsolateThreadData::~PerIsolateThreadData() {
+#if defined(USE_SIMULATOR)
+  delete simulator_;
+#endif
+}
+
+
 Isolate::PerIsolateThreadData*
     Isolate::ThreadDataTable::Lookup(Isolate* isolate,
                                      ThreadId thread_id) {
index ef1dd30..897197b 100644 (file)
@@ -396,6 +396,7 @@ class Isolate {
 #endif
           next_(NULL),
           prev_(NULL) { }
+    ~PerIsolateThreadData();
     Isolate* isolate() const { return isolate_; }
     ThreadId thread_id() const { return thread_id_; }
 
index efce887..d26499b 100644 (file)
@@ -925,6 +925,10 @@ Simulator::Simulator(Isolate* isolate) : isolate_(isolate) {
 }
 
 
+Simulator::~Simulator() {
+}
+
+
 // When the generated code calls an external reference we need to catch that in
 // the simulator.  The external reference will be a function compiled for the
 // host architecture.  We need to call that function instead of trying to