| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 VISIT_ALL, | 212 VISIT_ALL, |
| 213 VISIT_ALL_IN_SCAVENGE, | 213 VISIT_ALL_IN_SCAVENGE, |
| 214 VISIT_ALL_IN_SWEEP_NEWSPACE, | 214 VISIT_ALL_IN_SWEEP_NEWSPACE, |
| 215 VISIT_ONLY_STRONG | 215 VISIT_ONLY_STRONG |
| 216 }; | 216 }; |
| 217 | 217 |
| 218 // Flag indicating whether code is built into the VM (one of the natives files). | 218 // Flag indicating whether code is built into the VM (one of the natives files). |
| 219 enum NativesFlag { NOT_NATIVES_CODE, NATIVES_CODE }; | 219 enum NativesFlag { NOT_NATIVES_CODE, NATIVES_CODE }; |
| 220 | 220 |
| 221 | 221 |
| 222 #if V8_TARGET_ARCH_A64 |
| 223 typedef uint64_t RegList; |
| 224 #else |
| 225 typedef uint32_t RegList; |
| 226 #endif |
| 227 const RegList kRegListEmpty = 0; |
| 228 const int kRegListSize = sizeof(RegList); // NOLINT |
| 229 |
| 230 |
| 222 // A CodeDesc describes a buffer holding instructions and relocation | 231 // A CodeDesc describes a buffer holding instructions and relocation |
| 223 // information. The instructions start at the beginning of the buffer | 232 // information. The instructions start at the beginning of the buffer |
| 224 // and grow forward, the relocation information starts at the end of | 233 // and grow forward, the relocation information starts at the end of |
| 225 // the buffer and grows backward. | 234 // the buffer and grows backward. |
| 226 // | 235 // |
| 227 // |<--------------- buffer_size ---------------->| | 236 // |<--------------- buffer_size ---------------->| |
| 228 // |<-- instr_size -->| |<-- reloc_size -->| | 237 // |<-- instr_size -->| |<-- reloc_size -->| |
| 229 // +==================+========+==================+ | 238 // +==================+========+==================+ |
| 230 // | instructions | free | reloc info | | 239 // | instructions | free | reloc info | |
| 231 // +==================+========+==================+ | 240 // +==================+========+==================+ |
| 232 // ^ | 241 // ^ |
| 233 // | | 242 // | |
| 234 // buffer | 243 // buffer |
| 235 | 244 |
| 236 struct CodeDesc { | 245 struct CodeDesc { |
| 237 byte* buffer; | 246 byte* buffer; |
| 238 int buffer_size; | 247 int buffer_size; |
| 239 int instr_size; | 248 int instr_size; |
| 240 int reloc_size; | 249 int reloc_size; |
| 241 Assembler* origin; | 250 Assembler* origin; |
| 251 RegList registers_mask; |
| 252 RegList double_registers_mask; |
| 242 }; | 253 }; |
| 243 | 254 |
| 244 | 255 |
| 245 // Callback function used for iterating objects in heap spaces, | 256 // Callback function used for iterating objects in heap spaces, |
| 246 // for example, scanning heap objects. | 257 // for example, scanning heap objects. |
| 247 typedef int (*HeapObjectCallback)(HeapObject* obj); | 258 typedef int (*HeapObjectCallback)(HeapObject* obj); |
| 248 | 259 |
| 249 | 260 |
| 250 // Callback function used for checking constraints when copying/relocating | 261 // Callback function used for checking constraints when copying/relocating |
| 251 // objects. Returns true if an object can be copied/relocated from its | 262 // objects. Returns true if an object can be copied/relocated from its |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 | 569 |
| 559 | 570 |
| 560 enum MinusZeroMode { | 571 enum MinusZeroMode { |
| 561 TREAT_MINUS_ZERO_AS_ZERO, | 572 TREAT_MINUS_ZERO_AS_ZERO, |
| 562 FAIL_ON_MINUS_ZERO | 573 FAIL_ON_MINUS_ZERO |
| 563 }; | 574 }; |
| 564 | 575 |
| 565 } } // namespace v8::internal | 576 } } // namespace v8::internal |
| 566 | 577 |
| 567 #endif // V8_V8GLOBALS_H_ | 578 #endif // V8_V8GLOBALS_H_ |
| OLD | NEW |