Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: src/code-stubs.h

Issue 22562002: Convert FastNewClosureStub into hydrogen. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Nit fixin Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after
2317 int MinorKey() { return 0; } 2326 int MinorKey() { return 0; }
2318 2327
2319 void Generate(MacroAssembler* masm); 2328 void Generate(MacroAssembler* masm);
2320 2329
2321 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); 2330 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub);
2322 }; 2331 };
2323 2332
2324 } } // namespace v8::internal 2333 } } // namespace v8::internal
2325 2334
2326 #endif // V8_CODE_STUBS_H_ 2335 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698