| 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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 | 385 |
| 386 enum Mode { | 386 enum Mode { |
| 387 // Please note the order is important (see IsCodeTarget, IsGCRelocMode). | 387 // Please note the order is important (see IsCodeTarget, IsGCRelocMode). |
| 388 CODE_TARGET, // Code target which is not any of the above. | 388 CODE_TARGET, // Code target which is not any of the above. |
| 389 CODE_TARGET_WITH_ID, | 389 CODE_TARGET_WITH_ID, |
| 390 DEBUGGER_STATEMENT, // Code target for the debugger statement. | 390 DEBUGGER_STATEMENT, // Code target for the debugger statement. |
| 391 EMBEDDED_OBJECT, | 391 EMBEDDED_OBJECT, |
| 392 // To relocate pointers into the wasm memory embedded in wasm code | 392 // To relocate pointers into the wasm memory embedded in wasm code |
| 393 WASM_MEMORY_REFERENCE, | 393 WASM_MEMORY_REFERENCE, |
| 394 WASM_GLOBAL_REFERENCE, | 394 WASM_GLOBAL_REFERENCE, |
| 395 WASM_MEMORY_SIZE_REFERENCE, | 395 WASM_MEMORY_BYTE_SIZE_REFERENCE, |
| 396 WASM_MEMORY_WORD_SIZE_REFERENCE, |
| 397 WASM_MEMORY_DWORD_SIZE_REFERENCE, |
| 398 WASM_MEMORY_QWORD_SIZE_REFERENCE, |
| 396 CELL, | 399 CELL, |
| 397 | 400 |
| 398 // Everything after runtime_entry (inclusive) is not GC'ed. | 401 // Everything after runtime_entry (inclusive) is not GC'ed. |
| 399 RUNTIME_ENTRY, | 402 RUNTIME_ENTRY, |
| 400 COMMENT, | 403 COMMENT, |
| 401 | 404 |
| 402 // Additional code inserted for debug break slot. | 405 // Additional code inserted for debug break slot. |
| 403 DEBUG_BREAK_SLOT_AT_POSITION, | 406 DEBUG_BREAK_SLOT_AT_POSITION, |
| 404 DEBUG_BREAK_SLOT_AT_RETURN, | 407 DEBUG_BREAK_SLOT_AT_RETURN, |
| 405 DEBUG_BREAK_SLOT_AT_CALL, | 408 DEBUG_BREAK_SLOT_AT_CALL, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 430 // Pseudo-types | 433 // Pseudo-types |
| 431 NUMBER_OF_MODES, | 434 NUMBER_OF_MODES, |
| 432 NONE32, // never recorded 32-bit value | 435 NONE32, // never recorded 32-bit value |
| 433 NONE64, // never recorded 64-bit value | 436 NONE64, // never recorded 64-bit value |
| 434 CODE_AGE_SEQUENCE, // Not stored in RelocInfo array, used explictly by | 437 CODE_AGE_SEQUENCE, // Not stored in RelocInfo array, used explictly by |
| 435 // code aging. | 438 // code aging. |
| 436 | 439 |
| 437 FIRST_REAL_RELOC_MODE = CODE_TARGET, | 440 FIRST_REAL_RELOC_MODE = CODE_TARGET, |
| 438 LAST_REAL_RELOC_MODE = VENEER_POOL, | 441 LAST_REAL_RELOC_MODE = VENEER_POOL, |
| 439 LAST_CODE_ENUM = DEBUGGER_STATEMENT, | 442 LAST_CODE_ENUM = DEBUGGER_STATEMENT, |
| 440 LAST_GCED_ENUM = WASM_MEMORY_SIZE_REFERENCE, | 443 LAST_GCED_ENUM = WASM_MEMORY_QWORD_SIZE_REFERENCE, |
| 441 FIRST_SHAREABLE_RELOC_MODE = CELL, | 444 FIRST_SHAREABLE_RELOC_MODE = CELL, |
| 442 }; | 445 }; |
| 443 | 446 |
| 444 STATIC_ASSERT(NUMBER_OF_MODES <= kBitsPerInt); | 447 STATIC_ASSERT(NUMBER_OF_MODES <= kBitsPerInt); |
| 445 | 448 |
| 446 explicit RelocInfo(Isolate* isolate) : isolate_(isolate) { | 449 explicit RelocInfo(Isolate* isolate) : isolate_(isolate) { |
| 447 DCHECK_NOT_NULL(isolate); | 450 DCHECK_NOT_NULL(isolate); |
| 448 } | 451 } |
| 449 | 452 |
| 450 RelocInfo(Isolate* isolate, byte* pc, Mode rmode, intptr_t data, Code* host) | 453 RelocInfo(Isolate* isolate, byte* pc, Mode rmode, intptr_t data, Code* host) |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 static inline bool IsCodeAgeSequence(Mode mode) { | 524 static inline bool IsCodeAgeSequence(Mode mode) { |
| 522 return mode == CODE_AGE_SEQUENCE; | 525 return mode == CODE_AGE_SEQUENCE; |
| 523 } | 526 } |
| 524 static inline bool IsGeneratorContinuation(Mode mode) { | 527 static inline bool IsGeneratorContinuation(Mode mode) { |
| 525 return mode == GENERATOR_CONTINUATION; | 528 return mode == GENERATOR_CONTINUATION; |
| 526 } | 529 } |
| 527 static inline bool IsWasmMemoryReference(Mode mode) { | 530 static inline bool IsWasmMemoryReference(Mode mode) { |
| 528 return mode == WASM_MEMORY_REFERENCE; | 531 return mode == WASM_MEMORY_REFERENCE; |
| 529 } | 532 } |
| 530 static inline bool IsWasmMemorySizeReference(Mode mode) { | 533 static inline bool IsWasmMemorySizeReference(Mode mode) { |
| 531 return mode == WASM_MEMORY_SIZE_REFERENCE; | 534 return mode == WASM_MEMORY_BYTE_SIZE_REFERENCE || |
| 535 mode == WASM_MEMORY_WORD_SIZE_REFERENCE || |
| 536 mode == WASM_MEMORY_DWORD_SIZE_REFERENCE || |
| 537 mode == WASM_MEMORY_QWORD_SIZE_REFERENCE; |
| 532 } | 538 } |
| 533 static inline bool IsWasmGlobalReference(Mode mode) { | 539 static inline bool IsWasmGlobalReference(Mode mode) { |
| 534 return mode == WASM_GLOBAL_REFERENCE; | 540 return mode == WASM_GLOBAL_REFERENCE; |
| 535 } | 541 } |
| 536 static inline int ModeMask(Mode mode) { return 1 << mode; } | 542 static inline int ModeMask(Mode mode) { return 1 << mode; } |
| 537 | 543 |
| 538 // Accessors | 544 // Accessors |
| 539 Isolate* isolate() const { return isolate_; } | 545 Isolate* isolate() const { return isolate_; } |
| 540 byte* pc() const { return pc_; } | 546 byte* pc() const { return pc_; } |
| 541 void set_pc(byte* pc) { pc_ = pc; } | 547 void set_pc(byte* pc) { pc_ = pc; } |
| (...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1281 std::vector<ConstantPoolEntry> shared_entries; | 1287 std::vector<ConstantPoolEntry> shared_entries; |
| 1282 }; | 1288 }; |
| 1283 | 1289 |
| 1284 Label emitted_label_; // Records pc_offset of emitted pool | 1290 Label emitted_label_; // Records pc_offset of emitted pool |
| 1285 PerTypeEntryInfo info_[ConstantPoolEntry::NUMBER_OF_TYPES]; | 1291 PerTypeEntryInfo info_[ConstantPoolEntry::NUMBER_OF_TYPES]; |
| 1286 }; | 1292 }; |
| 1287 | 1293 |
| 1288 } // namespace internal | 1294 } // namespace internal |
| 1289 } // namespace v8 | 1295 } // namespace v8 |
| 1290 #endif // V8_ASSEMBLER_H_ | 1296 #endif // V8_ASSEMBLER_H_ |
| OLD | NEW |