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

Unified Diff: src/full-codegen/full-codegen.cc

Issue 2363123002: Revert of [fullcodegen] Refactor code that calls store ICs. (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/full-codegen/full-codegen.h ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/full-codegen.cc
diff --git a/src/full-codegen/full-codegen.cc b/src/full-codegen/full-codegen.cc
index 1900d955f5cae62a453ba2f0a4e08987bf6ac725..2c5d979cf1d3f3563d698a947af3da456eeb37d5 100644
--- a/src/full-codegen/full-codegen.cc
+++ b/src/full-codegen/full-codegen.cc
@@ -235,37 +235,31 @@
CallIC(ic, id);
}
-void FullCodeGenerator::CallStoreIC(FeedbackVectorSlot slot,
- Handle<Object> name, TypeFeedbackId id) {
- DCHECK(name->IsName());
- __ Move(StoreDescriptor::NameRegister(), name);
+void FullCodeGenerator::CallStoreIC(TypeFeedbackId id) {
+ Handle<Code> ic = CodeFactory::StoreIC(isolate(), language_mode()).code();
STATIC_ASSERT(!StoreDescriptor::kPassLastArgsOnStack ||
StoreDescriptor::kStackArgumentsCount == 2);
if (StoreDescriptor::kPassLastArgsOnStack) {
__ Push(StoreDescriptor::ValueRegister());
- EmitPushSlot(slot);
- } else {
- EmitLoadSlot(StoreDescriptor::SlotRegister(), slot);
- }
-
- Handle<Code> ic = CodeFactory::StoreIC(isolate(), language_mode()).code();
+ __ Push(StoreDescriptor::SlotRegister());
+ }
+
CallIC(ic, id);
RestoreContext();
}
-void FullCodeGenerator::CallKeyedStoreIC(FeedbackVectorSlot slot) {
+void FullCodeGenerator::CallKeyedStoreIC() {
+ Handle<Code> ic =
+ CodeFactory::KeyedStoreIC(isolate(), language_mode()).code();
+
STATIC_ASSERT(!StoreDescriptor::kPassLastArgsOnStack ||
StoreDescriptor::kStackArgumentsCount == 2);
if (StoreDescriptor::kPassLastArgsOnStack) {
__ Push(StoreDescriptor::ValueRegister());
- EmitPushSlot(slot);
- } else {
- EmitLoadSlot(StoreDescriptor::SlotRegister(), slot);
- }
-
- Handle<Code> ic =
- CodeFactory::KeyedStoreIC(isolate(), language_mode()).code();
+ __ Push(StoreDescriptor::SlotRegister());
+ }
+
CallIC(ic);
RestoreContext();
}
@@ -493,6 +487,7 @@
Comment cmnt(masm_, "[ VariableProxy");
EmitVariableLoad(expr);
}
+
void FullCodeGenerator::VisitSloppyBlockFunctionStatement(
SloppyBlockFunctionStatement* declaration) {
@@ -1133,14 +1128,9 @@
PushOperand(result_register());
}
-void FullCodeGenerator::EmitLoadSlot(Register destination,
- FeedbackVectorSlot slot) {
+void FullCodeGenerator::EmitLoadStoreICSlot(FeedbackVectorSlot slot) {
DCHECK(!slot.IsInvalid());
- __ Move(destination, SmiFromSlot(slot));
-}
-
-void FullCodeGenerator::EmitPushSlot(FeedbackVectorSlot slot) {
- __ Push(SmiFromSlot(slot));
+ __ Move(StoreDescriptor::SlotRegister(), SmiFromSlot(slot));
}
void FullCodeGenerator::VisitReturnStatement(ReturnStatement* stmt) {
« no previous file with comments | « src/full-codegen/full-codegen.h ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698