| 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_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 } else if (FLAG_debug_code) { | 227 } else if (FLAG_debug_code) { |
| 228 Label done; | 228 Label done; |
| 229 __ JumpIfInNewSpace(rsi, rax, &done, Label::kNear); | 229 __ JumpIfInNewSpace(rsi, rax, &done, Label::kNear); |
| 230 __ Abort(kExpectedNewSpaceObject); | 230 __ Abort(kExpectedNewSpaceObject); |
| 231 __ bind(&done); | 231 __ bind(&done); |
| 232 } | 232 } |
| 233 } | 233 } |
| 234 } | 234 } |
| 235 } | 235 } |
| 236 | 236 |
| 237 Variable* home_object_var = scope()->home_object_var(); |
| 238 if (home_object_var != nullptr) { |
| 239 __ Push(rdi); |
| 240 } |
| 241 |
| 237 ArgumentsAccessStub::HasNewTarget has_new_target = | 242 ArgumentsAccessStub::HasNewTarget has_new_target = |
| 238 IsSubclassConstructor(info->function()->kind()) | 243 IsSubclassConstructor(info->function()->kind()) |
| 239 ? ArgumentsAccessStub::HAS_NEW_TARGET | 244 ? ArgumentsAccessStub::HAS_NEW_TARGET |
| 240 : ArgumentsAccessStub::NO_NEW_TARGET; | 245 : ArgumentsAccessStub::NO_NEW_TARGET; |
| 241 | 246 |
| 242 // Possibly allocate RestParameters | 247 // Possibly allocate RestParameters |
| 243 int rest_index; | 248 int rest_index; |
| 244 Variable* rest_param = scope()->rest_parameter(&rest_index); | 249 Variable* rest_param = scope()->rest_parameter(&rest_index); |
| 245 if (rest_param) { | 250 if (rest_param) { |
| 246 Comment cmnt(masm_, "[ Allocate rest parameter array"); | 251 Comment cmnt(masm_, "[ Allocate rest parameter array"); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 type = ArgumentsAccessStub::NEW_SLOPPY_SLOW; | 299 type = ArgumentsAccessStub::NEW_SLOPPY_SLOW; |
| 295 } else { | 300 } else { |
| 296 type = ArgumentsAccessStub::NEW_SLOPPY_FAST; | 301 type = ArgumentsAccessStub::NEW_SLOPPY_FAST; |
| 297 } | 302 } |
| 298 ArgumentsAccessStub stub(isolate(), type, has_new_target); | 303 ArgumentsAccessStub stub(isolate(), type, has_new_target); |
| 299 __ CallStub(&stub); | 304 __ CallStub(&stub); |
| 300 | 305 |
| 301 SetVar(arguments, rax, rbx, rdx); | 306 SetVar(arguments, rax, rbx, rdx); |
| 302 } | 307 } |
| 303 | 308 |
| 309 // Possibly set up a local binding to the [[HomeObject]]. |
| 310 // Variable* home_object_var = scope()->home_object_var(); |
| 311 if (home_object_var != nullptr) { |
| 312 Comment cmnt(masm_, "[ Home object"); |
| 313 __ Pop(LoadDescriptor::ReceiverRegister()); |
| 314 Handle<Symbol> home_object_symbol(isolate()->heap()->home_object_symbol()); |
| 315 __ Move(LoadDescriptor::NameRegister(), home_object_symbol); |
| 316 __ Move(LoadDescriptor::SlotRegister(), |
| 317 SmiFromSlot(function()->HomeObjectFeedbackSlot())); |
| 318 CallLoadIC(NOT_CONTEXTUAL); |
| 319 |
| 320 SetVar(home_object_var, rax, rbx, rdx); |
| 321 } |
| 322 |
| 304 if (FLAG_trace) { | 323 if (FLAG_trace) { |
| 305 __ CallRuntime(Runtime::kTraceEnter, 0); | 324 __ CallRuntime(Runtime::kTraceEnter, 0); |
| 306 } | 325 } |
| 307 | 326 |
| 308 // Visit the declarations and body unless there is an illegal | 327 // Visit the declarations and body unless there is an illegal |
| 309 // redeclaration. | 328 // redeclaration. |
| 310 if (scope()->HasIllegalRedeclaration()) { | 329 if (scope()->HasIllegalRedeclaration()) { |
| 311 Comment cmnt(masm_, "[ Declarations"); | 330 Comment cmnt(masm_, "[ Declarations"); |
| 312 scope()->VisitIllegalRedeclaration(this); | 331 scope()->VisitIllegalRedeclaration(this); |
| 313 | 332 |
| (...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1278 context()->Plug(rax); | 1297 context()->Plug(rax); |
| 1279 } | 1298 } |
| 1280 | 1299 |
| 1281 | 1300 |
| 1282 void FullCodeGenerator::VisitVariableProxy(VariableProxy* expr) { | 1301 void FullCodeGenerator::VisitVariableProxy(VariableProxy* expr) { |
| 1283 Comment cmnt(masm_, "[ VariableProxy"); | 1302 Comment cmnt(masm_, "[ VariableProxy"); |
| 1284 EmitVariableLoad(expr); | 1303 EmitVariableLoad(expr); |
| 1285 } | 1304 } |
| 1286 | 1305 |
| 1287 | 1306 |
| 1288 void FullCodeGenerator::EmitLoadHomeObject(SuperReference* expr) { | |
| 1289 Comment cnmt(masm_, "[ SuperReference "); | |
| 1290 | |
| 1291 __ movp(LoadDescriptor::ReceiverRegister(), | |
| 1292 Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); | |
| 1293 | |
| 1294 Handle<Symbol> home_object_symbol(isolate()->heap()->home_object_symbol()); | |
| 1295 __ Move(LoadDescriptor::NameRegister(), home_object_symbol); | |
| 1296 | |
| 1297 __ Move(LoadDescriptor::SlotRegister(), | |
| 1298 SmiFromSlot(expr->HomeObjectFeedbackSlot())); | |
| 1299 CallLoadIC(NOT_CONTEXTUAL); | |
| 1300 | |
| 1301 __ Cmp(rax, isolate()->factory()->undefined_value()); | |
| 1302 Label done; | |
| 1303 __ j(not_equal, &done); | |
| 1304 __ CallRuntime(Runtime::kThrowNonMethodError, 0); | |
| 1305 __ bind(&done); | |
| 1306 } | |
| 1307 | |
| 1308 | |
| 1309 void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, | 1307 void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, |
| 1310 int offset) { | 1308 int offset) { |
| 1311 if (NeedsHomeObject(initializer)) { | 1309 if (NeedsHomeObject(initializer)) { |
| 1312 __ movp(StoreDescriptor::ReceiverRegister(), Operand(rsp, 0)); | 1310 __ movp(StoreDescriptor::ReceiverRegister(), Operand(rsp, 0)); |
| 1313 __ Move(StoreDescriptor::NameRegister(), | 1311 __ Move(StoreDescriptor::NameRegister(), |
| 1314 isolate()->factory()->home_object_symbol()); | 1312 isolate()->factory()->home_object_symbol()); |
| 1315 __ movp(StoreDescriptor::ValueRegister(), | 1313 __ movp(StoreDescriptor::ValueRegister(), |
| 1316 Operand(rsp, offset * kPointerSize)); | 1314 Operand(rsp, offset * kPointerSize)); |
| 1317 CallStoreIC(); | 1315 CallStoreIC(); |
| 1318 } | 1316 } |
| (...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1932 if (expr->is_compound()) { | 1930 if (expr->is_compound()) { |
| 1933 // We need the receiver both on the stack and in the register. | 1931 // We need the receiver both on the stack and in the register. |
| 1934 VisitForStackValue(property->obj()); | 1932 VisitForStackValue(property->obj()); |
| 1935 __ movp(LoadDescriptor::ReceiverRegister(), Operand(rsp, 0)); | 1933 __ movp(LoadDescriptor::ReceiverRegister(), Operand(rsp, 0)); |
| 1936 } else { | 1934 } else { |
| 1937 VisitForStackValue(property->obj()); | 1935 VisitForStackValue(property->obj()); |
| 1938 } | 1936 } |
| 1939 break; | 1937 break; |
| 1940 case NAMED_SUPER_PROPERTY: | 1938 case NAMED_SUPER_PROPERTY: |
| 1941 VisitForStackValue(property->obj()->AsSuperReference()->this_var()); | 1939 VisitForStackValue(property->obj()->AsSuperReference()->this_var()); |
| 1942 EmitLoadHomeObject(property->obj()->AsSuperReference()); | 1940 VisitForAccumulatorValue( |
| 1941 property->obj()->AsSuperReference()->home_object_var()); |
| 1943 __ Push(result_register()); | 1942 __ Push(result_register()); |
| 1944 if (expr->is_compound()) { | 1943 if (expr->is_compound()) { |
| 1945 __ Push(MemOperand(rsp, kPointerSize)); | 1944 __ Push(MemOperand(rsp, kPointerSize)); |
| 1946 __ Push(result_register()); | 1945 __ Push(result_register()); |
| 1947 } | 1946 } |
| 1948 break; | 1947 break; |
| 1949 case KEYED_SUPER_PROPERTY: | 1948 case KEYED_SUPER_PROPERTY: |
| 1950 VisitForStackValue(property->obj()->AsSuperReference()->this_var()); | 1949 VisitForStackValue(property->obj()->AsSuperReference()->this_var()); |
| 1951 EmitLoadHomeObject(property->obj()->AsSuperReference()); | 1950 VisitForStackValue( |
| 1952 __ Push(result_register()); | 1951 property->obj()->AsSuperReference()->home_object_var()); |
| 1953 VisitForAccumulatorValue(property->key()); | 1952 VisitForAccumulatorValue(property->key()); |
| 1954 __ Push(result_register()); | 1953 __ Push(result_register()); |
| 1955 if (expr->is_compound()) { | 1954 if (expr->is_compound()) { |
| 1956 __ Push(MemOperand(rsp, 2 * kPointerSize)); | 1955 __ Push(MemOperand(rsp, 2 * kPointerSize)); |
| 1957 __ Push(MemOperand(rsp, 2 * kPointerSize)); | 1956 __ Push(MemOperand(rsp, 2 * kPointerSize)); |
| 1958 __ Push(result_register()); | 1957 __ Push(result_register()); |
| 1959 } | 1958 } |
| 1960 break; | 1959 break; |
| 1961 case KEYED_PROPERTY: { | 1960 case KEYED_PROPERTY: { |
| 1962 if (expr->is_compound()) { | 1961 if (expr->is_compound()) { |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2533 __ Move(StoreDescriptor::ReceiverRegister(), rax); | 2532 __ Move(StoreDescriptor::ReceiverRegister(), rax); |
| 2534 __ Pop(StoreDescriptor::ValueRegister()); // Restore value. | 2533 __ Pop(StoreDescriptor::ValueRegister()); // Restore value. |
| 2535 __ Move(StoreDescriptor::NameRegister(), | 2534 __ Move(StoreDescriptor::NameRegister(), |
| 2536 prop->key()->AsLiteral()->value()); | 2535 prop->key()->AsLiteral()->value()); |
| 2537 CallStoreIC(); | 2536 CallStoreIC(); |
| 2538 break; | 2537 break; |
| 2539 } | 2538 } |
| 2540 case NAMED_SUPER_PROPERTY: { | 2539 case NAMED_SUPER_PROPERTY: { |
| 2541 __ Push(rax); | 2540 __ Push(rax); |
| 2542 VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); | 2541 VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); |
| 2543 EmitLoadHomeObject(prop->obj()->AsSuperReference()); | 2542 VisitForAccumulatorValue( |
| 2543 prop->obj()->AsSuperReference()->home_object_var()); |
| 2544 // stack: value, this; rax: home_object | 2544 // stack: value, this; rax: home_object |
| 2545 Register scratch = rcx; | 2545 Register scratch = rcx; |
| 2546 Register scratch2 = rdx; | 2546 Register scratch2 = rdx; |
| 2547 __ Move(scratch, result_register()); // home_object | 2547 __ Move(scratch, result_register()); // home_object |
| 2548 __ movp(rax, MemOperand(rsp, kPointerSize)); // value | 2548 __ movp(rax, MemOperand(rsp, kPointerSize)); // value |
| 2549 __ movp(scratch2, MemOperand(rsp, 0)); // this | 2549 __ movp(scratch2, MemOperand(rsp, 0)); // this |
| 2550 __ movp(MemOperand(rsp, kPointerSize), scratch2); // this | 2550 __ movp(MemOperand(rsp, kPointerSize), scratch2); // this |
| 2551 __ movp(MemOperand(rsp, 0), scratch); // home_object | 2551 __ movp(MemOperand(rsp, 0), scratch); // home_object |
| 2552 // stack: this, home_object; rax: value | 2552 // stack: this, home_object; rax: value |
| 2553 EmitNamedSuperPropertyStore(prop); | 2553 EmitNamedSuperPropertyStore(prop); |
| 2554 break; | 2554 break; |
| 2555 } | 2555 } |
| 2556 case KEYED_SUPER_PROPERTY: { | 2556 case KEYED_SUPER_PROPERTY: { |
| 2557 __ Push(rax); | 2557 __ Push(rax); |
| 2558 VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); | 2558 VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); |
| 2559 EmitLoadHomeObject(prop->obj()->AsSuperReference()); | 2559 VisitForStackValue(prop->obj()->AsSuperReference()->home_object_var()); |
| 2560 __ Push(result_register()); | |
| 2561 VisitForAccumulatorValue(prop->key()); | 2560 VisitForAccumulatorValue(prop->key()); |
| 2562 Register scratch = rcx; | 2561 Register scratch = rcx; |
| 2563 Register scratch2 = rdx; | 2562 Register scratch2 = rdx; |
| 2564 __ movp(scratch2, MemOperand(rsp, 2 * kPointerSize)); // value | 2563 __ movp(scratch2, MemOperand(rsp, 2 * kPointerSize)); // value |
| 2565 // stack: value, this, home_object; rax: key, rdx: value | 2564 // stack: value, this, home_object; rax: key, rdx: value |
| 2566 __ movp(scratch, MemOperand(rsp, kPointerSize)); // this | 2565 __ movp(scratch, MemOperand(rsp, kPointerSize)); // this |
| 2567 __ movp(MemOperand(rsp, 2 * kPointerSize), scratch); | 2566 __ movp(MemOperand(rsp, 2 * kPointerSize), scratch); |
| 2568 __ movp(scratch, MemOperand(rsp, 0)); // home_object | 2567 __ movp(scratch, MemOperand(rsp, 0)); // home_object |
| 2569 __ movp(MemOperand(rsp, kPointerSize), scratch); | 2568 __ movp(MemOperand(rsp, kPointerSize), scratch); |
| 2570 __ movp(MemOperand(rsp, 0), rax); | 2569 __ movp(MemOperand(rsp, 0), rax); |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2758 Expression* key = expr->key(); | 2757 Expression* key = expr->key(); |
| 2759 | 2758 |
| 2760 if (key->IsPropertyName()) { | 2759 if (key->IsPropertyName()) { |
| 2761 if (!expr->IsSuperAccess()) { | 2760 if (!expr->IsSuperAccess()) { |
| 2762 VisitForAccumulatorValue(expr->obj()); | 2761 VisitForAccumulatorValue(expr->obj()); |
| 2763 DCHECK(!rax.is(LoadDescriptor::ReceiverRegister())); | 2762 DCHECK(!rax.is(LoadDescriptor::ReceiverRegister())); |
| 2764 __ movp(LoadDescriptor::ReceiverRegister(), rax); | 2763 __ movp(LoadDescriptor::ReceiverRegister(), rax); |
| 2765 EmitNamedPropertyLoad(expr); | 2764 EmitNamedPropertyLoad(expr); |
| 2766 } else { | 2765 } else { |
| 2767 VisitForStackValue(expr->obj()->AsSuperReference()->this_var()); | 2766 VisitForStackValue(expr->obj()->AsSuperReference()->this_var()); |
| 2768 EmitLoadHomeObject(expr->obj()->AsSuperReference()); | 2767 VisitForStackValue(expr->obj()->AsSuperReference()->home_object_var()); |
| 2769 __ Push(result_register()); | |
| 2770 EmitNamedSuperPropertyLoad(expr); | 2768 EmitNamedSuperPropertyLoad(expr); |
| 2771 } | 2769 } |
| 2772 } else { | 2770 } else { |
| 2773 if (!expr->IsSuperAccess()) { | 2771 if (!expr->IsSuperAccess()) { |
| 2774 VisitForStackValue(expr->obj()); | 2772 VisitForStackValue(expr->obj()); |
| 2775 VisitForAccumulatorValue(expr->key()); | 2773 VisitForAccumulatorValue(expr->key()); |
| 2776 __ Move(LoadDescriptor::NameRegister(), rax); | 2774 __ Move(LoadDescriptor::NameRegister(), rax); |
| 2777 __ Pop(LoadDescriptor::ReceiverRegister()); | 2775 __ Pop(LoadDescriptor::ReceiverRegister()); |
| 2778 EmitKeyedPropertyLoad(expr); | 2776 EmitKeyedPropertyLoad(expr); |
| 2779 } else { | 2777 } else { |
| 2780 VisitForStackValue(expr->obj()->AsSuperReference()->this_var()); | 2778 VisitForStackValue(expr->obj()->AsSuperReference()->this_var()); |
| 2781 EmitLoadHomeObject(expr->obj()->AsSuperReference()); | 2779 VisitForStackValue(expr->obj()->AsSuperReference()->home_object_var()); |
| 2782 __ Push(result_register()); | |
| 2783 VisitForStackValue(expr->key()); | 2780 VisitForStackValue(expr->key()); |
| 2784 EmitKeyedSuperPropertyLoad(expr); | 2781 EmitKeyedSuperPropertyLoad(expr); |
| 2785 } | 2782 } |
| 2786 } | 2783 } |
| 2787 PrepareForBailoutForId(expr->LoadId(), TOS_REG); | 2784 PrepareForBailoutForId(expr->LoadId(), TOS_REG); |
| 2788 context()->Plug(rax); | 2785 context()->Plug(rax); |
| 2789 } | 2786 } |
| 2790 | 2787 |
| 2791 | 2788 |
| 2792 void FullCodeGenerator::CallIC(Handle<Code> code, | 2789 void FullCodeGenerator::CallIC(Handle<Code> code, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2831 Expression* callee = expr->expression(); | 2828 Expression* callee = expr->expression(); |
| 2832 DCHECK(callee->IsProperty()); | 2829 DCHECK(callee->IsProperty()); |
| 2833 Property* prop = callee->AsProperty(); | 2830 Property* prop = callee->AsProperty(); |
| 2834 DCHECK(prop->IsSuperAccess()); | 2831 DCHECK(prop->IsSuperAccess()); |
| 2835 | 2832 |
| 2836 SetSourcePosition(prop->position()); | 2833 SetSourcePosition(prop->position()); |
| 2837 Literal* key = prop->key()->AsLiteral(); | 2834 Literal* key = prop->key()->AsLiteral(); |
| 2838 DCHECK(!key->value()->IsSmi()); | 2835 DCHECK(!key->value()->IsSmi()); |
| 2839 // Load the function from the receiver. | 2836 // Load the function from the receiver. |
| 2840 SuperReference* super_ref = prop->obj()->AsSuperReference(); | 2837 SuperReference* super_ref = prop->obj()->AsSuperReference(); |
| 2841 EmitLoadHomeObject(super_ref); | 2838 VisitForStackValue(super_ref->home_object_var()); |
| 2842 __ Push(rax); | |
| 2843 VisitForAccumulatorValue(super_ref->this_var()); | 2839 VisitForAccumulatorValue(super_ref->this_var()); |
| 2844 __ Push(rax); | 2840 __ Push(rax); |
| 2845 __ Push(rax); | 2841 __ Push(rax); |
| 2846 __ Push(Operand(rsp, kPointerSize * 2)); | 2842 __ Push(Operand(rsp, kPointerSize * 2)); |
| 2847 __ Push(key->value()); | 2843 __ Push(key->value()); |
| 2848 | 2844 |
| 2849 // Stack here: | 2845 // Stack here: |
| 2850 // - home_object | 2846 // - home_object |
| 2851 // - this (receiver) | 2847 // - this (receiver) |
| 2852 // - this (receiver) <-- LoadFromSuper will pop here and below. | 2848 // - this (receiver) <-- LoadFromSuper will pop here and below. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2889 | 2885 |
| 2890 void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) { | 2886 void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) { |
| 2891 Expression* callee = expr->expression(); | 2887 Expression* callee = expr->expression(); |
| 2892 DCHECK(callee->IsProperty()); | 2888 DCHECK(callee->IsProperty()); |
| 2893 Property* prop = callee->AsProperty(); | 2889 Property* prop = callee->AsProperty(); |
| 2894 DCHECK(prop->IsSuperAccess()); | 2890 DCHECK(prop->IsSuperAccess()); |
| 2895 | 2891 |
| 2896 SetSourcePosition(prop->position()); | 2892 SetSourcePosition(prop->position()); |
| 2897 // Load the function from the receiver. | 2893 // Load the function from the receiver. |
| 2898 SuperReference* super_ref = prop->obj()->AsSuperReference(); | 2894 SuperReference* super_ref = prop->obj()->AsSuperReference(); |
| 2899 EmitLoadHomeObject(super_ref); | 2895 VisitForStackValue(super_ref->home_object_var()); |
| 2900 __ Push(rax); | |
| 2901 VisitForAccumulatorValue(super_ref->this_var()); | 2896 VisitForAccumulatorValue(super_ref->this_var()); |
| 2902 __ Push(rax); | 2897 __ Push(rax); |
| 2903 __ Push(rax); | 2898 __ Push(rax); |
| 2904 __ Push(Operand(rsp, kPointerSize * 2)); | 2899 __ Push(Operand(rsp, kPointerSize * 2)); |
| 2905 VisitForStackValue(prop->key()); | 2900 VisitForStackValue(prop->key()); |
| 2906 | 2901 |
| 2907 // Stack here: | 2902 // Stack here: |
| 2908 // - home_object | 2903 // - home_object |
| 2909 // - this (receiver) | 2904 // - this (receiver) |
| 2910 // - this (receiver) <-- LoadKeyedFromSuper will pop here and below. | 2905 // - this (receiver) <-- LoadKeyedFromSuper will pop here and below. |
| (...skipping 1873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4784 switch (assign_type) { | 4779 switch (assign_type) { |
| 4785 case NAMED_PROPERTY: { | 4780 case NAMED_PROPERTY: { |
| 4786 VisitForStackValue(prop->obj()); | 4781 VisitForStackValue(prop->obj()); |
| 4787 __ movp(LoadDescriptor::ReceiverRegister(), Operand(rsp, 0)); | 4782 __ movp(LoadDescriptor::ReceiverRegister(), Operand(rsp, 0)); |
| 4788 EmitNamedPropertyLoad(prop); | 4783 EmitNamedPropertyLoad(prop); |
| 4789 break; | 4784 break; |
| 4790 } | 4785 } |
| 4791 | 4786 |
| 4792 case NAMED_SUPER_PROPERTY: { | 4787 case NAMED_SUPER_PROPERTY: { |
| 4793 VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); | 4788 VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); |
| 4794 EmitLoadHomeObject(prop->obj()->AsSuperReference()); | 4789 VisitForAccumulatorValue( |
| 4790 prop->obj()->AsSuperReference()->home_object_var()); |
| 4795 __ Push(result_register()); | 4791 __ Push(result_register()); |
| 4796 __ Push(MemOperand(rsp, kPointerSize)); | 4792 __ Push(MemOperand(rsp, kPointerSize)); |
| 4797 __ Push(result_register()); | 4793 __ Push(result_register()); |
| 4798 EmitNamedSuperPropertyLoad(prop); | 4794 EmitNamedSuperPropertyLoad(prop); |
| 4799 break; | 4795 break; |
| 4800 } | 4796 } |
| 4801 | 4797 |
| 4802 case KEYED_SUPER_PROPERTY: { | 4798 case KEYED_SUPER_PROPERTY: { |
| 4803 VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); | 4799 VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); |
| 4804 EmitLoadHomeObject(prop->obj()->AsSuperReference()); | 4800 VisitForStackValue(prop->obj()->AsSuperReference()->home_object_var()); |
| 4805 __ Push(result_register()); | |
| 4806 VisitForAccumulatorValue(prop->key()); | 4801 VisitForAccumulatorValue(prop->key()); |
| 4807 __ Push(result_register()); | 4802 __ Push(result_register()); |
| 4808 __ Push(MemOperand(rsp, 2 * kPointerSize)); | 4803 __ Push(MemOperand(rsp, 2 * kPointerSize)); |
| 4809 __ Push(MemOperand(rsp, 2 * kPointerSize)); | 4804 __ Push(MemOperand(rsp, 2 * kPointerSize)); |
| 4810 __ Push(result_register()); | 4805 __ Push(result_register()); |
| 4811 EmitKeyedSuperPropertyLoad(prop); | 4806 EmitKeyedSuperPropertyLoad(prop); |
| 4812 break; | 4807 break; |
| 4813 } | 4808 } |
| 4814 | 4809 |
| 4815 case KEYED_PROPERTY: { | 4810 case KEYED_PROPERTY: { |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5401 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5396 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 5402 Assembler::target_address_at(call_target_address, | 5397 Assembler::target_address_at(call_target_address, |
| 5403 unoptimized_code)); | 5398 unoptimized_code)); |
| 5404 return OSR_AFTER_STACK_CHECK; | 5399 return OSR_AFTER_STACK_CHECK; |
| 5405 } | 5400 } |
| 5406 | 5401 |
| 5407 | 5402 |
| 5408 } } // namespace v8::internal | 5403 } } // namespace v8::internal |
| 5409 | 5404 |
| 5410 #endif // V8_TARGET_ARCH_X64 | 5405 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |