Revision: 13050
Author: [email protected]
Date: Mon Nov 26 00:47:48 2012
Log: Fix valgrind warnings.
BUG=
Review URL: https://chromiumcodereview.appspot.com/11418138
http://code.google.com/p/v8/source/detail?r=13050
Modified:
/branches/bleeding_edge/src/compiler.h
/branches/bleeding_edge/src/optimizing-compiler-thread.cc
/branches/bleeding_edge/src/optimizing-compiler-thread.h
=======================================
--- /branches/bleeding_edge/src/compiler.h Tue Aug 28 04:25:08 2012
+++ /branches/bleeding_edge/src/compiler.h Mon Nov 26 00:47:48 2012
@@ -293,6 +293,8 @@
// Zone on construction and deallocates it on exit.
class CompilationInfoWithZone: public CompilationInfo {
public:
+ INLINE(void* operator new(size_t size)) { return Malloced::New(size); }
+
explicit CompilationInfoWithZone(Handle<Script> script)
: CompilationInfo(script, &zone_),
zone_(script->GetIsolate()),
=======================================
--- /branches/bleeding_edge/src/optimizing-compiler-thread.cc Thu Nov 22
05:04:11 2012
+++ /branches/bleeding_edge/src/optimizing-compiler-thread.cc Mon Nov 26
00:47:48 2012
@@ -127,8 +127,9 @@
output_queue_semaphore_->Wait();
OptimizingCompiler* compiler = NULL;
output_queue_.Dequeue(&compiler);
+ Handle<SharedFunctionInfo> shared = compiler->info()->shared_info();
Compiler::InstallOptimizedCode(compiler);
- return compiler->info()->shared_info();
+ return shared;
}
=======================================
--- /branches/bleeding_edge/src/optimizing-compiler-thread.h Fri Nov 16
02:57:50 2012
+++ /branches/bleeding_edge/src/optimizing-compiler-thread.h Mon Nov 26
00:47:48 2012
@@ -44,6 +44,9 @@
public:
explicit OptimizingCompilerThread(Isolate *isolate) :
Thread("OptimizingCompilerThread"),
+#ifdef DEBUG
+ thread_id_(0),
+#endif
isolate_(isolate),
stop_semaphore_(OS::CreateSemaphore(0)),
input_queue_semaphore_(OS::CreateSemaphore(0)),
@@ -81,12 +84,16 @@
#endif
~OptimizingCompilerThread() {
+ delete output_queue_semaphore_; // Only used for manual mode.
delete input_queue_semaphore_;
- delete output_queue_semaphore_; // Only used for manual mode.
delete stop_semaphore_;
}
private:
+#ifdef DEBUG
+ int thread_id_;
+#endif
+
Isolate* isolate_;
Semaphore* stop_semaphore_;
Semaphore* input_queue_semaphore_;
@@ -97,10 +104,6 @@
volatile Atomic32 queue_length_;
int64_t time_spent_compiling_;
int64_t time_spent_total_;
-
-#ifdef DEBUG
- int thread_id_;
-#endif
};
} } // namespace v8::internal
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev