| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 #ifdef DEBUG | 107 #ifdef DEBUG |
| 108 if (strlen(FLAG_stop_at) > 0 && | 108 if (strlen(FLAG_stop_at) > 0 && |
| 109 info->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { | 109 info->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { |
| 110 __ int3(); | 110 __ int3(); |
| 111 } | 111 } |
| 112 #endif | 112 #endif |
| 113 | 113 |
| 114 // Sloppy mode functions and builtins need to replace the receiver with the | 114 // Sloppy mode functions and builtins need to replace the receiver with the |
| 115 // global proxy when called as functions (without an explicit receiver | 115 // global proxy when called as functions (without an explicit receiver |
| 116 // object). | 116 // object). |
| 117 if (info->strict_mode() == SLOPPY && !info->is_native()) { | 117 if (is_sloppy(info->language_mode()) && !info->is_native()) { |
| 118 Label ok; | 118 Label ok; |
| 119 // +1 for return address. | 119 // +1 for return address. |
| 120 StackArgumentsAccessor args(rsp, info->scope()->num_parameters()); | 120 StackArgumentsAccessor args(rsp, info->scope()->num_parameters()); |
| 121 __ movp(rcx, args.GetReceiverOperand()); | 121 __ movp(rcx, args.GetReceiverOperand()); |
| 122 | 122 |
| 123 __ CompareRoot(rcx, Heap::kUndefinedValueRootIndex); | 123 __ CompareRoot(rcx, Heap::kUndefinedValueRootIndex); |
| 124 __ j(not_equal, &ok, Label::kNear); | 124 __ j(not_equal, &ok, Label::kNear); |
| 125 | 125 |
| 126 __ movp(rcx, GlobalObjectOperand()); | 126 __ movp(rcx, GlobalObjectOperand()); |
| 127 __ movp(rcx, FieldOperand(rcx, GlobalObject::kGlobalProxyOffset)); | 127 __ movp(rcx, FieldOperand(rcx, GlobalObject::kGlobalProxyOffset)); |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 int offset = num_parameters * kPointerSize; | 248 int offset = num_parameters * kPointerSize; |
| 249 __ leap(rdx, | 249 __ leap(rdx, |
| 250 Operand(rbp, StandardFrameConstants::kCallerSPOffset + offset)); | 250 Operand(rbp, StandardFrameConstants::kCallerSPOffset + offset)); |
| 251 __ Push(rdx); | 251 __ Push(rdx); |
| 252 __ Push(Smi::FromInt(num_parameters)); | 252 __ Push(Smi::FromInt(num_parameters)); |
| 253 // Arguments to ArgumentsAccessStub: | 253 // Arguments to ArgumentsAccessStub: |
| 254 // function, receiver address, parameter count. | 254 // function, receiver address, parameter count. |
| 255 // The stub will rewrite receiver and parameter count if the previous | 255 // The stub will rewrite receiver and parameter count if the previous |
| 256 // stack frame was an arguments adapter frame. | 256 // stack frame was an arguments adapter frame. |
| 257 ArgumentsAccessStub::Type type; | 257 ArgumentsAccessStub::Type type; |
| 258 if (strict_mode() == STRICT) { | 258 if (is_strict(language_mode())) { |
| 259 type = ArgumentsAccessStub::NEW_STRICT; | 259 type = ArgumentsAccessStub::NEW_STRICT; |
| 260 } else if (function()->has_duplicate_parameters()) { | 260 } else if (function()->has_duplicate_parameters()) { |
| 261 type = ArgumentsAccessStub::NEW_SLOPPY_SLOW; | 261 type = ArgumentsAccessStub::NEW_SLOPPY_SLOW; |
| 262 } else { | 262 } else { |
| 263 type = ArgumentsAccessStub::NEW_SLOPPY_FAST; | 263 type = ArgumentsAccessStub::NEW_SLOPPY_FAST; |
| 264 } | 264 } |
| 265 ArgumentsAccessStub stub(isolate(), type); | 265 ArgumentsAccessStub stub(isolate(), type); |
| 266 __ CallStub(&stub); | 266 __ CallStub(&stub); |
| 267 | 267 |
| 268 SetVar(arguments, rax, rbx, rdx); | 268 SetVar(arguments, rax, rbx, rdx); |
| (...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1249 // space for nested functions that don't need literals cloning. If | 1249 // space for nested functions that don't need literals cloning. If |
| 1250 // we're running with the --always-opt or the --prepare-always-opt | 1250 // we're running with the --always-opt or the --prepare-always-opt |
| 1251 // flag, we need to use the runtime function so that the new function | 1251 // flag, we need to use the runtime function so that the new function |
| 1252 // we are creating here gets a chance to have its code optimized and | 1252 // we are creating here gets a chance to have its code optimized and |
| 1253 // doesn't just get a copy of the existing unoptimized code. | 1253 // doesn't just get a copy of the existing unoptimized code. |
| 1254 if (!FLAG_always_opt && | 1254 if (!FLAG_always_opt && |
| 1255 !FLAG_prepare_always_opt && | 1255 !FLAG_prepare_always_opt && |
| 1256 !pretenure && | 1256 !pretenure && |
| 1257 scope()->is_function_scope() && | 1257 scope()->is_function_scope() && |
| 1258 info->num_literals() == 0) { | 1258 info->num_literals() == 0) { |
| 1259 FastNewClosureStub stub(isolate(), info->strict_mode(), info->kind()); | 1259 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); |
| 1260 __ Move(rbx, info); | 1260 __ Move(rbx, info); |
| 1261 __ CallStub(&stub); | 1261 __ CallStub(&stub); |
| 1262 } else { | 1262 } else { |
| 1263 __ Push(rsi); | 1263 __ Push(rsi); |
| 1264 __ Push(info); | 1264 __ Push(info); |
| 1265 __ Push(pretenure | 1265 __ Push(pretenure |
| 1266 ? isolate()->factory()->true_value() | 1266 ? isolate()->factory()->true_value() |
| 1267 : isolate()->factory()->false_value()); | 1267 : isolate()->factory()->false_value()); |
| 1268 __ CallRuntime(Runtime::kNewClosure, 3); | 1268 __ CallRuntime(Runtime::kNewClosure, 3); |
| 1269 } | 1269 } |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1696 } else { | 1696 } else { |
| 1697 VisitForEffect(value); | 1697 VisitForEffect(value); |
| 1698 } | 1698 } |
| 1699 break; | 1699 break; |
| 1700 } | 1700 } |
| 1701 __ Push(Operand(rsp, 0)); // Duplicate receiver. | 1701 __ Push(Operand(rsp, 0)); // Duplicate receiver. |
| 1702 VisitForStackValue(key); | 1702 VisitForStackValue(key); |
| 1703 VisitForStackValue(value); | 1703 VisitForStackValue(value); |
| 1704 if (property->emit_store()) { | 1704 if (property->emit_store()) { |
| 1705 EmitSetHomeObjectIfNeeded(value, 2); | 1705 EmitSetHomeObjectIfNeeded(value, 2); |
| 1706 __ Push(Smi::FromInt(SLOPPY)); // Strict mode | 1706 __ Push(Smi::FromInt(SLOPPY)); // Language mode |
| 1707 __ CallRuntime(Runtime::kSetProperty, 4); | 1707 __ CallRuntime(Runtime::kSetProperty, 4); |
| 1708 } else { | 1708 } else { |
| 1709 __ Drop(3); | 1709 __ Drop(3); |
| 1710 } | 1710 } |
| 1711 break; | 1711 break; |
| 1712 case ObjectLiteral::Property::PROTOTYPE: | 1712 case ObjectLiteral::Property::PROTOTYPE: |
| 1713 __ Push(Operand(rsp, 0)); // Duplicate receiver. | 1713 __ Push(Operand(rsp, 0)); // Duplicate receiver. |
| 1714 VisitForStackValue(value); | 1714 VisitForStackValue(value); |
| 1715 DCHECK(property->emit_store()); | 1715 DCHECK(property->emit_store()); |
| 1716 __ CallRuntime(Runtime::kInternalSetPrototype, 2); | 1716 __ CallRuntime(Runtime::kInternalSetPrototype, 2); |
| (...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2567 break; | 2567 break; |
| 2568 } | 2568 } |
| 2569 case KEYED_PROPERTY: { | 2569 case KEYED_PROPERTY: { |
| 2570 __ Push(rax); // Preserve value. | 2570 __ Push(rax); // Preserve value. |
| 2571 VisitForStackValue(prop->obj()); | 2571 VisitForStackValue(prop->obj()); |
| 2572 VisitForAccumulatorValue(prop->key()); | 2572 VisitForAccumulatorValue(prop->key()); |
| 2573 __ Move(StoreDescriptor::NameRegister(), rax); | 2573 __ Move(StoreDescriptor::NameRegister(), rax); |
| 2574 __ Pop(StoreDescriptor::ReceiverRegister()); | 2574 __ Pop(StoreDescriptor::ReceiverRegister()); |
| 2575 __ Pop(StoreDescriptor::ValueRegister()); // Restore value. | 2575 __ Pop(StoreDescriptor::ValueRegister()); // Restore value. |
| 2576 Handle<Code> ic = | 2576 Handle<Code> ic = |
| 2577 CodeFactory::KeyedStoreIC(isolate(), strict_mode()).code(); | 2577 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
| 2578 CallIC(ic); | 2578 CallIC(ic); |
| 2579 break; | 2579 break; |
| 2580 } | 2580 } |
| 2581 } | 2581 } |
| 2582 context()->Plug(rax); | 2582 context()->Plug(rax); |
| 2583 } | 2583 } |
| 2584 | 2584 |
| 2585 | 2585 |
| 2586 void FullCodeGenerator::EmitStoreToStackLocalOrContextSlot( | 2586 void FullCodeGenerator::EmitStoreToStackLocalOrContextSlot( |
| 2587 Variable* var, MemOperand location) { | 2587 Variable* var, MemOperand location) { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2634 __ CallRuntime(Runtime::kThrowReferenceError, 1); | 2634 __ CallRuntime(Runtime::kThrowReferenceError, 1); |
| 2635 __ bind(&assign); | 2635 __ bind(&assign); |
| 2636 EmitStoreToStackLocalOrContextSlot(var, location); | 2636 EmitStoreToStackLocalOrContextSlot(var, location); |
| 2637 | 2637 |
| 2638 } else if (!var->is_const_mode() || op == Token::INIT_CONST) { | 2638 } else if (!var->is_const_mode() || op == Token::INIT_CONST) { |
| 2639 if (var->IsLookupSlot()) { | 2639 if (var->IsLookupSlot()) { |
| 2640 // Assignment to var. | 2640 // Assignment to var. |
| 2641 __ Push(rax); // Value. | 2641 __ Push(rax); // Value. |
| 2642 __ Push(rsi); // Context. | 2642 __ Push(rsi); // Context. |
| 2643 __ Push(var->name()); | 2643 __ Push(var->name()); |
| 2644 __ Push(Smi::FromInt(strict_mode())); | 2644 __ Push(Smi::FromInt(language_mode())); |
| 2645 __ CallRuntime(Runtime::kStoreLookupSlot, 4); | 2645 __ CallRuntime(Runtime::kStoreLookupSlot, 4); |
| 2646 } else { | 2646 } else { |
| 2647 // Assignment to var or initializing assignment to let/const in harmony | 2647 // Assignment to var or initializing assignment to let/const in harmony |
| 2648 // mode. | 2648 // mode. |
| 2649 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); | 2649 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
| 2650 MemOperand location = VarOperand(var, rcx); | 2650 MemOperand location = VarOperand(var, rcx); |
| 2651 if (generate_debug_code_ && op == Token::INIT_LET) { | 2651 if (generate_debug_code_ && op == Token::INIT_LET) { |
| 2652 // Check for an uninitialized let binding. | 2652 // Check for an uninitialized let binding. |
| 2653 __ movp(rdx, location); | 2653 __ movp(rdx, location); |
| 2654 __ CompareRoot(rdx, Heap::kTheHoleValueRootIndex); | 2654 __ CompareRoot(rdx, Heap::kTheHoleValueRootIndex); |
| 2655 __ Check(equal, kLetBindingReInitialization); | 2655 __ Check(equal, kLetBindingReInitialization); |
| 2656 } | 2656 } |
| 2657 EmitStoreToStackLocalOrContextSlot(var, location); | 2657 EmitStoreToStackLocalOrContextSlot(var, location); |
| 2658 } | 2658 } |
| 2659 } else if (IsSignallingAssignmentToConst(var, op, strict_mode())) { | 2659 } else if (IsSignallingAssignmentToConst(var, op, language_mode())) { |
| 2660 __ CallRuntime(Runtime::kThrowConstAssignError, 0); | 2660 __ CallRuntime(Runtime::kThrowConstAssignError, 0); |
| 2661 } | 2661 } |
| 2662 } | 2662 } |
| 2663 | 2663 |
| 2664 | 2664 |
| 2665 void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { | 2665 void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { |
| 2666 // Assignment to a property, using a named store IC. | 2666 // Assignment to a property, using a named store IC. |
| 2667 Property* prop = expr->target()->AsProperty(); | 2667 Property* prop = expr->target()->AsProperty(); |
| 2668 DCHECK(prop != NULL); | 2668 DCHECK(prop != NULL); |
| 2669 DCHECK(prop->key()->IsLiteral()); | 2669 DCHECK(prop->key()->IsLiteral()); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 2682 void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) { | 2682 void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) { |
| 2683 // Assignment to named property of super. | 2683 // Assignment to named property of super. |
| 2684 // rax : value | 2684 // rax : value |
| 2685 // stack : receiver ('this'), home_object | 2685 // stack : receiver ('this'), home_object |
| 2686 DCHECK(prop != NULL); | 2686 DCHECK(prop != NULL); |
| 2687 Literal* key = prop->key()->AsLiteral(); | 2687 Literal* key = prop->key()->AsLiteral(); |
| 2688 DCHECK(key != NULL); | 2688 DCHECK(key != NULL); |
| 2689 | 2689 |
| 2690 __ Push(key->value()); | 2690 __ Push(key->value()); |
| 2691 __ Push(rax); | 2691 __ Push(rax); |
| 2692 __ CallRuntime((strict_mode() == STRICT ? Runtime::kStoreToSuper_Strict | 2692 __ CallRuntime((is_strict(language_mode()) ? Runtime::kStoreToSuper_Strict |
| 2693 : Runtime::kStoreToSuper_Sloppy), | 2693 : Runtime::kStoreToSuper_Sloppy), |
| 2694 4); | 2694 4); |
| 2695 } | 2695 } |
| 2696 | 2696 |
| 2697 | 2697 |
| 2698 void FullCodeGenerator::EmitKeyedSuperPropertyStore(Property* prop) { | 2698 void FullCodeGenerator::EmitKeyedSuperPropertyStore(Property* prop) { |
| 2699 // Assignment to named property of super. | 2699 // Assignment to named property of super. |
| 2700 // rax : value | 2700 // rax : value |
| 2701 // stack : receiver ('this'), home_object, key | 2701 // stack : receiver ('this'), home_object, key |
| 2702 DCHECK(prop != NULL); | 2702 DCHECK(prop != NULL); |
| 2703 | 2703 |
| 2704 __ Push(rax); | 2704 __ Push(rax); |
| 2705 __ CallRuntime((strict_mode() == STRICT ? Runtime::kStoreKeyedToSuper_Strict | 2705 __ CallRuntime( |
| 2706 : Runtime::kStoreKeyedToSuper_Sloppy), | 2706 (is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict |
| 2707 4); | 2707 : Runtime::kStoreKeyedToSuper_Sloppy), |
| 2708 4); |
| 2708 } | 2709 } |
| 2709 | 2710 |
| 2710 | 2711 |
| 2711 void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { | 2712 void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { |
| 2712 // Assignment to a property, using a keyed store IC. | 2713 // Assignment to a property, using a keyed store IC. |
| 2713 | 2714 |
| 2714 __ Pop(StoreDescriptor::NameRegister()); // Key. | 2715 __ Pop(StoreDescriptor::NameRegister()); // Key. |
| 2715 __ Pop(StoreDescriptor::ReceiverRegister()); | 2716 __ Pop(StoreDescriptor::ReceiverRegister()); |
| 2716 DCHECK(StoreDescriptor::ValueRegister().is(rax)); | 2717 DCHECK(StoreDescriptor::ValueRegister().is(rax)); |
| 2717 // Record source code position before IC call. | 2718 // Record source code position before IC call. |
| 2718 SetSourcePosition(expr->position()); | 2719 SetSourcePosition(expr->position()); |
| 2719 Handle<Code> ic = CodeFactory::KeyedStoreIC(isolate(), strict_mode()).code(); | 2720 Handle<Code> ic = |
| 2721 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
| 2720 CallIC(ic, expr->AssignmentFeedbackId()); | 2722 CallIC(ic, expr->AssignmentFeedbackId()); |
| 2721 | 2723 |
| 2722 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 2724 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
| 2723 context()->Plug(rax); | 2725 context()->Plug(rax); |
| 2724 } | 2726 } |
| 2725 | 2727 |
| 2726 | 2728 |
| 2727 void FullCodeGenerator::VisitProperty(Property* expr) { | 2729 void FullCodeGenerator::VisitProperty(Property* expr) { |
| 2728 Comment cmnt(masm_, "[ Property"); | 2730 Comment cmnt(masm_, "[ Property"); |
| 2729 Expression* key = expr->key(); | 2731 Expression* key = expr->key(); |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2930 } | 2932 } |
| 2931 | 2933 |
| 2932 // Push the enclosing function. | 2934 // Push the enclosing function. |
| 2933 __ Push(Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); | 2935 __ Push(Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
| 2934 | 2936 |
| 2935 // Push the receiver of the enclosing function and do runtime call. | 2937 // Push the receiver of the enclosing function and do runtime call. |
| 2936 StackArgumentsAccessor args(rbp, info_->scope()->num_parameters()); | 2938 StackArgumentsAccessor args(rbp, info_->scope()->num_parameters()); |
| 2937 __ Push(args.GetReceiverOperand()); | 2939 __ Push(args.GetReceiverOperand()); |
| 2938 | 2940 |
| 2939 // Push the language mode. | 2941 // Push the language mode. |
| 2940 __ Push(Smi::FromInt(strict_mode())); | 2942 __ Push(Smi::FromInt(language_mode())); |
| 2941 | 2943 |
| 2942 // Push the start position of the scope the calls resides in. | 2944 // Push the start position of the scope the calls resides in. |
| 2943 __ Push(Smi::FromInt(scope()->start_position())); | 2945 __ Push(Smi::FromInt(scope()->start_position())); |
| 2944 | 2946 |
| 2945 // Do the runtime call. | 2947 // Do the runtime call. |
| 2946 __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 6); | 2948 __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 6); |
| 2947 } | 2949 } |
| 2948 | 2950 |
| 2949 | 2951 |
| 2950 void FullCodeGenerator::EmitLoadSuperConstructor(SuperReference* super_ref) { | 2952 void FullCodeGenerator::EmitLoadSuperConstructor(SuperReference* super_ref) { |
| (...skipping 1570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4521 void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { | 4523 void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { |
| 4522 switch (expr->op()) { | 4524 switch (expr->op()) { |
| 4523 case Token::DELETE: { | 4525 case Token::DELETE: { |
| 4524 Comment cmnt(masm_, "[ UnaryOperation (DELETE)"); | 4526 Comment cmnt(masm_, "[ UnaryOperation (DELETE)"); |
| 4525 Property* property = expr->expression()->AsProperty(); | 4527 Property* property = expr->expression()->AsProperty(); |
| 4526 VariableProxy* proxy = expr->expression()->AsVariableProxy(); | 4528 VariableProxy* proxy = expr->expression()->AsVariableProxy(); |
| 4527 | 4529 |
| 4528 if (property != NULL) { | 4530 if (property != NULL) { |
| 4529 VisitForStackValue(property->obj()); | 4531 VisitForStackValue(property->obj()); |
| 4530 VisitForStackValue(property->key()); | 4532 VisitForStackValue(property->key()); |
| 4531 __ Push(Smi::FromInt(strict_mode())); | 4533 __ Push(Smi::FromInt(language_mode())); |
| 4532 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); | 4534 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); |
| 4533 context()->Plug(rax); | 4535 context()->Plug(rax); |
| 4534 } else if (proxy != NULL) { | 4536 } else if (proxy != NULL) { |
| 4535 Variable* var = proxy->var(); | 4537 Variable* var = proxy->var(); |
| 4536 // Delete of an unqualified identifier is disallowed in strict mode | 4538 // Delete of an unqualified identifier is disallowed in strict mode |
| 4537 // but "delete this" is allowed. | 4539 // but "delete this" is allowed. |
| 4538 DCHECK(strict_mode() == SLOPPY || var->is_this()); | 4540 DCHECK(is_sloppy(language_mode()) || var->is_this()); |
| 4539 if (var->IsUnallocated()) { | 4541 if (var->IsUnallocated()) { |
| 4540 __ Push(GlobalObjectOperand()); | 4542 __ Push(GlobalObjectOperand()); |
| 4541 __ Push(var->name()); | 4543 __ Push(var->name()); |
| 4542 __ Push(Smi::FromInt(SLOPPY)); | 4544 __ Push(Smi::FromInt(SLOPPY)); |
| 4543 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); | 4545 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); |
| 4544 context()->Plug(rax); | 4546 context()->Plug(rax); |
| 4545 } else if (var->IsStackAllocated() || var->IsContextSlot()) { | 4547 } else if (var->IsStackAllocated() || var->IsContextSlot()) { |
| 4546 // Result of deleting non-global variables is false. 'this' is | 4548 // Result of deleting non-global variables is false. 'this' is |
| 4547 // not really a variable, though we implement it as one. The | 4549 // not really a variable, though we implement it as one. The |
| 4548 // subexpression does not have side effects. | 4550 // subexpression does not have side effects. |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4852 } | 4854 } |
| 4853 } else { | 4855 } else { |
| 4854 context()->Plug(rax); | 4856 context()->Plug(rax); |
| 4855 } | 4857 } |
| 4856 break; | 4858 break; |
| 4857 } | 4859 } |
| 4858 case KEYED_PROPERTY: { | 4860 case KEYED_PROPERTY: { |
| 4859 __ Pop(StoreDescriptor::NameRegister()); | 4861 __ Pop(StoreDescriptor::NameRegister()); |
| 4860 __ Pop(StoreDescriptor::ReceiverRegister()); | 4862 __ Pop(StoreDescriptor::ReceiverRegister()); |
| 4861 Handle<Code> ic = | 4863 Handle<Code> ic = |
| 4862 CodeFactory::KeyedStoreIC(isolate(), strict_mode()).code(); | 4864 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
| 4863 CallIC(ic, expr->CountStoreFeedbackId()); | 4865 CallIC(ic, expr->CountStoreFeedbackId()); |
| 4864 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 4866 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
| 4865 if (expr->is_postfix()) { | 4867 if (expr->is_postfix()) { |
| 4866 if (!context()->IsEffect()) { | 4868 if (!context()->IsEffect()) { |
| 4867 context()->PlugTOS(); | 4869 context()->PlugTOS(); |
| 4868 } | 4870 } |
| 4869 } else { | 4871 } else { |
| 4870 context()->Plug(rax); | 4872 context()->Plug(rax); |
| 4871 } | 4873 } |
| 4872 break; | 4874 break; |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5311 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5313 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 5312 Assembler::target_address_at(call_target_address, | 5314 Assembler::target_address_at(call_target_address, |
| 5313 unoptimized_code)); | 5315 unoptimized_code)); |
| 5314 return OSR_AFTER_STACK_CHECK; | 5316 return OSR_AFTER_STACK_CHECK; |
| 5315 } | 5317 } |
| 5316 | 5318 |
| 5317 | 5319 |
| 5318 } } // namespace v8::internal | 5320 } } // namespace v8::internal |
| 5319 | 5321 |
| 5320 #endif // V8_TARGET_ARCH_X64 | 5322 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |