| 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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 | 511 |
| 512 #ifdef DEBUG | 512 #ifdef DEBUG |
| 513 void Print() { | 513 void Print() { |
| 514 PrintF("CallFunctionStub (args %d, in_loop %d, flags %d)\n", | 514 PrintF("CallFunctionStub (args %d, in_loop %d, flags %d)\n", |
| 515 argc_, | 515 argc_, |
| 516 static_cast<int>(in_loop_), | 516 static_cast<int>(in_loop_), |
| 517 static_cast<int>(flags_)); | 517 static_cast<int>(flags_)); |
| 518 } | 518 } |
| 519 #endif | 519 #endif |
| 520 | 520 |
| 521 // Minor key encoding in 31 bits AAAAAAAAAAAAAAAAAAAAAFI A(rgs)F(lag)I(nloop). | 521 // Minor key encoding in 32 bits with Bitfield <Type, shift, size>. |
| 522 class InLoopBits: public BitField<InLoopFlag, 0, 1> {}; | 522 class InLoopBits: public BitField<InLoopFlag, 0, 1> {}; |
| 523 class FlagBits: public BitField<CallFunctionFlags, 1, 1> {}; | 523 class FlagBits: public BitField<CallFunctionFlags, 1, 1> {}; |
| 524 class ArgcBits: public BitField<int, 2, 29> {}; | 524 class ArgcBits: public BitField<int, 2, 32 - 2> {}; |
| 525 | 525 |
| 526 Major MajorKey() { return CallFunction; } | 526 Major MajorKey() { return CallFunction; } |
| 527 int MinorKey() { | 527 int MinorKey() { |
| 528 // Encode the parameters in a unique 31 bit value. | 528 // Encode the parameters in a unique 32 bit value. |
| 529 return InLoopBits::encode(in_loop_) | 529 return InLoopBits::encode(in_loop_) |
| 530 | FlagBits::encode(flags_) | 530 | FlagBits::encode(flags_) |
| 531 | ArgcBits::encode(argc_); | 531 | ArgcBits::encode(argc_); |
| 532 } | 532 } |
| 533 | 533 |
| 534 InLoopFlag InLoop() { return in_loop_; } | 534 InLoopFlag InLoop() { return in_loop_; } |
| 535 bool ReceiverMightBeValue() { | 535 bool ReceiverMightBeValue() { |
| 536 return (flags_ & RECEIVER_MIGHT_BE_VALUE) != 0; | 536 return (flags_ & RECEIVER_MIGHT_BE_VALUE) != 0; |
| 537 } | 537 } |
| 538 | 538 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 552 private: | 552 private: |
| 553 Major MajorKey() { return ToBoolean; } | 553 Major MajorKey() { return ToBoolean; } |
| 554 int MinorKey() { return 0; } | 554 int MinorKey() { return 0; } |
| 555 }; | 555 }; |
| 556 | 556 |
| 557 | 557 |
| 558 } // namespace internal | 558 } // namespace internal |
| 559 } // namespace v8 | 559 } // namespace v8 |
| 560 | 560 |
| 561 #endif // V8_CODEGEN_H_ | 561 #endif // V8_CODEGEN_H_ |
| OLD | NEW |