| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef V8_CODE_STUBS_H_ | 5 #ifndef V8_CODE_STUBS_H_ |
| 6 #define V8_CODE_STUBS_H_ | 6 #define V8_CODE_STUBS_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1002 Code::Kind kind() const OVERRIDE { return Code::LOAD_IC; } | 1002 Code::Kind kind() const OVERRIDE { return Code::LOAD_IC; } |
| 1003 Code::StubType GetStubType() const OVERRIDE { return Code::FAST; } | 1003 Code::StubType GetStubType() const OVERRIDE { return Code::FAST; } |
| 1004 | 1004 |
| 1005 private: | 1005 private: |
| 1006 class ConstantIndexBits : public BitField<int, 0, kSubMinorKeyBits> {}; | 1006 class ConstantIndexBits : public BitField<int, 0, kSubMinorKeyBits> {}; |
| 1007 | 1007 |
| 1008 DEFINE_HANDLER_CODE_STUB(LoadConstant, HandlerStub); | 1008 DEFINE_HANDLER_CODE_STUB(LoadConstant, HandlerStub); |
| 1009 }; | 1009 }; |
| 1010 | 1010 |
| 1011 | 1011 |
| 1012 class StringLengthStub: public HandlerStub { | 1012 class StringLengthStub : public CodeStub { |
| 1013 public: | 1013 public: |
| 1014 explicit StringLengthStub(Isolate* isolate) : HandlerStub(isolate) {} | 1014 explicit StringLengthStub(Isolate* isolate) : CodeStub(isolate) {} |
| 1015 | 1015 |
| 1016 protected: | 1016 StringLengthStub(uint32_t key, Isolate* isolate) : CodeStub(key, isolate) {} |
| 1017 Code::Kind kind() const OVERRIDE { return Code::LOAD_IC; } | |
| 1018 Code::StubType GetStubType() const OVERRIDE { return Code::FAST; } | |
| 1019 | 1017 |
| 1020 DEFINE_HANDLER_CODE_STUB(StringLength, HandlerStub); | 1018 CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE { |
| 1019 return LoadDescriptor(isolate()); |
| 1020 }; |
| 1021 |
| 1022 Handle<Code> GenerateCode() OVERRIDE; |
| 1023 |
| 1024 Major MajorKey() const OVERRIDE { return StringLength; }; |
| 1025 Code::Kind GetCodeKind() const OVERRIDE { return Code::HANDLER; } |
| 1026 InlineCacheState GetICState() const OVERRIDE { return MONOMORPHIC; } |
| 1027 ExtraICState GetExtraICState() const OVERRIDE { return Code::LOAD_IC; } |
| 1028 |
| 1029 private: |
| 1030 DISALLOW_COPY_AND_ASSIGN(StringLengthStub); |
| 1021 }; | 1031 }; |
| 1022 | 1032 |
| 1023 | 1033 |
| 1024 class StoreFieldStub : public HandlerStub { | 1034 class StoreFieldStub : public HandlerStub { |
| 1025 public: | 1035 public: |
| 1026 StoreFieldStub(Isolate* isolate, FieldIndex index, | 1036 StoreFieldStub(Isolate* isolate, FieldIndex index, |
| 1027 Representation representation) | 1037 Representation representation) |
| 1028 : HandlerStub(isolate) { | 1038 : HandlerStub(isolate) { |
| 1029 int property_index_key = index.GetFieldAccessStubKey(); | 1039 int property_index_key = index.GetFieldAccessStubKey(); |
| 1030 uint8_t repr = PropertyDetails::EncodeRepresentation(representation); | 1040 uint8_t repr = PropertyDetails::EncodeRepresentation(representation); |
| (...skipping 1701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2732 | 2742 |
| 2733 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR | 2743 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR |
| 2734 #undef DEFINE_PLATFORM_CODE_STUB | 2744 #undef DEFINE_PLATFORM_CODE_STUB |
| 2735 #undef DEFINE_HANDLER_CODE_STUB | 2745 #undef DEFINE_HANDLER_CODE_STUB |
| 2736 #undef DEFINE_HYDROGEN_CODE_STUB | 2746 #undef DEFINE_HYDROGEN_CODE_STUB |
| 2737 #undef DEFINE_CODE_STUB | 2747 #undef DEFINE_CODE_STUB |
| 2738 #undef DEFINE_CODE_STUB_BASE | 2748 #undef DEFINE_CODE_STUB_BASE |
| 2739 } } // namespace v8::internal | 2749 } } // namespace v8::internal |
| 2740 | 2750 |
| 2741 #endif // V8_CODE_STUBS_H_ | 2751 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |