Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Side by Side Diff: src/mips/code-stubs-mips.cc

Issue 7134043: Moved non-architecture-specific GetFooCodeStub functions to ic.cc, removing (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ic.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1787 matching lines...) Expand 10 before | Expand all | Expand 10 after
1798 // If length is not zero, "tos_" contains a non-zero value ==> true. 1798 // If length is not zero, "tos_" contains a non-zero value ==> true.
1799 __ Ret(); 1799 __ Ret();
1800 1800
1801 // Return 0 in "tos_" for false. 1801 // Return 0 in "tos_" for false.
1802 __ bind(&false_result); 1802 __ bind(&false_result);
1803 __ mov(tos_, zero_reg); 1803 __ mov(tos_, zero_reg);
1804 __ Ret(); 1804 __ Ret();
1805 } 1805 }
1806 1806
1807 1807
1808 Handle<Code> GetUnaryOpStub(int key, UnaryOpIC::TypeInfo type_info) {
1809 UnaryOpStub stub(key, type_info);
1810 return stub.GetCode();
1811 }
1812
1813
1814 const char* UnaryOpStub::GetName() { 1808 const char* UnaryOpStub::GetName() {
1815 if (name_ != NULL) return name_; 1809 if (name_ != NULL) return name_;
1816 const int kMaxNameLength = 100; 1810 const int kMaxNameLength = 100;
1817 name_ = Isolate::Current()->bootstrapper()->AllocateAutoDeletedArray( 1811 name_ = Isolate::Current()->bootstrapper()->AllocateAutoDeletedArray(
1818 kMaxNameLength); 1812 kMaxNameLength);
1819 if (name_ == NULL) return "OOM"; 1813 if (name_ == NULL) return "OOM";
1820 const char* op_name = Token::Name(op_); 1814 const char* op_name = Token::Name(op_);
1821 const char* overwrite_name = NULL; // Make g++ happy. 1815 const char* overwrite_name = NULL; // Make g++ happy.
1822 switch (mode_) { 1816 switch (mode_) {
1823 case UNARY_NO_OVERWRITE: overwrite_name = "Alloc"; break; 1817 case UNARY_NO_OVERWRITE: overwrite_name = "Alloc"; break;
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
2111 break; 2105 break;
2112 case Token::BIT_NOT: 2106 case Token::BIT_NOT:
2113 __ InvokeBuiltin(Builtins::BIT_NOT, JUMP_FUNCTION); 2107 __ InvokeBuiltin(Builtins::BIT_NOT, JUMP_FUNCTION);
2114 break; 2108 break;
2115 default: 2109 default:
2116 UNREACHABLE(); 2110 UNREACHABLE();
2117 } 2111 }
2118 } 2112 }
2119 2113
2120 2114
2121 Handle<Code> GetBinaryOpStub(int key,
2122 BinaryOpIC::TypeInfo type_info,
2123 BinaryOpIC::TypeInfo result_type_info) {
2124 BinaryOpStub stub(key, type_info, result_type_info);
2125 return stub.GetCode();
2126 }
2127
2128
2129 void BinaryOpStub::GenerateTypeTransition(MacroAssembler* masm) { 2115 void BinaryOpStub::GenerateTypeTransition(MacroAssembler* masm) {
2130 Label get_result; 2116 Label get_result;
2131 2117
2132 __ Push(a1, a0); 2118 __ Push(a1, a0);
2133 2119
2134 __ li(a2, Operand(Smi::FromInt(MinorKey()))); 2120 __ li(a2, Operand(Smi::FromInt(MinorKey())));
2135 __ li(a1, Operand(Smi::FromInt(op_))); 2121 __ li(a1, Operand(Smi::FromInt(op_)));
2136 __ li(a0, Operand(Smi::FromInt(operands_type_))); 2122 __ li(a0, Operand(Smi::FromInt(operands_type_)));
2137 __ Push(a2, a1, a0); 2123 __ Push(a2, a1, a0);
2138 2124
(...skipping 4530 matching lines...) Expand 10 before | Expand all | Expand 10 after
6669 __ mov(result, zero_reg); 6655 __ mov(result, zero_reg);
6670 __ Ret(); 6656 __ Ret();
6671 } 6657 }
6672 6658
6673 6659
6674 #undef __ 6660 #undef __
6675 6661
6676 } } // namespace v8::internal 6662 } } // namespace v8::internal
6677 6663
6678 #endif // V8_TARGET_ARCH_MIPS 6664 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698