Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index b7f374b8c0416d2700d4868d0ed016e990e8682b..e4c98aa1dc082921054de365596fd6438a6926ba 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -1954,7 +1954,7 @@ HStoreNamedField* HGraphBuilder::AddStoreMapConstant(HValue *object, |
HValue* HGraphBuilder::AddLoadJSBuiltin(Builtins::JavaScript builtin, |
- HContext* context) { |
+ HValue* context) { |
HGlobalObject* global_object = Add<HGlobalObject>(context); |
HObjectAccess access = HObjectAccess::ForJSObjectOffset( |
GlobalObject::kBuiltinsOffset); |
@@ -8293,7 +8293,11 @@ void HOptimizedGraphBuilder::VisitDelete(UnaryOperation* expr) { |
HValue* key = Pop(); |
HValue* obj = Pop(); |
HValue* context = environment()->LookupContext(); |
- HDeleteProperty* instr = new(zone()) HDeleteProperty(context, obj, key); |
+ HValue* function = AddLoadJSBuiltin(Builtins::DELETE, context); |
+ Add<HPushArgument>(obj); |
+ Add<HPushArgument>(key); |
+ Add<HPushArgument>(Add<HConstant>(function_strict_mode_flag())); |
+ HInstruction* instr = new(zone()) HInvokeFunction(context, function, 3); |
Michael Starzinger
2013/07/05 13:47:49
This will introduce an additional check that compa
|
return ast_context()->ReturnInstruction(instr, expr->id()); |
} else if (proxy != NULL) { |
Variable* var = proxy->var(); |
@@ -9105,7 +9109,10 @@ void HOptimizedGraphBuilder::VisitCompareOperation(CompareOperation* expr) { |
// Code below assumes that we don't fall through. |
UNREACHABLE(); |
} else if (op == Token::IN) { |
- HIn* result = new(zone()) HIn(context, left, right); |
+ HValue* function = AddLoadJSBuiltin(Builtins::IN, context); |
+ Add<HPushArgument>(left); |
+ Add<HPushArgument>(right); |
+ HInstruction* result = new(zone()) HInvokeFunction(context, function, 2); |
Michael Starzinger
2013/07/05 13:47:49
Likewise.
|
result->set_position(expr->position()); |
return ast_context()->ReturnInstruction(result, expr->id()); |
} |