| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 }; | 65 }; |
| 66 static int MinorKeyFromKey(uint32_t key) { | 66 static int MinorKeyFromKey(uint32_t key) { |
| 67 return MinorKeyBits::decode(key); | 67 return MinorKeyBits::decode(key); |
| 68 }; | 68 }; |
| 69 static const char* MajorName(Major major_key); | 69 static const char* MajorName(Major major_key); |
| 70 | 70 |
| 71 virtual ~CodeStub() {} | 71 virtual ~CodeStub() {} |
| 72 | 72 |
| 73 protected: | 73 protected: |
| 74 static const int kMajorBits = 5; | 74 static const int kMajorBits = 5; |
| 75 static const int kMinorBits = kBitsPerPointer - kMajorBits - kSmiTagSize; | 75 static const int kMinorBits = kBitsPerInt - kMajorBits - kSmiTagSize; |
| 76 | 76 |
| 77 private: | 77 private: |
| 78 // Generates the assembler code for the stub. | 78 // Generates the assembler code for the stub. |
| 79 virtual void Generate(MacroAssembler* masm) = 0; | 79 virtual void Generate(MacroAssembler* masm) = 0; |
| 80 | 80 |
| 81 // Returns information for computing the number key. | 81 // Returns information for computing the number key. |
| 82 virtual Major MajorKey() = 0; | 82 virtual Major MajorKey() = 0; |
| 83 virtual int MinorKey() = 0; | 83 virtual int MinorKey() = 0; |
| 84 | 84 |
| 85 // Returns a name for logging/debugging purposes. | 85 // Returns a name for logging/debugging purposes. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 100 | 100 |
| 101 class MajorKeyBits: public BitField<uint32_t, 0, kMajorBits> {}; | 101 class MajorKeyBits: public BitField<uint32_t, 0, kMajorBits> {}; |
| 102 class MinorKeyBits: public BitField<uint32_t, kMajorBits, kMinorBits> {}; | 102 class MinorKeyBits: public BitField<uint32_t, kMajorBits, kMinorBits> {}; |
| 103 | 103 |
| 104 friend class BreakPointIterator; | 104 friend class BreakPointIterator; |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 } } // namespace v8::internal | 107 } } // namespace v8::internal |
| 108 | 108 |
| 109 #endif // V8_CODE_STUBS_H_ | 109 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |