| 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 1991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2002 Major MajorKey() { return KeyedStoreElement; } | 2002 Major MajorKey() { return KeyedStoreElement; } |
| 2003 int NotMissMinorKey() { return bit_field_; } | 2003 int NotMissMinorKey() { return bit_field_; } |
| 2004 | 2004 |
| 2005 DISALLOW_COPY_AND_ASSIGN(KeyedStoreFastElementStub); | 2005 DISALLOW_COPY_AND_ASSIGN(KeyedStoreFastElementStub); |
| 2006 }; | 2006 }; |
| 2007 | 2007 |
| 2008 | 2008 |
| 2009 class TransitionElementsKindStub : public HydrogenCodeStub { | 2009 class TransitionElementsKindStub : public HydrogenCodeStub { |
| 2010 public: | 2010 public: |
| 2011 TransitionElementsKindStub(ElementsKind from_kind, | 2011 TransitionElementsKindStub(ElementsKind from_kind, |
| 2012 ElementsKind to_kind) { | 2012 ElementsKind to_kind, |
| 2013 bool is_js_array) { |
| 2013 bit_field_ = FromKindBits::encode(from_kind) | | 2014 bit_field_ = FromKindBits::encode(from_kind) | |
| 2014 ToKindBits::encode(to_kind); | 2015 ToKindBits::encode(to_kind) | |
| 2016 IsJSArrayBits::encode(is_js_array); |
| 2015 } | 2017 } |
| 2016 | 2018 |
| 2017 ElementsKind from_kind() const { | 2019 ElementsKind from_kind() const { |
| 2018 return FromKindBits::decode(bit_field_); | 2020 return FromKindBits::decode(bit_field_); |
| 2019 } | 2021 } |
| 2020 | 2022 |
| 2021 ElementsKind to_kind() const { | 2023 ElementsKind to_kind() const { |
| 2022 return ToKindBits::decode(bit_field_); | 2024 return ToKindBits::decode(bit_field_); |
| 2023 } | 2025 } |
| 2024 | 2026 |
| 2027 bool is_js_array() const { |
| 2028 return IsJSArrayBits::decode(bit_field_); |
| 2029 } |
| 2030 |
| 2025 virtual Handle<Code> GenerateCode(Isolate* isolate); | 2031 virtual Handle<Code> GenerateCode(Isolate* isolate); |
| 2026 | 2032 |
| 2027 virtual void InitializeInterfaceDescriptor( | 2033 virtual void InitializeInterfaceDescriptor( |
| 2028 Isolate* isolate, | 2034 Isolate* isolate, |
| 2029 CodeStubInterfaceDescriptor* descriptor); | 2035 CodeStubInterfaceDescriptor* descriptor); |
| 2030 | 2036 |
| 2031 private: | 2037 private: |
| 2032 class FromKindBits: public BitField<ElementsKind, 8, 8> {}; | 2038 class FromKindBits: public BitField<ElementsKind, 8, 8> {}; |
| 2033 class ToKindBits: public BitField<ElementsKind, 0, 8> {}; | 2039 class ToKindBits: public BitField<ElementsKind, 0, 8> {}; |
| 2040 class IsJSArrayBits: public BitField<bool, 16, 1> {}; |
| 2034 uint32_t bit_field_; | 2041 uint32_t bit_field_; |
| 2035 | 2042 |
| 2036 Major MajorKey() { return TransitionElementsKind; } | 2043 Major MajorKey() { return TransitionElementsKind; } |
| 2037 int NotMissMinorKey() { return bit_field_; } | 2044 int NotMissMinorKey() { return bit_field_; } |
| 2038 | 2045 |
| 2039 DISALLOW_COPY_AND_ASSIGN(TransitionElementsKindStub); | 2046 DISALLOW_COPY_AND_ASSIGN(TransitionElementsKindStub); |
| 2040 }; | 2047 }; |
| 2041 | 2048 |
| 2042 | 2049 |
| 2043 class ArrayConstructorStubBase : public HydrogenCodeStub { | 2050 class ArrayConstructorStubBase : public HydrogenCodeStub { |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2476 | 2483 |
| 2477 | 2484 |
| 2478 class CallDescriptors { | 2485 class CallDescriptors { |
| 2479 public: | 2486 public: |
| 2480 static void InitializeForIsolate(Isolate* isolate); | 2487 static void InitializeForIsolate(Isolate* isolate); |
| 2481 }; | 2488 }; |
| 2482 | 2489 |
| 2483 } } // namespace v8::internal | 2490 } } // namespace v8::internal |
| 2484 | 2491 |
| 2485 #endif // V8_CODE_STUBS_H_ | 2492 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |