| 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 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1546 return ArgcBits::decode(minor_key); | 1546 return ArgcBits::decode(minor_key); |
| 1547 } | 1547 } |
| 1548 | 1548 |
| 1549 private: | 1549 private: |
| 1550 int argc_; | 1550 int argc_; |
| 1551 CallFunctionFlags flags_; | 1551 CallFunctionFlags flags_; |
| 1552 | 1552 |
| 1553 virtual void PrintName(StringStream* stream); | 1553 virtual void PrintName(StringStream* stream); |
| 1554 | 1554 |
| 1555 // Minor key encoding in 32 bits with Bitfield <Type, shift, size>. | 1555 // Minor key encoding in 32 bits with Bitfield <Type, shift, size>. |
| 1556 class FlagBits: public BitField<CallFunctionFlags, 0, 3> {}; | 1556 class FlagBits: public BitField<CallFunctionFlags, 0, 1> {}; |
| 1557 class ArgcBits: public BitField<unsigned, 3, 32 - 3> {}; | 1557 class ArgcBits: public BitField<unsigned, 1, 32 - 1> {}; |
| 1558 | 1558 |
| 1559 Major MajorKey() { return CallFunction; } | 1559 Major MajorKey() { return CallFunction; } |
| 1560 int MinorKey() { | 1560 int MinorKey() { |
| 1561 // Encode the parameters in a unique 32 bit value. | 1561 // Encode the parameters in a unique 32 bit value. |
| 1562 return FlagBits::encode(flags_) | ArgcBits::encode(argc_); | 1562 return FlagBits::encode(flags_) | ArgcBits::encode(argc_); |
| 1563 } | 1563 } |
| 1564 | 1564 |
| 1565 bool ReceiverMightBeImplicit() { | |
| 1566 return (flags_ & RECEIVER_MIGHT_BE_IMPLICIT) != 0; | |
| 1567 } | |
| 1568 | |
| 1569 bool ReceiverIsImplicit() { | |
| 1570 return (flags_ & RECEIVER_IS_IMPLICIT) != 0; | |
| 1571 } | |
| 1572 | |
| 1573 bool RecordCallTarget() { | 1565 bool RecordCallTarget() { |
| 1574 return (flags_ & RECORD_CALL_TARGET) != 0; | 1566 return (flags_ & RECORD_CALL_TARGET) != 0; |
| 1575 } | 1567 } |
| 1576 }; | 1568 }; |
| 1577 | 1569 |
| 1578 | 1570 |
| 1579 class CallConstructStub: public PlatformCodeStub { | 1571 class CallConstructStub: public PlatformCodeStub { |
| 1580 public: | 1572 public: |
| 1581 explicit CallConstructStub(CallFunctionFlags flags) : flags_(flags) {} | 1573 explicit CallConstructStub(CallFunctionFlags flags) : flags_(flags) {} |
| 1582 | 1574 |
| (...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2436 int MinorKey() { return 0; } | 2428 int MinorKey() { return 0; } |
| 2437 | 2429 |
| 2438 void Generate(MacroAssembler* masm); | 2430 void Generate(MacroAssembler* masm); |
| 2439 | 2431 |
| 2440 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); | 2432 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); |
| 2441 }; | 2433 }; |
| 2442 | 2434 |
| 2443 } } // namespace v8::internal | 2435 } } // namespace v8::internal |
| 2444 | 2436 |
| 2445 #endif // V8_CODE_STUBS_H_ | 2437 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |