[kernel] Stream everything. Replace .kernel_function with .kernel_offset
- Put pointer to kernel data into Script. - Replace function.kernel_function pointer to AstNode with kernel_offset(): - Replace field.kernel_field pointer to AstNode with kernel_offest(). - Stream the previously unstreamed AstNodes: FunctionDeclaration and FunctionExpression. - Move special handling for _buildin.getMainClosure into the streaming flowgraph builder. - Delete big parts of kernel_to_il. R=kmillikin@google.com Committed: https://github.com/dart-lang/sdk/commit/948e2f5d7916032ed6f0bfdc316ba4f577a5ea61 Review-Url: https://codereview.chromium.org/2901533002 .
This commit is contained in:
@@ -257,6 +257,7 @@ Typedef* Typedef::ReadFrom(Reader* reader) {
|
||||
Class* Class::ReadFrom(Reader* reader) {
|
||||
TRACE_READ_OFFSET();
|
||||
|
||||
kernel_offset_ = reader->offset() - 1; // -1 to include tag byte.
|
||||
canonical_name_ = reader->ReadCanonicalNameReference();
|
||||
position_ = reader->ReadPosition(false);
|
||||
is_abstract_ = reader->ReadBool();
|
||||
@@ -1843,6 +1844,7 @@ FunctionNode* FunctionNode::ReadFrom(Reader* reader) {
|
||||
function->dart_async_marker_ =
|
||||
static_cast<FunctionNode::AsyncMarker>(reader->ReadByte());
|
||||
function->type_parameters().ReadFrom(reader);
|
||||
reader->ReadUInt(); // total parameter count.
|
||||
function->required_parameter_count_ = reader->ReadUInt();
|
||||
function->positional_parameters().ReadFromStatic<VariableDeclarationImpl>(
|
||||
reader);
|
||||
|
||||
Reference in New Issue
Block a user