| 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 2029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2040 Major MajorKey() { return KeyedStoreElement; } | 2040 Major MajorKey() { return KeyedStoreElement; } |
| 2041 int NotMissMinorKey() { return bit_field_; } | 2041 int NotMissMinorKey() { return bit_field_; } |
| 2042 | 2042 |
| 2043 DISALLOW_COPY_AND_ASSIGN(KeyedStoreFastElementStub); | 2043 DISALLOW_COPY_AND_ASSIGN(KeyedStoreFastElementStub); |
| 2044 }; | 2044 }; |
| 2045 | 2045 |
| 2046 | 2046 |
| 2047 class TransitionElementsKindStub : public HydrogenCodeStub { | 2047 class TransitionElementsKindStub : public HydrogenCodeStub { |
| 2048 public: | 2048 public: |
| 2049 TransitionElementsKindStub(ElementsKind from_kind, | 2049 TransitionElementsKindStub(ElementsKind from_kind, |
| 2050 ElementsKind to_kind) { | 2050 ElementsKind to_kind, |
| 2051 bool is_js_array) { |
| 2051 bit_field_ = FromKindBits::encode(from_kind) | | 2052 bit_field_ = FromKindBits::encode(from_kind) | |
| 2052 ToKindBits::encode(to_kind); | 2053 ToKindBits::encode(to_kind) | |
| 2054 IsJSArrayBits::encode(is_js_array); |
| 2053 } | 2055 } |
| 2054 | 2056 |
| 2055 ElementsKind from_kind() const { | 2057 ElementsKind from_kind() const { |
| 2056 return FromKindBits::decode(bit_field_); | 2058 return FromKindBits::decode(bit_field_); |
| 2057 } | 2059 } |
| 2058 | 2060 |
| 2059 ElementsKind to_kind() const { | 2061 ElementsKind to_kind() const { |
| 2060 return ToKindBits::decode(bit_field_); | 2062 return ToKindBits::decode(bit_field_); |
| 2061 } | 2063 } |
| 2062 | 2064 |
| 2065 bool is_js_array() const { |
| 2066 return IsJSArrayBits::decode(bit_field_); |
| 2067 } |
| 2068 |
| 2063 virtual Handle<Code> GenerateCode(Isolate* isolate); | 2069 virtual Handle<Code> GenerateCode(Isolate* isolate); |
| 2064 | 2070 |
| 2065 virtual void InitializeInterfaceDescriptor( | 2071 virtual void InitializeInterfaceDescriptor( |
| 2066 Isolate* isolate, | 2072 Isolate* isolate, |
| 2067 CodeStubInterfaceDescriptor* descriptor); | 2073 CodeStubInterfaceDescriptor* descriptor); |
| 2068 | 2074 |
| 2069 private: | 2075 private: |
| 2070 class FromKindBits: public BitField<ElementsKind, 8, 8> {}; | 2076 class FromKindBits: public BitField<ElementsKind, 8, 8> {}; |
| 2071 class ToKindBits: public BitField<ElementsKind, 0, 8> {}; | 2077 class ToKindBits: public BitField<ElementsKind, 0, 8> {}; |
| 2078 class IsJSArrayBits: public BitField<bool, 16, 1> {}; |
| 2072 uint32_t bit_field_; | 2079 uint32_t bit_field_; |
| 2073 | 2080 |
| 2074 Major MajorKey() { return TransitionElementsKind; } | 2081 Major MajorKey() { return TransitionElementsKind; } |
| 2075 int NotMissMinorKey() { return bit_field_; } | 2082 int NotMissMinorKey() { return bit_field_; } |
| 2076 | 2083 |
| 2077 DISALLOW_COPY_AND_ASSIGN(TransitionElementsKindStub); | 2084 DISALLOW_COPY_AND_ASSIGN(TransitionElementsKindStub); |
| 2078 }; | 2085 }; |
| 2079 | 2086 |
| 2080 | 2087 |
| 2081 class ArrayConstructorStubBase : public HydrogenCodeStub { | 2088 class ArrayConstructorStubBase : public HydrogenCodeStub { |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2514 | 2521 |
| 2515 | 2522 |
| 2516 class CallDescriptors { | 2523 class CallDescriptors { |
| 2517 public: | 2524 public: |
| 2518 static void InitializeForIsolate(Isolate* isolate); | 2525 static void InitializeForIsolate(Isolate* isolate); |
| 2519 }; | 2526 }; |
| 2520 | 2527 |
| 2521 } } // namespace v8::internal | 2528 } } // namespace v8::internal |
| 2522 | 2529 |
| 2523 #endif // V8_CODE_STUBS_H_ | 2530 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |