| 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 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1459 return ArgcBits::decode(minor_key); | 1459 return ArgcBits::decode(minor_key); |
| 1460 } | 1460 } |
| 1461 | 1461 |
| 1462 private: | 1462 private: |
| 1463 int argc_; | 1463 int argc_; |
| 1464 CallFunctionFlags flags_; | 1464 CallFunctionFlags flags_; |
| 1465 | 1465 |
| 1466 virtual void PrintName(StringStream* stream); | 1466 virtual void PrintName(StringStream* stream); |
| 1467 | 1467 |
| 1468 // Minor key encoding in 32 bits with Bitfield <Type, shift, size>. | 1468 // Minor key encoding in 32 bits with Bitfield <Type, shift, size>. |
| 1469 class FlagBits: public BitField<CallFunctionFlags, 0, 2> {}; | 1469 class FlagBits: public BitField<CallFunctionFlags, 0, 3> {}; |
| 1470 class ArgcBits: public BitField<unsigned, 2, 32 - 2> {}; | 1470 class ArgcBits: public BitField<unsigned, 3, 32 - 3> {}; |
| 1471 | 1471 |
| 1472 Major MajorKey() { return CallFunction; } | 1472 Major MajorKey() { return CallFunction; } |
| 1473 int MinorKey() { | 1473 int MinorKey() { |
| 1474 // Encode the parameters in a unique 32 bit value. | 1474 // Encode the parameters in a unique 32 bit value. |
| 1475 return FlagBits::encode(flags_) | ArgcBits::encode(argc_); | 1475 return FlagBits::encode(flags_) | ArgcBits::encode(argc_); |
| 1476 } | 1476 } |
| 1477 | 1477 |
| 1478 bool ReceiverMightBeImplicit() { | 1478 bool ReceiverMightBeImplicit() { |
| 1479 return (flags_ & RECEIVER_MIGHT_BE_IMPLICIT) != 0; | 1479 return (flags_ & RECEIVER_MIGHT_BE_IMPLICIT) != 0; |
| 1480 } | 1480 } |
| 1481 | 1481 |
| 1482 bool ReceiverIsImplicit() { |
| 1483 return (flags_ & RECEIVER_IS_IMPLICIT) != 0; |
| 1484 } |
| 1485 |
| 1482 bool RecordCallTarget() { | 1486 bool RecordCallTarget() { |
| 1483 return (flags_ & RECORD_CALL_TARGET) != 0; | 1487 return (flags_ & RECORD_CALL_TARGET) != 0; |
| 1484 } | 1488 } |
| 1485 }; | 1489 }; |
| 1486 | 1490 |
| 1487 | 1491 |
| 1488 class CallConstructStub: public PlatformCodeStub { | 1492 class CallConstructStub: public PlatformCodeStub { |
| 1489 public: | 1493 public: |
| 1490 explicit CallConstructStub(CallFunctionFlags flags) : flags_(flags) {} | 1494 explicit CallConstructStub(CallFunctionFlags flags) : flags_(flags) {} |
| 1491 | 1495 |
| (...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2348 int MinorKey() { return 0; } | 2352 int MinorKey() { return 0; } |
| 2349 | 2353 |
| 2350 void Generate(MacroAssembler* masm); | 2354 void Generate(MacroAssembler* masm); |
| 2351 | 2355 |
| 2352 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); | 2356 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); |
| 2353 }; | 2357 }; |
| 2354 | 2358 |
| 2355 } } // namespace v8::internal | 2359 } } // namespace v8::internal |
| 2356 | 2360 |
| 2357 #endif // V8_CODE_STUBS_H_ | 2361 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |