| 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 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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 // If the provided buffer is NULL, the assembler allocates and grows its own | 474 // If the provided buffer is NULL, the assembler allocates and grows its own |
| 475 // buffer, and buffer_size determines the initial buffer size. The buffer is | 475 // buffer, and buffer_size determines the initial buffer size. The buffer is |
| 476 // owned by the assembler and deallocated upon destruction of the assembler. | 476 // owned by the assembler and deallocated upon destruction of the assembler. |
| 477 // | 477 // |
| 478 // If the provided buffer is not NULL, the assembler uses the provided buffer | 478 // If the provided buffer is not NULL, the assembler uses the provided buffer |
| 479 // for code generation and assumes its size to be buffer_size. If the buffer | 479 // for code generation and assumes its size to be buffer_size. If the buffer |
| 480 // is too small, a fatal error occurs. No deallocation of the buffer is done | 480 // is too small, a fatal error occurs. No deallocation of the buffer is done |
| 481 // upon destruction of the assembler. | 481 // upon destruction of the assembler. |
| 482 // TODO(vitalyr): the assembler does not need an isolate. | 482 // TODO(vitalyr): the assembler does not need an isolate. |
| 483 Assembler(Isolate* isolate, void* buffer, int buffer_size); | 483 Assembler(Isolate* isolate, void* buffer, int buffer_size); |
| 484 virtual ~Assembler() { } | 484 virtual ~Assembler(); |
| 485 | 485 |
| 486 // GetCode emits any pending (non-emitted) code and fills the descriptor | 486 // GetCode emits any pending (non-emitted) code and fills the descriptor |
| 487 // desc. GetCode() is idempotent; it returns the same result if no other | 487 // desc. GetCode() is idempotent; it returns the same result if no other |
| 488 // Assembler functions are invoked in between GetCode() calls. | 488 // Assembler functions are invoked in between GetCode() calls. |
| 489 void GetCode(CodeDesc* desc); | 489 void GetCode(CodeDesc* desc); |
| 490 | 490 |
| 491 // Read/Modify the code target in the branch/call instruction at pc. | 491 // Read/Modify the code target in the branch/call instruction at pc. |
| 492 inline static Address target_address_at(Address pc, | 492 inline static Address target_address_at(Address pc, |
| 493 ConstantPoolArray* constant_pool); | 493 ConstantPoolArray* constant_pool); |
| 494 inline static void set_target_address_at(Address pc, | 494 inline static void set_target_address_at(Address pc, |
| (...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1160 private: | 1160 private: |
| 1161 Assembler* assembler_; | 1161 Assembler* assembler_; |
| 1162 #ifdef DEBUG | 1162 #ifdef DEBUG |
| 1163 int space_before_; | 1163 int space_before_; |
| 1164 #endif | 1164 #endif |
| 1165 }; | 1165 }; |
| 1166 | 1166 |
| 1167 } } // namespace v8::internal | 1167 } } // namespace v8::internal |
| 1168 | 1168 |
| 1169 #endif // V8_IA32_ASSEMBLER_IA32_H_ | 1169 #endif // V8_IA32_ASSEMBLER_IA32_H_ |
| OLD | NEW |