| 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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 int NotMissMinorKey() { | 549 int NotMissMinorKey() { |
| 550 return StrictModeBits::encode(language_mode_ != CLASSIC_MODE) | | 550 return StrictModeBits::encode(language_mode_ != CLASSIC_MODE) | |
| 551 IsGeneratorBits::encode(is_generator_); | 551 IsGeneratorBits::encode(is_generator_); |
| 552 } | 552 } |
| 553 | 553 |
| 554 LanguageMode language_mode_; | 554 LanguageMode language_mode_; |
| 555 bool is_generator_; | 555 bool is_generator_; |
| 556 }; | 556 }; |
| 557 | 557 |
| 558 | 558 |
| 559 class FastNewContextStub : public PlatformCodeStub { | 559 class FastNewContextStub V8_FINAL : public HydrogenCodeStub { |
| 560 public: | 560 public: |
| 561 static const int kMaximumSlots = 64; | 561 static const int kMaximumSlots = 64; |
| 562 | 562 |
| 563 explicit FastNewContextStub(int slots) : slots_(slots) { | 563 explicit FastNewContextStub(int slots) : slots_(slots) { |
| 564 ASSERT(slots_ > 0 && slots_ <= kMaximumSlots); | 564 ASSERT(slots_ > 0 && slots_ <= kMaximumSlots); |
| 565 } | 565 } |
| 566 | 566 |
| 567 void Generate(MacroAssembler* masm); | 567 virtual Handle<Code> GenerateCode(Isolate* isolate); |
| 568 |
| 569 virtual void InitializeInterfaceDescriptor( |
| 570 Isolate* isolate, |
| 571 CodeStubInterfaceDescriptor* descriptor); |
| 572 |
| 573 static void InstallDescriptors(Isolate* isolate); |
| 574 |
| 575 int slots() const { return slots_; } |
| 576 |
| 577 virtual Major MajorKey() V8_OVERRIDE { return FastNewContext; } |
| 578 virtual int NotMissMinorKey() V8_OVERRIDE { return slots_; } |
| 579 |
| 580 // Parameters accessed via CodeStubGraphBuilder::GetParameter() |
| 581 static const int kFunction = 0; |
| 568 | 582 |
| 569 private: | 583 private: |
| 570 int slots_; | 584 int slots_; |
| 571 | |
| 572 Major MajorKey() { return FastNewContext; } | |
| 573 int MinorKey() { return slots_; } | |
| 574 }; | 585 }; |
| 575 | 586 |
| 576 | 587 |
| 577 class FastNewBlockContextStub : public PlatformCodeStub { | 588 class FastNewBlockContextStub : public PlatformCodeStub { |
| 578 public: | 589 public: |
| 579 static const int kMaximumSlots = 64; | 590 static const int kMaximumSlots = 64; |
| 580 | 591 |
| 581 explicit FastNewBlockContextStub(int slots) : slots_(slots) { | 592 explicit FastNewBlockContextStub(int slots) : slots_(slots) { |
| 582 ASSERT(slots_ > 0 && slots_ <= kMaximumSlots); | 593 ASSERT(slots_ > 0 && slots_ <= kMaximumSlots); |
| 583 } | 594 } |
| (...skipping 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2488 | 2499 |
| 2489 | 2500 |
| 2490 class CallDescriptors { | 2501 class CallDescriptors { |
| 2491 public: | 2502 public: |
| 2492 static void InitializeForIsolate(Isolate* isolate); | 2503 static void InitializeForIsolate(Isolate* isolate); |
| 2493 }; | 2504 }; |
| 2494 | 2505 |
| 2495 } } // namespace v8::internal | 2506 } } // namespace v8::internal |
| 2496 | 2507 |
| 2497 #endif // V8_CODE_STUBS_H_ | 2508 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |