Revision: 19406
Author: [email protected]
Date: Mon Feb 17 12:36:44 2014 UTC
Log: Remove arch specific api callback generate functions
[email protected]
BUG=
Review URL: https://codereview.chromium.org/169353002
http://code.google.com/p/v8/source/detail?r=19406
Modified:
/branches/bleeding_edge/src/a64/stub-cache-a64.cc
/branches/bleeding_edge/src/arm/stub-cache-arm.cc
/branches/bleeding_edge/src/ia32/stub-cache-ia32.cc
/branches/bleeding_edge/src/stub-cache.cc
/branches/bleeding_edge/src/stub-cache.h
/branches/bleeding_edge/src/x64/stub-cache-x64.cc
=======================================
--- /branches/bleeding_edge/src/a64/stub-cache-a64.cc Mon Feb 17 12:08:06
2014 UTC
+++ /branches/bleeding_edge/src/a64/stub-cache-a64.cc Mon Feb 17 12:36:44
2014 UTC
@@ -745,14 +745,14 @@
// Generate call to api function.
-static void GenerateFastApiCall(MacroAssembler* masm,
- const CallOptimization& optimization,
- Handle<Map> receiver_map,
- Register receiver,
- Register scratch,
- bool is_store,
- int argc,
- Register* values) {
+void StubCompiler::GenerateFastApiCall(MacroAssembler* masm,
+ const CallOptimization&
optimization,
+ Handle<Map> receiver_map,
+ Register receiver,
+ Register scratch,
+ bool is_store,
+ int argc,
+ Register* values) {
ASSERT(!AreAliased(receiver, scratch));
MacroAssembler::PushPopQueue queue(masm);
@@ -1044,15 +1044,6 @@
__ LoadObject(x0, value);
__ Ret();
}
-
-
-void LoadStubCompiler::GenerateLoadCallback(
- const CallOptimization& call_optimization,
- Handle<Map> receiver_map) {
- GenerateFastApiCall(
- masm(), call_optimization, receiver_map,
- receiver(), scratch3(), false, 0, NULL);
-}
void LoadStubCompiler::GenerateLoadCallback(
@@ -1532,23 +1523,6 @@
return GetICCode(
kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC);
}
-
-
-Handle<Code> StoreStubCompiler::CompileStoreCallback(
- Handle<JSObject> object,
- Handle<JSObject> holder,
- Handle<Name> name,
- const CallOptimization& call_optimization) {
- HandlerFrontend(IC::CurrentTypeOf(object, isolate()),
- receiver(), holder, name);
-
- Register values[] = { value() };
- GenerateFastApiCall(masm(), call_optimization, handle(object->map()),
- receiver(), scratch3(), true, 1, values);
-
- // Return the generated code.
- return GetCode(kind(), Code::FAST, name);
-}
#undef __
=======================================
--- /branches/bleeding_edge/src/arm/stub-cache-arm.cc Fri Feb 14 14:13:06
2014 UTC
+++ /branches/bleeding_edge/src/arm/stub-cache-arm.cc Mon Feb 17 12:36:44
2014 UTC
@@ -783,14 +783,14 @@
// Generate call to api function.
-static void GenerateFastApiCall(MacroAssembler* masm,
- const CallOptimization& optimization,
- Handle<Map> receiver_map,
- Register receiver,
- Register scratch_in,
- bool is_store,
- int argc,
- Register* values) {
+void StubCompiler::GenerateFastApiCall(MacroAssembler* masm,
+ const CallOptimization&
optimization,
+ Handle<Map> receiver_map,
+ Register receiver,
+ Register scratch_in,
+ bool is_store,
+ int argc,
+ Register* values) {
ASSERT(!receiver.is(scratch_in));
__ push(receiver);
// Write the arguments to stack frame.
@@ -1074,15 +1074,6 @@
__ Move(r0, value);
__ Ret();
}
-
-
-void LoadStubCompiler::GenerateLoadCallback(
- const CallOptimization& call_optimization,
- Handle<Map> receiver_map) {
- GenerateFastApiCall(
- masm(), call_optimization, receiver_map,
- receiver(), scratch3(), false, 0, NULL);
-}
void LoadStubCompiler::GenerateLoadCallback(
@@ -1259,24 +1250,6 @@
// Return the generated code.
return GetCode(kind(), Code::FAST, name);
}
-
-
-Handle<Code> StoreStubCompiler::CompileStoreCallback(
- Handle<JSObject> object,
- Handle<JSObject> holder,
- Handle<Name> name,
- const CallOptimization& call_optimization) {
- HandlerFrontend(IC::CurrentTypeOf(object, isolate()),
- receiver(), holder, name);
-
- Register values[] = { value() };
- GenerateFastApiCall(
- masm(), call_optimization, handle(object->map()),
- receiver(), scratch3(), true, 1, values);
-
- // Return the generated code.
- return GetCode(kind(), Code::FAST, name);
-}
#undef __
=======================================
--- /branches/bleeding_edge/src/ia32/stub-cache-ia32.cc Fri Feb 14 14:13:06
2014 UTC
+++ /branches/bleeding_edge/src/ia32/stub-cache-ia32.cc Mon Feb 17 12:36:44
2014 UTC
@@ -422,14 +422,14 @@
// This function uses push() to generate smaller, faster code than
// the version above. It is an optimization that should will be removed
// when api call ICs are generated in hydrogen.
-static void GenerateFastApiCall(MacroAssembler* masm,
- const CallOptimization& optimization,
- Handle<Map> receiver_map,
- Register receiver,
- Register scratch_in,
- bool is_store,
- int argc,
- Register* values) {
+void StubCompiler::GenerateFastApiCall(MacroAssembler* masm,
+ const CallOptimization&
optimization,
+ Handle<Map> receiver_map,
+ Register receiver,
+ Register scratch_in,
+ bool is_store,
+ int argc,
+ Register* values) {
// Copy return value.
__ pop(scratch_in);
// receiver
@@ -1064,15 +1064,6 @@
GenerateTailCall(masm(), stub.GetCode(isolate()));
}
}
-
-
-void LoadStubCompiler::GenerateLoadCallback(
- const CallOptimization& call_optimization,
- Handle<Map> receiver_map) {
- GenerateFastApiCall(
- masm(), call_optimization, receiver_map,
- receiver(), scratch1(), false, 0, NULL);
-}
void LoadStubCompiler::GenerateLoadCallback(
@@ -1262,24 +1253,6 @@
// Return the generated code.
return GetCode(kind(), Code::FAST, name);
}
-
-
-Handle<Code> StoreStubCompiler::CompileStoreCallback(
- Handle<JSObject> object,
- Handle<JSObject> holder,
- Handle<Name> name,
- const CallOptimization& call_optimization) {
- HandlerFrontend(IC::CurrentTypeOf(object, isolate()),
- receiver(), holder, name);
-
- Register values[] = { value() };
- GenerateFastApiCall(
- masm(), call_optimization, handle(object->map()),
- receiver(), scratch1(), true, 1, values);
-
- // Return the generated code.
- return GetCode(kind(), Code::FAST, name);
-}
#undef __
=======================================
--- /branches/bleeding_edge/src/stub-cache.cc Fri Feb 14 15:17:26 2014 UTC
+++ /branches/bleeding_edge/src/stub-cache.cc Mon Feb 17 12:36:44 2014 UTC
@@ -947,8 +947,10 @@
ASSERT(call_optimization.is_simple_api_call());
Handle<JSFunction> callback = call_optimization.constant_function();
CallbackHandlerFrontend(type, receiver(), holder, name, callback);
- GenerateLoadCallback(call_optimization, IC::TypeToMap(*type, isolate()));
-
+ Handle<Map>receiver_map = IC::TypeToMap(*type, isolate());
+ GenerateFastApiCall(
+ masm(), call_optimization, receiver_map,
+ receiver(), scratch1(), false, 0, NULL);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);
}
@@ -1125,6 +1127,22 @@
return GetCode(kind(), Code::FAST, name);
}
+
+
+Handle<Code> StoreStubCompiler::CompileStoreCallback(
+ Handle<JSObject> object,
+ Handle<JSObject> holder,
+ Handle<Name> name,
+ const CallOptimization& call_optimization) {
+ HandlerFrontend(IC::CurrentTypeOf(object, isolate()),
+ receiver(), holder, name);
+ Register values[] = { value() };
+ GenerateFastApiCall(
+ masm(), call_optimization, handle(object->map()),
+ receiver(), scratch1(), true, 1, values);
+ // Return the generated code.
+ return GetCode(kind(), Code::FAST, name);
+}
Handle<Code> KeyedLoadStubCompiler::CompileLoadElement(
=======================================
--- /branches/bleeding_edge/src/stub-cache.h Fri Feb 14 15:14:34 2014 UTC
+++ /branches/bleeding_edge/src/stub-cache.h Mon Feb 17 12:36:44 2014 UTC
@@ -406,6 +406,15 @@
void GenerateBooleanCheck(Register object, Label* miss);
+ static void GenerateFastApiCall(MacroAssembler* masm,
+ const CallOptimization& optimization,
+ Handle<Map> receiver_map,
+ Register receiver,
+ Register scratch,
+ bool is_store,
+ int argc,
+ Register* values);
+
protected:
Handle<Code> GetCodeWithFlags(Code::Flags flags, const char* name);
Handle<Code> GetCodeWithFlags(Code::Flags flags, Handle<Name> name);
=======================================
--- /branches/bleeding_edge/src/x64/stub-cache-x64.cc Fri Feb 14 14:13:06
2014 UTC
+++ /branches/bleeding_edge/src/x64/stub-cache-x64.cc Mon Feb 17 12:36:44
2014 UTC
@@ -393,14 +393,14 @@
// Generate call to api function.
-static void GenerateFastApiCall(MacroAssembler* masm,
- const CallOptimization& optimization,
- Handle<Map> receiver_map,
- Register receiver,
- Register scratch_in,
- bool is_store,
- int argc,
- Register* values) {
+void StubCompiler::GenerateFastApiCall(MacroAssembler* masm,
+ const CallOptimization&
optimization,
+ Handle<Map> receiver_map,
+ Register receiver,
+ Register scratch_in,
+ bool is_store,
+ int argc,
+ Register* values) {
ASSERT(optimization.is_simple_api_call());
__ PopReturnAddressTo(scratch_in);
@@ -968,15 +968,6 @@
GenerateTailCall(masm(), stub.GetCode(isolate()));
}
}
-
-
-void LoadStubCompiler::GenerateLoadCallback(
- const CallOptimization& call_optimization,
- Handle<Map> receiver_map) {
- GenerateFastApiCall(
- masm(), call_optimization, receiver_map,
- receiver(), scratch1(), false, 0, NULL);
-}
void LoadStubCompiler::GenerateLoadCallback(
@@ -1157,24 +1148,6 @@
// Return the generated code.
return GetCode(kind(), Code::FAST, name);
}
-
-
-Handle<Code> StoreStubCompiler::CompileStoreCallback(
- Handle<JSObject> object,
- Handle<JSObject> holder,
- Handle<Name> name,
- const CallOptimization& call_optimization) {
- HandlerFrontend(IC::CurrentTypeOf(object, isolate()),
- receiver(), holder, name);
-
- Register values[] = { value() };
- GenerateFastApiCall(
- masm(), call_optimization, handle(object->map()),
- receiver(), scratch1(), true, 1, values);
-
- // Return the generated code.
- return GetCode(kind(), Code::FAST, name);
-}
#undef __
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.