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

Side by Side Diff: src/compiler/js-generic-lowering.cc

Issue 2810363003: [builtins] Introduce DeleteProperty builtin (Closed)
Patch Set: ready for review 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/compiler/js-generic-lowering.h" 5 #include "src/compiler/js-generic-lowering.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/builtins/builtins-constructor.h" 8 #include "src/builtins/builtins-constructor.h"
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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 302
303 void JSGenericLowering::LowerJSStoreDataPropertyInLiteral(Node* node) { 303 void JSGenericLowering::LowerJSStoreDataPropertyInLiteral(Node* node) {
304 FeedbackParameter const& p = FeedbackParameterOf(node->op()); 304 FeedbackParameter const& p = FeedbackParameterOf(node->op());
305 node->InsertInputs(zone(), 4, 2); 305 node->InsertInputs(zone(), 4, 2);
306 node->ReplaceInput(4, jsgraph()->HeapConstant(p.feedback().vector())); 306 node->ReplaceInput(4, jsgraph()->HeapConstant(p.feedback().vector()));
307 node->ReplaceInput(5, jsgraph()->SmiConstant(p.feedback().index())); 307 node->ReplaceInput(5, jsgraph()->SmiConstant(p.feedback().index()));
308 ReplaceWithRuntimeCall(node, Runtime::kDefineDataPropertyInLiteral); 308 ReplaceWithRuntimeCall(node, Runtime::kDefineDataPropertyInLiteral);
309 } 309 }
310 310
311 void JSGenericLowering::LowerJSDeleteProperty(Node* node) { 311 void JSGenericLowering::LowerJSDeleteProperty(Node* node) {
312 LanguageMode language_mode = OpParameter<LanguageMode>(node); 312 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
313 ReplaceWithRuntimeCall(node, is_strict(language_mode) 313 Callable callable = CodeFactory::DeleteProperty(isolate());
314 ? Runtime::kDeleteProperty_Strict 314 ReplaceWithStubCall(node, callable, flags);
315 : Runtime::kDeleteProperty_Sloppy);
316 } 315 }
317 316
318 void JSGenericLowering::LowerJSGetSuperConstructor(Node* node) { 317 void JSGenericLowering::LowerJSGetSuperConstructor(Node* node) {
319 CallDescriptor::Flags flags = FrameStateFlagForCall(node); 318 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
320 Callable callable = CodeFactory::GetSuperConstructor(isolate()); 319 Callable callable = CodeFactory::GetSuperConstructor(isolate());
321 ReplaceWithStubCall(node, callable, flags); 320 ReplaceWithStubCall(node, callable, flags);
322 } 321 }
323 322
324 void JSGenericLowering::LowerJSInstanceOf(Node* node) { 323 void JSGenericLowering::LowerJSInstanceOf(Node* node) {
325 CallDescriptor::Flags flags = FrameStateFlagForCall(node); 324 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 } 721 }
723 722
724 723
725 MachineOperatorBuilder* JSGenericLowering::machine() const { 724 MachineOperatorBuilder* JSGenericLowering::machine() const {
726 return jsgraph()->machine(); 725 return jsgraph()->machine();
727 } 726 }
728 727
729 } // namespace compiler 728 } // namespace compiler
730 } // namespace internal 729 } // namespace internal
731 } // namespace v8 730 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698