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/objects.h

Issue 209903003: Reland "Remove Failure::OutOfMemory propagation and V8::IgnoreOutOfMemoryException." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix Created 6 years, 9 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/mips/code-stubs-mips.cc ('k') | src/objects.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 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 #ifdef OBJECT_PRINT 927 #ifdef OBJECT_PRINT
928 #define DECLARE_PRINTER(Name) void Name##Print(FILE* out = stdout); 928 #define DECLARE_PRINTER(Name) void Name##Print(FILE* out = stdout);
929 #else 929 #else
930 #define DECLARE_PRINTER(Name) 930 #define DECLARE_PRINTER(Name)
931 #endif 931 #endif
932 932
933 class MaybeObject BASE_EMBEDDED { 933 class MaybeObject BASE_EMBEDDED {
934 public: 934 public:
935 inline bool IsFailure(); 935 inline bool IsFailure();
936 inline bool IsRetryAfterGC(); 936 inline bool IsRetryAfterGC();
937 inline bool IsOutOfMemory();
938 inline bool IsException(); 937 inline bool IsException();
939 INLINE(bool IsTheHole()); 938 INLINE(bool IsTheHole());
940 INLINE(bool IsUninitialized()); 939 INLINE(bool IsUninitialized());
941 inline bool ToObject(Object** obj) { 940 inline bool ToObject(Object** obj) {
942 if (IsFailure()) return false; 941 if (IsFailure()) return false;
943 *obj = reinterpret_cast<Object*>(this); 942 *obj = reinterpret_cast<Object*>(this);
944 return true; 943 return true;
945 } 944 }
946 inline Failure* ToFailureUnchecked() { 945 inline Failure* ToFailureUnchecked() {
947 ASSERT(IsFailure()); 946 ASSERT(IsFailure());
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
1721 INTERNAL_ERROR = 2, 1720 INTERNAL_ERROR = 2,
1722 OUT_OF_MEMORY_EXCEPTION = 3 1721 OUT_OF_MEMORY_EXCEPTION = 3
1723 }; 1722 };
1724 1723
1725 inline Type type() const; 1724 inline Type type() const;
1726 1725
1727 // Returns the space that needs to be collected for RetryAfterGC failures. 1726 // Returns the space that needs to be collected for RetryAfterGC failures.
1728 inline AllocationSpace allocation_space() const; 1727 inline AllocationSpace allocation_space() const;
1729 1728
1730 inline bool IsInternalError() const; 1729 inline bool IsInternalError() const;
1731 inline bool IsOutOfMemoryException() const;
1732 1730
1733 static inline Failure* RetryAfterGC(AllocationSpace space); 1731 static inline Failure* RetryAfterGC(AllocationSpace space);
1734 static inline Failure* RetryAfterGC(); // NEW_SPACE 1732 static inline Failure* RetryAfterGC(); // NEW_SPACE
1735 static inline Failure* Exception(); 1733 static inline Failure* Exception();
1736 static inline Failure* InternalError(); 1734 static inline Failure* InternalError();
1737 // TODO(jkummerow): The value is temporary instrumentation. Remove it
1738 // when it has served its purpose.
1739 static inline Failure* OutOfMemoryException(intptr_t value);
1740 // Casting. 1735 // Casting.
1741 static inline Failure* cast(MaybeObject* object); 1736 static inline Failure* cast(MaybeObject* object);
1742 1737
1743 // Dispatched behavior. 1738 // Dispatched behavior.
1744 void FailurePrint(FILE* out = stdout); 1739 void FailurePrint(FILE* out = stdout);
1745 void FailurePrint(StringStream* accumulator); 1740 void FailurePrint(StringStream* accumulator);
1746 1741
1747 DECLARE_VERIFIER(Failure) 1742 DECLARE_VERIFIER(Failure)
1748 1743
1749 private: 1744 private:
(...skipping 9041 matching lines...) Expand 10 before | Expand all | Expand 10 after
10791 } else { 10786 } else {
10792 value &= ~(1 << bit_position); 10787 value &= ~(1 << bit_position);
10793 } 10788 }
10794 return value; 10789 return value;
10795 } 10790 }
10796 }; 10791 };
10797 10792
10798 } } // namespace v8::internal 10793 } } // namespace v8::internal
10799 10794
10800 #endif // V8_OBJECTS_H_ 10795 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698