Reviewers: Vyacheslav Egorov,
Message:
A change for you!
Description:
Fix compilation error on ARM with gcc 4.4. Remove NULL check of pointer to
member, which was dead code (never failed).
Please review this at http://codereview.chromium.org/3793011/show
SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/
Affected files:
M src/arm/codegen-arm.h
M src/codegen.h
M src/codegen.cc
M src/ia32/codegen-ia32.h
M src/x64/codegen-x64.h
Index: src/arm/codegen-arm.h
===================================================================
--- src/arm/codegen-arm.h (revision 5634)
+++ src/arm/codegen-arm.h (working copy)
@@ -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);
Index: src/codegen.cc
===================================================================
--- src/codegen.cc (revision 5634)
+++ src/codegen.cc (working copy)
@@ -361,24 +361,19 @@
#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) {
ZoneList<Expression*>* args = node->arguments();
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;
}
Index: src/codegen.h
===================================================================
--- src/codegen.h (revision 5634)
+++ src/codegen.h (working copy)
@@ -62,7 +62,6 @@
// ComputeCallInitializeInLoop
// ProcessDeclarations
// DeclareGlobals
-// FindInlineRuntimeLUT
// CheckForInlineRuntimeCall
// AnalyzeCondition
// CodeForFunctionPosition
Index: src/ia32/codegen-ia32.h
===================================================================
--- src/ia32/codegen-ia32.h (revision 5634)
+++ src/ia32/codegen-ia32.h (working copy)
@@ -624,9 +624,6 @@
void CheckStack();
- static InlineFunctionGenerator FindInlineFunctionGenerator(
- Runtime::FunctionId function_id);
-
bool CheckForInlineRuntimeCall(CallRuntime* node);
void ProcessDeclarations(ZoneList<Declaration*>* declarations);
Index: src/x64/codegen-x64.h
===================================================================
--- src/x64/codegen-x64.h (revision 5634)
+++ src/x64/codegen-x64.h (working copy)
@@ -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