| OLD | NEW | 
|---|
| 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/code-factory.h" | 8 #include "src/code-factory.h" | 
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" | 
| 10 #include "src/compiler/common-operator.h" | 10 #include "src/compiler/common-operator.h" | 
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 330   node->ReplaceInput(Descriptor::kReceiver, global); | 330   node->ReplaceInput(Descriptor::kReceiver, global); | 
| 331   node->ReplaceInput(Descriptor::kName, jsgraph()->HeapConstant(p.name())); | 331   node->ReplaceInput(Descriptor::kName, jsgraph()->HeapConstant(p.name())); | 
| 332   node->ReplaceInput(Descriptor::kValue, value); | 332   node->ReplaceInput(Descriptor::kValue, value); | 
| 333   node->ReplaceInput(Descriptor::kSlot, | 333   node->ReplaceInput(Descriptor::kSlot, | 
| 334                      jsgraph()->SmiConstant(p.feedback().index())); | 334                      jsgraph()->SmiConstant(p.feedback().index())); | 
| 335   node->ReplaceInput(Descriptor::kVector, vector); | 335   node->ReplaceInput(Descriptor::kVector, vector); | 
| 336   node->ReplaceInput(7, effect); | 336   node->ReplaceInput(7, effect); | 
| 337   ReplaceWithStubCall(node, callable, flags); | 337   ReplaceWithStubCall(node, callable, flags); | 
| 338 } | 338 } | 
| 339 | 339 | 
|  | 340 void JSGenericLowering::LowerJSStoreDataPropertyInLiteral(Node* node) { | 
|  | 341   ReplaceWithRuntimeCall(node, Runtime::kDefineDataPropertyInLiteral); | 
|  | 342 } | 
| 340 | 343 | 
| 341 void JSGenericLowering::LowerJSDeleteProperty(Node* node) { | 344 void JSGenericLowering::LowerJSDeleteProperty(Node* node) { | 
| 342   LanguageMode language_mode = OpParameter<LanguageMode>(node); | 345   LanguageMode language_mode = OpParameter<LanguageMode>(node); | 
| 343   ReplaceWithRuntimeCall(node, is_strict(language_mode) | 346   ReplaceWithRuntimeCall(node, is_strict(language_mode) | 
| 344                                    ? Runtime::kDeleteProperty_Strict | 347                                    ? Runtime::kDeleteProperty_Strict | 
| 345                                    : Runtime::kDeleteProperty_Sloppy); | 348                                    : Runtime::kDeleteProperty_Sloppy); | 
| 346 } | 349 } | 
| 347 | 350 | 
| 348 |  | 
| 349 void JSGenericLowering::LowerJSInstanceOf(Node* node) { | 351 void JSGenericLowering::LowerJSInstanceOf(Node* node) { | 
| 350   CallDescriptor::Flags flags = FrameStateFlagForCall(node); | 352   CallDescriptor::Flags flags = FrameStateFlagForCall(node); | 
| 351   Callable callable = CodeFactory::InstanceOf(isolate()); | 353   Callable callable = CodeFactory::InstanceOf(isolate()); | 
| 352   ReplaceWithStubCall(node, callable, flags); | 354   ReplaceWithStubCall(node, callable, flags); | 
| 353 } | 355 } | 
| 354 | 356 | 
| 355 void JSGenericLowering::LowerJSOrdinaryHasInstance(Node* node) { | 357 void JSGenericLowering::LowerJSOrdinaryHasInstance(Node* node) { | 
| 356   CallDescriptor::Flags flags = FrameStateFlagForCall(node); | 358   CallDescriptor::Flags flags = FrameStateFlagForCall(node); | 
| 357   Callable callable = CodeFactory::OrdinaryHasInstance(isolate()); | 359   Callable callable = CodeFactory::OrdinaryHasInstance(isolate()); | 
| 358   ReplaceWithStubCall(node, callable, flags); | 360   ReplaceWithStubCall(node, callable, flags); | 
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 711 } | 713 } | 
| 712 | 714 | 
| 713 | 715 | 
| 714 MachineOperatorBuilder* JSGenericLowering::machine() const { | 716 MachineOperatorBuilder* JSGenericLowering::machine() const { | 
| 715   return jsgraph()->machine(); | 717   return jsgraph()->machine(); | 
| 716 } | 718 } | 
| 717 | 719 | 
| 718 }  // namespace compiler | 720 }  // namespace compiler | 
| 719 }  // namespace internal | 721 }  // namespace internal | 
| 720 }  // namespace v8 | 722 }  // namespace v8 | 
| OLD | NEW | 
|---|