| 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 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 virtual int MinorKey() { return exponent_type_; } | 542 virtual int MinorKey() { return exponent_type_; } |
| 543 | 543 |
| 544 ExponentType exponent_type_; | 544 ExponentType exponent_type_; |
| 545 }; | 545 }; |
| 546 | 546 |
| 547 | 547 |
| 548 class ICStub: public PlatformCodeStub { | 548 class ICStub: public PlatformCodeStub { |
| 549 public: | 549 public: |
| 550 explicit ICStub(Code::Kind kind) : kind_(kind) { } | 550 explicit ICStub(Code::Kind kind) : kind_(kind) { } |
| 551 virtual int GetCodeKind() { return kind_; } | 551 virtual int GetCodeKind() { return kind_; } |
| 552 // Currently all IC stubs do not collect explicit type feedback but rather | 552 virtual InlineCacheState GetICState() { return MONOMORPHIC; } |
| 553 // check the instance type. | |
| 554 // TODO(verwaest): These stubs should collect proper type feedback, and should | |
| 555 // not check the instance type explicitly (perhaps unless more than | |
| 556 // kMaxPolymorphism maps are recorded). | |
| 557 virtual InlineCacheState GetICState() { return MEGAMORPHIC; } | |
| 558 | 553 |
| 559 bool Describes(Code* code) { | 554 bool Describes(Code* code) { |
| 560 return GetMajorKey(code) == MajorKey() && code->stub_info() == MinorKey(); | 555 return GetMajorKey(code) == MajorKey() && code->stub_info() == MinorKey(); |
| 561 } | 556 } |
| 562 | 557 |
| 563 protected: | 558 protected: |
| 564 class KindBits: public BitField<Code::Kind, 0, 4> {}; | 559 class KindBits: public BitField<Code::Kind, 0, 4> {}; |
| 565 virtual void FinishCode(Handle<Code> code) { | 560 virtual void FinishCode(Handle<Code> code) { |
| 566 code->set_stub_info(MinorKey()); | 561 code->set_stub_info(MinorKey()); |
| 567 } | 562 } |
| (...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1465 | 1460 |
| 1466 // The current function entry hook. | 1461 // The current function entry hook. |
| 1467 static FunctionEntryHook entry_hook_; | 1462 static FunctionEntryHook entry_hook_; |
| 1468 | 1463 |
| 1469 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); | 1464 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); |
| 1470 }; | 1465 }; |
| 1471 | 1466 |
| 1472 } } // namespace v8::internal | 1467 } } // namespace v8::internal |
| 1473 | 1468 |
| 1474 #endif // V8_CODE_STUBS_H_ | 1469 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |