Revision: 8240
Author: [email protected]
Date: Thu Jun 9 06:26:18 2011
Log: Moved non-architecture-specific GetFooCodeStub functions to
ic.cc, removing
duplicate code and the need for 2 free-floating function prototypes.
Review URL: http://codereview.chromium.org/7134043
http://code.google.com/p/v8/source/detail?r=8240
Modified:
/branches/bleeding_edge/src/arm/code-stubs-arm.cc
/branches/bleeding_edge/src/ia32/code-stubs-ia32.cc
/branches/bleeding_edge/src/ic.cc
/branches/bleeding_edge/src/mips/code-stubs-mips.cc
/branches/bleeding_edge/src/x64/code-stubs-x64.cc
=======================================
--- /branches/bleeding_edge/src/arm/code-stubs-arm.cc Thu Jun 9 05:45:26
2011
+++ /branches/bleeding_edge/src/arm/code-stubs-arm.cc Thu Jun 9 06:26:18
2011
@@ -1705,12 +1705,6 @@
__ mov(tos_, Operand(0, RelocInfo::NONE));
__ Ret();
}
-
-
-Handle<Code> GetUnaryOpStub(int key, UnaryOpIC::TypeInfo type_info) {
- UnaryOpStub stub(key, type_info);
- return stub.GetCode();
-}
const char* UnaryOpStub::GetName() {
@@ -2017,14 +2011,6 @@
UNREACHABLE();
}
}
-
-
-Handle<Code> GetBinaryOpStub(int key,
- BinaryOpIC::TypeInfo type_info,
- BinaryOpIC::TypeInfo result_type_info) {
- BinaryOpStub stub(key, type_info, result_type_info);
- return stub.GetCode();
-}
void BinaryOpStub::GenerateTypeTransition(MacroAssembler* masm) {
=======================================
--- /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Thu Jun 9 05:45:26
2011
+++ /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Thu Jun 9 06:26:18
2011
@@ -512,12 +512,6 @@
__ bind(&done);
}
}
-
-
-Handle<Code> GetUnaryOpStub(int key, UnaryOpIC::TypeInfo type_info) {
- UnaryOpStub stub(key, type_info);
- return stub.GetCode();
-}
const char* UnaryOpStub::GetName() {
@@ -848,14 +842,6 @@
UNREACHABLE();
}
}
-
-
-Handle<Code> GetBinaryOpStub(int key,
- BinaryOpIC::TypeInfo type_info,
- BinaryOpIC::TypeInfo result_type_info) {
- BinaryOpStub stub(key, type_info, result_type_info);
- return stub.GetCode();
-}
void BinaryOpStub::GenerateTypeTransition(MacroAssembler* masm) {
=======================================
--- /branches/bleeding_edge/src/ic.cc Mon Jun 6 06:15:11 2011
+++ /branches/bleeding_edge/src/ic.cc Thu Jun 9 06:26:18 2011
@@ -2291,11 +2291,6 @@
return GENERIC;
}
-
-
-// defined in code-stubs-<arch>.cc
-// Only needed to remove dependency of ic.cc on code-stubs-<arch>.h.
-Handle<Code> GetUnaryOpStub(int key, UnaryOpIC::TypeInfo type_info);
RUNTIME_FUNCTION(MaybeObject*, UnaryOp_Patch) {
@@ -2311,7 +2306,8 @@
UnaryOpIC::TypeInfo type = UnaryOpIC::GetTypeInfo(operand);
type = UnaryOpIC::ComputeNewType(type, previous_type);
- Handle<Code> code = GetUnaryOpStub(key, type);
+ UnaryOpStub stub(key, type);
+ Handle<Code> code = stub.GetCode();
if (!code.is_null()) {
if (FLAG_trace_ic) {
PrintF("[UnaryOpIC (%s->%s)#%s]\n",
@@ -2347,13 +2343,6 @@
}
return *result;
}
-
-// defined in code-stubs-<arch>.cc
-// Only needed to remove dependency of ic.cc on code-stubs-<arch>.h.
-Handle<Code> GetBinaryOpStub(int key,
- BinaryOpIC::TypeInfo type_info,
- BinaryOpIC::TypeInfo result_type);
-
RUNTIME_FUNCTION(MaybeObject*, BinaryOp_Patch) {
ASSERT(args.length() == 5);
@@ -2393,7 +2382,8 @@
result_type = BinaryOpIC::HEAP_NUMBER;
}
- Handle<Code> code = GetBinaryOpStub(key, type, result_type);
+ BinaryOpStub stub(key, type, result_type);
+ Handle<Code> code = stub.GetCode();
if (!code.is_null()) {
if (FLAG_trace_ic) {
PrintF("[BinaryOpIC (%s->(%s->%s))#%s]\n",
=======================================
--- /branches/bleeding_edge/src/mips/code-stubs-mips.cc Mon Jun 6 01:47:27
2011
+++ /branches/bleeding_edge/src/mips/code-stubs-mips.cc Thu Jun 9 06:26:18
2011
@@ -1803,12 +1803,6 @@
__ mov(tos_, zero_reg);
__ Ret();
}
-
-
-Handle<Code> GetUnaryOpStub(int key, UnaryOpIC::TypeInfo type_info) {
- UnaryOpStub stub(key, type_info);
- return stub.GetCode();
-}
const char* UnaryOpStub::GetName() {
@@ -2116,14 +2110,6 @@
UNREACHABLE();
}
}
-
-
-Handle<Code> GetBinaryOpStub(int key,
- BinaryOpIC::TypeInfo type_info,
- BinaryOpIC::TypeInfo result_type_info) {
- BinaryOpStub stub(key, type_info, result_type_info);
- return stub.GetCode();
-}
void BinaryOpStub::GenerateTypeTransition(MacroAssembler* masm) {
=======================================
--- /branches/bleeding_edge/src/x64/code-stubs-x64.cc Thu Jun 9 05:45:26
2011
+++ /branches/bleeding_edge/src/x64/code-stubs-x64.cc Thu Jun 9 06:26:18
2011
@@ -404,12 +404,6 @@
__ bind(&done);
}
-
-
-Handle<Code> GetUnaryOpStub(int key, UnaryOpIC::TypeInfo type_info) {
- UnaryOpStub stub(key, type_info);
- return stub.GetCode();
-}
void UnaryOpStub::Generate(MacroAssembler* masm) {
@@ -675,14 +669,6 @@
UnaryOpIC::GetName(operand_type_));
return name_;
}
-
-
-Handle<Code> GetBinaryOpStub(int key,
- BinaryOpIC::TypeInfo type_info,
- BinaryOpIC::TypeInfo result_type_info) {
- BinaryOpStub stub(key, type_info, result_type_info);
- return stub.GetCode();
-}
void BinaryOpStub::GenerateTypeTransition(MacroAssembler* masm) {
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev