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

Side by Side Diff: src/frames.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 | « SConstruct ('k') | src/objects.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-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 #define DECLARE_TYPE(type, ignore) type, 105 #define DECLARE_TYPE(type, ignore) type,
106 enum Type { 106 enum Type {
107 NONE = 0, 107 NONE = 0,
108 STACK_FRAME_TYPE_LIST(DECLARE_TYPE) 108 STACK_FRAME_TYPE_LIST(DECLARE_TYPE)
109 NUMBER_OF_TYPES 109 NUMBER_OF_TYPES
110 }; 110 };
111 #undef DECLARE_TYPE 111 #undef DECLARE_TYPE
112 112
113 // Opaque data type for identifying stack frames. Used extensively 113 // Opaque data type for identifying stack frames. Used extensively
114 // by the debugger. 114 // by the debugger.
115 enum Id { NO_ID = 0 }; 115 // ID_MIN_VALUE and ID_MAX_VALUE are specified to ensure that enumeration type
116 // has correct value range (see Issue 830 for more details).
117 enum Id {
118 ID_MIN_VALUE = kMinInt,
119 ID_MAX_VALUE = kMaxInt,
120 NO_ID = 0
121 };
116 122
117 // Copy constructor; it breaks the connection to host iterator. 123 // Copy constructor; it breaks the connection to host iterator.
118 StackFrame(const StackFrame& original) { 124 StackFrame(const StackFrame& original) {
119 this->state_ = original.state_; 125 this->state_ = original.state_;
120 this->iterator_ = NULL; 126 this->iterator_ = NULL;
121 } 127 }
122 128
123 // Type testers. 129 // Type testers.
124 bool is_entry() const { return type() == ENTRY; } 130 bool is_entry() const { return type() == ENTRY; }
125 bool is_entry_construct() const { return type() == ENTRY_CONSTRUCT; } 131 bool is_entry_construct() const { return type() == ENTRY_CONSTRUCT; }
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 }; 679 };
674 680
675 681
676 // Reads all frames on the current stack and copies them into the current 682 // Reads all frames on the current stack and copies them into the current
677 // zone memory. 683 // zone memory.
678 Vector<StackFrame*> CreateStackMap(); 684 Vector<StackFrame*> CreateStackMap();
679 685
680 } } // namespace v8::internal 686 } } // namespace v8::internal
681 687
682 #endif // V8_FRAMES_H_ 688 #endif // V8_FRAMES_H_
OLDNEW
« no previous file with comments | « SConstruct ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698