Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Unified Diff: src/arm/codegen-arm.cc

Issue 6515005: Strict mode delete. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {
« no previous file with comments | « .gitignore ('k') | src/arm/full-codegen-arm.cc » ('j') | src/arm/full-codegen-arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698