Index: src/arm/codegen-arm.cc |
diff --git a/src/arm/codegen-arm.cc b/src/arm/codegen-arm.cc |
index c827110731783088200046585e2f0985e6d0ef70..f2f832879144b12eb33759d5bf12d4550938e238 100644 |
--- a/src/arm/codegen-arm.cc |
+++ b/src/arm/codegen-arm.cc |
@@ -5844,15 +5844,18 @@ void CodeGenerator::VisitUnaryOperation(UnaryOperation* node) { |
if (property != NULL) { |
Load(property->obj()); |
Load(property->key()); |
- frame_->InvokeBuiltin(Builtins::DELETE, CALL_JS, 2); |
+ frame_->EmitPush(Operand(Smi::FromInt(strict_mode_flag()))); |
+ frame_->InvokeBuiltin(Builtins::DELETE, CALL_JS, 3); |
frame_->EmitPush(r0); |
} else if (variable != NULL) { |
+ ASSERT(strict_mode_flag() == kNonStrictMode); |
Martin Maly
2011/02/14 05:15:22
"delete foo" is disallowed in strict mode so we ca
Mads Ager (chromium)
2011/02/14 10:27:24
And 'this' rewrites to a slot, right?
Also, could
Kevin Millikin (Chromium)
2011/02/14 11:56:55
It just doesn't rewrite to a property reference (g
Martin Maly
2011/02/14 21:46:51
Yes, this rewrites to a slot.
Added comment.
|
Slot* slot = variable->AsSlot(); |
if (variable->is_global()) { |
LoadGlobal(); |
frame_->EmitPush(Operand(variable->name())); |
- frame_->InvokeBuiltin(Builtins::DELETE, CALL_JS, 2); |
+ frame_->EmitPush(Operand(Smi::FromInt(kNonStrictMode))); |
+ frame_->InvokeBuiltin(Builtins::DELETE, CALL_JS, 3); |
frame_->EmitPush(r0); |
} else if (slot != NULL && slot->type() == Slot::LOOKUP) { |