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

Unified Diff: src/crankshaft/hydrogen.cc

Issue 2810363003: [builtins] Introduce DeleteProperty builtin (Closed)
Patch Set: fix CallableFor not to create handles Created 3 years, 8 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
« no previous file with comments | « src/compiler/js-operator.cc ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/hydrogen.cc
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc
index 52a19ac26c4fc1b25f1dad71eaa56dd9a9d6009b..32102107e796ab986b6bc6402b05b442a3097969 100644
--- a/src/crankshaft/hydrogen.cc
+++ b/src/crankshaft/hydrogen.cc
@@ -10013,12 +10013,11 @@ void HOptimizedGraphBuilder::VisitDelete(UnaryOperation* expr) {
CHECK_ALIVE(VisitForValue(prop->key()));
HValue* key = Pop();
HValue* obj = Pop();
- Add<HPushArguments>(obj, key);
- HInstruction* instr = New<HCallRuntime>(
- Runtime::FunctionForId(is_strict(function_language_mode())
- ? Runtime::kDeleteProperty_Strict
- : Runtime::kDeleteProperty_Sloppy),
- 2);
+ HValue* language_mode = Add<HConstant>(
+ static_cast<int32_t>(function_language_mode()), Representation::Smi());
+ Add<HPushArguments>(obj, key, language_mode);
+ HInstruction* instr =
+ New<HCallRuntime>(Runtime::FunctionForId(Runtime::kDeleteProperty), 3);
return ast_context()->ReturnInstruction(instr, expr->id());
} else if (proxy != NULL) {
Variable* var = proxy->var();
« no previous file with comments | « src/compiler/js-operator.cc ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698