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