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

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

Issue 13192004: arrange to create prototypes for generators (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Explicitly add constructor properties in generator.js Created 7 years, 8 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
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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 void Generate(MacroAssembler* masm); 386 void Generate(MacroAssembler* masm);
387 387
388 private: 388 private:
389 Major MajorKey() { return ToNumber; } 389 Major MajorKey() { return ToNumber; }
390 int MinorKey() { return 0; } 390 int MinorKey() { return 0; }
391 }; 391 };
392 392
393 393
394 class FastNewClosureStub : public PlatformCodeStub { 394 class FastNewClosureStub : public PlatformCodeStub {
395 public: 395 public:
396 explicit FastNewClosureStub(LanguageMode language_mode) 396 explicit FastNewClosureStub(LanguageMode language_mode, bool is_generator)
397 : language_mode_(language_mode) { } 397 : language_mode_(language_mode),
398 is_generator_(is_generator) { }
398 399
399 void Generate(MacroAssembler* masm); 400 void Generate(MacroAssembler* masm);
400 401
401 private: 402 private:
403 class StrictModeBits: public BitField<bool, 0, 1> {};
404 class IsGeneratorBits: public BitField<bool, 1, 1> {};
405
402 Major MajorKey() { return FastNewClosure; } 406 Major MajorKey() { return FastNewClosure; }
403 int MinorKey() { return language_mode_ == CLASSIC_MODE 407 int MinorKey() {
404 ? kNonStrictMode : kStrictMode; } 408 return StrictModeBits::encode(language_mode_ != CLASSIC_MODE) |
409 IsGeneratorBits::encode(is_generator_);
410 }
405 411
406 LanguageMode language_mode_; 412 LanguageMode language_mode_;
413 bool is_generator_;
407 }; 414 };
408 415
409 416
410 class FastNewContextStub : public PlatformCodeStub { 417 class FastNewContextStub : public PlatformCodeStub {
411 public: 418 public:
412 static const int kMaximumSlots = 64; 419 static const int kMaximumSlots = 64;
413 420
414 explicit FastNewContextStub(int slots) : slots_(slots) { 421 explicit FastNewContextStub(int slots) : slots_(slots) {
415 ASSERT(slots_ > 0 && slots_ <= kMaximumSlots); 422 ASSERT(slots_ > 0 && slots_ <= kMaximumSlots);
416 } 423 }
(...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1650 1657
1651 // The current function entry hook. 1658 // The current function entry hook.
1652 static FunctionEntryHook entry_hook_; 1659 static FunctionEntryHook entry_hook_;
1653 1660
1654 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); 1661 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub);
1655 }; 1662 };
1656 1663
1657 } } // namespace v8::internal 1664 } } // namespace v8::internal
1658 1665
1659 #endif // V8_CODE_STUBS_H_ 1666 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/contexts.h » ('j') | src/generator.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698