| 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_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 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 int receiver_offset = (info->scope()->num_parameters() + 1) * kPointerSize; | 120 int receiver_offset = (info->scope()->num_parameters() + 1) * kPointerSize; |
| 121 __ mov(ecx, Operand(esp, receiver_offset)); | 121 __ mov(ecx, Operand(esp, receiver_offset)); |
| 122 | 122 |
| 123 __ cmp(ecx, isolate()->factory()->undefined_value()); | 123 __ cmp(ecx, isolate()->factory()->undefined_value()); |
| 124 __ j(not_equal, &ok, Label::kNear); | 124 __ j(not_equal, &ok, Label::kNear); |
| 125 | 125 |
| 126 __ mov(ecx, GlobalObjectOperand()); | 126 __ mov(ecx, GlobalObjectOperand()); |
| 127 __ mov(ecx, FieldOperand(ecx, GlobalObject::kGlobalProxyOffset)); | 127 __ mov(ecx, FieldOperand(ecx, GlobalObject::kGlobalProxyOffset)); |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 int offset = num_parameters * kPointerSize; | 247 int offset = num_parameters * kPointerSize; |
| 248 __ lea(edx, | 248 __ lea(edx, |
| 249 Operand(ebp, StandardFrameConstants::kCallerSPOffset + offset)); | 249 Operand(ebp, StandardFrameConstants::kCallerSPOffset + offset)); |
| 250 __ push(edx); | 250 __ push(edx); |
| 251 __ push(Immediate(Smi::FromInt(num_parameters))); | 251 __ push(Immediate(Smi::FromInt(num_parameters))); |
| 252 // Arguments to ArgumentsAccessStub: | 252 // Arguments to ArgumentsAccessStub: |
| 253 // function, receiver address, parameter count. | 253 // function, receiver address, parameter count. |
| 254 // The stub will rewrite receiver and parameter count if the previous | 254 // The stub will rewrite receiver and parameter count if the previous |
| 255 // stack frame was an arguments adapter frame. | 255 // stack frame was an arguments adapter frame. |
| 256 ArgumentsAccessStub::Type type; | 256 ArgumentsAccessStub::Type type; |
| 257 if (strict_mode() == STRICT) { | 257 if (is_strict(language_mode())) { |
| 258 type = ArgumentsAccessStub::NEW_STRICT; | 258 type = ArgumentsAccessStub::NEW_STRICT; |
| 259 } else if (function()->has_duplicate_parameters()) { | 259 } else if (function()->has_duplicate_parameters()) { |
| 260 type = ArgumentsAccessStub::NEW_SLOPPY_SLOW; | 260 type = ArgumentsAccessStub::NEW_SLOPPY_SLOW; |
| 261 } else { | 261 } else { |
| 262 type = ArgumentsAccessStub::NEW_SLOPPY_FAST; | 262 type = ArgumentsAccessStub::NEW_SLOPPY_FAST; |
| 263 } | 263 } |
| 264 ArgumentsAccessStub stub(isolate(), type); | 264 ArgumentsAccessStub stub(isolate(), type); |
| 265 __ CallStub(&stub); | 265 __ CallStub(&stub); |
| 266 | 266 |
| 267 SetVar(arguments, eax, ebx, edx); | 267 SetVar(arguments, eax, ebx, edx); |
| (...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1204 // space for nested functions that don't need literals cloning. If | 1204 // space for nested functions that don't need literals cloning. If |
| 1205 // we're running with the --always-opt or the --prepare-always-opt | 1205 // we're running with the --always-opt or the --prepare-always-opt |
| 1206 // flag, we need to use the runtime function so that the new function | 1206 // flag, we need to use the runtime function so that the new function |
| 1207 // we are creating here gets a chance to have its code optimized and | 1207 // we are creating here gets a chance to have its code optimized and |
| 1208 // doesn't just get a copy of the existing unoptimized code. | 1208 // doesn't just get a copy of the existing unoptimized code. |
| 1209 if (!FLAG_always_opt && | 1209 if (!FLAG_always_opt && |
| 1210 !FLAG_prepare_always_opt && | 1210 !FLAG_prepare_always_opt && |
| 1211 !pretenure && | 1211 !pretenure && |
| 1212 scope()->is_function_scope() && | 1212 scope()->is_function_scope() && |
| 1213 info->num_literals() == 0) { | 1213 info->num_literals() == 0) { |
| 1214 FastNewClosureStub stub(isolate(), info->strict_mode(), info->kind()); | 1214 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); |
| 1215 __ mov(ebx, Immediate(info)); | 1215 __ mov(ebx, Immediate(info)); |
| 1216 __ CallStub(&stub); | 1216 __ CallStub(&stub); |
| 1217 } else { | 1217 } else { |
| 1218 __ push(esi); | 1218 __ push(esi); |
| 1219 __ push(Immediate(info)); | 1219 __ push(Immediate(info)); |
| 1220 __ push(Immediate(pretenure | 1220 __ push(Immediate(pretenure |
| 1221 ? isolate()->factory()->true_value() | 1221 ? isolate()->factory()->true_value() |
| 1222 : isolate()->factory()->false_value())); | 1222 : isolate()->factory()->false_value())); |
| 1223 __ CallRuntime(Runtime::kNewClosure, 3); | 1223 __ CallRuntime(Runtime::kNewClosure, 3); |
| 1224 } | 1224 } |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1651 } else { | 1651 } else { |
| 1652 VisitForEffect(value); | 1652 VisitForEffect(value); |
| 1653 } | 1653 } |
| 1654 break; | 1654 break; |
| 1655 } | 1655 } |
| 1656 __ push(Operand(esp, 0)); // Duplicate receiver. | 1656 __ push(Operand(esp, 0)); // Duplicate receiver. |
| 1657 VisitForStackValue(key); | 1657 VisitForStackValue(key); |
| 1658 VisitForStackValue(value); | 1658 VisitForStackValue(value); |
| 1659 if (property->emit_store()) { | 1659 if (property->emit_store()) { |
| 1660 EmitSetHomeObjectIfNeeded(value, 2); | 1660 EmitSetHomeObjectIfNeeded(value, 2); |
| 1661 __ push(Immediate(Smi::FromInt(SLOPPY))); // Strict mode | 1661 __ push(Immediate(Smi::FromInt(SLOPPY))); // Language mode |
| 1662 __ CallRuntime(Runtime::kSetProperty, 4); | 1662 __ CallRuntime(Runtime::kSetProperty, 4); |
| 1663 } else { | 1663 } else { |
| 1664 __ Drop(3); | 1664 __ Drop(3); |
| 1665 } | 1665 } |
| 1666 break; | 1666 break; |
| 1667 case ObjectLiteral::Property::PROTOTYPE: | 1667 case ObjectLiteral::Property::PROTOTYPE: |
| 1668 __ push(Operand(esp, 0)); // Duplicate receiver. | 1668 __ push(Operand(esp, 0)); // Duplicate receiver. |
| 1669 VisitForStackValue(value); | 1669 VisitForStackValue(value); |
| 1670 DCHECK(property->emit_store()); | 1670 DCHECK(property->emit_store()); |
| 1671 __ CallRuntime(Runtime::kInternalSetPrototype, 2); | 1671 __ CallRuntime(Runtime::kInternalSetPrototype, 2); |
| (...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2560 break; | 2560 break; |
| 2561 } | 2561 } |
| 2562 case KEYED_PROPERTY: { | 2562 case KEYED_PROPERTY: { |
| 2563 __ push(eax); // Preserve value. | 2563 __ push(eax); // Preserve value. |
| 2564 VisitForStackValue(prop->obj()); | 2564 VisitForStackValue(prop->obj()); |
| 2565 VisitForAccumulatorValue(prop->key()); | 2565 VisitForAccumulatorValue(prop->key()); |
| 2566 __ Move(StoreDescriptor::NameRegister(), eax); | 2566 __ Move(StoreDescriptor::NameRegister(), eax); |
| 2567 __ pop(StoreDescriptor::ReceiverRegister()); // Receiver. | 2567 __ pop(StoreDescriptor::ReceiverRegister()); // Receiver. |
| 2568 __ pop(StoreDescriptor::ValueRegister()); // Restore value. | 2568 __ pop(StoreDescriptor::ValueRegister()); // Restore value. |
| 2569 Handle<Code> ic = | 2569 Handle<Code> ic = |
| 2570 CodeFactory::KeyedStoreIC(isolate(), strict_mode()).code(); | 2570 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
| 2571 CallIC(ic); | 2571 CallIC(ic); |
| 2572 break; | 2572 break; |
| 2573 } | 2573 } |
| 2574 } | 2574 } |
| 2575 context()->Plug(eax); | 2575 context()->Plug(eax); |
| 2576 } | 2576 } |
| 2577 | 2577 |
| 2578 | 2578 |
| 2579 void FullCodeGenerator::EmitStoreToStackLocalOrContextSlot( | 2579 void FullCodeGenerator::EmitStoreToStackLocalOrContextSlot( |
| 2580 Variable* var, MemOperand location) { | 2580 Variable* var, MemOperand location) { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2626 __ push(Immediate(var->name())); | 2626 __ push(Immediate(var->name())); |
| 2627 __ CallRuntime(Runtime::kThrowReferenceError, 1); | 2627 __ CallRuntime(Runtime::kThrowReferenceError, 1); |
| 2628 __ bind(&assign); | 2628 __ bind(&assign); |
| 2629 EmitStoreToStackLocalOrContextSlot(var, location); | 2629 EmitStoreToStackLocalOrContextSlot(var, location); |
| 2630 } else if (!var->is_const_mode() || op == Token::INIT_CONST) { | 2630 } else if (!var->is_const_mode() || op == Token::INIT_CONST) { |
| 2631 if (var->IsLookupSlot()) { | 2631 if (var->IsLookupSlot()) { |
| 2632 // Assignment to var. | 2632 // Assignment to var. |
| 2633 __ push(eax); // Value. | 2633 __ push(eax); // Value. |
| 2634 __ push(esi); // Context. | 2634 __ push(esi); // Context. |
| 2635 __ push(Immediate(var->name())); | 2635 __ push(Immediate(var->name())); |
| 2636 __ push(Immediate(Smi::FromInt(strict_mode()))); | 2636 __ push(Immediate(Smi::FromInt(language_mode()))); |
| 2637 __ CallRuntime(Runtime::kStoreLookupSlot, 4); | 2637 __ CallRuntime(Runtime::kStoreLookupSlot, 4); |
| 2638 } else { | 2638 } else { |
| 2639 // Assignment to var or initializing assignment to let/const in harmony | 2639 // Assignment to var or initializing assignment to let/const in harmony |
| 2640 // mode. | 2640 // mode. |
| 2641 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); | 2641 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
| 2642 MemOperand location = VarOperand(var, ecx); | 2642 MemOperand location = VarOperand(var, ecx); |
| 2643 if (generate_debug_code_ && op == Token::INIT_LET) { | 2643 if (generate_debug_code_ && op == Token::INIT_LET) { |
| 2644 // Check for an uninitialized let binding. | 2644 // Check for an uninitialized let binding. |
| 2645 __ mov(edx, location); | 2645 __ mov(edx, location); |
| 2646 __ cmp(edx, isolate()->factory()->the_hole_value()); | 2646 __ cmp(edx, isolate()->factory()->the_hole_value()); |
| 2647 __ Check(equal, kLetBindingReInitialization); | 2647 __ Check(equal, kLetBindingReInitialization); |
| 2648 } | 2648 } |
| 2649 EmitStoreToStackLocalOrContextSlot(var, location); | 2649 EmitStoreToStackLocalOrContextSlot(var, location); |
| 2650 } | 2650 } |
| 2651 } else if (IsSignallingAssignmentToConst(var, op, strict_mode())) { | 2651 } else if (IsSignallingAssignmentToConst(var, op, language_mode())) { |
| 2652 __ CallRuntime(Runtime::kThrowConstAssignError, 0); | 2652 __ CallRuntime(Runtime::kThrowConstAssignError, 0); |
| 2653 } | 2653 } |
| 2654 } | 2654 } |
| 2655 | 2655 |
| 2656 | 2656 |
| 2657 void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { | 2657 void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { |
| 2658 // Assignment to a property, using a named store IC. | 2658 // Assignment to a property, using a named store IC. |
| 2659 // eax : value | 2659 // eax : value |
| 2660 // esp[0] : receiver | 2660 // esp[0] : receiver |
| 2661 | 2661 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2676 void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) { | 2676 void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) { |
| 2677 // Assignment to named property of super. | 2677 // Assignment to named property of super. |
| 2678 // eax : value | 2678 // eax : value |
| 2679 // stack : receiver ('this'), home_object | 2679 // stack : receiver ('this'), home_object |
| 2680 DCHECK(prop != NULL); | 2680 DCHECK(prop != NULL); |
| 2681 Literal* key = prop->key()->AsLiteral(); | 2681 Literal* key = prop->key()->AsLiteral(); |
| 2682 DCHECK(key != NULL); | 2682 DCHECK(key != NULL); |
| 2683 | 2683 |
| 2684 __ push(Immediate(key->value())); | 2684 __ push(Immediate(key->value())); |
| 2685 __ push(eax); | 2685 __ push(eax); |
| 2686 __ CallRuntime((strict_mode() == STRICT ? Runtime::kStoreToSuper_Strict | 2686 __ CallRuntime((is_strict(language_mode()) ? Runtime::kStoreToSuper_Strict |
| 2687 : Runtime::kStoreToSuper_Sloppy), | 2687 : Runtime::kStoreToSuper_Sloppy), |
| 2688 4); | 2688 4); |
| 2689 } | 2689 } |
| 2690 | 2690 |
| 2691 | 2691 |
| 2692 void FullCodeGenerator::EmitKeyedSuperPropertyStore(Property* prop) { | 2692 void FullCodeGenerator::EmitKeyedSuperPropertyStore(Property* prop) { |
| 2693 // Assignment to named property of super. | 2693 // Assignment to named property of super. |
| 2694 // eax : value | 2694 // eax : value |
| 2695 // stack : receiver ('this'), home_object, key | 2695 // stack : receiver ('this'), home_object, key |
| 2696 | 2696 |
| 2697 __ push(eax); | 2697 __ push(eax); |
| 2698 __ CallRuntime((strict_mode() == STRICT ? Runtime::kStoreKeyedToSuper_Strict | 2698 __ CallRuntime( |
| 2699 : Runtime::kStoreKeyedToSuper_Sloppy), | 2699 (is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict |
| 2700 4); | 2700 : Runtime::kStoreKeyedToSuper_Sloppy), |
| 2701 4); |
| 2701 } | 2702 } |
| 2702 | 2703 |
| 2703 | 2704 |
| 2704 void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { | 2705 void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { |
| 2705 // Assignment to a property, using a keyed store IC. | 2706 // Assignment to a property, using a keyed store IC. |
| 2706 // eax : value | 2707 // eax : value |
| 2707 // esp[0] : key | 2708 // esp[0] : key |
| 2708 // esp[kPointerSize] : receiver | 2709 // esp[kPointerSize] : receiver |
| 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(eax)); | 2713 DCHECK(StoreDescriptor::ValueRegister().is(eax)); |
| 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(eax); | 2721 context()->Plug(eax); |
| 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2920 __ push(Operand(esp, arg_count * kPointerSize)); | 2922 __ push(Operand(esp, arg_count * kPointerSize)); |
| 2921 } else { | 2923 } else { |
| 2922 __ push(Immediate(isolate()->factory()->undefined_value())); | 2924 __ push(Immediate(isolate()->factory()->undefined_value())); |
| 2923 } | 2925 } |
| 2924 | 2926 |
| 2925 // Push the enclosing function. | 2927 // Push the enclosing function. |
| 2926 __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); | 2928 __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
| 2927 // Push the receiver of the enclosing function. | 2929 // Push the receiver of the enclosing function. |
| 2928 __ push(Operand(ebp, (2 + info_->scope()->num_parameters()) * kPointerSize)); | 2930 __ push(Operand(ebp, (2 + info_->scope()->num_parameters()) * kPointerSize)); |
| 2929 // Push the language mode. | 2931 // Push the language mode. |
| 2930 __ push(Immediate(Smi::FromInt(strict_mode()))); | 2932 __ push(Immediate(Smi::FromInt(language_mode()))); |
| 2931 | 2933 |
| 2932 // Push the start position of the scope the calls resides in. | 2934 // Push the start position of the scope the calls resides in. |
| 2933 __ push(Immediate(Smi::FromInt(scope()->start_position()))); | 2935 __ push(Immediate(Smi::FromInt(scope()->start_position()))); |
| 2934 | 2936 |
| 2935 // Do the runtime call. | 2937 // Do the runtime call. |
| 2936 __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 6); | 2938 __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 6); |
| 2937 } | 2939 } |
| 2938 | 2940 |
| 2939 | 2941 |
| 2940 void FullCodeGenerator::EmitLoadSuperConstructor(SuperReference* super_ref) { | 2942 void FullCodeGenerator::EmitLoadSuperConstructor(SuperReference* super_ref) { |
| (...skipping 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4491 void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { | 4493 void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { |
| 4492 switch (expr->op()) { | 4494 switch (expr->op()) { |
| 4493 case Token::DELETE: { | 4495 case Token::DELETE: { |
| 4494 Comment cmnt(masm_, "[ UnaryOperation (DELETE)"); | 4496 Comment cmnt(masm_, "[ UnaryOperation (DELETE)"); |
| 4495 Property* property = expr->expression()->AsProperty(); | 4497 Property* property = expr->expression()->AsProperty(); |
| 4496 VariableProxy* proxy = expr->expression()->AsVariableProxy(); | 4498 VariableProxy* proxy = expr->expression()->AsVariableProxy(); |
| 4497 | 4499 |
| 4498 if (property != NULL) { | 4500 if (property != NULL) { |
| 4499 VisitForStackValue(property->obj()); | 4501 VisitForStackValue(property->obj()); |
| 4500 VisitForStackValue(property->key()); | 4502 VisitForStackValue(property->key()); |
| 4501 __ push(Immediate(Smi::FromInt(strict_mode()))); | 4503 __ push(Immediate(Smi::FromInt(language_mode()))); |
| 4502 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); | 4504 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); |
| 4503 context()->Plug(eax); | 4505 context()->Plug(eax); |
| 4504 } else if (proxy != NULL) { | 4506 } else if (proxy != NULL) { |
| 4505 Variable* var = proxy->var(); | 4507 Variable* var = proxy->var(); |
| 4506 // Delete of an unqualified identifier is disallowed in strict mode | 4508 // Delete of an unqualified identifier is disallowed in strict mode |
| 4507 // but "delete this" is allowed. | 4509 // but "delete this" is allowed. |
| 4508 DCHECK(strict_mode() == SLOPPY || var->is_this()); | 4510 DCHECK(is_sloppy(language_mode()) || var->is_this()); |
| 4509 if (var->IsUnallocated()) { | 4511 if (var->IsUnallocated()) { |
| 4510 __ push(GlobalObjectOperand()); | 4512 __ push(GlobalObjectOperand()); |
| 4511 __ push(Immediate(var->name())); | 4513 __ push(Immediate(var->name())); |
| 4512 __ push(Immediate(Smi::FromInt(SLOPPY))); | 4514 __ push(Immediate(Smi::FromInt(SLOPPY))); |
| 4513 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); | 4515 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); |
| 4514 context()->Plug(eax); | 4516 context()->Plug(eax); |
| 4515 } else if (var->IsStackAllocated() || var->IsContextSlot()) { | 4517 } else if (var->IsStackAllocated() || var->IsContextSlot()) { |
| 4516 // Result of deleting non-global variables is false. 'this' is | 4518 // Result of deleting non-global variables is false. 'this' is |
| 4517 // not really a variable, though we implement it as one. The | 4519 // not really a variable, though we implement it as one. The |
| 4518 // subexpression does not have side effects. | 4520 // subexpression does not have side effects. |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4825 } | 4827 } |
| 4826 } else { | 4828 } else { |
| 4827 context()->Plug(eax); | 4829 context()->Plug(eax); |
| 4828 } | 4830 } |
| 4829 break; | 4831 break; |
| 4830 } | 4832 } |
| 4831 case KEYED_PROPERTY: { | 4833 case KEYED_PROPERTY: { |
| 4832 __ pop(StoreDescriptor::NameRegister()); | 4834 __ pop(StoreDescriptor::NameRegister()); |
| 4833 __ pop(StoreDescriptor::ReceiverRegister()); | 4835 __ pop(StoreDescriptor::ReceiverRegister()); |
| 4834 Handle<Code> ic = | 4836 Handle<Code> ic = |
| 4835 CodeFactory::KeyedStoreIC(isolate(), strict_mode()).code(); | 4837 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
| 4836 CallIC(ic, expr->CountStoreFeedbackId()); | 4838 CallIC(ic, expr->CountStoreFeedbackId()); |
| 4837 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 4839 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
| 4838 if (expr->is_postfix()) { | 4840 if (expr->is_postfix()) { |
| 4839 // Result is on the stack | 4841 // Result is on the stack |
| 4840 if (!context()->IsEffect()) { | 4842 if (!context()->IsEffect()) { |
| 4841 context()->PlugTOS(); | 4843 context()->PlugTOS(); |
| 4842 } | 4844 } |
| 4843 } else { | 4845 } else { |
| 4844 context()->Plug(eax); | 4846 context()->Plug(eax); |
| 4845 } | 4847 } |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5282 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5284 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 5283 Assembler::target_address_at(call_target_address, | 5285 Assembler::target_address_at(call_target_address, |
| 5284 unoptimized_code)); | 5286 unoptimized_code)); |
| 5285 return OSR_AFTER_STACK_CHECK; | 5287 return OSR_AFTER_STACK_CHECK; |
| 5286 } | 5288 } |
| 5287 | 5289 |
| 5288 | 5290 |
| 5289 } } // namespace v8::internal | 5291 } } // namespace v8::internal |
| 5290 | 5292 |
| 5291 #endif // V8_TARGET_ARCH_X87 | 5293 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |