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

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

Issue 23729006: thread isolate for files starting with 'b' and 'c' (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: remaining arches 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/builtins.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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 virtual int GetStubFlags() { 198 virtual int GetStubFlags() {
199 return -1; 199 return -1;
200 } 200 }
201 201
202 virtual void PrintName(StringStream* stream); 202 virtual void PrintName(StringStream* stream);
203 203
204 protected: 204 protected:
205 static bool CanUseFPRegisters(); 205 static bool CanUseFPRegisters();
206 206
207 // Generates the assembler code for the stub. 207 // Generates the assembler code for the stub.
208 virtual Handle<Code> GenerateCode() = 0; 208 virtual Handle<Code> GenerateCode(Isolate* isolate) = 0;
209 209
210 210
211 // Returns whether the code generated for this stub needs to be allocated as 211 // Returns whether the code generated for this stub needs to be allocated as
212 // a fixed (non-moveable) code object. 212 // a fixed (non-moveable) code object.
213 virtual bool NeedsImmovableCode() { return false; } 213 virtual bool NeedsImmovableCode() { return false; }
214 214
215 // Returns a name for logging/debugging purposes. 215 // Returns a name for logging/debugging purposes.
216 SmartArrayPointer<const char> GetName(); 216 SmartArrayPointer<const char> GetName();
217 virtual void PrintBaseName(StringStream* stream); 217 virtual void PrintBaseName(StringStream* stream);
218 virtual void PrintState(StringStream* stream) { } 218 virtual void PrintState(StringStream* stream) { }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 class MinorKeyBits: public BitField<uint32_t, 256 class MinorKeyBits: public BitField<uint32_t,
257 kStubMajorKeyBits, kStubMinorKeyBits> {}; // NOLINT 257 kStubMajorKeyBits, kStubMinorKeyBits> {}; // NOLINT
258 258
259 friend class BreakPointIterator; 259 friend class BreakPointIterator;
260 }; 260 };
261 261
262 262
263 class PlatformCodeStub : public CodeStub { 263 class PlatformCodeStub : public CodeStub {
264 public: 264 public:
265 // Retrieve the code for the stub. Generate the code if needed. 265 // Retrieve the code for the stub. Generate the code if needed.
266 virtual Handle<Code> GenerateCode(); 266 virtual Handle<Code> GenerateCode(Isolate* isolate);
267 267
268 virtual Code::Kind GetCodeKind() const { return Code::STUB; } 268 virtual Code::Kind GetCodeKind() const { return Code::STUB; }
269 269
270 protected: 270 protected:
271 // Generates the assembler code for the stub. 271 // Generates the assembler code for the stub.
272 virtual void Generate(MacroAssembler* masm) = 0; 272 virtual void Generate(MacroAssembler* masm) = 0;
273 }; 273 };
274 274
275 275
276 enum StubFunctionMode { NOT_JS_FUNCTION_STUB_MODE, JS_FUNCTION_STUB_MODE }; 276 enum StubFunctionMode { NOT_JS_FUNCTION_STUB_MODE, JS_FUNCTION_STUB_MODE };
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 static Handle<Code> GetUninitialized(Isolate* isolate) { 346 static Handle<Code> GetUninitialized(Isolate* isolate) {
347 SubClass::GenerateAheadOfTime(isolate); 347 SubClass::GenerateAheadOfTime(isolate);
348 return SubClass().GetCode(isolate); 348 return SubClass().GetCode(isolate);
349 } 349 }
350 350
351 virtual void InitializeInterfaceDescriptor( 351 virtual void InitializeInterfaceDescriptor(
352 Isolate* isolate, 352 Isolate* isolate,
353 CodeStubInterfaceDescriptor* descriptor) = 0; 353 CodeStubInterfaceDescriptor* descriptor) = 0;
354 354
355 // Retrieve the code for the stub. Generate the code if needed. 355 // Retrieve the code for the stub. Generate the code if needed.
356 virtual Handle<Code> GenerateCode() = 0; 356 virtual Handle<Code> GenerateCode(Isolate* isolate) = 0;
357 357
358 virtual int NotMissMinorKey() = 0; 358 virtual int NotMissMinorKey() = 0;
359 359
360 Handle<Code> GenerateLightweightMissCode(Isolate* isolate); 360 Handle<Code> GenerateLightweightMissCode(Isolate* isolate);
361 361
362 template<class StateType> 362 template<class StateType>
363 void TraceTransition(StateType from, StateType to); 363 void TraceTransition(StateType from, StateType to);
364 364
365 private: 365 private:
366 class MinorKeyBits: public BitField<int, 0, kStubMinorKeyBits - 1> {}; 366 class MinorKeyBits: public BitField<int, 0, kStubMinorKeyBits - 1> {};
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 virtual void BeforeCall(MacroAssembler* masm) const {} 446 virtual void BeforeCall(MacroAssembler* masm) const {}
447 447
448 virtual void AfterCall(MacroAssembler* masm) const {} 448 virtual void AfterCall(MacroAssembler* masm) const {}
449 }; 449 };
450 450
451 451
452 class ToNumberStub: public HydrogenCodeStub { 452 class ToNumberStub: public HydrogenCodeStub {
453 public: 453 public:
454 ToNumberStub() { } 454 ToNumberStub() { }
455 455
456 virtual Handle<Code> GenerateCode(); 456 virtual Handle<Code> GenerateCode(Isolate* isolate);
457 457
458 virtual void InitializeInterfaceDescriptor( 458 virtual void InitializeInterfaceDescriptor(
459 Isolate* isolate, 459 Isolate* isolate,
460 CodeStubInterfaceDescriptor* descriptor); 460 CodeStubInterfaceDescriptor* descriptor);
461 461
462 private: 462 private:
463 Major MajorKey() { return ToNumber; } 463 Major MajorKey() { return ToNumber; }
464 int NotMissMinorKey() { return 0; } 464 int NotMissMinorKey() { return 0; }
465 }; 465 };
466 466
467 467
468 class FastNewClosureStub : public HydrogenCodeStub { 468 class FastNewClosureStub : public HydrogenCodeStub {
469 public: 469 public:
470 explicit FastNewClosureStub(LanguageMode language_mode, bool is_generator) 470 explicit FastNewClosureStub(LanguageMode language_mode, bool is_generator)
471 : language_mode_(language_mode), 471 : language_mode_(language_mode),
472 is_generator_(is_generator) { } 472 is_generator_(is_generator) { }
473 473
474 virtual Handle<Code> GenerateCode(); 474 virtual Handle<Code> GenerateCode(Isolate* isolate);
475 475
476 virtual void InitializeInterfaceDescriptor( 476 virtual void InitializeInterfaceDescriptor(
477 Isolate* isolate, 477 Isolate* isolate,
478 CodeStubInterfaceDescriptor* descriptor); 478 CodeStubInterfaceDescriptor* descriptor);
479 479
480 static void InstallDescriptors(Isolate* isolate); 480 static void InstallDescriptors(Isolate* isolate);
481 481
482 LanguageMode language_mode() const { return language_mode_; } 482 LanguageMode language_mode() const { return language_mode_; }
483 bool is_generator() const { return is_generator_; } 483 bool is_generator() const { return is_generator_; }
484 484
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 int MinorKey() { return slots_; } 532 int MinorKey() { return slots_; }
533 }; 533 };
534 534
535 class StoreGlobalStub : public HydrogenCodeStub { 535 class StoreGlobalStub : public HydrogenCodeStub {
536 public: 536 public:
537 StoreGlobalStub(StrictModeFlag strict_mode, bool is_constant) { 537 StoreGlobalStub(StrictModeFlag strict_mode, bool is_constant) {
538 bit_field_ = StrictModeBits::encode(strict_mode) | 538 bit_field_ = StrictModeBits::encode(strict_mode) |
539 IsConstantBits::encode(is_constant); 539 IsConstantBits::encode(is_constant);
540 } 540 }
541 541
542 virtual Handle<Code> GenerateCode(); 542 virtual Handle<Code> GenerateCode(Isolate* isolate);
543 543
544 virtual void InitializeInterfaceDescriptor( 544 virtual void InitializeInterfaceDescriptor(
545 Isolate* isolate, 545 Isolate* isolate,
546 CodeStubInterfaceDescriptor* descriptor); 546 CodeStubInterfaceDescriptor* descriptor);
547 547
548 virtual Code::Kind GetCodeKind() const { return Code::STORE_IC; } 548 virtual Code::Kind GetCodeKind() const { return Code::STORE_IC; }
549 virtual InlineCacheState GetICState() { return MONOMORPHIC; } 549 virtual InlineCacheState GetICState() { return MONOMORPHIC; }
550 virtual Code::ExtraICState GetExtraICState() { return bit_field_; } 550 virtual Code::ExtraICState GetExtraICState() { return bit_field_; }
551 551
552 bool is_constant() { 552 bool is_constant() {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 return FAST_ELEMENTS; 614 return FAST_ELEMENTS;
615 case CLONE_DOUBLE_ELEMENTS: 615 case CLONE_DOUBLE_ELEMENTS:
616 return FAST_DOUBLE_ELEMENTS; 616 return FAST_DOUBLE_ELEMENTS;
617 case CLONE_ANY_ELEMENTS: 617 case CLONE_ANY_ELEMENTS:
618 /*fall-through*/; 618 /*fall-through*/;
619 } 619 }
620 UNREACHABLE(); 620 UNREACHABLE();
621 return LAST_ELEMENTS_KIND; 621 return LAST_ELEMENTS_KIND;
622 } 622 }
623 623
624 virtual Handle<Code> GenerateCode(); 624 virtual Handle<Code> GenerateCode(Isolate* isolate);
625 625
626 virtual void InitializeInterfaceDescriptor( 626 virtual void InitializeInterfaceDescriptor(
627 Isolate* isolate, 627 Isolate* isolate,
628 CodeStubInterfaceDescriptor* descriptor); 628 CodeStubInterfaceDescriptor* descriptor);
629 629
630 private: 630 private:
631 Mode mode_; 631 Mode mode_;
632 AllocationSiteMode allocation_site_mode_; 632 AllocationSiteMode allocation_site_mode_;
633 int length_; 633 int length_;
634 634
(...skipping 19 matching lines...) Expand all
654 static const int kMaximumClonedProperties = 6; 654 static const int kMaximumClonedProperties = 6;
655 655
656 explicit FastCloneShallowObjectStub(int length) 656 explicit FastCloneShallowObjectStub(int length)
657 : length_(length) { 657 : length_(length) {
658 ASSERT_GE(length_, 0); 658 ASSERT_GE(length_, 0);
659 ASSERT_LE(length_, kMaximumClonedProperties); 659 ASSERT_LE(length_, kMaximumClonedProperties);
660 } 660 }
661 661
662 int length() const { return length_; } 662 int length() const { return length_; }
663 663
664 virtual Handle<Code> GenerateCode(); 664 virtual Handle<Code> GenerateCode(Isolate* isolate);
665 665
666 virtual void InitializeInterfaceDescriptor( 666 virtual void InitializeInterfaceDescriptor(
667 Isolate* isolate, 667 Isolate* isolate,
668 CodeStubInterfaceDescriptor* descriptor); 668 CodeStubInterfaceDescriptor* descriptor);
669 669
670 private: 670 private:
671 int length_; 671 int length_;
672 672
673 Major MajorKey() { return FastCloneShallowObject; } 673 Major MajorKey() { return FastCloneShallowObject; }
674 int NotMissMinorKey() { return length_; } 674 int NotMissMinorKey() { return length_; }
675 675
676 DISALLOW_COPY_AND_ASSIGN(FastCloneShallowObjectStub); 676 DISALLOW_COPY_AND_ASSIGN(FastCloneShallowObjectStub);
677 }; 677 };
678 678
679 679
680 class CreateAllocationSiteStub : public HydrogenCodeStub { 680 class CreateAllocationSiteStub : public HydrogenCodeStub {
681 public: 681 public:
682 explicit CreateAllocationSiteStub() { } 682 explicit CreateAllocationSiteStub() { }
683 683
684 virtual Handle<Code> GenerateCode(); 684 virtual Handle<Code> GenerateCode(Isolate* isolate);
685 685
686 virtual bool IsPregenerated() { return true; } 686 virtual bool IsPregenerated() { return true; }
687 687
688 static void GenerateAheadOfTime(Isolate* isolate); 688 static void GenerateAheadOfTime(Isolate* isolate);
689 689
690 virtual void InitializeInterfaceDescriptor( 690 virtual void InitializeInterfaceDescriptor(
691 Isolate* isolate, 691 Isolate* isolate,
692 CodeStubInterfaceDescriptor* descriptor); 692 CodeStubInterfaceDescriptor* descriptor);
693 693
694 private: 694 private:
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 }; 891 };
892 892
893 893
894 class LoadFieldStub: public HandlerStub { 894 class LoadFieldStub: public HandlerStub {
895 public: 895 public:
896 LoadFieldStub(bool inobject, int index, Representation representation) 896 LoadFieldStub(bool inobject, int index, Representation representation)
897 : HandlerStub() { 897 : HandlerStub() {
898 Initialize(Code::LOAD_IC, inobject, index, representation); 898 Initialize(Code::LOAD_IC, inobject, index, representation);
899 } 899 }
900 900
901 virtual Handle<Code> GenerateCode(); 901 virtual Handle<Code> GenerateCode(Isolate* isolate);
902 902
903 virtual void InitializeInterfaceDescriptor( 903 virtual void InitializeInterfaceDescriptor(
904 Isolate* isolate, 904 Isolate* isolate,
905 CodeStubInterfaceDescriptor* descriptor); 905 CodeStubInterfaceDescriptor* descriptor);
906 906
907 Representation representation() { 907 Representation representation() {
908 if (unboxed_double()) return Representation::Double(); 908 if (unboxed_double()) return Representation::Double();
909 return Representation::Tagged(); 909 return Representation::Tagged();
910 } 910 }
911 911
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 public: 960 public:
961 KeyedLoadFieldStub(bool inobject, int index, Representation representation) 961 KeyedLoadFieldStub(bool inobject, int index, Representation representation)
962 : LoadFieldStub() { 962 : LoadFieldStub() {
963 Initialize(Code::KEYED_LOAD_IC, inobject, index, representation); 963 Initialize(Code::KEYED_LOAD_IC, inobject, index, representation);
964 } 964 }
965 965
966 virtual void InitializeInterfaceDescriptor( 966 virtual void InitializeInterfaceDescriptor(
967 Isolate* isolate, 967 Isolate* isolate,
968 CodeStubInterfaceDescriptor* descriptor); 968 CodeStubInterfaceDescriptor* descriptor);
969 969
970 virtual Handle<Code> GenerateCode(); 970 virtual Handle<Code> GenerateCode(Isolate* isolate);
971 971
972 private: 972 private:
973 virtual CodeStub::Major MajorKey() { return KeyedLoadField; } 973 virtual CodeStub::Major MajorKey() { return KeyedLoadField; }
974 }; 974 };
975 975
976 976
977 class BinaryOpStub: public PlatformCodeStub { 977 class BinaryOpStub: public PlatformCodeStub {
978 public: 978 public:
979 BinaryOpStub(Token::Value op, OverwriteMode mode) 979 BinaryOpStub(Token::Value op, OverwriteMode mode)
980 : op_(op), 980 : op_(op),
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 return MEGAMORPHIC; 1231 return MEGAMORPHIC;
1232 } else if (state_.Contains(MONOMORPHIC_MAP)) { 1232 } else if (state_.Contains(MONOMORPHIC_MAP)) {
1233 return MONOMORPHIC; 1233 return MONOMORPHIC;
1234 } else { 1234 } else {
1235 return PREMONOMORPHIC; 1235 return PREMONOMORPHIC;
1236 } 1236 }
1237 } 1237 }
1238 1238
1239 virtual Code::Kind GetCodeKind() const { return Code::COMPARE_NIL_IC; } 1239 virtual Code::Kind GetCodeKind() const { return Code::COMPARE_NIL_IC; }
1240 1240
1241 Handle<Code> GenerateCode(); 1241 virtual Handle<Code> GenerateCode(Isolate* isolate);
1242 1242
1243 virtual Code::ExtraICState GetExtraICState() { 1243 virtual Code::ExtraICState GetExtraICState() {
1244 return NilValueField::encode(nil_value_) | 1244 return NilValueField::encode(nil_value_) |
1245 TypesField::encode(state_.ToIntegral()); 1245 TypesField::encode(state_.ToIntegral());
1246 } 1246 }
1247 1247
1248 void UpdateStatus(Handle<Object> object); 1248 void UpdateStatus(Handle<Object> object);
1249 1249
1250 bool IsMonomorphic() const { return state_.Contains(MONOMORPHIC_MAP); } 1250 bool IsMonomorphic() const { return state_.Contains(MONOMORPHIC_MAP); }
1251 NilValue GetNilValue() const { return nil_value_; } 1251 NilValue GetNilValue() const { return nil_value_; }
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
1756 } 1756 }
1757 1757
1758 bool is_js_array() const { 1758 bool is_js_array() const {
1759 return IsJSArrayBits::decode(bit_field_); 1759 return IsJSArrayBits::decode(bit_field_);
1760 } 1760 }
1761 1761
1762 ElementsKind elements_kind() const { 1762 ElementsKind elements_kind() const {
1763 return ElementsKindBits::decode(bit_field_); 1763 return ElementsKindBits::decode(bit_field_);
1764 } 1764 }
1765 1765
1766 virtual Handle<Code> GenerateCode(); 1766 virtual Handle<Code> GenerateCode(Isolate* isolate);
1767 1767
1768 virtual void InitializeInterfaceDescriptor( 1768 virtual void InitializeInterfaceDescriptor(
1769 Isolate* isolate, 1769 Isolate* isolate,
1770 CodeStubInterfaceDescriptor* descriptor); 1770 CodeStubInterfaceDescriptor* descriptor);
1771 1771
1772 private: 1772 private:
1773 class ElementsKindBits: public BitField<ElementsKind, 0, 8> {}; 1773 class ElementsKindBits: public BitField<ElementsKind, 0, 8> {};
1774 class IsJSArrayBits: public BitField<bool, 8, 1> {}; 1774 class IsJSArrayBits: public BitField<bool, 8, 1> {};
1775 uint32_t bit_field_; 1775 uint32_t bit_field_;
1776 1776
(...skipping 19 matching lines...) Expand all
1796 } 1796 }
1797 1797
1798 ElementsKind elements_kind() const { 1798 ElementsKind elements_kind() const {
1799 return ElementsKindBits::decode(bit_field_); 1799 return ElementsKindBits::decode(bit_field_);
1800 } 1800 }
1801 1801
1802 KeyedAccessStoreMode store_mode() const { 1802 KeyedAccessStoreMode store_mode() const {
1803 return StoreModeBits::decode(bit_field_); 1803 return StoreModeBits::decode(bit_field_);
1804 } 1804 }
1805 1805
1806 virtual Handle<Code> GenerateCode(); 1806 virtual Handle<Code> GenerateCode(Isolate* isolate);
1807 1807
1808 virtual void InitializeInterfaceDescriptor( 1808 virtual void InitializeInterfaceDescriptor(
1809 Isolate* isolate, 1809 Isolate* isolate,
1810 CodeStubInterfaceDescriptor* descriptor); 1810 CodeStubInterfaceDescriptor* descriptor);
1811 1811
1812 private: 1812 private:
1813 class ElementsKindBits: public BitField<ElementsKind, 0, 8> {}; 1813 class ElementsKindBits: public BitField<ElementsKind, 0, 8> {};
1814 class StoreModeBits: public BitField<KeyedAccessStoreMode, 8, 4> {}; 1814 class StoreModeBits: public BitField<KeyedAccessStoreMode, 8, 4> {};
1815 class IsJSArrayBits: public BitField<bool, 12, 1> {}; 1815 class IsJSArrayBits: public BitField<bool, 12, 1> {};
1816 uint32_t bit_field_; 1816 uint32_t bit_field_;
(...skipping 14 matching lines...) Expand all
1831 } 1831 }
1832 1832
1833 ElementsKind from_kind() const { 1833 ElementsKind from_kind() const {
1834 return FromKindBits::decode(bit_field_); 1834 return FromKindBits::decode(bit_field_);
1835 } 1835 }
1836 1836
1837 ElementsKind to_kind() const { 1837 ElementsKind to_kind() const {
1838 return ToKindBits::decode(bit_field_); 1838 return ToKindBits::decode(bit_field_);
1839 } 1839 }
1840 1840
1841 virtual Handle<Code> GenerateCode(); 1841 virtual Handle<Code> GenerateCode(Isolate* isolate);
1842 1842
1843 virtual void InitializeInterfaceDescriptor( 1843 virtual void InitializeInterfaceDescriptor(
1844 Isolate* isolate, 1844 Isolate* isolate,
1845 CodeStubInterfaceDescriptor* descriptor); 1845 CodeStubInterfaceDescriptor* descriptor);
1846 1846
1847 private: 1847 private:
1848 class FromKindBits: public BitField<ElementsKind, 8, 8> {}; 1848 class FromKindBits: public BitField<ElementsKind, 8, 8> {};
1849 class ToKindBits: public BitField<ElementsKind, 0, 8> {}; 1849 class ToKindBits: public BitField<ElementsKind, 0, 8> {};
1850 uint32_t bit_field_; 1850 uint32_t bit_field_;
1851 1851
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
1927 1927
1928 class ArrayNoArgumentConstructorStub : public ArrayConstructorStubBase { 1928 class ArrayNoArgumentConstructorStub : public ArrayConstructorStubBase {
1929 public: 1929 public:
1930 ArrayNoArgumentConstructorStub( 1930 ArrayNoArgumentConstructorStub(
1931 ElementsKind kind, 1931 ElementsKind kind,
1932 ContextCheckMode context_mode = CONTEXT_CHECK_REQUIRED, 1932 ContextCheckMode context_mode = CONTEXT_CHECK_REQUIRED,
1933 AllocationSiteOverrideMode override_mode = DONT_OVERRIDE) 1933 AllocationSiteOverrideMode override_mode = DONT_OVERRIDE)
1934 : ArrayConstructorStubBase(kind, context_mode, override_mode) { 1934 : ArrayConstructorStubBase(kind, context_mode, override_mode) {
1935 } 1935 }
1936 1936
1937 virtual Handle<Code> GenerateCode(); 1937 virtual Handle<Code> GenerateCode(Isolate* isolate);
1938 1938
1939 virtual void InitializeInterfaceDescriptor( 1939 virtual void InitializeInterfaceDescriptor(
1940 Isolate* isolate, 1940 Isolate* isolate,
1941 CodeStubInterfaceDescriptor* descriptor); 1941 CodeStubInterfaceDescriptor* descriptor);
1942 1942
1943 private: 1943 private:
1944 Major MajorKey() { return ArrayNoArgumentConstructor; } 1944 Major MajorKey() { return ArrayNoArgumentConstructor; }
1945 1945
1946 DISALLOW_COPY_AND_ASSIGN(ArrayNoArgumentConstructorStub); 1946 DISALLOW_COPY_AND_ASSIGN(ArrayNoArgumentConstructorStub);
1947 }; 1947 };
1948 1948
1949 1949
1950 class ArraySingleArgumentConstructorStub : public ArrayConstructorStubBase { 1950 class ArraySingleArgumentConstructorStub : public ArrayConstructorStubBase {
1951 public: 1951 public:
1952 ArraySingleArgumentConstructorStub( 1952 ArraySingleArgumentConstructorStub(
1953 ElementsKind kind, 1953 ElementsKind kind,
1954 ContextCheckMode context_mode = CONTEXT_CHECK_REQUIRED, 1954 ContextCheckMode context_mode = CONTEXT_CHECK_REQUIRED,
1955 AllocationSiteOverrideMode override_mode = DONT_OVERRIDE) 1955 AllocationSiteOverrideMode override_mode = DONT_OVERRIDE)
1956 : ArrayConstructorStubBase(kind, context_mode, override_mode) { 1956 : ArrayConstructorStubBase(kind, context_mode, override_mode) {
1957 } 1957 }
1958 1958
1959 virtual Handle<Code> GenerateCode(); 1959 virtual Handle<Code> GenerateCode(Isolate* isolate);
1960 1960
1961 virtual void InitializeInterfaceDescriptor( 1961 virtual void InitializeInterfaceDescriptor(
1962 Isolate* isolate, 1962 Isolate* isolate,
1963 CodeStubInterfaceDescriptor* descriptor); 1963 CodeStubInterfaceDescriptor* descriptor);
1964 1964
1965 private: 1965 private:
1966 Major MajorKey() { return ArraySingleArgumentConstructor; } 1966 Major MajorKey() { return ArraySingleArgumentConstructor; }
1967 1967
1968 DISALLOW_COPY_AND_ASSIGN(ArraySingleArgumentConstructorStub); 1968 DISALLOW_COPY_AND_ASSIGN(ArraySingleArgumentConstructorStub);
1969 }; 1969 };
1970 1970
1971 1971
1972 class ArrayNArgumentsConstructorStub : public ArrayConstructorStubBase { 1972 class ArrayNArgumentsConstructorStub : public ArrayConstructorStubBase {
1973 public: 1973 public:
1974 ArrayNArgumentsConstructorStub( 1974 ArrayNArgumentsConstructorStub(
1975 ElementsKind kind, 1975 ElementsKind kind,
1976 ContextCheckMode context_mode = CONTEXT_CHECK_REQUIRED, 1976 ContextCheckMode context_mode = CONTEXT_CHECK_REQUIRED,
1977 AllocationSiteOverrideMode override_mode = DONT_OVERRIDE) 1977 AllocationSiteOverrideMode override_mode = DONT_OVERRIDE)
1978 : ArrayConstructorStubBase(kind, context_mode, override_mode) { 1978 : ArrayConstructorStubBase(kind, context_mode, override_mode) {
1979 } 1979 }
1980 1980
1981 virtual Handle<Code> GenerateCode(); 1981 virtual Handle<Code> GenerateCode(Isolate* isolate);
1982 1982
1983 virtual void InitializeInterfaceDescriptor( 1983 virtual void InitializeInterfaceDescriptor(
1984 Isolate* isolate, 1984 Isolate* isolate,
1985 CodeStubInterfaceDescriptor* descriptor); 1985 CodeStubInterfaceDescriptor* descriptor);
1986 1986
1987 private: 1987 private:
1988 Major MajorKey() { return ArrayNArgumentsConstructor; } 1988 Major MajorKey() { return ArrayNArgumentsConstructor; }
1989 1989
1990 DISALLOW_COPY_AND_ASSIGN(ArrayNArgumentsConstructorStub); 1990 DISALLOW_COPY_AND_ASSIGN(ArrayNArgumentsConstructorStub);
1991 }; 1991 };
(...skipping 22 matching lines...) Expand all
2014 DISALLOW_COPY_AND_ASSIGN(InternalArrayConstructorStubBase); 2014 DISALLOW_COPY_AND_ASSIGN(InternalArrayConstructorStubBase);
2015 }; 2015 };
2016 2016
2017 2017
2018 class InternalArrayNoArgumentConstructorStub : public 2018 class InternalArrayNoArgumentConstructorStub : public
2019 InternalArrayConstructorStubBase { 2019 InternalArrayConstructorStubBase {
2020 public: 2020 public:
2021 explicit InternalArrayNoArgumentConstructorStub(ElementsKind kind) 2021 explicit InternalArrayNoArgumentConstructorStub(ElementsKind kind)
2022 : InternalArrayConstructorStubBase(kind) { } 2022 : InternalArrayConstructorStubBase(kind) { }
2023 2023
2024 virtual Handle<Code> GenerateCode(); 2024 virtual Handle<Code> GenerateCode(Isolate* isolate);
2025 2025
2026 virtual void InitializeInterfaceDescriptor( 2026 virtual void InitializeInterfaceDescriptor(
2027 Isolate* isolate, 2027 Isolate* isolate,
2028 CodeStubInterfaceDescriptor* descriptor); 2028 CodeStubInterfaceDescriptor* descriptor);
2029 2029
2030 private: 2030 private:
2031 Major MajorKey() { return InternalArrayNoArgumentConstructor; } 2031 Major MajorKey() { return InternalArrayNoArgumentConstructor; }
2032 2032
2033 DISALLOW_COPY_AND_ASSIGN(InternalArrayNoArgumentConstructorStub); 2033 DISALLOW_COPY_AND_ASSIGN(InternalArrayNoArgumentConstructorStub);
2034 }; 2034 };
2035 2035
2036 2036
2037 class InternalArraySingleArgumentConstructorStub : public 2037 class InternalArraySingleArgumentConstructorStub : public
2038 InternalArrayConstructorStubBase { 2038 InternalArrayConstructorStubBase {
2039 public: 2039 public:
2040 explicit InternalArraySingleArgumentConstructorStub(ElementsKind kind) 2040 explicit InternalArraySingleArgumentConstructorStub(ElementsKind kind)
2041 : InternalArrayConstructorStubBase(kind) { } 2041 : InternalArrayConstructorStubBase(kind) { }
2042 2042
2043 virtual Handle<Code> GenerateCode(); 2043 virtual Handle<Code> GenerateCode(Isolate* isolate);
2044 2044
2045 virtual void InitializeInterfaceDescriptor( 2045 virtual void InitializeInterfaceDescriptor(
2046 Isolate* isolate, 2046 Isolate* isolate,
2047 CodeStubInterfaceDescriptor* descriptor); 2047 CodeStubInterfaceDescriptor* descriptor);
2048 2048
2049 private: 2049 private:
2050 Major MajorKey() { return InternalArraySingleArgumentConstructor; } 2050 Major MajorKey() { return InternalArraySingleArgumentConstructor; }
2051 2051
2052 DISALLOW_COPY_AND_ASSIGN(InternalArraySingleArgumentConstructorStub); 2052 DISALLOW_COPY_AND_ASSIGN(InternalArraySingleArgumentConstructorStub);
2053 }; 2053 };
2054 2054
2055 2055
2056 class InternalArrayNArgumentsConstructorStub : public 2056 class InternalArrayNArgumentsConstructorStub : public
2057 InternalArrayConstructorStubBase { 2057 InternalArrayConstructorStubBase {
2058 public: 2058 public:
2059 explicit InternalArrayNArgumentsConstructorStub(ElementsKind kind) 2059 explicit InternalArrayNArgumentsConstructorStub(ElementsKind kind)
2060 : InternalArrayConstructorStubBase(kind) { } 2060 : InternalArrayConstructorStubBase(kind) { }
2061 2061
2062 virtual Handle<Code> GenerateCode(); 2062 virtual Handle<Code> GenerateCode(Isolate* isolate);
2063 2063
2064 virtual void InitializeInterfaceDescriptor( 2064 virtual void InitializeInterfaceDescriptor(
2065 Isolate* isolate, 2065 Isolate* isolate,
2066 CodeStubInterfaceDescriptor* descriptor); 2066 CodeStubInterfaceDescriptor* descriptor);
2067 2067
2068 private: 2068 private:
2069 Major MajorKey() { return InternalArrayNArgumentsConstructor; } 2069 Major MajorKey() { return InternalArrayNArgumentsConstructor; }
2070 2070
2071 DISALLOW_COPY_AND_ASSIGN(InternalArrayNArgumentsConstructorStub); 2071 DISALLOW_COPY_AND_ASSIGN(InternalArrayNArgumentsConstructorStub);
2072 }; 2072 };
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
2141 }; 2141 };
2142 2142
2143 explicit ToBooleanStub(Types types = Types()) 2143 explicit ToBooleanStub(Types types = Types())
2144 : types_(types) { } 2144 : types_(types) { }
2145 explicit ToBooleanStub(Code::ExtraICState state) 2145 explicit ToBooleanStub(Code::ExtraICState state)
2146 : types_(static_cast<byte>(state)) { } 2146 : types_(static_cast<byte>(state)) { }
2147 2147
2148 bool UpdateStatus(Handle<Object> object); 2148 bool UpdateStatus(Handle<Object> object);
2149 Types GetTypes() { return types_; } 2149 Types GetTypes() { return types_; }
2150 2150
2151 virtual Handle<Code> GenerateCode(); 2151 virtual Handle<Code> GenerateCode(Isolate* isolate);
2152 virtual void InitializeInterfaceDescriptor( 2152 virtual void InitializeInterfaceDescriptor(
2153 Isolate* isolate, 2153 Isolate* isolate,
2154 CodeStubInterfaceDescriptor* descriptor); 2154 CodeStubInterfaceDescriptor* descriptor);
2155 2155
2156 virtual Code::Kind GetCodeKind() const { return Code::TO_BOOLEAN_IC; } 2156 virtual Code::Kind GetCodeKind() const { return Code::TO_BOOLEAN_IC; }
2157 virtual void PrintState(StringStream* stream); 2157 virtual void PrintState(StringStream* stream);
2158 2158
2159 virtual bool SometimesSetsUpAFrame() { return false; } 2159 virtual bool SometimesSetsUpAFrame() { return false; }
2160 2160
2161 static void InitializeForIsolate(Isolate* isolate) { 2161 static void InitializeForIsolate(Isolate* isolate) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
2201 : from_kind_(from_kind), 2201 : from_kind_(from_kind),
2202 to_kind_(to_kind), 2202 to_kind_(to_kind),
2203 is_jsarray_(is_jsarray), 2203 is_jsarray_(is_jsarray),
2204 store_mode_(store_mode) {} 2204 store_mode_(store_mode) {}
2205 2205
2206 ElementsKind from_kind() const { return from_kind_; } 2206 ElementsKind from_kind() const { return from_kind_; }
2207 ElementsKind to_kind() const { return to_kind_; } 2207 ElementsKind to_kind() const { return to_kind_; }
2208 bool is_jsarray() const { return is_jsarray_; } 2208 bool is_jsarray() const { return is_jsarray_; }
2209 KeyedAccessStoreMode store_mode() const { return store_mode_; } 2209 KeyedAccessStoreMode store_mode() const { return store_mode_; }
2210 2210
2211 Handle<Code> GenerateCode(); 2211 virtual Handle<Code> GenerateCode(Isolate* isolate);
2212 2212
2213 void InitializeInterfaceDescriptor( 2213 void InitializeInterfaceDescriptor(
2214 Isolate* isolate, 2214 Isolate* isolate,
2215 CodeStubInterfaceDescriptor* descriptor); 2215 CodeStubInterfaceDescriptor* descriptor);
2216 2216
2217 private: 2217 private:
2218 class FromBits: public BitField<ElementsKind, 0, 8> {}; 2218 class FromBits: public BitField<ElementsKind, 0, 8> {};
2219 class ToBits: public BitField<ElementsKind, 8, 8> {}; 2219 class ToBits: public BitField<ElementsKind, 8, 8> {};
2220 class IsJSArrayBits: public BitField<bool, 16, 1> {}; 2220 class IsJSArrayBits: public BitField<bool, 16, 1> {};
2221 class StoreModeBits: public BitField<KeyedAccessStoreMode, 17, 4> {}; 2221 class StoreModeBits: public BitField<KeyedAccessStoreMode, 17, 4> {};
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
2302 int MinorKey() { return 0; } 2302 int MinorKey() { return 0; }
2303 2303
2304 void Generate(MacroAssembler* masm); 2304 void Generate(MacroAssembler* masm);
2305 2305
2306 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); 2306 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub);
2307 }; 2307 };
2308 2308
2309 } } // namespace v8::internal 2309 } } // namespace v8::internal
2310 2310
2311 #endif // V8_CODE_STUBS_H_ 2311 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698