OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
938 | 938 |
939 virtual Code::StubType GetStubType() { return Code::FAST; } | 939 virtual Code::StubType GetStubType() { return Code::FAST; } |
940 | 940 |
941 protected: | 941 protected: |
942 LoadFieldStub() : HandlerStub() { } | 942 LoadFieldStub() : HandlerStub() { } |
943 | 943 |
944 void Initialize(Code::Kind kind, | 944 void Initialize(Code::Kind kind, |
945 bool inobject, | 945 bool inobject, |
946 int index, | 946 int index, |
947 Representation representation) { | 947 Representation representation) { |
948 bool unboxed_double = FLAG_track_double_fields && representation.IsDouble(); | |
949 bit_field_ = KindBits::encode(kind) | 948 bit_field_ = KindBits::encode(kind) |
950 | InobjectBits::encode(inobject) | 949 | InobjectBits::encode(inobject) |
951 | IndexBits::encode(index) | 950 | IndexBits::encode(index) |
952 | UnboxedDoubleBits::encode(unboxed_double); | 951 | UnboxedDoubleBits::encode(representation.IsDouble()); |
953 } | 952 } |
954 | 953 |
955 private: | 954 private: |
956 STATIC_ASSERT(KindBits::kSize == 4); | 955 STATIC_ASSERT(KindBits::kSize == 4); |
957 class InobjectBits: public BitField<bool, 4, 1> {}; | 956 class InobjectBits: public BitField<bool, 4, 1> {}; |
958 class IndexBits: public BitField<int, 5, 11> {}; | 957 class IndexBits: public BitField<int, 5, 11> {}; |
959 class UnboxedDoubleBits: public BitField<bool, 16, 1> {}; | 958 class UnboxedDoubleBits: public BitField<bool, 16, 1> {}; |
960 virtual CodeStub::Major MajorKey() { return LoadField; } | 959 virtual CodeStub::Major MajorKey() { return LoadField; } |
961 }; | 960 }; |
962 | 961 |
(...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2478 | 2477 |
2479 | 2478 |
2480 class CallDescriptors { | 2479 class CallDescriptors { |
2481 public: | 2480 public: |
2482 static void InitializeForIsolate(Isolate* isolate); | 2481 static void InitializeForIsolate(Isolate* isolate); |
2483 }; | 2482 }; |
2484 | 2483 |
2485 } } // namespace v8::internal | 2484 } } // namespace v8::internal |
2486 | 2485 |
2487 #endif // V8_CODE_STUBS_H_ | 2486 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |