| 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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 virtual void InitializeInterfaceDescriptor( | 482 virtual void InitializeInterfaceDescriptor( |
| 483 Isolate* isolate, | 483 Isolate* isolate, |
| 484 CodeStubInterfaceDescriptor* descriptor); | 484 CodeStubInterfaceDescriptor* descriptor); |
| 485 | 485 |
| 486 private: | 486 private: |
| 487 Major MajorKey() { return ToNumber; } | 487 Major MajorKey() { return ToNumber; } |
| 488 int NotMissMinorKey() { return 0; } | 488 int NotMissMinorKey() { return 0; } |
| 489 }; | 489 }; |
| 490 | 490 |
| 491 | 491 |
| 492 class FastNewClosureStub : public PlatformCodeStub { | 492 class FastNewClosureStub : public HydrogenCodeStub { |
| 493 public: | 493 public: |
| 494 explicit FastNewClosureStub(LanguageMode language_mode, bool is_generator) | 494 explicit FastNewClosureStub(LanguageMode language_mode, bool is_generator) |
| 495 : language_mode_(language_mode), | 495 : language_mode_(language_mode), |
| 496 is_generator_(is_generator) { } | 496 is_generator_(is_generator) { } |
| 497 | 497 |
| 498 void Generate(MacroAssembler* masm); | 498 virtual Handle<Code> GenerateCode(); |
| 499 |
| 500 virtual void InitializeInterfaceDescriptor( |
| 501 Isolate* isolate, |
| 502 CodeStubInterfaceDescriptor* descriptor); |
| 503 |
| 504 static void InstallDescriptors(Isolate* isolate); |
| 505 |
| 506 LanguageMode language_mode() const { return language_mode_; } |
| 507 bool is_generator() const { return is_generator_; } |
| 499 | 508 |
| 500 private: | 509 private: |
| 501 class StrictModeBits: public BitField<bool, 0, 1> {}; | 510 class StrictModeBits: public BitField<bool, 0, 1> {}; |
| 502 class IsGeneratorBits: public BitField<bool, 1, 1> {}; | 511 class IsGeneratorBits: public BitField<bool, 1, 1> {}; |
| 503 | 512 |
| 504 Major MajorKey() { return FastNewClosure; } | 513 Major MajorKey() { return FastNewClosure; } |
| 505 int MinorKey() { | 514 int NotMissMinorKey() { |
| 506 return StrictModeBits::encode(language_mode_ != CLASSIC_MODE) | | 515 return StrictModeBits::encode(language_mode_ != CLASSIC_MODE) | |
| 507 IsGeneratorBits::encode(is_generator_); | 516 IsGeneratorBits::encode(is_generator_); |
| 508 } | 517 } |
| 509 | 518 |
| 510 LanguageMode language_mode_; | 519 LanguageMode language_mode_; |
| 511 bool is_generator_; | 520 bool is_generator_; |
| 512 }; | 521 }; |
| 513 | 522 |
| 514 | 523 |
| 515 class FastNewContextStub : public PlatformCodeStub { | 524 class FastNewContextStub : public PlatformCodeStub { |
| (...skipping 1791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2307 int MinorKey() { return 0; } | 2316 int MinorKey() { return 0; } |
| 2308 | 2317 |
| 2309 void Generate(MacroAssembler* masm); | 2318 void Generate(MacroAssembler* masm); |
| 2310 | 2319 |
| 2311 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); | 2320 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); |
| 2312 }; | 2321 }; |
| 2313 | 2322 |
| 2314 } } // namespace v8::internal | 2323 } } // namespace v8::internal |
| 2315 | 2324 |
| 2316 #endif // V8_CODE_STUBS_H_ | 2325 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |