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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 // Please note the order is important (see IsCodeTarget, IsGCRelocMode). | 317 // Please note the order is important (see IsCodeTarget, IsGCRelocMode). |
318 CODE_TARGET, // Code target which is not any of the above. | 318 CODE_TARGET, // Code target which is not any of the above. |
319 CODE_TARGET_WITH_ID, | 319 CODE_TARGET_WITH_ID, |
320 DEBUGGER_STATEMENT, // Code target for the debugger statement. | 320 DEBUGGER_STATEMENT, // Code target for the debugger statement. |
321 EMBEDDED_OBJECT, | 321 EMBEDDED_OBJECT, |
322 // To relocate pointers into the wasm memory embedded in wasm code | 322 // To relocate pointers into the wasm memory embedded in wasm code |
323 WASM_MEMORY_REFERENCE, | 323 WASM_MEMORY_REFERENCE, |
324 WASM_GLOBAL_REFERENCE, | 324 WASM_GLOBAL_REFERENCE, |
325 WASM_MEMORY_SIZE_REFERENCE, | 325 WASM_MEMORY_SIZE_REFERENCE, |
326 WASM_FUNCTION_TABLE_SIZE_REFERENCE, | 326 WASM_FUNCTION_TABLE_SIZE_REFERENCE, |
| 327 WASM_PROTECTED_INSTRUCTION_LANDING, |
327 CELL, | 328 CELL, |
328 | 329 |
329 // Everything after runtime_entry (inclusive) is not GC'ed. | 330 // Everything after runtime_entry (inclusive) is not GC'ed. |
330 RUNTIME_ENTRY, | 331 RUNTIME_ENTRY, |
331 COMMENT, | 332 COMMENT, |
332 | 333 |
333 // Additional code inserted for debug break slot. | 334 // Additional code inserted for debug break slot. |
334 DEBUG_BREAK_SLOT_AT_POSITION, | 335 DEBUG_BREAK_SLOT_AT_POSITION, |
335 DEBUG_BREAK_SLOT_AT_RETURN, | 336 DEBUG_BREAK_SLOT_AT_RETURN, |
336 DEBUG_BREAK_SLOT_AT_CALL, | 337 DEBUG_BREAK_SLOT_AT_CALL, |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 mode == WASM_MEMORY_SIZE_REFERENCE || | 468 mode == WASM_MEMORY_SIZE_REFERENCE || |
468 mode == WASM_FUNCTION_TABLE_SIZE_REFERENCE; | 469 mode == WASM_FUNCTION_TABLE_SIZE_REFERENCE; |
469 } | 470 } |
470 static inline bool IsWasmSizeReference(Mode mode) { | 471 static inline bool IsWasmSizeReference(Mode mode) { |
471 return mode == WASM_MEMORY_SIZE_REFERENCE || | 472 return mode == WASM_MEMORY_SIZE_REFERENCE || |
472 mode == WASM_FUNCTION_TABLE_SIZE_REFERENCE; | 473 mode == WASM_FUNCTION_TABLE_SIZE_REFERENCE; |
473 } | 474 } |
474 static inline bool IsWasmPtrReference(Mode mode) { | 475 static inline bool IsWasmPtrReference(Mode mode) { |
475 return mode == WASM_MEMORY_REFERENCE || mode == WASM_GLOBAL_REFERENCE; | 476 return mode == WASM_MEMORY_REFERENCE || mode == WASM_GLOBAL_REFERENCE; |
476 } | 477 } |
| 478 static inline bool IsWasmProtectedLanding(Mode mode) { |
| 479 return mode == WASM_PROTECTED_INSTRUCTION_LANDING; |
| 480 } |
477 | 481 |
478 static inline int ModeMask(Mode mode) { return 1 << mode; } | 482 static inline int ModeMask(Mode mode) { return 1 << mode; } |
479 | 483 |
480 // Accessors | 484 // Accessors |
481 Isolate* isolate() const { return isolate_; } | 485 Isolate* isolate() const { return isolate_; } |
482 byte* pc() const { return pc_; } | 486 byte* pc() const { return pc_; } |
483 void set_pc(byte* pc) { pc_ = pc; } | 487 void set_pc(byte* pc) { pc_ = pc; } |
484 Mode rmode() const { return rmode_; } | 488 Mode rmode() const { return rmode_; } |
485 intptr_t data() const { return data_; } | 489 intptr_t data() const { return data_; } |
486 Code* host() const { return host_; } | 490 Code* host() const { return host_; } |
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1239 std::vector<ConstantPoolEntry> shared_entries; | 1243 std::vector<ConstantPoolEntry> shared_entries; |
1240 }; | 1244 }; |
1241 | 1245 |
1242 Label emitted_label_; // Records pc_offset of emitted pool | 1246 Label emitted_label_; // Records pc_offset of emitted pool |
1243 PerTypeEntryInfo info_[ConstantPoolEntry::NUMBER_OF_TYPES]; | 1247 PerTypeEntryInfo info_[ConstantPoolEntry::NUMBER_OF_TYPES]; |
1244 }; | 1248 }; |
1245 | 1249 |
1246 } // namespace internal | 1250 } // namespace internal |
1247 } // namespace v8 | 1251 } // namespace v8 |
1248 #endif // V8_ASSEMBLER_H_ | 1252 #endif // V8_ASSEMBLER_H_ |
OLD | NEW |