Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 //===- subzero/src/IceAssembler.h - Integrated assembler --------*- C++ -*-===// | 1 //===- subzero/src/IceAssembler.h - Integrated assembler --------*- C++ -*-===// |
| 2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 3 // for details. All rights reserved. Use of this source code is governed by a | 3 // for details. All rights reserved. Use of this source code is governed by a |
| 4 // BSD-style license that can be found in the LICENSE file. | 4 // BSD-style license that can be found in the LICENSE file. |
| 5 // | 5 // |
| 6 // Modified by the Subzero authors. | 6 // Modified by the Subzero authors. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 // | 9 // |
| 10 // The Subzero Code Generator | 10 // The Subzero Code Generator |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 331 | 331 |
| 332 AssemblerKind getKind() const { return Kind; } | 332 AssemblerKind getKind() const { return Kind; } |
| 333 | 333 |
| 334 protected: | 334 protected: |
| 335 explicit Assembler(AssemblerKind Kind) | 335 explicit Assembler(AssemblerKind Kind) |
| 336 : Kind(Kind), Allocator(), Buffer(*this) {} | 336 : Kind(Kind), Allocator(), Buffer(*this) {} |
| 337 | 337 |
| 338 private: | 338 private: |
| 339 const AssemblerKind Kind; | 339 const AssemblerKind Kind; |
| 340 | 340 |
| 341 ArenaAllocator<32 * 1024> Allocator; | 341 ArenaAllocator Allocator; |
|
Jim Stichnoth
2016/02/24 23:23:32
So the assembler arena size increases now, hope th
John
2016/02/24 23:46:05
It was very unfortunate that ArenaAllocator was a
| |
| 342 /// FunctionName and IsInternal are transferred from the original Cfg object, | 342 /// FunctionName and IsInternal are transferred from the original Cfg object, |
| 343 /// since the Cfg object may be deleted by the time the assembler buffer is | 343 /// since the Cfg object may be deleted by the time the assembler buffer is |
| 344 /// emitted. | 344 /// emitted. |
| 345 IceString FunctionName = ""; | 345 IceString FunctionName = ""; |
| 346 bool IsInternal = false; | 346 bool IsInternal = false; |
| 347 /// Preliminary indicates whether a preliminary pass is being made for | 347 /// Preliminary indicates whether a preliminary pass is being made for |
| 348 /// calculating bundle padding (Preliminary=true), versus the final pass where | 348 /// calculating bundle padding (Preliminary=true), versus the final pass where |
| 349 /// all changes to label bindings, label links, and relocation fixups are | 349 /// all changes to label bindings, label links, and relocation fixups are |
| 350 /// fully committed (Preliminary=false). | 350 /// fully committed (Preliminary=false). |
| 351 bool Preliminary = false; | 351 bool Preliminary = false; |
| 352 | 352 |
| 353 /// Installs a created fixup, after it has been allocated. | 353 /// Installs a created fixup, after it has been allocated. |
| 354 void installFixup(AssemblerFixup *F) { Buffer.installFixup(F); } | 354 void installFixup(AssemblerFixup *F) { Buffer.installFixup(F); } |
| 355 | 355 |
| 356 protected: | 356 protected: |
| 357 // Buffer's constructor uses the Allocator, so it needs to appear after it. | 357 // Buffer's constructor uses the Allocator, so it needs to appear after it. |
| 358 // TODO(jpp): dependencies on construction order are a nice way of shooting | 358 // TODO(jpp): dependencies on construction order are a nice way of shooting |
| 359 // yourself in the foot. Fix this. | 359 // yourself in the foot. Fix this. |
| 360 AssemblerBuffer Buffer; | 360 AssemblerBuffer Buffer; |
| 361 }; | 361 }; |
| 362 | 362 |
| 363 } // end of namespace Ice | 363 } // end of namespace Ice |
| 364 | 364 |
| 365 #endif // SUBZERO_SRC_ICEASSEMBLER_H_ | 365 #endif // SUBZERO_SRC_ICEASSEMBLER_H_ |
| OLD | NEW |