| 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_strict(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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1692 } else { | 1692 } else { |
| 1693 VisitForEffect(value); | 1693 VisitForEffect(value); |
| 1694 } | 1694 } |
| 1695 break; | 1695 break; |
| 1696 } | 1696 } |
| 1697 __ Push(Operand(rsp, 0)); // Duplicate receiver. | 1697 __ Push(Operand(rsp, 0)); // Duplicate receiver. |
| 1698 VisitForStackValue(key); | 1698 VisitForStackValue(key); |
| 1699 VisitForStackValue(value); | 1699 VisitForStackValue(value); |
| 1700 if (property->emit_store()) { | 1700 if (property->emit_store()) { |
| 1701 EmitSetHomeObjectIfNeeded(value, 2); | 1701 EmitSetHomeObjectIfNeeded(value, 2); |
| 1702 __ Push(Smi::FromInt(SLOPPY)); // Strict mode | 1702 __ Push(Smi::FromInt(SLOPPY)); // Language mode |
| 1703 __ CallRuntime(Runtime::kSetProperty, 4); | 1703 __ CallRuntime(Runtime::kSetProperty, 4); |
| 1704 } else { | 1704 } else { |
| 1705 __ Drop(3); | 1705 __ Drop(3); |
| 1706 } | 1706 } |
| 1707 break; | 1707 break; |
| 1708 case ObjectLiteral::Property::PROTOTYPE: | 1708 case ObjectLiteral::Property::PROTOTYPE: |
| 1709 __ Push(Operand(rsp, 0)); // Duplicate receiver. | 1709 __ Push(Operand(rsp, 0)); // Duplicate receiver. |
| 1710 VisitForStackValue(value); | 1710 VisitForStackValue(value); |
| 1711 DCHECK(property->emit_store()); | 1711 DCHECK(property->emit_store()); |
| 1712 __ CallRuntime(Runtime::kInternalSetPrototype, 2); | 1712 __ CallRuntime(Runtime::kInternalSetPrototype, 2); |
| (...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2563 break; | 2563 break; |
| 2564 } | 2564 } |
| 2565 case KEYED_PROPERTY: { | 2565 case KEYED_PROPERTY: { |
| 2566 __ Push(rax); // Preserve value. | 2566 __ Push(rax); // Preserve value. |
| 2567 VisitForStackValue(prop->obj()); | 2567 VisitForStackValue(prop->obj()); |
| 2568 VisitForAccumulatorValue(prop->key()); | 2568 VisitForAccumulatorValue(prop->key()); |
| 2569 __ Move(StoreDescriptor::NameRegister(), rax); | 2569 __ Move(StoreDescriptor::NameRegister(), rax); |
| 2570 __ Pop(StoreDescriptor::ReceiverRegister()); | 2570 __ Pop(StoreDescriptor::ReceiverRegister()); |
| 2571 __ Pop(StoreDescriptor::ValueRegister()); // Restore value. | 2571 __ Pop(StoreDescriptor::ValueRegister()); // Restore value. |
| 2572 Handle<Code> ic = | 2572 Handle<Code> ic = |
| 2573 CodeFactory::KeyedStoreIC(isolate(), strict_mode()).code(); | 2573 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
| 2574 CallIC(ic); | 2574 CallIC(ic); |
| 2575 break; | 2575 break; |
| 2576 } | 2576 } |
| 2577 } | 2577 } |
| 2578 context()->Plug(rax); | 2578 context()->Plug(rax); |
| 2579 } | 2579 } |
| 2580 | 2580 |
| 2581 | 2581 |
| 2582 void FullCodeGenerator::EmitStoreToStackLocalOrContextSlot( | 2582 void FullCodeGenerator::EmitStoreToStackLocalOrContextSlot( |
| 2583 Variable* var, MemOperand location) { | 2583 Variable* var, MemOperand location) { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2630 __ CallRuntime(Runtime::kThrowReferenceError, 1); | 2630 __ CallRuntime(Runtime::kThrowReferenceError, 1); |
| 2631 __ bind(&assign); | 2631 __ bind(&assign); |
| 2632 EmitStoreToStackLocalOrContextSlot(var, location); | 2632 EmitStoreToStackLocalOrContextSlot(var, location); |
| 2633 | 2633 |
| 2634 } else if (!var->is_const_mode() || op == Token::INIT_CONST) { | 2634 } else if (!var->is_const_mode() || op == Token::INIT_CONST) { |
| 2635 if (var->IsLookupSlot()) { | 2635 if (var->IsLookupSlot()) { |
| 2636 // Assignment to var. | 2636 // Assignment to var. |
| 2637 __ Push(rax); // Value. | 2637 __ Push(rax); // Value. |
| 2638 __ Push(rsi); // Context. | 2638 __ Push(rsi); // Context. |
| 2639 __ Push(var->name()); | 2639 __ Push(var->name()); |
| 2640 __ Push(Smi::FromInt(strict_mode())); | 2640 __ Push(Smi::FromInt(language_mode())); |
| 2641 __ CallRuntime(Runtime::kStoreLookupSlot, 4); | 2641 __ CallRuntime(Runtime::kStoreLookupSlot, 4); |
| 2642 } else { | 2642 } else { |
| 2643 // Assignment to var or initializing assignment to let/const in harmony | 2643 // Assignment to var or initializing assignment to let/const in harmony |
| 2644 // mode. | 2644 // mode. |
| 2645 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); | 2645 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
| 2646 MemOperand location = VarOperand(var, rcx); | 2646 MemOperand location = VarOperand(var, rcx); |
| 2647 if (generate_debug_code_ && op == Token::INIT_LET) { | 2647 if (generate_debug_code_ && op == Token::INIT_LET) { |
| 2648 // Check for an uninitialized let binding. | 2648 // Check for an uninitialized let binding. |
| 2649 __ movp(rdx, location); | 2649 __ movp(rdx, location); |
| 2650 __ CompareRoot(rdx, Heap::kTheHoleValueRootIndex); | 2650 __ CompareRoot(rdx, Heap::kTheHoleValueRootIndex); |
| 2651 __ Check(equal, kLetBindingReInitialization); | 2651 __ Check(equal, kLetBindingReInitialization); |
| 2652 } | 2652 } |
| 2653 EmitStoreToStackLocalOrContextSlot(var, location); | 2653 EmitStoreToStackLocalOrContextSlot(var, location); |
| 2654 } | 2654 } |
| 2655 } else if (IsSignallingAssignmentToConst(var, op, strict_mode())) { | 2655 } else if (IsSignallingAssignmentToConst(var, op, language_mode())) { |
| 2656 __ CallRuntime(Runtime::kThrowConstAssignError, 0); | 2656 __ CallRuntime(Runtime::kThrowConstAssignError, 0); |
| 2657 } | 2657 } |
| 2658 } | 2658 } |
| 2659 | 2659 |
| 2660 | 2660 |
| 2661 void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { | 2661 void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { |
| 2662 // Assignment to a property, using a named store IC. | 2662 // Assignment to a property, using a named store IC. |
| 2663 Property* prop = expr->target()->AsProperty(); | 2663 Property* prop = expr->target()->AsProperty(); |
| 2664 DCHECK(prop != NULL); | 2664 DCHECK(prop != NULL); |
| 2665 DCHECK(prop->key()->IsLiteral()); | 2665 DCHECK(prop->key()->IsLiteral()); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 2678 void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) { | 2678 void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) { |
| 2679 // Assignment to named property of super. | 2679 // Assignment to named property of super. |
| 2680 // rax : value | 2680 // rax : value |
| 2681 // stack : receiver ('this'), home_object | 2681 // stack : receiver ('this'), home_object |
| 2682 DCHECK(prop != NULL); | 2682 DCHECK(prop != NULL); |
| 2683 Literal* key = prop->key()->AsLiteral(); | 2683 Literal* key = prop->key()->AsLiteral(); |
| 2684 DCHECK(key != NULL); | 2684 DCHECK(key != NULL); |
| 2685 | 2685 |
| 2686 __ Push(key->value()); | 2686 __ Push(key->value()); |
| 2687 __ Push(rax); | 2687 __ Push(rax); |
| 2688 __ CallRuntime((strict_mode() == STRICT ? Runtime::kStoreToSuper_Strict | 2688 __ CallRuntime((is_strict(language_mode()) ? Runtime::kStoreToSuper_Strict |
| 2689 : Runtime::kStoreToSuper_Sloppy), | 2689 : Runtime::kStoreToSuper_Sloppy), |
| 2690 4); | 2690 4); |
| 2691 } | 2691 } |
| 2692 | 2692 |
| 2693 | 2693 |
| 2694 void FullCodeGenerator::EmitKeyedSuperPropertyStore(Property* prop) { | 2694 void FullCodeGenerator::EmitKeyedSuperPropertyStore(Property* prop) { |
| 2695 // Assignment to named property of super. | 2695 // Assignment to named property of super. |
| 2696 // rax : value | 2696 // rax : value |
| 2697 // stack : receiver ('this'), home_object, key | 2697 // stack : receiver ('this'), home_object, key |
| 2698 DCHECK(prop != NULL); | 2698 DCHECK(prop != NULL); |
| 2699 | 2699 |
| 2700 __ Push(rax); | 2700 __ Push(rax); |
| 2701 __ CallRuntime((strict_mode() == STRICT ? Runtime::kStoreKeyedToSuper_Strict | 2701 __ CallRuntime( |
| 2702 : Runtime::kStoreKeyedToSuper_Sloppy), | 2702 (is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict |
| 2703 4); | 2703 : Runtime::kStoreKeyedToSuper_Sloppy), |
| 2704 4); |
| 2704 } | 2705 } |
| 2705 | 2706 |
| 2706 | 2707 |
| 2707 void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { | 2708 void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { |
| 2708 // Assignment to a property, using a keyed store IC. | 2709 // Assignment to a property, using a keyed store IC. |
| 2709 | 2710 |
| 2710 __ Pop(StoreDescriptor::NameRegister()); // Key. | 2711 __ Pop(StoreDescriptor::NameRegister()); // Key. |
| 2711 __ Pop(StoreDescriptor::ReceiverRegister()); | 2712 __ Pop(StoreDescriptor::ReceiverRegister()); |
| 2712 DCHECK(StoreDescriptor::ValueRegister().is(rax)); | 2713 DCHECK(StoreDescriptor::ValueRegister().is(rax)); |
| 2713 // Record source code position before IC call. | 2714 // Record source code position before IC call. |
| 2714 SetSourcePosition(expr->position()); | 2715 SetSourcePosition(expr->position()); |
| 2715 Handle<Code> ic = CodeFactory::KeyedStoreIC(isolate(), strict_mode()).code(); | 2716 Handle<Code> ic = |
| 2717 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
| 2716 CallIC(ic, expr->AssignmentFeedbackId()); | 2718 CallIC(ic, expr->AssignmentFeedbackId()); |
| 2717 | 2719 |
| 2718 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 2720 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
| 2719 context()->Plug(rax); | 2721 context()->Plug(rax); |
| 2720 } | 2722 } |
| 2721 | 2723 |
| 2722 | 2724 |
| 2723 void FullCodeGenerator::VisitProperty(Property* expr) { | 2725 void FullCodeGenerator::VisitProperty(Property* expr) { |
| 2724 Comment cmnt(masm_, "[ Property"); | 2726 Comment cmnt(masm_, "[ Property"); |
| 2725 Expression* key = expr->key(); | 2727 Expression* key = expr->key(); |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2926 } | 2928 } |
| 2927 | 2929 |
| 2928 // Push the enclosing function. | 2930 // Push the enclosing function. |
| 2929 __ Push(Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); | 2931 __ Push(Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
| 2930 | 2932 |
| 2931 // Push the receiver of the enclosing function and do runtime call. | 2933 // Push the receiver of the enclosing function and do runtime call. |
| 2932 StackArgumentsAccessor args(rbp, info_->scope()->num_parameters()); | 2934 StackArgumentsAccessor args(rbp, info_->scope()->num_parameters()); |
| 2933 __ Push(args.GetReceiverOperand()); | 2935 __ Push(args.GetReceiverOperand()); |
| 2934 | 2936 |
| 2935 // Push the language mode. | 2937 // Push the language mode. |
| 2936 __ Push(Smi::FromInt(strict_mode())); | 2938 __ Push(Smi::FromInt(language_mode())); |
| 2937 | 2939 |
| 2938 // Push the start position of the scope the calls resides in. | 2940 // Push the start position of the scope the calls resides in. |
| 2939 __ Push(Smi::FromInt(scope()->start_position())); | 2941 __ Push(Smi::FromInt(scope()->start_position())); |
| 2940 | 2942 |
| 2941 // Do the runtime call. | 2943 // Do the runtime call. |
| 2942 __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 6); | 2944 __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 6); |
| 2943 } | 2945 } |
| 2944 | 2946 |
| 2945 | 2947 |
| 2946 void FullCodeGenerator::EmitLoadSuperConstructor(SuperReference* super_ref) { | 2948 void FullCodeGenerator::EmitLoadSuperConstructor(SuperReference* super_ref) { |
| (...skipping 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4507 void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { | 4509 void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { |
| 4508 switch (expr->op()) { | 4510 switch (expr->op()) { |
| 4509 case Token::DELETE: { | 4511 case Token::DELETE: { |
| 4510 Comment cmnt(masm_, "[ UnaryOperation (DELETE)"); | 4512 Comment cmnt(masm_, "[ UnaryOperation (DELETE)"); |
| 4511 Property* property = expr->expression()->AsProperty(); | 4513 Property* property = expr->expression()->AsProperty(); |
| 4512 VariableProxy* proxy = expr->expression()->AsVariableProxy(); | 4514 VariableProxy* proxy = expr->expression()->AsVariableProxy(); |
| 4513 | 4515 |
| 4514 if (property != NULL) { | 4516 if (property != NULL) { |
| 4515 VisitForStackValue(property->obj()); | 4517 VisitForStackValue(property->obj()); |
| 4516 VisitForStackValue(property->key()); | 4518 VisitForStackValue(property->key()); |
| 4517 __ Push(Smi::FromInt(strict_mode())); | 4519 __ Push(Smi::FromInt(language_mode())); |
| 4518 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); | 4520 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); |
| 4519 context()->Plug(rax); | 4521 context()->Plug(rax); |
| 4520 } else if (proxy != NULL) { | 4522 } else if (proxy != NULL) { |
| 4521 Variable* var = proxy->var(); | 4523 Variable* var = proxy->var(); |
| 4522 // Delete of an unqualified identifier is disallowed in strict mode | 4524 // Delete of an unqualified identifier is disallowed in strict mode |
| 4523 // but "delete this" is allowed. | 4525 // but "delete this" is allowed. |
| 4524 DCHECK(strict_mode() == SLOPPY || var->is_this()); | 4526 DCHECK(!is_strict(language_mode()) || var->is_this()); |
| 4525 if (var->IsUnallocated()) { | 4527 if (var->IsUnallocated()) { |
| 4526 __ Push(GlobalObjectOperand()); | 4528 __ Push(GlobalObjectOperand()); |
| 4527 __ Push(var->name()); | 4529 __ Push(var->name()); |
| 4528 __ Push(Smi::FromInt(SLOPPY)); | 4530 __ Push(Smi::FromInt(SLOPPY)); |
| 4529 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); | 4531 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); |
| 4530 context()->Plug(rax); | 4532 context()->Plug(rax); |
| 4531 } else if (var->IsStackAllocated() || var->IsContextSlot()) { | 4533 } else if (var->IsStackAllocated() || var->IsContextSlot()) { |
| 4532 // Result of deleting non-global variables is false. 'this' is | 4534 // Result of deleting non-global variables is false. 'this' is |
| 4533 // not really a variable, though we implement it as one. The | 4535 // not really a variable, though we implement it as one. The |
| 4534 // subexpression does not have side effects. | 4536 // subexpression does not have side effects. |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4838 } | 4840 } |
| 4839 } else { | 4841 } else { |
| 4840 context()->Plug(rax); | 4842 context()->Plug(rax); |
| 4841 } | 4843 } |
| 4842 break; | 4844 break; |
| 4843 } | 4845 } |
| 4844 case KEYED_PROPERTY: { | 4846 case KEYED_PROPERTY: { |
| 4845 __ Pop(StoreDescriptor::NameRegister()); | 4847 __ Pop(StoreDescriptor::NameRegister()); |
| 4846 __ Pop(StoreDescriptor::ReceiverRegister()); | 4848 __ Pop(StoreDescriptor::ReceiverRegister()); |
| 4847 Handle<Code> ic = | 4849 Handle<Code> ic = |
| 4848 CodeFactory::KeyedStoreIC(isolate(), strict_mode()).code(); | 4850 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
| 4849 CallIC(ic, expr->CountStoreFeedbackId()); | 4851 CallIC(ic, expr->CountStoreFeedbackId()); |
| 4850 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 4852 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
| 4851 if (expr->is_postfix()) { | 4853 if (expr->is_postfix()) { |
| 4852 if (!context()->IsEffect()) { | 4854 if (!context()->IsEffect()) { |
| 4853 context()->PlugTOS(); | 4855 context()->PlugTOS(); |
| 4854 } | 4856 } |
| 4855 } else { | 4857 } else { |
| 4856 context()->Plug(rax); | 4858 context()->Plug(rax); |
| 4857 } | 4859 } |
| 4858 break; | 4860 break; |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5297 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5299 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 5298 Assembler::target_address_at(call_target_address, | 5300 Assembler::target_address_at(call_target_address, |
| 5299 unoptimized_code)); | 5301 unoptimized_code)); |
| 5300 return OSR_AFTER_STACK_CHECK; | 5302 return OSR_AFTER_STACK_CHECK; |
| 5301 } | 5303 } |
| 5302 | 5304 |
| 5303 | 5305 |
| 5304 } } // namespace v8::internal | 5306 } } // namespace v8::internal |
| 5305 | 5307 |
| 5306 #endif // V8_TARGET_ARCH_X64 | 5308 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |