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

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

Issue 1154103005: Refactor lexical home object binding (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: git rebase Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/full-codegen-x87.cc
diff --git a/src/x87/full-codegen-x87.cc b/src/x87/full-codegen-x87.cc
index 5b3f8e0ee7601f45532b9f431f4864c02e08f1df..526bfe5ae710eafa62d90f59b9e69d1595103374 100644
--- a/src/x87/full-codegen-x87.cc
+++ b/src/x87/full-codegen-x87.cc
@@ -235,11 +235,6 @@ void FullCodeGenerator::Generate() {
}
}
- Variable* home_object_var = scope()->home_object_var();
- if (home_object_var != nullptr) {
- __ push(edi);
- }
-
ArgumentsAccessStub::HasNewTarget has_new_target =
IsSubclassConstructor(info->function()->kind())
? ArgumentsAccessStub::HAS_NEW_TARGET
@@ -306,19 +301,6 @@ void FullCodeGenerator::Generate() {
SetVar(arguments, eax, ebx, edx);
}
- // Possibly set up a local binding to the [[HomeObject]].
- if (home_object_var != nullptr) {
- Comment cmnt(masm_, "[ Home object");
- __ pop(LoadDescriptor::ReceiverRegister());
- Handle<Symbol> home_object_symbol(isolate()->heap()->home_object_symbol());
- __ mov(LoadDescriptor::NameRegister(), Immediate(home_object_symbol));
- __ mov(LoadDescriptor::SlotRegister(),
- Immediate(SmiFromSlot(function()->HomeObjectFeedbackSlot())));
- CallLoadIC(NOT_CONTEXTUAL);
-
- SetVar(home_object_var, eax, ebx, edx);
- }
-
if (FLAG_trace) {
__ CallRuntime(Runtime::kTraceEnter, 0);
}
@@ -1914,7 +1896,7 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
case NAMED_SUPER_PROPERTY:
VisitForStackValue(property->obj()->AsSuperReference()->this_var());
VisitForAccumulatorValue(
- property->obj()->AsSuperReference()->home_object_var());
+ property->obj()->AsSuperReference()->home_object());
__ push(result_register());
if (expr->is_compound()) {
__ push(MemOperand(esp, kPointerSize));
@@ -1932,8 +1914,7 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
break;
case KEYED_SUPER_PROPERTY:
VisitForStackValue(property->obj()->AsSuperReference()->this_var());
- VisitForStackValue(
- property->obj()->AsSuperReference()->home_object_var());
+ VisitForStackValue(property->obj()->AsSuperReference()->home_object());
VisitForAccumulatorValue(property->key());
__ Push(result_register());
if (expr->is_compound()) {
@@ -2558,8 +2539,7 @@ void FullCodeGenerator::EmitAssignment(Expression* expr,
case NAMED_SUPER_PROPERTY: {
__ push(eax);
VisitForStackValue(prop->obj()->AsSuperReference()->this_var());
- VisitForAccumulatorValue(
- prop->obj()->AsSuperReference()->home_object_var());
+ VisitForAccumulatorValue(prop->obj()->AsSuperReference()->home_object());
// stack: value, this; eax: home_object
Register scratch = ecx;
Register scratch2 = edx;
@@ -2575,7 +2555,7 @@ void FullCodeGenerator::EmitAssignment(Expression* expr,
case KEYED_SUPER_PROPERTY: {
__ push(eax);
VisitForStackValue(prop->obj()->AsSuperReference()->this_var());
- VisitForStackValue(prop->obj()->AsSuperReference()->home_object_var());
+ VisitForStackValue(prop->obj()->AsSuperReference()->home_object());
VisitForAccumulatorValue(prop->key());
Register scratch = ecx;
Register scratch2 = edx;
@@ -2798,7 +2778,7 @@ void FullCodeGenerator::VisitProperty(Property* expr) {
EmitNamedPropertyLoad(expr);
} else {
VisitForStackValue(expr->obj()->AsSuperReference()->this_var());
- VisitForStackValue(expr->obj()->AsSuperReference()->home_object_var());
+ VisitForStackValue(expr->obj()->AsSuperReference()->home_object());
EmitNamedSuperPropertyLoad(expr);
}
} else {
@@ -2810,7 +2790,7 @@ void FullCodeGenerator::VisitProperty(Property* expr) {
EmitKeyedPropertyLoad(expr);
} else {
VisitForStackValue(expr->obj()->AsSuperReference()->this_var());
- VisitForStackValue(expr->obj()->AsSuperReference()->home_object_var());
+ VisitForStackValue(expr->obj()->AsSuperReference()->home_object());
VisitForStackValue(expr->key());
EmitKeyedSuperPropertyLoad(expr);
}
@@ -2869,7 +2849,7 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
DCHECK(!key->value()->IsSmi());
// Load the function from the receiver.
SuperReference* super_ref = callee->AsProperty()->obj()->AsSuperReference();
- VisitForStackValue(super_ref->home_object_var());
+ VisitForStackValue(super_ref->home_object());
VisitForAccumulatorValue(super_ref->this_var());
__ push(eax);
__ push(eax);
@@ -2925,7 +2905,7 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
SetSourcePosition(prop->position());
// Load the function from the receiver.
SuperReference* super_ref = callee->AsProperty()->obj()->AsSuperReference();
- VisitForStackValue(super_ref->home_object_var());
+ VisitForStackValue(super_ref->home_object());
VisitForAccumulatorValue(super_ref->this_var());
__ push(eax);
__ push(eax);
@@ -4799,7 +4779,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
case NAMED_SUPER_PROPERTY: {
VisitForStackValue(prop->obj()->AsSuperReference()->this_var());
VisitForAccumulatorValue(
- prop->obj()->AsSuperReference()->home_object_var());
+ prop->obj()->AsSuperReference()->home_object());
__ push(result_register());
__ push(MemOperand(esp, kPointerSize));
__ push(result_register());
@@ -4809,7 +4789,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
case KEYED_SUPER_PROPERTY: {
VisitForStackValue(prop->obj()->AsSuperReference()->this_var());
- VisitForStackValue(prop->obj()->AsSuperReference()->home_object_var());
+ VisitForStackValue(prop->obj()->AsSuperReference()->home_object());
VisitForAccumulatorValue(prop->key());
__ push(result_register());
__ push(MemOperand(esp, 2 * kPointerSize));
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698