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

Side by Side Diff: src/objects.h

Issue 3135022: Give correct value ranges to enumeration types used as opaque types. (Closed)
Patch Set: fixed Created 10 years, 4 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
« no previous file with comments | « src/frames.h ('k') | src/platform.h » ('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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 2744 matching lines...) Expand 10 before | Expand all | Expand 10 after
2755 private: 2755 private:
2756 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalFloatArray); 2756 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalFloatArray);
2757 }; 2757 };
2758 2758
2759 2759
2760 // Code describes objects with on-the-fly generated machine code. 2760 // Code describes objects with on-the-fly generated machine code.
2761 class Code: public HeapObject { 2761 class Code: public HeapObject {
2762 public: 2762 public:
2763 // Opaque data type for encapsulating code flags like kind, inline 2763 // Opaque data type for encapsulating code flags like kind, inline
2764 // cache state, and arguments count. 2764 // cache state, and arguments count.
2765 enum Flags { }; 2765 // FLAGS_MIN_VALUE and FLAGS_MAX_VALUE are specified to ensure that
2766 // enumeration type has correct value range (see Issue 830 for more details).
2767 enum Flags {
2768 FLAGS_MIN_VALUE = kMinInt,
2769 FLAGS_MAX_VALUE = kMaxInt
2770 };
2766 2771
2767 enum Kind { 2772 enum Kind {
2768 FUNCTION, 2773 FUNCTION,
2769 STUB, 2774 STUB,
2770 BUILTIN, 2775 BUILTIN,
2771 LOAD_IC, 2776 LOAD_IC,
2772 KEYED_LOAD_IC, 2777 KEYED_LOAD_IC,
2773 CALL_IC, 2778 CALL_IC,
2774 KEYED_CALL_IC, 2779 KEYED_CALL_IC,
2775 STORE_IC, 2780 STORE_IC,
(...skipping 2679 matching lines...) Expand 10 before | Expand all | Expand 10 after
5455 } else { 5460 } else {
5456 value &= ~(1 << bit_position); 5461 value &= ~(1 << bit_position);
5457 } 5462 }
5458 return value; 5463 return value;
5459 } 5464 }
5460 }; 5465 };
5461 5466
5462 } } // namespace v8::internal 5467 } } // namespace v8::internal
5463 5468
5464 #endif // V8_OBJECTS_H_ 5469 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/frames.h ('k') | src/platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698