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

Side by Side Diff: runtime/vm/regexp_assembler.h

Issue 2974233002: VM: Re-format to use at most one newline between functions (Closed)
Patch Set: Rebase and merge Created 3 years, 5 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 | « runtime/vm/regexp.cc ('k') | runtime/vm/regexp_assembler.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 (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef RUNTIME_VM_REGEXP_ASSEMBLER_H_ 5 #ifndef RUNTIME_VM_REGEXP_ASSEMBLER_H_
6 #define RUNTIME_VM_REGEXP_ASSEMBLER_H_ 6 #define RUNTIME_VM_REGEXP_ASSEMBLER_H_
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/intermediate_language.h" 9 #include "vm/intermediate_language.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
11 11
12 namespace dart { 12 namespace dart {
13 13
14 // Utility function for the DotPrinter 14 // Utility function for the DotPrinter
15 void PrintUtf16(uint16_t c); 15 void PrintUtf16(uint16_t c);
16 16
17
18 /// Convenience wrapper around a BlockEntryInstr pointer. 17 /// Convenience wrapper around a BlockEntryInstr pointer.
19 class BlockLabel : public ValueObject { 18 class BlockLabel : public ValueObject {
20 // Used by the IR assembler. 19 // Used by the IR assembler.
21 public: 20 public:
22 BlockLabel(); 21 BlockLabel();
23 22
24 JoinEntryInstr* block() const { return block_; } 23 JoinEntryInstr* block() const { return block_; }
25 24
26 bool IsBound() const { return is_bound_; } 25 bool IsBound() const { return is_bound_; }
27 void SetBound(intptr_t block_id) { 26 void SetBound(intptr_t block_id) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 pos_ = pos; 68 pos_ = pos;
70 is_bound_ = false; 69 is_bound_ = false;
71 is_linked_ = true; 70 is_linked_ = true;
72 ASSERT(is_linked()); 71 ASSERT(is_linked());
73 } 72 }
74 73
75 private: 74 private:
76 intptr_t pos_; 75 intptr_t pos_;
77 }; 76 };
78 77
79
80 class RegExpMacroAssembler : public ZoneAllocated { 78 class RegExpMacroAssembler : public ZoneAllocated {
81 public: 79 public:
82 // The implementation must be able to handle at least: 80 // The implementation must be able to handle at least:
83 static const intptr_t kMaxRegister = (1 << 16) - 1; 81 static const intptr_t kMaxRegister = (1 << 16) - 1;
84 static const intptr_t kMaxCPOffset = (1 << 15) - 1; 82 static const intptr_t kMaxCPOffset = (1 << 15) - 1;
85 static const intptr_t kMinCPOffset = -(1 << 15); 83 static const intptr_t kMinCPOffset = -(1 << 15);
86 84
87 static const intptr_t kTableSizeBits = 7; 85 static const intptr_t kTableSizeBits = 7;
88 static const intptr_t kTableSize = 1 << kTableSizeBits; 86 static const intptr_t kTableSize = 1 << kTableSizeBits;
89 static const intptr_t kTableMask = kTableSize - 1; 87 static const intptr_t kTableMask = kTableSize - 1;
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 227
230 private: 228 private:
231 bool slow_safe_compiler_; 229 bool slow_safe_compiler_;
232 bool global_mode_; 230 bool global_mode_;
233 Zone* zone_; 231 Zone* zone_;
234 }; 232 };
235 233
236 } // namespace dart 234 } // namespace dart
237 235
238 #endif // RUNTIME_VM_REGEXP_ASSEMBLER_H_ 236 #endif // RUNTIME_VM_REGEXP_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « runtime/vm/regexp.cc ('k') | runtime/vm/regexp_assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698