| OLD | NEW | 
|     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 |     5 // modification, are permitted provided that the following conditions | 
|     6 // are met: |     6 // are 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 631 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   642   // buffer, and buffer_size determines the initial buffer size. The buffer is |   642   // buffer, and buffer_size determines the initial buffer size. The buffer is | 
|   643   // owned by the assembler and deallocated upon destruction of the assembler. |   643   // owned by the assembler and deallocated upon destruction of the assembler. | 
|   644   // |   644   // | 
|   645   // If the provided buffer is not NULL, the assembler uses the provided buffer |   645   // If the provided buffer is not NULL, the assembler uses the provided buffer | 
|   646   // for code generation and assumes its size to be buffer_size. If the buffer |   646   // for code generation and assumes its size to be buffer_size. If the buffer | 
|   647   // is too small, a fatal error occurs. No deallocation of the buffer is done |   647   // is too small, a fatal error occurs. No deallocation of the buffer is done | 
|   648   // upon destruction of the assembler. |   648   // upon destruction of the assembler. | 
|   649   Assembler(Isolate* isolate, void* buffer, int buffer_size); |   649   Assembler(Isolate* isolate, void* buffer, int buffer_size); | 
|   650   ~Assembler(); |   650   ~Assembler(); | 
|   651  |   651  | 
|   652   // Overrides the default provided by FLAG_debug_code. |  | 
|   653   void set_emit_debug_code(bool value) { emit_debug_code_ = value; } |  | 
|   654  |  | 
|   655   // GetCode emits any pending (non-emitted) code and fills the descriptor |   652   // GetCode emits any pending (non-emitted) code and fills the descriptor | 
|   656   // desc. GetCode() is idempotent; it returns the same result if no other |   653   // desc. GetCode() is idempotent; it returns the same result if no other | 
|   657   // Assembler functions are invoked in between GetCode() calls. |   654   // Assembler functions are invoked in between GetCode() calls. | 
|   658   void GetCode(CodeDesc* desc); |   655   void GetCode(CodeDesc* desc); | 
|   659  |   656  | 
|   660   // Label operations & relative jumps (PPUM Appendix D) |   657   // Label operations & relative jumps (PPUM Appendix D) | 
|   661   // |   658   // | 
|   662   // Takes a branch opcode (cc) and a label (L) and generates |   659   // Takes a branch opcode (cc) and a label (L) and generates | 
|   663   // either a backward branch or a forward branch and links it |   660   // either a backward branch or a forward branch and links it | 
|   664   // to the label fixup chain. Usage: |   661   // to the label fixup chain. Usage: | 
| (...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1331  |  1328  | 
|  1332   // Check if is time to emit a constant pool. |  1329   // Check if is time to emit a constant pool. | 
|  1333   void CheckConstPool(bool force_emit, bool require_jump); |  1330   void CheckConstPool(bool force_emit, bool require_jump); | 
|  1334  |  1331  | 
|  1335  protected: |  1332  protected: | 
|  1336   // Relocation for a type-recording IC has the AST id added to it.  This |  1333   // Relocation for a type-recording IC has the AST id added to it.  This | 
|  1337   // member variable is a way to pass the information from the call site to |  1334   // member variable is a way to pass the information from the call site to | 
|  1338   // the relocation info. |  1335   // the relocation info. | 
|  1339   TypeFeedbackId recorded_ast_id_; |  1336   TypeFeedbackId recorded_ast_id_; | 
|  1340  |  1337  | 
|  1341   bool emit_debug_code() const { return emit_debug_code_; } |  | 
|  1342  |  | 
|  1343   int buffer_space() const { return reloc_info_writer.pos() - pc_; } |  1338   int buffer_space() const { return reloc_info_writer.pos() - pc_; } | 
|  1344  |  1339  | 
|  1345   // Decode branch instruction at pos and return branch target pos |  1340   // Decode branch instruction at pos and return branch target pos | 
|  1346   int target_at(int pos); |  1341   int target_at(int pos); | 
|  1347  |  1342  | 
|  1348   // Patch branch instruction at pos to branch to given branch target pos |  1343   // Patch branch instruction at pos to branch to given branch target pos | 
|  1349   void target_at_put(int pos, int target_pos); |  1344   void target_at_put(int pos, int target_pos); | 
|  1350  |  1345  | 
|  1351   // Prevent contant pool emission until EndBlockConstPool is called. |  1346   // Prevent contant pool emission until EndBlockConstPool is called. | 
|  1352   // Call to this function can be nested but must be followed by an equal |  1347   // Call to this function can be nested but must be followed by an equal | 
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1483   // Record reloc info for current pc_ |  1478   // Record reloc info for current pc_ | 
|  1484   void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0, |  1479   void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0, | 
|  1485                        UseConstantPoolMode mode = USE_CONSTANT_POOL); |  1480                        UseConstantPoolMode mode = USE_CONSTANT_POOL); | 
|  1486  |  1481  | 
|  1487   friend class RegExpMacroAssemblerARM; |  1482   friend class RegExpMacroAssemblerARM; | 
|  1488   friend class RelocInfo; |  1483   friend class RelocInfo; | 
|  1489   friend class CodePatcher; |  1484   friend class CodePatcher; | 
|  1490   friend class BlockConstPoolScope; |  1485   friend class BlockConstPoolScope; | 
|  1491  |  1486  | 
|  1492   PositionsRecorder positions_recorder_; |  1487   PositionsRecorder positions_recorder_; | 
|  1493  |  | 
|  1494   bool emit_debug_code_; |  | 
|  1495  |  | 
|  1496   friend class PositionsRecorder; |  1488   friend class PositionsRecorder; | 
|  1497   friend class EnsureSpace; |  1489   friend class EnsureSpace; | 
|  1498 }; |  1490 }; | 
|  1499  |  1491  | 
|  1500  |  1492  | 
|  1501 class EnsureSpace BASE_EMBEDDED { |  1493 class EnsureSpace BASE_EMBEDDED { | 
|  1502  public: |  1494  public: | 
|  1503   explicit EnsureSpace(Assembler* assembler) { |  1495   explicit EnsureSpace(Assembler* assembler) { | 
|  1504     assembler->CheckBuffer(); |  1496     assembler->CheckBuffer(); | 
|  1505   } |  1497   } | 
|  1506 }; |  1498 }; | 
|  1507  |  1499  | 
|  1508  |  1500  | 
|  1509 } }  // namespace v8::internal |  1501 } }  // namespace v8::internal | 
|  1510  |  1502  | 
|  1511 #endif  // V8_ARM_ASSEMBLER_ARM_H_ |  1503 #endif  // V8_ARM_ASSEMBLER_ARM_H_ | 
| OLD | NEW |