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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 // The maximum size for a call instruction including pc-jump. | 310 // The maximum size for a call instruction including pc-jump. |
311 static const int kMaxCallSize = 6; | 311 static const int kMaxCallSize = 6; |
312 | 312 |
313 // The maximum pc delta that will use the short encoding. | 313 // The maximum pc delta that will use the short encoding. |
314 static const int kMaxSmallPCDelta; | 314 static const int kMaxSmallPCDelta; |
315 | 315 |
316 enum Mode { | 316 enum Mode { |
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 EMBEDDED_OBJECT, | 321 EMBEDDED_OBJECT, |
321 // To relocate pointers into the wasm memory embedded in wasm code | 322 // To relocate pointers into the wasm memory embedded in wasm code |
322 WASM_MEMORY_REFERENCE, | 323 WASM_MEMORY_REFERENCE, |
323 WASM_GLOBAL_REFERENCE, | 324 WASM_GLOBAL_REFERENCE, |
324 WASM_MEMORY_SIZE_REFERENCE, | 325 WASM_MEMORY_SIZE_REFERENCE, |
325 WASM_FUNCTION_TABLE_SIZE_REFERENCE, | 326 WASM_FUNCTION_TABLE_SIZE_REFERENCE, |
326 WASM_PROTECTED_INSTRUCTION_LANDING, | 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. |
(...skipping 28 matching lines...) Expand all Loading... |
358 | 359 |
359 // Pseudo-types | 360 // Pseudo-types |
360 NUMBER_OF_MODES, | 361 NUMBER_OF_MODES, |
361 NONE32, // never recorded 32-bit value | 362 NONE32, // never recorded 32-bit value |
362 NONE64, // never recorded 64-bit value | 363 NONE64, // never recorded 64-bit value |
363 CODE_AGE_SEQUENCE, // Not stored in RelocInfo array, used explictly by | 364 CODE_AGE_SEQUENCE, // Not stored in RelocInfo array, used explictly by |
364 // code aging. | 365 // code aging. |
365 | 366 |
366 FIRST_REAL_RELOC_MODE = CODE_TARGET, | 367 FIRST_REAL_RELOC_MODE = CODE_TARGET, |
367 LAST_REAL_RELOC_MODE = VENEER_POOL, | 368 LAST_REAL_RELOC_MODE = VENEER_POOL, |
368 LAST_CODE_ENUM = CODE_TARGET_WITH_ID, | 369 LAST_CODE_ENUM = DEBUGGER_STATEMENT, |
369 LAST_GCED_ENUM = WASM_FUNCTION_TABLE_SIZE_REFERENCE, | 370 LAST_GCED_ENUM = WASM_FUNCTION_TABLE_SIZE_REFERENCE, |
370 FIRST_SHAREABLE_RELOC_MODE = CELL, | 371 FIRST_SHAREABLE_RELOC_MODE = CELL, |
371 }; | 372 }; |
372 | 373 |
373 STATIC_ASSERT(NUMBER_OF_MODES <= kBitsPerInt); | 374 STATIC_ASSERT(NUMBER_OF_MODES <= kBitsPerInt); |
374 | 375 |
375 explicit RelocInfo(Isolate* isolate) : isolate_(isolate) { | 376 explicit RelocInfo(Isolate* isolate) : isolate_(isolate) { |
376 DCHECK_NOT_NULL(isolate); | 377 DCHECK_NOT_NULL(isolate); |
377 } | 378 } |
378 | 379 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 } | 435 } |
435 static inline bool IsDebugBreakSlotAtReturn(Mode mode) { | 436 static inline bool IsDebugBreakSlotAtReturn(Mode mode) { |
436 return mode == DEBUG_BREAK_SLOT_AT_RETURN; | 437 return mode == DEBUG_BREAK_SLOT_AT_RETURN; |
437 } | 438 } |
438 static inline bool IsDebugBreakSlotAtCall(Mode mode) { | 439 static inline bool IsDebugBreakSlotAtCall(Mode mode) { |
439 return mode == DEBUG_BREAK_SLOT_AT_CALL; | 440 return mode == DEBUG_BREAK_SLOT_AT_CALL; |
440 } | 441 } |
441 static inline bool IsDebugBreakSlotAtTailCall(Mode mode) { | 442 static inline bool IsDebugBreakSlotAtTailCall(Mode mode) { |
442 return mode == DEBUG_BREAK_SLOT_AT_TAIL_CALL; | 443 return mode == DEBUG_BREAK_SLOT_AT_TAIL_CALL; |
443 } | 444 } |
| 445 static inline bool IsDebuggerStatement(Mode mode) { |
| 446 return mode == DEBUGGER_STATEMENT; |
| 447 } |
444 static inline bool IsNone(Mode mode) { | 448 static inline bool IsNone(Mode mode) { |
445 return mode == NONE32 || mode == NONE64; | 449 return mode == NONE32 || mode == NONE64; |
446 } | 450 } |
447 static inline bool IsCodeAgeSequence(Mode mode) { | 451 static inline bool IsCodeAgeSequence(Mode mode) { |
448 return mode == CODE_AGE_SEQUENCE; | 452 return mode == CODE_AGE_SEQUENCE; |
449 } | 453 } |
450 static inline bool IsWasmMemoryReference(Mode mode) { | 454 static inline bool IsWasmMemoryReference(Mode mode) { |
451 return mode == WASM_MEMORY_REFERENCE; | 455 return mode == WASM_MEMORY_REFERENCE; |
452 } | 456 } |
453 static inline bool IsWasmMemorySizeReference(Mode mode) { | 457 static inline bool IsWasmMemorySizeReference(Mode mode) { |
(...skipping 785 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 |