This change inlines the _init method into the Thrift constructor and pivots the async vs sync behavior from Thrift.load into the Thrift constructor, using a callback option which also replaces the signal asyncReadFile used previously to switch off the synchronous constructor behaviors. V8 infers the final hidden classe produced by a constructor function from the properties created within the constructor function so inlining bypasses the creation of intermediate hidden classes.
Previous changes inferred that this project uses underscore prefixes for private methods, based on the precedent of compile/_compile. This change corrects that misunderstanding by renaming some methods.
This change inlines the _init method into the Thrift constructor and pivots the async vs sync behavior from Thrift.load into the Thrift constructor, using a
callback
option which also replaces the signalasyncReadFile
used previously to switch off the synchronous constructor behaviors. V8 infers the final hidden classe produced by a constructor function from the properties created within the constructor function so inlining bypasses the creation of intermediate hidden classes.Previous changes inferred that this project uses underscore prefixes for private methods, based on the precedent of compile/_compile. This change corrects that misunderstanding by renaming some methods.