Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a simpler way to get strong references of block. #101

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

LucasXu0
Copy link

@LucasXu0 LucasXu0 commented Nov 4, 2020

Inspired by libclosure.

// Extended layout encoding.

// Values for Block_descriptor_3->layout with BLOCK_HAS_EXTENDED_LAYOUT
// and for Block_byref_3->layout with BLOCK_BYREF_LAYOUT_EXTENDED

// If the layout field is less than 0x1000, then it is a compact encoding 
// of the form 0xXYZ: X strong pointers, then Y byref pointers, 
// then Z weak pointers.

// If the layout field is 0x1000 or greater, it points to a 
// string of layout bytes. Each byte is of the form 0xPN.
// Operator P is from the list below. Value N is a parameter for the operator.
// Byte 0x00 terminates the layout; remaining block data is non-pointer bytes.

@LucasXu0 LucasXu0 changed the title Use a simpler way to get strong references in closure. Use a simpler way to get strong references of block. Nov 5, 2020
@LucasXu0
Copy link
Author

@aditya7fb Hi, Would you mind reviewing this PR? 😁

@aditya7fb
Copy link
Contributor

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants