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

Side by Side Diff: src/assembler.h

Issue 12470: * Lint fixes (Closed)
Patch Set: Created 12 years 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 | « no previous file | src/ast.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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 44
45 // ----------------------------------------------------------------------------- 45 // -----------------------------------------------------------------------------
46 // Labels represent pc locations; they are typically jump or call targets. 46 // Labels represent pc locations; they are typically jump or call targets.
47 // After declaration, a label can be freely used to denote known or (yet) 47 // After declaration, a label can be freely used to denote known or (yet)
48 // unknown pc location. Assembler::bind() is used to bind a label to the 48 // unknown pc location. Assembler::bind() is used to bind a label to the
49 // current pc. A label can be bound only once. 49 // current pc. A label can be bound only once.
50 50
51 class Label : public ZoneObject { // LabelShadows are dynamically allocated. 51 class Label : public ZoneObject { // LabelShadows are dynamically allocated.
52 public: 52 public:
53 INLINE(Label()) 53 INLINE(Label()) { Unuse(); }
54 { Unuse(); }
55 INLINE(~Label()) { ASSERT(!is_linked()); } 54 INLINE(~Label()) { ASSERT(!is_linked()); }
56 55
57 INLINE(void Unuse()) { pos_ = 0; } 56 INLINE(void Unuse()) { pos_ = 0; }
58 57
59 INLINE(bool is_bound() const) { return pos_ < 0; } 58 INLINE(bool is_bound() const) { return pos_ < 0; }
60 INLINE(bool is_unused() const) { return pos_ == 0; } 59 INLINE(bool is_unused() const) { return pos_ == 0; }
61 INLINE(bool is_linked() const) { return pos_ > 0; } 60 INLINE(bool is_linked() const) { return pos_ > 0; }
62 61
63 // Returns the position of bound or linked labels. Cannot be used 62 // Returns the position of bound or linked labels. Cannot be used
64 // for unused labels. 63 // for unused labels.
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 static inline bool is_uint4(int x) { return is_uintn(x, 4); } 470 static inline bool is_uint4(int x) { return is_uintn(x, 4); }
472 static inline bool is_uint5(int x) { return is_uintn(x, 5); } 471 static inline bool is_uint5(int x) { return is_uintn(x, 5); }
473 static inline bool is_uint8(int x) { return is_uintn(x, 8); } 472 static inline bool is_uint8(int x) { return is_uintn(x, 8); }
474 static inline bool is_uint12(int x) { return is_uintn(x, 12); } 473 static inline bool is_uint12(int x) { return is_uintn(x, 12); }
475 static inline bool is_uint16(int x) { return is_uintn(x, 16); } 474 static inline bool is_uint16(int x) { return is_uintn(x, 16); }
476 static inline bool is_uint24(int x) { return is_uintn(x, 24); } 475 static inline bool is_uint24(int x) { return is_uintn(x, 24); }
477 476
478 } } // namespace v8::internal 477 } } // namespace v8::internal
479 478
480 #endif // V8_ASSEMBLER_H_ 479 #endif // V8_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « no previous file | src/ast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698