Commit db53680d authored by Igor Sheludko's avatar Igor Sheludko Committed by Commit Bot

[ic] Generate FCG-specific IC dispatchers as tail calls to optimized-code specific ones.

... instead of inlining the dispatchers' code. This should reduce the size of the generated
builtins code.

BUG=

Change-Id: Ia3f68ea8b398f049bad87f6ce93c818f0af4674f
Reviewed-on: https://chromium-review.googlesource.com/447938Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43542}
parent 12963af7
...@@ -29,12 +29,11 @@ IC_BUILTIN(LoadICTrampoline) ...@@ -29,12 +29,11 @@ IC_BUILTIN(LoadICTrampoline)
IC_BUILTIN(LoadField) IC_BUILTIN(LoadField)
IC_BUILTIN(KeyedLoadICTrampoline) IC_BUILTIN(KeyedLoadICTrampoline)
IC_BUILTIN(KeyedLoadIC_Megamorphic) IC_BUILTIN(KeyedLoadIC_Megamorphic)
IC_BUILTIN(StoreIC)
IC_BUILTIN(StoreICTrampoline)
IC_BUILTIN_PARAM(StoreICStrict, StoreIC, /* no param */)
IC_BUILTIN_PARAM(StoreICStrictTrampoline, StoreICTrampoline, /* no param */)
IC_BUILTIN_PARAM(StoreIC, StoreIC, SLOPPY)
IC_BUILTIN_PARAM(StoreICTrampoline, StoreICTrampoline, SLOPPY)
IC_BUILTIN_PARAM(StoreICStrict, StoreIC, STRICT)
IC_BUILTIN_PARAM(StoreICStrictTrampoline, StoreICTrampoline, STRICT)
IC_BUILTIN_PARAM(KeyedStoreIC, KeyedStoreIC, SLOPPY) IC_BUILTIN_PARAM(KeyedStoreIC, KeyedStoreIC, SLOPPY)
IC_BUILTIN_PARAM(KeyedStoreICTrampoline, KeyedStoreICTrampoline, SLOPPY) IC_BUILTIN_PARAM(KeyedStoreICTrampoline, KeyedStoreICTrampoline, SLOPPY)
IC_BUILTIN_PARAM(KeyedStoreICStrict, KeyedStoreIC, STRICT) IC_BUILTIN_PARAM(KeyedStoreICStrict, KeyedStoreIC, STRICT)
......
...@@ -2072,8 +2072,8 @@ void AccessorAssembler::GenerateLoadICTrampoline() { ...@@ -2072,8 +2072,8 @@ void AccessorAssembler::GenerateLoadICTrampoline() {
Node* context = Parameter(Descriptor::kContext); Node* context = Parameter(Descriptor::kContext);
Node* vector = LoadFeedbackVectorForStub(); Node* vector = LoadFeedbackVectorForStub();
LoadICParameters p(context, receiver, name, slot, vector); Callable callable = CodeFactory::LoadICInOptimizedCode(isolate());
LoadIC(&p); TailCallStub(callable, context, receiver, name, slot, vector);
} }
void AccessorAssembler::GenerateLoadICProtoArray( void AccessorAssembler::GenerateLoadICProtoArray(
...@@ -2135,8 +2135,9 @@ void AccessorAssembler::GenerateLoadGlobalICTrampoline(TypeofMode typeof_mode) { ...@@ -2135,8 +2135,9 @@ void AccessorAssembler::GenerateLoadGlobalICTrampoline(TypeofMode typeof_mode) {
Node* context = Parameter(Descriptor::kContext); Node* context = Parameter(Descriptor::kContext);
Node* vector = LoadFeedbackVectorForStub(); Node* vector = LoadFeedbackVectorForStub();
LoadICParameters p(context, nullptr, name, slot, vector); Callable callable =
LoadGlobalIC(&p, typeof_mode); CodeFactory::LoadGlobalICInOptimizedCode(isolate(), typeof_mode);
TailCallStub(callable, context, name, slot, vector);
} }
void AccessorAssembler::GenerateKeyedLoadIC() { void AccessorAssembler::GenerateKeyedLoadIC() {
...@@ -2161,8 +2162,8 @@ void AccessorAssembler::GenerateKeyedLoadICTrampoline() { ...@@ -2161,8 +2162,8 @@ void AccessorAssembler::GenerateKeyedLoadICTrampoline() {
Node* context = Parameter(Descriptor::kContext); Node* context = Parameter(Descriptor::kContext);
Node* vector = LoadFeedbackVectorForStub(); Node* vector = LoadFeedbackVectorForStub();
LoadICParameters p(context, receiver, name, slot, vector); Callable callable = CodeFactory::KeyedLoadICInOptimizedCode(isolate());
KeyedLoadIC(&p); TailCallStub(callable, context, receiver, name, slot, vector);
} }
void AccessorAssembler::GenerateKeyedLoadIC_Megamorphic() { void AccessorAssembler::GenerateKeyedLoadIC_Megamorphic() {
...@@ -2178,7 +2179,7 @@ void AccessorAssembler::GenerateKeyedLoadIC_Megamorphic() { ...@@ -2178,7 +2179,7 @@ void AccessorAssembler::GenerateKeyedLoadIC_Megamorphic() {
KeyedLoadICGeneric(&p); KeyedLoadICGeneric(&p);
} }
void AccessorAssembler::GenerateStoreIC() { void AccessorAssembler::GenerateStoreIC(LanguageMode language_mode) {
typedef StoreWithVectorDescriptor Descriptor; typedef StoreWithVectorDescriptor Descriptor;
Node* receiver = Parameter(Descriptor::kReceiver); Node* receiver = Parameter(Descriptor::kReceiver);
...@@ -2189,10 +2190,11 @@ void AccessorAssembler::GenerateStoreIC() { ...@@ -2189,10 +2190,11 @@ void AccessorAssembler::GenerateStoreIC() {
Node* context = Parameter(Descriptor::kContext); Node* context = Parameter(Descriptor::kContext);
StoreICParameters p(context, receiver, name, value, slot, vector); StoreICParameters p(context, receiver, name, value, slot, vector);
// Current StoreIC dispatcher does not depend on the language mode.
StoreIC(&p); StoreIC(&p);
} }
void AccessorAssembler::GenerateStoreICTrampoline() { void AccessorAssembler::GenerateStoreICTrampoline(LanguageMode language_mode) {
typedef StoreDescriptor Descriptor; typedef StoreDescriptor Descriptor;
Node* receiver = Parameter(Descriptor::kReceiver); Node* receiver = Parameter(Descriptor::kReceiver);
...@@ -2202,8 +2204,9 @@ void AccessorAssembler::GenerateStoreICTrampoline() { ...@@ -2202,8 +2204,9 @@ void AccessorAssembler::GenerateStoreICTrampoline() {
Node* context = Parameter(Descriptor::kContext); Node* context = Parameter(Descriptor::kContext);
Node* vector = LoadFeedbackVectorForStub(); Node* vector = LoadFeedbackVectorForStub();
StoreICParameters p(context, receiver, name, value, slot, vector); Callable callable =
StoreIC(&p); CodeFactory::StoreICInOptimizedCode(isolate(), language_mode);
TailCallStub(callable, context, receiver, name, value, slot, vector);
} }
void AccessorAssembler::GenerateKeyedStoreIC(LanguageMode language_mode) { void AccessorAssembler::GenerateKeyedStoreIC(LanguageMode language_mode) {
...@@ -2231,8 +2234,9 @@ void AccessorAssembler::GenerateKeyedStoreICTrampoline( ...@@ -2231,8 +2234,9 @@ void AccessorAssembler::GenerateKeyedStoreICTrampoline(
Node* context = Parameter(Descriptor::kContext); Node* context = Parameter(Descriptor::kContext);
Node* vector = LoadFeedbackVectorForStub(); Node* vector = LoadFeedbackVectorForStub();
StoreICParameters p(context, receiver, name, value, slot, vector); Callable callable =
KeyedStoreIC(&p, language_mode); CodeFactory::KeyedStoreICInOptimizedCode(isolate(), language_mode);
TailCallStub(callable, context, receiver, name, value, slot, vector);
} }
} // namespace internal } // namespace internal
......
...@@ -30,8 +30,8 @@ class AccessorAssembler : public CodeStubAssembler { ...@@ -30,8 +30,8 @@ class AccessorAssembler : public CodeStubAssembler {
void GenerateKeyedLoadIC(); void GenerateKeyedLoadIC();
void GenerateKeyedLoadICTrampoline(); void GenerateKeyedLoadICTrampoline();
void GenerateKeyedLoadIC_Megamorphic(); void GenerateKeyedLoadIC_Megamorphic();
void GenerateStoreIC(); void GenerateStoreIC(LanguageMode language_mode);
void GenerateStoreICTrampoline(); void GenerateStoreICTrampoline(LanguageMode language_mode);
void GenerateLoadICProtoArray(bool throw_reference_error_if_nonexistent); void GenerateLoadICProtoArray(bool throw_reference_error_if_nonexistent);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment