Revision: 5636
Author: [email protected]
Date: Mon Oct 18 03:23:45 2010
Log: Fix compilation error on ARM with gcc 4.4. Remove NULL check of pointer to member, which was dead code (never failed).
Review URL: http://codereview.chromium.org/3793011
http://code.google.com/p/v8/source/detail?r=5636

Modified:
 /branches/bleeding_edge/src/arm/codegen-arm.h
 /branches/bleeding_edge/src/codegen.cc
 /branches/bleeding_edge/src/codegen.h
 /branches/bleeding_edge/src/ia32/codegen-ia32.h
 /branches/bleeding_edge/src/x64/codegen-x64.h

=======================================
--- /branches/bleeding_edge/src/arm/codegen-arm.h       Mon Oct  4 07:30:43 2010
+++ /branches/bleeding_edge/src/arm/codegen-arm.h       Mon Oct 18 03:23:45 2010
@@ -447,9 +447,6 @@
   void Branch(bool if_true, JumpTarget* target);
   void CheckStack();

-  static InlineFunctionGenerator FindInlineFunctionGenerator(
-      Runtime::FunctionId function_id);
-
   bool CheckForInlineRuntimeCall(CallRuntime* node);

   static Handle<Code> ComputeLazyCompile(int argc);
=======================================
--- /branches/bleeding_edge/src/codegen.cc      Mon Oct  4 07:30:43 2010
+++ /branches/bleeding_edge/src/codegen.cc      Mon Oct 18 03:23:45 2010
@@ -359,13 +359,6 @@
         INLINE_RUNTIME_FUNCTION_LIST(INLINE_FUNCTION_GENERATOR_ADDRESS)
 };
 #undef INLINE_FUNCTION_GENERATOR_ADDRESS
-
-
-CodeGenerator::InlineFunctionGenerator
-  CodeGenerator::FindInlineFunctionGenerator(Runtime::FunctionId id) {
-    return kInlineFunctionGenerators[
- static_cast<int>(id) - static_cast<int>(Runtime::kFirstInlineFunction)];
-}


 bool CodeGenerator::CheckForInlineRuntimeCall(CallRuntime* node) {
@@ -373,12 +366,14 @@
   Handle<String> name = node->name();
   Runtime::Function* function = node->function();
   if (function != NULL && function->intrinsic_type == Runtime::INLINE) {
-    InlineFunctionGenerator generator =
-        FindInlineFunctionGenerator(function->function_id);
-    if (generator != NULL) {
-      ((*this).*(generator))(args);
-      return true;
-    }
+    int lookup_index = static_cast<int>(function->function_id) -
+        static_cast<int>(Runtime::kFirstInlineFunction);
+    ASSERT(lookup_index >= 0);
+    ASSERT(static_cast<size_t>(lookup_index) <
+           ARRAY_SIZE(kInlineFunctionGenerators));
+ InlineFunctionGenerator generator = kInlineFunctionGenerators[lookup_index];
+    (this->*generator)(args);
+    return true;
   }
   return false;
 }
=======================================
--- /branches/bleeding_edge/src/codegen.h       Tue Sep 14 07:52:53 2010
+++ /branches/bleeding_edge/src/codegen.h       Mon Oct 18 03:23:45 2010
@@ -62,7 +62,6 @@
 //   ComputeCallInitializeInLoop
 //   ProcessDeclarations
 //   DeclareGlobals
-//   FindInlineRuntimeLUT
 //   CheckForInlineRuntimeCall
 //   AnalyzeCondition
 //   CodeForFunctionPosition
=======================================
--- /branches/bleeding_edge/src/ia32/codegen-ia32.h     Mon Oct  4 07:30:43 2010
+++ /branches/bleeding_edge/src/ia32/codegen-ia32.h     Mon Oct 18 03:23:45 2010
@@ -624,9 +624,6 @@

   void CheckStack();

-  static InlineFunctionGenerator FindInlineFunctionGenerator(
-      Runtime::FunctionId function_id);
-
   bool CheckForInlineRuntimeCall(CallRuntime* node);

   void ProcessDeclarations(ZoneList<Declaration*>* declarations);
=======================================
--- /branches/bleeding_edge/src/x64/codegen-x64.h       Mon Oct  4 07:30:43 2010
+++ /branches/bleeding_edge/src/x64/codegen-x64.h       Mon Oct 18 03:23:45 2010
@@ -584,9 +584,6 @@

   void CheckStack();

-  static InlineFunctionGenerator FindInlineFunctionGenerator(
-      Runtime::FunctionId function_id);
-
   bool CheckForInlineRuntimeCall(CallRuntime* node);

   void ProcessDeclarations(ZoneList<Declaration*>* declarations);

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to