| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 8 | 8 |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 } else if (FLAG_debug_code) { | 231 } else if (FLAG_debug_code) { |
| 232 Label done; | 232 Label done; |
| 233 __ JumpIfInNewSpace(esi, eax, &done, Label::kNear); | 233 __ JumpIfInNewSpace(esi, eax, &done, Label::kNear); |
| 234 __ Abort(kExpectedNewSpaceObject); | 234 __ Abort(kExpectedNewSpaceObject); |
| 235 __ bind(&done); | 235 __ bind(&done); |
| 236 } | 236 } |
| 237 } | 237 } |
| 238 } | 238 } |
| 239 } | 239 } |
| 240 | 240 |
| 241 Variable* home_object_var = scope()->home_object_var(); |
| 242 if (home_object_var != nullptr) { |
| 243 __ push(edi); |
| 244 } |
| 245 |
| 241 ArgumentsAccessStub::HasNewTarget has_new_target = | 246 ArgumentsAccessStub::HasNewTarget has_new_target = |
| 242 IsSubclassConstructor(info->function()->kind()) | 247 IsSubclassConstructor(info->function()->kind()) |
| 243 ? ArgumentsAccessStub::HAS_NEW_TARGET | 248 ? ArgumentsAccessStub::HAS_NEW_TARGET |
| 244 : ArgumentsAccessStub::NO_NEW_TARGET; | 249 : ArgumentsAccessStub::NO_NEW_TARGET; |
| 245 | 250 |
| 246 // Possibly allocate RestParameters | 251 // Possibly allocate RestParameters |
| 247 int rest_index; | 252 int rest_index; |
| 248 Variable* rest_param = scope()->rest_parameter(&rest_index); | 253 Variable* rest_param = scope()->rest_parameter(&rest_index); |
| 249 if (rest_param) { | 254 if (rest_param) { |
| 250 Comment cmnt(masm_, "[ Allocate rest parameter array"); | 255 Comment cmnt(masm_, "[ Allocate rest parameter array"); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 } else { | 301 } else { |
| 297 type = ArgumentsAccessStub::NEW_SLOPPY_FAST; | 302 type = ArgumentsAccessStub::NEW_SLOPPY_FAST; |
| 298 } | 303 } |
| 299 | 304 |
| 300 ArgumentsAccessStub stub(isolate(), type, has_new_target); | 305 ArgumentsAccessStub stub(isolate(), type, has_new_target); |
| 301 __ CallStub(&stub); | 306 __ CallStub(&stub); |
| 302 | 307 |
| 303 SetVar(arguments, eax, ebx, edx); | 308 SetVar(arguments, eax, ebx, edx); |
| 304 } | 309 } |
| 305 | 310 |
| 311 // Possibly set up a local binding to the [[HomeObject]]. |
| 312 if (home_object_var != nullptr) { |
| 313 Comment cmnt(masm_, "[ Home object"); |
| 314 __ pop(LoadDescriptor::ReceiverRegister()); |
| 315 Handle<Symbol> home_object_symbol(isolate()->heap()->home_object_symbol()); |
| 316 __ mov(LoadDescriptor::NameRegister(), Immediate(home_object_symbol)); |
| 317 __ mov(LoadDescriptor::SlotRegister(), |
| 318 Immediate(SmiFromSlot(function()->HomeObjectFeedbackSlot()))); |
| 319 CallLoadIC(NOT_CONTEXTUAL); |
| 320 |
| 321 SetVar(home_object_var, eax, ebx, edx); |
| 322 } |
| 323 |
| 306 if (FLAG_trace) { | 324 if (FLAG_trace) { |
| 307 __ CallRuntime(Runtime::kTraceEnter, 0); | 325 __ CallRuntime(Runtime::kTraceEnter, 0); |
| 308 } | 326 } |
| 309 | 327 |
| 310 // Visit the declarations and body unless there is an illegal | 328 // Visit the declarations and body unless there is an illegal |
| 311 // redeclaration. | 329 // redeclaration. |
| 312 if (scope()->HasIllegalRedeclaration()) { | 330 if (scope()->HasIllegalRedeclaration()) { |
| 313 Comment cmnt(masm_, "[ Declarations"); | 331 Comment cmnt(masm_, "[ Declarations"); |
| 314 scope()->VisitIllegalRedeclaration(this); | 332 scope()->VisitIllegalRedeclaration(this); |
| 315 | 333 |
| (...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1244 context()->Plug(eax); | 1262 context()->Plug(eax); |
| 1245 } | 1263 } |
| 1246 | 1264 |
| 1247 | 1265 |
| 1248 void FullCodeGenerator::VisitVariableProxy(VariableProxy* expr) { | 1266 void FullCodeGenerator::VisitVariableProxy(VariableProxy* expr) { |
| 1249 Comment cmnt(masm_, "[ VariableProxy"); | 1267 Comment cmnt(masm_, "[ VariableProxy"); |
| 1250 EmitVariableLoad(expr); | 1268 EmitVariableLoad(expr); |
| 1251 } | 1269 } |
| 1252 | 1270 |
| 1253 | 1271 |
| 1254 void FullCodeGenerator::EmitLoadHomeObject(SuperReference* expr) { | |
| 1255 Comment cnmt(masm_, "[ SuperReference "); | |
| 1256 | |
| 1257 __ mov(LoadDescriptor::ReceiverRegister(), | |
| 1258 Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); | |
| 1259 | |
| 1260 Handle<Symbol> home_object_symbol(isolate()->heap()->home_object_symbol()); | |
| 1261 __ mov(LoadDescriptor::NameRegister(), home_object_symbol); | |
| 1262 | |
| 1263 __ mov(LoadDescriptor::SlotRegister(), | |
| 1264 Immediate(SmiFromSlot(expr->HomeObjectFeedbackSlot()))); | |
| 1265 CallLoadIC(NOT_CONTEXTUAL); | |
| 1266 | |
| 1267 __ cmp(eax, isolate()->factory()->undefined_value()); | |
| 1268 Label done; | |
| 1269 __ j(not_equal, &done); | |
| 1270 __ CallRuntime(Runtime::kThrowNonMethodError, 0); | |
| 1271 __ bind(&done); | |
| 1272 } | |
| 1273 | |
| 1274 | |
| 1275 void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, | 1272 void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, |
| 1276 int offset) { | 1273 int offset) { |
| 1277 if (NeedsHomeObject(initializer)) { | 1274 if (NeedsHomeObject(initializer)) { |
| 1278 __ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, 0)); | 1275 __ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, 0)); |
| 1279 __ mov(StoreDescriptor::NameRegister(), | 1276 __ mov(StoreDescriptor::NameRegister(), |
| 1280 Immediate(isolate()->factory()->home_object_symbol())); | 1277 Immediate(isolate()->factory()->home_object_symbol())); |
| 1281 __ mov(StoreDescriptor::ValueRegister(), | 1278 __ mov(StoreDescriptor::ValueRegister(), |
| 1282 Operand(esp, offset * kPointerSize)); | 1279 Operand(esp, offset * kPointerSize)); |
| 1283 CallStoreIC(); | 1280 CallStoreIC(); |
| 1284 } | 1281 } |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1891 Property* property = expr->target()->AsProperty(); | 1888 Property* property = expr->target()->AsProperty(); |
| 1892 LhsKind assign_type = GetAssignType(property); | 1889 LhsKind assign_type = GetAssignType(property); |
| 1893 | 1890 |
| 1894 // Evaluate LHS expression. | 1891 // Evaluate LHS expression. |
| 1895 switch (assign_type) { | 1892 switch (assign_type) { |
| 1896 case VARIABLE: | 1893 case VARIABLE: |
| 1897 // Nothing to do here. | 1894 // Nothing to do here. |
| 1898 break; | 1895 break; |
| 1899 case NAMED_SUPER_PROPERTY: | 1896 case NAMED_SUPER_PROPERTY: |
| 1900 VisitForStackValue(property->obj()->AsSuperReference()->this_var()); | 1897 VisitForStackValue(property->obj()->AsSuperReference()->this_var()); |
| 1901 EmitLoadHomeObject(property->obj()->AsSuperReference()); | 1898 VisitForAccumulatorValue( |
| 1899 property->obj()->AsSuperReference()->home_object_var()); |
| 1902 __ push(result_register()); | 1900 __ push(result_register()); |
| 1903 if (expr->is_compound()) { | 1901 if (expr->is_compound()) { |
| 1904 __ push(MemOperand(esp, kPointerSize)); | 1902 __ push(MemOperand(esp, kPointerSize)); |
| 1905 __ push(result_register()); | 1903 __ push(result_register()); |
| 1906 } | 1904 } |
| 1907 break; | 1905 break; |
| 1908 case NAMED_PROPERTY: | 1906 case NAMED_PROPERTY: |
| 1909 if (expr->is_compound()) { | 1907 if (expr->is_compound()) { |
| 1910 // We need the receiver both on the stack and in the register. | 1908 // We need the receiver both on the stack and in the register. |
| 1911 VisitForStackValue(property->obj()); | 1909 VisitForStackValue(property->obj()); |
| 1912 __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0)); | 1910 __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0)); |
| 1913 } else { | 1911 } else { |
| 1914 VisitForStackValue(property->obj()); | 1912 VisitForStackValue(property->obj()); |
| 1915 } | 1913 } |
| 1916 break; | 1914 break; |
| 1917 case KEYED_SUPER_PROPERTY: | 1915 case KEYED_SUPER_PROPERTY: |
| 1918 VisitForStackValue(property->obj()->AsSuperReference()->this_var()); | 1916 VisitForStackValue(property->obj()->AsSuperReference()->this_var()); |
| 1919 EmitLoadHomeObject(property->obj()->AsSuperReference()); | 1917 VisitForStackValue( |
| 1920 __ Push(result_register()); | 1918 property->obj()->AsSuperReference()->home_object_var()); |
| 1921 VisitForAccumulatorValue(property->key()); | 1919 VisitForAccumulatorValue(property->key()); |
| 1922 __ Push(result_register()); | 1920 __ Push(result_register()); |
| 1923 if (expr->is_compound()) { | 1921 if (expr->is_compound()) { |
| 1924 __ push(MemOperand(esp, 2 * kPointerSize)); | 1922 __ push(MemOperand(esp, 2 * kPointerSize)); |
| 1925 __ push(MemOperand(esp, 2 * kPointerSize)); | 1923 __ push(MemOperand(esp, 2 * kPointerSize)); |
| 1926 __ push(result_register()); | 1924 __ push(result_register()); |
| 1927 } | 1925 } |
| 1928 break; | 1926 break; |
| 1929 case KEYED_PROPERTY: { | 1927 case KEYED_PROPERTY: { |
| 1930 if (expr->is_compound()) { | 1928 if (expr->is_compound()) { |
| (...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2533 __ Move(StoreDescriptor::ReceiverRegister(), eax); | 2531 __ Move(StoreDescriptor::ReceiverRegister(), eax); |
| 2534 __ pop(StoreDescriptor::ValueRegister()); // Restore value. | 2532 __ pop(StoreDescriptor::ValueRegister()); // Restore value. |
| 2535 __ mov(StoreDescriptor::NameRegister(), | 2533 __ mov(StoreDescriptor::NameRegister(), |
| 2536 prop->key()->AsLiteral()->value()); | 2534 prop->key()->AsLiteral()->value()); |
| 2537 CallStoreIC(); | 2535 CallStoreIC(); |
| 2538 break; | 2536 break; |
| 2539 } | 2537 } |
| 2540 case NAMED_SUPER_PROPERTY: { | 2538 case NAMED_SUPER_PROPERTY: { |
| 2541 __ push(eax); | 2539 __ push(eax); |
| 2542 VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); | 2540 VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); |
| 2543 EmitLoadHomeObject(prop->obj()->AsSuperReference()); | 2541 VisitForAccumulatorValue( |
| 2542 prop->obj()->AsSuperReference()->home_object_var()); |
| 2544 // stack: value, this; eax: home_object | 2543 // stack: value, this; eax: home_object |
| 2545 Register scratch = ecx; | 2544 Register scratch = ecx; |
| 2546 Register scratch2 = edx; | 2545 Register scratch2 = edx; |
| 2547 __ mov(scratch, result_register()); // home_object | 2546 __ mov(scratch, result_register()); // home_object |
| 2548 __ mov(eax, MemOperand(esp, kPointerSize)); // value | 2547 __ mov(eax, MemOperand(esp, kPointerSize)); // value |
| 2549 __ mov(scratch2, MemOperand(esp, 0)); // this | 2548 __ mov(scratch2, MemOperand(esp, 0)); // this |
| 2550 __ mov(MemOperand(esp, kPointerSize), scratch2); // this | 2549 __ mov(MemOperand(esp, kPointerSize), scratch2); // this |
| 2551 __ mov(MemOperand(esp, 0), scratch); // home_object | 2550 __ mov(MemOperand(esp, 0), scratch); // home_object |
| 2552 // stack: this, home_object. eax: value | 2551 // stack: this, home_object. eax: value |
| 2553 EmitNamedSuperPropertyStore(prop); | 2552 EmitNamedSuperPropertyStore(prop); |
| 2554 break; | 2553 break; |
| 2555 } | 2554 } |
| 2556 case KEYED_SUPER_PROPERTY: { | 2555 case KEYED_SUPER_PROPERTY: { |
| 2557 __ push(eax); | 2556 __ push(eax); |
| 2558 VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); | 2557 VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); |
| 2559 EmitLoadHomeObject(prop->obj()->AsSuperReference()); | 2558 VisitForStackValue(prop->obj()->AsSuperReference()->home_object_var()); |
| 2560 __ push(result_register()); | |
| 2561 VisitForAccumulatorValue(prop->key()); | 2559 VisitForAccumulatorValue(prop->key()); |
| 2562 Register scratch = ecx; | 2560 Register scratch = ecx; |
| 2563 Register scratch2 = edx; | 2561 Register scratch2 = edx; |
| 2564 __ mov(scratch2, MemOperand(esp, 2 * kPointerSize)); // value | 2562 __ mov(scratch2, MemOperand(esp, 2 * kPointerSize)); // value |
| 2565 // stack: value, this, home_object; eax: key, edx: value | 2563 // stack: value, this, home_object; eax: key, edx: value |
| 2566 __ mov(scratch, MemOperand(esp, kPointerSize)); // this | 2564 __ mov(scratch, MemOperand(esp, kPointerSize)); // this |
| 2567 __ mov(MemOperand(esp, 2 * kPointerSize), scratch); | 2565 __ mov(MemOperand(esp, 2 * kPointerSize), scratch); |
| 2568 __ mov(scratch, MemOperand(esp, 0)); // home_object | 2566 __ mov(scratch, MemOperand(esp, 0)); // home_object |
| 2569 __ mov(MemOperand(esp, kPointerSize), scratch); | 2567 __ mov(MemOperand(esp, kPointerSize), scratch); |
| 2570 __ mov(MemOperand(esp, 0), eax); | 2568 __ mov(MemOperand(esp, 0), eax); |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2761 Comment cmnt(masm_, "[ Property"); | 2759 Comment cmnt(masm_, "[ Property"); |
| 2762 Expression* key = expr->key(); | 2760 Expression* key = expr->key(); |
| 2763 | 2761 |
| 2764 if (key->IsPropertyName()) { | 2762 if (key->IsPropertyName()) { |
| 2765 if (!expr->IsSuperAccess()) { | 2763 if (!expr->IsSuperAccess()) { |
| 2766 VisitForAccumulatorValue(expr->obj()); | 2764 VisitForAccumulatorValue(expr->obj()); |
| 2767 __ Move(LoadDescriptor::ReceiverRegister(), result_register()); | 2765 __ Move(LoadDescriptor::ReceiverRegister(), result_register()); |
| 2768 EmitNamedPropertyLoad(expr); | 2766 EmitNamedPropertyLoad(expr); |
| 2769 } else { | 2767 } else { |
| 2770 VisitForStackValue(expr->obj()->AsSuperReference()->this_var()); | 2768 VisitForStackValue(expr->obj()->AsSuperReference()->this_var()); |
| 2771 EmitLoadHomeObject(expr->obj()->AsSuperReference()); | 2769 VisitForStackValue(expr->obj()->AsSuperReference()->home_object_var()); |
| 2772 __ push(result_register()); | |
| 2773 EmitNamedSuperPropertyLoad(expr); | 2770 EmitNamedSuperPropertyLoad(expr); |
| 2774 } | 2771 } |
| 2775 } else { | 2772 } else { |
| 2776 if (!expr->IsSuperAccess()) { | 2773 if (!expr->IsSuperAccess()) { |
| 2777 VisitForStackValue(expr->obj()); | 2774 VisitForStackValue(expr->obj()); |
| 2778 VisitForAccumulatorValue(expr->key()); | 2775 VisitForAccumulatorValue(expr->key()); |
| 2779 __ pop(LoadDescriptor::ReceiverRegister()); // Object. | 2776 __ pop(LoadDescriptor::ReceiverRegister()); // Object. |
| 2780 __ Move(LoadDescriptor::NameRegister(), result_register()); // Key. | 2777 __ Move(LoadDescriptor::NameRegister(), result_register()); // Key. |
| 2781 EmitKeyedPropertyLoad(expr); | 2778 EmitKeyedPropertyLoad(expr); |
| 2782 } else { | 2779 } else { |
| 2783 VisitForStackValue(expr->obj()->AsSuperReference()->this_var()); | 2780 VisitForStackValue(expr->obj()->AsSuperReference()->this_var()); |
| 2784 EmitLoadHomeObject(expr->obj()->AsSuperReference()); | 2781 VisitForStackValue(expr->obj()->AsSuperReference()->home_object_var()); |
| 2785 __ push(result_register()); | |
| 2786 VisitForStackValue(expr->key()); | 2782 VisitForStackValue(expr->key()); |
| 2787 EmitKeyedSuperPropertyLoad(expr); | 2783 EmitKeyedSuperPropertyLoad(expr); |
| 2788 } | 2784 } |
| 2789 } | 2785 } |
| 2790 PrepareForBailoutForId(expr->LoadId(), TOS_REG); | 2786 PrepareForBailoutForId(expr->LoadId(), TOS_REG); |
| 2791 context()->Plug(eax); | 2787 context()->Plug(eax); |
| 2792 } | 2788 } |
| 2793 | 2789 |
| 2794 | 2790 |
| 2795 void FullCodeGenerator::CallIC(Handle<Code> code, | 2791 void FullCodeGenerator::CallIC(Handle<Code> code, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2834 Expression* callee = expr->expression(); | 2830 Expression* callee = expr->expression(); |
| 2835 DCHECK(callee->IsProperty()); | 2831 DCHECK(callee->IsProperty()); |
| 2836 Property* prop = callee->AsProperty(); | 2832 Property* prop = callee->AsProperty(); |
| 2837 DCHECK(prop->IsSuperAccess()); | 2833 DCHECK(prop->IsSuperAccess()); |
| 2838 | 2834 |
| 2839 SetSourcePosition(prop->position()); | 2835 SetSourcePosition(prop->position()); |
| 2840 Literal* key = prop->key()->AsLiteral(); | 2836 Literal* key = prop->key()->AsLiteral(); |
| 2841 DCHECK(!key->value()->IsSmi()); | 2837 DCHECK(!key->value()->IsSmi()); |
| 2842 // Load the function from the receiver. | 2838 // Load the function from the receiver. |
| 2843 SuperReference* super_ref = callee->AsProperty()->obj()->AsSuperReference(); | 2839 SuperReference* super_ref = callee->AsProperty()->obj()->AsSuperReference(); |
| 2844 EmitLoadHomeObject(super_ref); | 2840 VisitForStackValue(super_ref->home_object_var()); |
| 2845 __ push(eax); | |
| 2846 VisitForAccumulatorValue(super_ref->this_var()); | 2841 VisitForAccumulatorValue(super_ref->this_var()); |
| 2847 __ push(eax); | 2842 __ push(eax); |
| 2848 __ push(eax); | 2843 __ push(eax); |
| 2849 __ push(Operand(esp, kPointerSize * 2)); | 2844 __ push(Operand(esp, kPointerSize * 2)); |
| 2850 __ push(Immediate(key->value())); | 2845 __ push(Immediate(key->value())); |
| 2851 // Stack here: | 2846 // Stack here: |
| 2852 // - home_object | 2847 // - home_object |
| 2853 // - this (receiver) | 2848 // - this (receiver) |
| 2854 // - this (receiver) <-- LoadFromSuper will pop here and below. | 2849 // - this (receiver) <-- LoadFromSuper will pop here and below. |
| 2855 // - home_object | 2850 // - home_object |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2891 | 2886 |
| 2892 void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) { | 2887 void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) { |
| 2893 Expression* callee = expr->expression(); | 2888 Expression* callee = expr->expression(); |
| 2894 DCHECK(callee->IsProperty()); | 2889 DCHECK(callee->IsProperty()); |
| 2895 Property* prop = callee->AsProperty(); | 2890 Property* prop = callee->AsProperty(); |
| 2896 DCHECK(prop->IsSuperAccess()); | 2891 DCHECK(prop->IsSuperAccess()); |
| 2897 | 2892 |
| 2898 SetSourcePosition(prop->position()); | 2893 SetSourcePosition(prop->position()); |
| 2899 // Load the function from the receiver. | 2894 // Load the function from the receiver. |
| 2900 SuperReference* super_ref = callee->AsProperty()->obj()->AsSuperReference(); | 2895 SuperReference* super_ref = callee->AsProperty()->obj()->AsSuperReference(); |
| 2901 EmitLoadHomeObject(super_ref); | 2896 VisitForStackValue(super_ref->home_object_var()); |
| 2902 __ push(eax); | |
| 2903 VisitForAccumulatorValue(super_ref->this_var()); | 2897 VisitForAccumulatorValue(super_ref->this_var()); |
| 2904 __ push(eax); | 2898 __ push(eax); |
| 2905 __ push(eax); | 2899 __ push(eax); |
| 2906 __ push(Operand(esp, kPointerSize * 2)); | 2900 __ push(Operand(esp, kPointerSize * 2)); |
| 2907 VisitForStackValue(prop->key()); | 2901 VisitForStackValue(prop->key()); |
| 2908 // Stack here: | 2902 // Stack here: |
| 2909 // - home_object | 2903 // - home_object |
| 2910 // - this (receiver) | 2904 // - this (receiver) |
| 2911 // - this (receiver) <-- LoadKeyedFromSuper will pop here and below. | 2905 // - this (receiver) <-- LoadKeyedFromSuper will pop here and below. |
| 2912 // - home_object | 2906 // - home_object |
| (...skipping 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4764 case NAMED_PROPERTY: { | 4758 case NAMED_PROPERTY: { |
| 4765 // Put the object both on the stack and in the register. | 4759 // Put the object both on the stack and in the register. |
| 4766 VisitForStackValue(prop->obj()); | 4760 VisitForStackValue(prop->obj()); |
| 4767 __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0)); | 4761 __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0)); |
| 4768 EmitNamedPropertyLoad(prop); | 4762 EmitNamedPropertyLoad(prop); |
| 4769 break; | 4763 break; |
| 4770 } | 4764 } |
| 4771 | 4765 |
| 4772 case NAMED_SUPER_PROPERTY: { | 4766 case NAMED_SUPER_PROPERTY: { |
| 4773 VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); | 4767 VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); |
| 4774 EmitLoadHomeObject(prop->obj()->AsSuperReference()); | 4768 VisitForAccumulatorValue( |
| 4769 prop->obj()->AsSuperReference()->home_object_var()); |
| 4775 __ push(result_register()); | 4770 __ push(result_register()); |
| 4776 __ push(MemOperand(esp, kPointerSize)); | 4771 __ push(MemOperand(esp, kPointerSize)); |
| 4777 __ push(result_register()); | 4772 __ push(result_register()); |
| 4778 EmitNamedSuperPropertyLoad(prop); | 4773 EmitNamedSuperPropertyLoad(prop); |
| 4779 break; | 4774 break; |
| 4780 } | 4775 } |
| 4781 | 4776 |
| 4782 case KEYED_SUPER_PROPERTY: { | 4777 case KEYED_SUPER_PROPERTY: { |
| 4783 VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); | 4778 VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); |
| 4784 EmitLoadHomeObject(prop->obj()->AsSuperReference()); | 4779 VisitForStackValue(prop->obj()->AsSuperReference()->home_object_var()); |
| 4785 __ push(result_register()); | |
| 4786 VisitForAccumulatorValue(prop->key()); | 4780 VisitForAccumulatorValue(prop->key()); |
| 4787 __ push(result_register()); | 4781 __ push(result_register()); |
| 4788 __ push(MemOperand(esp, 2 * kPointerSize)); | 4782 __ push(MemOperand(esp, 2 * kPointerSize)); |
| 4789 __ push(MemOperand(esp, 2 * kPointerSize)); | 4783 __ push(MemOperand(esp, 2 * kPointerSize)); |
| 4790 __ push(result_register()); | 4784 __ push(result_register()); |
| 4791 EmitKeyedSuperPropertyLoad(prop); | 4785 EmitKeyedSuperPropertyLoad(prop); |
| 4792 break; | 4786 break; |
| 4793 } | 4787 } |
| 4794 | 4788 |
| 4795 case KEYED_PROPERTY: { | 4789 case KEYED_PROPERTY: { |
| (...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5383 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5377 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 5384 Assembler::target_address_at(call_target_address, | 5378 Assembler::target_address_at(call_target_address, |
| 5385 unoptimized_code)); | 5379 unoptimized_code)); |
| 5386 return OSR_AFTER_STACK_CHECK; | 5380 return OSR_AFTER_STACK_CHECK; |
| 5387 } | 5381 } |
| 5388 | 5382 |
| 5389 | 5383 |
| 5390 } } // namespace v8::internal | 5384 } } // namespace v8::internal |
| 5391 | 5385 |
| 5392 #endif // V8_TARGET_ARCH_IA32 | 5386 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |