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 5582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5593 Bind(&constant); | 5593 Bind(&constant); |
5594 { | 5594 { |
5595 Comment("constant_load"); | 5595 Comment("constant_load"); |
5596 Node* descriptors = LoadMapDescriptors(LoadMap(holder)); | 5596 Node* descriptors = LoadMapDescriptors(LoadMap(holder)); |
5597 Node* descriptor = | 5597 Node* descriptor = |
5598 DecodeWord<LoadHandler::DescriptorValueIndexBits>(handler_word); | 5598 DecodeWord<LoadHandler::DescriptorValueIndexBits>(handler_word); |
5599 #if defined(DEBUG) | 5599 #if defined(DEBUG) |
5600 CSA_ASSERT(UintPtrLessThan( | 5600 CSA_ASSERT(UintPtrLessThan( |
5601 descriptor, LoadAndUntagFixedArrayBaseLength(descriptors))); | 5601 descriptor, LoadAndUntagFixedArrayBaseLength(descriptors))); |
5602 #endif | 5602 #endif |
5603 Return( | 5603 Node* value = |
5604 LoadFixedArrayElement(descriptors, descriptor, 0, INTPTR_PARAMETERS)); | 5604 LoadFixedArrayElement(descriptors, descriptor, 0, INTPTR_PARAMETERS); |
| 5605 |
| 5606 Label if_accessor_info(this); |
| 5607 GotoIf(IsSetWord<LoadHandler::IsAccessorInfoBits>(handler_word), |
| 5608 &if_accessor_info); |
| 5609 Return(value); |
| 5610 |
| 5611 Bind(&if_accessor_info); |
| 5612 Callable callable = CodeFactory::ApiGetter(isolate()); |
| 5613 TailCallStub(callable, p->context, p->receiver, holder, value); |
5605 } | 5614 } |
5606 } | 5615 } |
5607 | 5616 |
5608 Bind(&try_proto_handler); | 5617 Bind(&try_proto_handler); |
5609 { | 5618 { |
5610 GotoIf(WordEqual(LoadMap(handler), LoadRoot(Heap::kCodeMapRootIndex)), | 5619 GotoIf(WordEqual(LoadMap(handler), LoadRoot(Heap::kCodeMapRootIndex)), |
5611 &call_handler); | 5620 &call_handler); |
5612 HandleLoadICProtoHandler(p, handler, &var_holder, &var_smi_handler, | 5621 HandleLoadICProtoHandler(p, handler, &var_holder, &var_smi_handler, |
5613 &if_smi_handler, miss); | 5622 &if_smi_handler, miss); |
5614 } | 5623 } |
(...skipping 3264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8879 } | 8888 } |
8880 | 8889 |
8881 void CodeStubArguments::PopAndReturn(compiler::Node* value) { | 8890 void CodeStubArguments::PopAndReturn(compiler::Node* value) { |
8882 assembler_->PopAndReturn( | 8891 assembler_->PopAndReturn( |
8883 assembler_->IntPtrAddFoldConstants(argc_, assembler_->IntPtrConstant(1)), | 8892 assembler_->IntPtrAddFoldConstants(argc_, assembler_->IntPtrConstant(1)), |
8884 value); | 8893 value); |
8885 } | 8894 } |
8886 | 8895 |
8887 } // namespace internal | 8896 } // namespace internal |
8888 } // namespace v8 | 8897 } // namespace v8 |
OLD | NEW |