| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 #include "src/code-stub-assembler.h" | 4 #include "src/code-stub-assembler.h" |
| 5 #include "src/code-factory.h" | 5 #include "src/code-factory.h" |
| 6 #include "src/frames-inl.h" | 6 #include "src/frames-inl.h" |
| 7 #include "src/frames.h" | 7 #include "src/frames.h" |
| 8 #include "src/ic/handler-configuration.h" | 8 #include "src/ic/handler-configuration.h" |
| 9 #include "src/ic/stub-cache.h" | 9 #include "src/ic/stub-cache.h" |
| 10 | 10 |
| (...skipping 5534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5545 | 5545 |
| 5546 Bind(&if_hole); | 5546 Bind(&if_hole); |
| 5547 { | 5547 { |
| 5548 Comment("convert hole"); | 5548 Comment("convert hole"); |
| 5549 GotoUnless(IsSetWord<LoadHandler::ConvertHoleBits>(handler_word), miss); | 5549 GotoUnless(IsSetWord<LoadHandler::ConvertHoleBits>(handler_word), miss); |
| 5550 Node* protector_cell = LoadRoot(Heap::kArrayProtectorRootIndex); | 5550 Node* protector_cell = LoadRoot(Heap::kArrayProtectorRootIndex); |
| 5551 DCHECK(isolate()->heap()->array_protector()->IsPropertyCell()); | 5551 DCHECK(isolate()->heap()->array_protector()->IsPropertyCell()); |
| 5552 GotoUnless( | 5552 GotoUnless( |
| 5553 WordEqual( | 5553 WordEqual( |
| 5554 LoadObjectField(protector_cell, PropertyCell::kValueOffset), | 5554 LoadObjectField(protector_cell, PropertyCell::kValueOffset), |
| 5555 SmiConstant(Smi::FromInt(Isolate::kArrayProtectorValid))), | 5555 SmiConstant(Smi::FromInt(Isolate::kProtectorValid))), |
| 5556 miss); | 5556 miss); |
| 5557 Return(UndefinedConstant()); | 5557 Return(UndefinedConstant()); |
| 5558 } | 5558 } |
| 5559 | 5559 |
| 5560 Bind(&property); | 5560 Bind(&property); |
| 5561 Comment("property_load"); | 5561 Comment("property_load"); |
| 5562 } | 5562 } |
| 5563 | 5563 |
| 5564 Label constant(this), field(this); | 5564 Label constant(this), field(this); |
| 5565 Branch(WordEqual(handler_kind, IntPtrConstant(LoadHandler::kForFields)), | 5565 Branch(WordEqual(handler_kind, IntPtrConstant(LoadHandler::kForFields)), |
| (...skipping 3024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8590 compiler::Node* CodeStubAssembler::InstanceOf(compiler::Node* object, | 8590 compiler::Node* CodeStubAssembler::InstanceOf(compiler::Node* object, |
| 8591 compiler::Node* callable, | 8591 compiler::Node* callable, |
| 8592 compiler::Node* context) { | 8592 compiler::Node* context) { |
| 8593 Label return_runtime(this, Label::kDeferred), end(this); | 8593 Label return_runtime(this, Label::kDeferred), end(this); |
| 8594 Variable result(this, MachineRepresentation::kTagged); | 8594 Variable result(this, MachineRepresentation::kTagged); |
| 8595 | 8595 |
| 8596 // Check if no one installed @@hasInstance somewhere. | 8596 // Check if no one installed @@hasInstance somewhere. |
| 8597 GotoUnless( | 8597 GotoUnless( |
| 8598 WordEqual(LoadObjectField(LoadRoot(Heap::kHasInstanceProtectorRootIndex), | 8598 WordEqual(LoadObjectField(LoadRoot(Heap::kHasInstanceProtectorRootIndex), |
| 8599 PropertyCell::kValueOffset), | 8599 PropertyCell::kValueOffset), |
| 8600 SmiConstant(Smi::FromInt(Isolate::kArrayProtectorValid))), | 8600 SmiConstant(Smi::FromInt(Isolate::kProtectorValid))), |
| 8601 &return_runtime); | 8601 &return_runtime); |
| 8602 | 8602 |
| 8603 // Check if {callable} is a valid receiver. | 8603 // Check if {callable} is a valid receiver. |
| 8604 GotoIf(TaggedIsSmi(callable), &return_runtime); | 8604 GotoIf(TaggedIsSmi(callable), &return_runtime); |
| 8605 GotoUnless(IsCallableMap(LoadMap(callable)), &return_runtime); | 8605 GotoUnless(IsCallableMap(LoadMap(callable)), &return_runtime); |
| 8606 | 8606 |
| 8607 // Use the inline OrdinaryHasInstance directly. | 8607 // Use the inline OrdinaryHasInstance directly. |
| 8608 result.Bind(OrdinaryHasInstance(context, callable, object)); | 8608 result.Bind(OrdinaryHasInstance(context, callable, object)); |
| 8609 Goto(&end); | 8609 Goto(&end); |
| 8610 | 8610 |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8910 } | 8910 } |
| 8911 | 8911 |
| 8912 void CodeStubArguments::PopAndReturn(compiler::Node* value) { | 8912 void CodeStubArguments::PopAndReturn(compiler::Node* value) { |
| 8913 assembler_->PopAndReturn( | 8913 assembler_->PopAndReturn( |
| 8914 assembler_->IntPtrAddFoldConstants(argc_, assembler_->IntPtrConstant(1)), | 8914 assembler_->IntPtrAddFoldConstants(argc_, assembler_->IntPtrConstant(1)), |
| 8915 value); | 8915 value); |
| 8916 } | 8916 } |
| 8917 | 8917 |
| 8918 } // namespace internal | 8918 } // namespace internal |
| 8919 } // namespace v8 | 8919 } // namespace v8 |
| OLD | NEW |