From: sgjesse@chromium.org Date: Thu, 11 Mar 2010 10:56:49 +0000 (+0000) Subject: Fix compile of MIPS port X-Git-Tag: upstream/4.7.83~22275 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7def7afc2305e2c3e018d6cf610a58a68df9845c;p=platform%2Fupstream%2Fv8.git Fix compile of MIPS port TBR=alexandre.rames@gmail.com Review URL: http://codereview.chromium.org/870002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4103 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/mips/codegen-mips-inl.h b/src/mips/codegen-mips-inl.h index 2a77715a3..904dd74e9 100644 --- a/src/mips/codegen-mips-inl.h +++ b/src/mips/codegen-mips-inl.h @@ -38,16 +38,6 @@ namespace internal { void DeferredCode::Jump() { __ b(&entry_label_); } -void CodeGenerator::GenerateMathSin(ZoneList* args) { - UNIMPLEMENTED_MIPS(); -} - - -void CodeGenerator::GenerateMathCos(ZoneList* args) { - UNIMPLEMENTED_MIPS(); -} - - #undef __ } } // namespace v8::internal diff --git a/src/mips/codegen-mips.cc b/src/mips/codegen-mips.cc index facccc288..7b32180ef 100644 --- a/src/mips/codegen-mips.cc +++ b/src/mips/codegen-mips.cc @@ -31,6 +31,7 @@ #include "bootstrapper.h" #include "codegen-inl.h" #include "debug.h" +#include "ic-inl.h" #include "parser.h" #include "register-allocator-inl.h" #include "runtime.h" @@ -297,6 +298,16 @@ void CodeGenerator::GenerateMathPow(ZoneList* args) { } +void CodeGenerator::GenerateMathCos(ZoneList* args) { + UNIMPLEMENTED_MIPS(); +} + + +void CodeGenerator::GenerateMathSin(ZoneList* args) { + UNIMPLEMENTED_MIPS(); +} + + void CodeGenerator::GenerateMathSqrt(ZoneList* args) { UNIMPLEMENTED_MIPS(); } @@ -335,7 +346,7 @@ void CodeGenerator::GenerateArgumentsLength(ZoneList* args) { } -void CodeGenerator::GenerateArgumentsAccess(ZoneList* args) { +void CodeGenerator::GenerateArguments(ZoneList* args) { UNIMPLEMENTED_MIPS(); } @@ -429,6 +440,11 @@ bool CodeGenerator::HasValidEntryRegisters() { return true; } #define __ ACCESS_MASM(masm) +Handle GetBinaryOpStub(int key, BinaryOpIC::TypeInfo type_info) { + return Handle::null(); +} + + // On entry a0 and a1 are the things to be compared. On exit v0 is 0, // positive or negative to indicate the result of the comparison. void CompareStub::Generate(MacroAssembler* masm) { diff --git a/src/mips/codegen-mips.h b/src/mips/codegen-mips.h index 987dcca87..3f78fcd5f 100644 --- a/src/mips/codegen-mips.h +++ b/src/mips/codegen-mips.h @@ -154,6 +154,10 @@ class CodeGenerator: public AstVisitor { // used by the debugger to patch the JS return sequence. static const int kJSReturnSequenceLength = 6; + // If the name is an inline runtime function call return the number of + // expected arguments. Otherwise return -1. + static int InlineRuntimeCallArgumentsCount(Handle name); + private: // Construction/Destruction. explicit CodeGenerator(MacroAssembler* masm); @@ -188,6 +192,7 @@ class CodeGenerator: public AstVisitor { struct InlineRuntimeLUT { void (CodeGenerator::*method)(ZoneList*); const char* name; + int nargs; }; static InlineRuntimeLUT* FindInlineRuntimeLUT(Handle name); @@ -216,7 +221,7 @@ class CodeGenerator: public AstVisitor { // Support for arguments.length and arguments[?]. void GenerateArgumentsLength(ZoneList* args); - void GenerateArgumentsAccess(ZoneList* args); + void GenerateArguments(ZoneList* args); // Support for accessing the class and value fields of an object. void GenerateClassOf(ZoneList* args); @@ -246,15 +251,11 @@ class CodeGenerator: public AstVisitor { void GenerateRegExpExec(ZoneList* args); void GenerateNumberToString(ZoneList* args); - // Fast support for Math.pow(). - void GenerateMathPow(ZoneList* args); - // Fast support for Math.sqrt(). + // Fast call to math functions. void GenerateMathPow(ZoneList* args); - - - // Fast support for Math.sin and Math.cos. - inline void GenerateMathSin(ZoneList* args); - inline void GenerateMathCos(ZoneList* args); + void GenerateMathSin(ZoneList* args); + void GenerateMathCos(ZoneList* args); + void GenerateMathSqrt(ZoneList* args); // Simple condition analysis. enum ConditionAnalysis { diff --git a/src/mips/virtual-frame-mips.h b/src/mips/virtual-frame-mips.h index e5bc93fa2..77c795c9f 100644 --- a/src/mips/virtual-frame-mips.h +++ b/src/mips/virtual-frame-mips.h @@ -71,7 +71,7 @@ class VirtualFrame : public ZoneObject { // Create a duplicate of an existing valid frame element. FrameElement CopyElementAt(int index, - NumberInfo::Type info = NumberInfo::kUnknown); + NumberInfo info = NumberInfo::Unknown()); // The number of elements on the virtual frame. int element_count() { return elements_.length(); } @@ -367,7 +367,7 @@ class VirtualFrame : public ZoneObject { void EmitMultiPushReversed(RegList regs); // higher first // Push an element on the virtual frame. - inline void Push(Register reg, NumberInfo::Type info = NumberInfo::kUnknown); + inline void Push(Register reg, NumberInfo info = NumberInfo::Unknown()); inline void Push(Handle value); inline void Push(Smi* value); @@ -391,6 +391,8 @@ class VirtualFrame : public ZoneObject { // 'a' registers are arguments register a0 to a3. void EmitArgumentSlots(RegList reglist); + inline void SetTypeForLocalAt(int index, NumberInfo info); + private: static const int kLocal0Offset = JavaScriptFrameConstants::kLocal0Offset; static const int kFunctionOffset = JavaScriptFrameConstants::kFunctionOffset;