Fixed build with no ENABLE_LOGGING_AND_PROFILING
authorchristian.plesner.hansen@gmail.com <christian.plesner.hansen@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 7 Jan 2009 14:24:08 +0000 (14:24 +0000)
committerchristian.plesner.hansen@gmail.com <christian.plesner.hansen@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 7 Jan 2009 14:24:08 +0000 (14:24 +0000)
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1039 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/codegen-arm.cc
src/codegen-arm.h
src/codegen-ia32.cc
src/codegen-ia32.h
src/codegen.cc
src/log.cc
src/log.h

index e0cae7f6e85d54cc0394c93ab4958fc5529bdcd9..47da62de7240632468022e0c6a15d5ff29aec415 100644 (file)
@@ -2580,11 +2580,13 @@ void CodeGenerator::GenerateIsSmi(ZoneList<Expression*>* args) {
 void CodeGenerator::GenerateLog(ZoneList<Expression*>* args) {
   // See comment in CodeGenerator::GenerateLog in codegen-ia32.cc.
   ASSERT_EQ(args->length(), 3);
+#ifdef ENABLE_LOGGING_AND_PROFILING
   if (ShouldGenerateLog(args->at(0))) {
     Load(args->at(1));
     Load(args->at(2));
     __ CallRuntime(Runtime::kLog, 2);
   }
+#endif
   __ mov(r0, Operand(Factory::undefined_value()));
   frame_->Push(r0);
 }
index 18f7a9212b643eaf1f384d024b97556f290d93c7..c1a823b910a28f058adeb3440bf6fed9d1dd4dcd 100644 (file)
@@ -195,7 +195,9 @@ class CodeGenerator: public AstVisitor {
                                Handle<Script> script,
                                bool is_eval);
 
+#ifdef ENABLE_LOGGING_AND_PROFILING
   static bool ShouldGenerateLog(Expression* type);
+#endif
 
   static void SetFunctionInfo(Handle<JSFunction> fun,
                               int length,
index 17e4a8d74125633df755e401c3c9f85bfe5bed0e..119e41fb40f228a3af3948023746190d28b61cea 100644 (file)
@@ -2909,11 +2909,13 @@ void CodeGenerator::GenerateLog(ZoneList<Expression*>* args) {
   //     with '%2s' (see Logger::LogRuntime for all the formats).
   //   2 (array): Arguments to the format string.
   ASSERT_EQ(args->length(), 3);
+#ifdef ENABLE_LOGGING_AND_PROFILING
   if (ShouldGenerateLog(args->at(0))) {
     Load(args->at(1));
     Load(args->at(2));
     __ CallRuntime(Runtime::kLog, 2);
   }
+#endif
   // Finally, we're expected to leave a value on the top of the stack.
   frame_->Push(Immediate(Factory::undefined_value()));
 }
index ee1cfc1178d8243fccc5903634b4baf417e5a001..68ec56184854d4fc29c19a61ef365c2d0c124f16 100644 (file)
@@ -201,7 +201,9 @@ class CodeGenerator: public AstVisitor {
                                Handle<Script> script,
                                bool is_eval);
 
+#ifdef ENABLE_LOGGING_AND_PROFILING
   static bool ShouldGenerateLog(Expression* type);
+#endif
 
   static void SetFunctionInfo(Handle<JSFunction> fun,
                               int length,
index 265f6badb2e5bd0675ff6a3a5a735050162c491d..81c2af81f7bfb92bd69722dcc14fddd92825abe7 100644 (file)
@@ -163,6 +163,8 @@ Handle<Code> CodeGenerator::MakeCode(FunctionLiteral* flit,
 }
 
 
+#ifdef ENABLE_LOGGING_AND_PROFILING
+
 bool CodeGenerator::ShouldGenerateLog(Expression* type) {
   ASSERT(type != NULL);
   if (!Logger::is_enabled()) return false;
@@ -175,6 +177,8 @@ bool CodeGenerator::ShouldGenerateLog(Expression* type) {
   return false;
 }
 
+#endif
+
 
 // Sets the function info on a function.
 // The start_position points to the first '(' character after the function name
index 7ecf2ac63b107e822b72cdacc0597b7f1345bf38..04119fff8af194c45e7dc001ccc07e0504b60c4d 100644 (file)
@@ -432,6 +432,7 @@ void Logger::RegExpCompileEvent(Handle<JSRegExp> regexp, bool in_cache) {
 
 
 void Logger::LogRuntime(Vector<const char> format, JSArray* args) {
+#ifdef ENABLE_LOGGING_AND_PROFILING
   ScopedLock sl(mutex_);
   HandleScope scope;
   for (int i = 0; i < format.length(); i++) {
@@ -465,6 +466,7 @@ void Logger::LogRuntime(Vector<const char> format, JSArray* args) {
     }
   }
   fputc('\n', logfile_);
+#endif
 }
 
 
index 93ac6a012ad4bb5b427f0c55cc65cff22e574970..84143644fd6968fc8c218aa7088e654313f473cc 100644 (file)
--- a/src/log.h
+++ b/src/log.h
@@ -200,11 +200,9 @@ class Logger {
   static StateTag state() {
     return current_state_ ? current_state_->state() : OTHER;
   }
-#endif
 
   static bool is_enabled() { return logfile_ != NULL; }
 
-#ifdef ENABLE_LOGGING_AND_PROFILING
  private:
 
   // Emits the source code of a regexp. Used by regexp events.