| 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 29 matching lines...) Expand all Loading... |
| 40 V(CallFunction) \ | 40 V(CallFunction) \ |
| 41 V(CallConstruct) \ | 41 V(CallConstruct) \ |
| 42 V(UnaryOp) \ | 42 V(UnaryOp) \ |
| 43 V(BinaryOp) \ | 43 V(BinaryOp) \ |
| 44 V(StringAdd) \ | 44 V(StringAdd) \ |
| 45 V(SubString) \ | 45 V(SubString) \ |
| 46 V(StringCompare) \ | 46 V(StringCompare) \ |
| 47 V(Compare) \ | 47 V(Compare) \ |
| 48 V(CompareIC) \ | 48 V(CompareIC) \ |
| 49 V(MathPow) \ | 49 V(MathPow) \ |
| 50 V(ArrayLength) \ |
| 50 V(StringLength) \ | 51 V(StringLength) \ |
| 51 V(RecordWrite) \ | 52 V(RecordWrite) \ |
| 52 V(StoreBufferOverflow) \ | 53 V(StoreBufferOverflow) \ |
| 53 V(RegExpExec) \ | 54 V(RegExpExec) \ |
| 54 V(TranscendentalCache) \ | 55 V(TranscendentalCache) \ |
| 55 V(Instanceof) \ | 56 V(Instanceof) \ |
| 56 V(ConvertToDouble) \ | 57 V(ConvertToDouble) \ |
| 57 V(WriteInt32ToHeapNumber) \ | 58 V(WriteInt32ToHeapNumber) \ |
| 58 V(StackCheck) \ | 59 V(StackCheck) \ |
| 59 V(Interrupt) \ | 60 V(Interrupt) \ |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 return GetMajorKey(code) == MajorKey() && code->stub_info() == MinorKey(); | 551 return GetMajorKey(code) == MajorKey() && code->stub_info() == MinorKey(); |
| 551 } | 552 } |
| 552 | 553 |
| 553 protected: | 554 protected: |
| 554 class KindBits: public BitField<Code::Kind, 0, 4> {}; | 555 class KindBits: public BitField<Code::Kind, 0, 4> {}; |
| 555 virtual void FinishCode(Handle<Code> code) { | 556 virtual void FinishCode(Handle<Code> code) { |
| 556 code->set_stub_info(MinorKey()); | 557 code->set_stub_info(MinorKey()); |
| 557 } | 558 } |
| 558 Code::Kind kind() { return kind_; } | 559 Code::Kind kind() { return kind_; } |
| 559 | 560 |
| 561 virtual int MinorKey() { |
| 562 return KindBits::encode(kind_); |
| 563 } |
| 564 |
| 560 private: | 565 private: |
| 561 Code::Kind kind_; | 566 Code::Kind kind_; |
| 562 }; | 567 }; |
| 563 | 568 |
| 564 | 569 |
| 570 class ArrayLengthStub: public ICStub { |
| 571 public: |
| 572 explicit ArrayLengthStub(Code::Kind kind) : ICStub(kind) { } |
| 573 virtual void Generate(MacroAssembler* masm); |
| 574 |
| 575 private: |
| 576 virtual CodeStub::Major MajorKey() { return ArrayLength; } |
| 577 }; |
| 578 |
| 579 |
| 565 class StringLengthStub: public ICStub { | 580 class StringLengthStub: public ICStub { |
| 566 public: | 581 public: |
| 567 StringLengthStub(Code::Kind kind, bool support_wrapper) | 582 StringLengthStub(Code::Kind kind, bool support_wrapper) |
| 568 : ICStub(kind), support_wrapper_(support_wrapper) { } | 583 : ICStub(kind), support_wrapper_(support_wrapper) { } |
| 569 virtual void Generate(MacroAssembler* masm); | 584 virtual void Generate(MacroAssembler* masm); |
| 570 | 585 |
| 571 private: | 586 private: |
| 572 class WrapperModeBits: public BitField<bool, 4, 1> {}; | 587 class WrapperModeBits: public BitField<bool, 4, 1> {}; |
| 573 virtual CodeStub::Major MajorKey() { return StringLength; } | 588 virtual CodeStub::Major MajorKey() { return StringLength; } |
| 574 virtual int MinorKey() { | 589 virtual int MinorKey() { |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1352 | 1367 |
| 1353 // The current function entry hook. | 1368 // The current function entry hook. |
| 1354 static FunctionEntryHook entry_hook_; | 1369 static FunctionEntryHook entry_hook_; |
| 1355 | 1370 |
| 1356 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); | 1371 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); |
| 1357 }; | 1372 }; |
| 1358 | 1373 |
| 1359 } } // namespace v8::internal | 1374 } } // namespace v8::internal |
| 1360 | 1375 |
| 1361 #endif // V8_CODE_STUBS_H_ | 1376 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |