| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 #if !defined(DART_PRECOMPILED_RUNTIME) | 4 #if !defined(DART_PRECOMPILED_RUNTIME) |
| 5 | 5 |
| 6 #include "platform/globals.h" | 6 #include "platform/globals.h" |
| 7 #include "vm/flags.h" | 7 #include "vm/flags.h" |
| 8 #include "vm/growable_array.h" | 8 #include "vm/growable_array.h" |
| 9 #include "vm/kernel.h" | 9 #include "vm/kernel.h" |
| 10 #include "vm/kernel_to_il.h" | 10 #include "vm/kernel_to_il.h" |
| (...skipping 1883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1894 | 1894 |
| 1895 FunctionNode* FunctionNode::ReadFrom(Reader* reader) { | 1895 FunctionNode* FunctionNode::ReadFrom(Reader* reader) { |
| 1896 TRACE_READ_OFFSET(); | 1896 TRACE_READ_OFFSET(); |
| 1897 TypeParameterScope<ReaderHelper> scope(reader->helper()); | 1897 TypeParameterScope<ReaderHelper> scope(reader->helper()); |
| 1898 | 1898 |
| 1899 FunctionNode* function = new FunctionNode(); | 1899 FunctionNode* function = new FunctionNode(); |
| 1900 function->position_ = reader->ReadPosition(); | 1900 function->position_ = reader->ReadPosition(); |
| 1901 function->end_position_ = reader->ReadPosition(); | 1901 function->end_position_ = reader->ReadPosition(); |
| 1902 function->async_marker_ = | 1902 function->async_marker_ = |
| 1903 static_cast<FunctionNode::AsyncMarker>(reader->ReadByte()); | 1903 static_cast<FunctionNode::AsyncMarker>(reader->ReadByte()); |
| 1904 function->debuggable_ = reader->ReadByte() == 1 ? true : false; | 1904 function->original_async_marker_ = |
| 1905 static_cast<FunctionNode::AsyncMarker>(reader->ReadByte()); |
| 1905 function->type_parameters().ReadFrom(reader); | 1906 function->type_parameters().ReadFrom(reader); |
| 1906 function->required_parameter_count_ = reader->ReadUInt(); | 1907 function->required_parameter_count_ = reader->ReadUInt(); |
| 1907 function->positional_parameters().ReadFromStatic<VariableDeclarationImpl>( | 1908 function->positional_parameters().ReadFromStatic<VariableDeclarationImpl>( |
| 1908 reader); | 1909 reader); |
| 1909 function->named_parameters().ReadFromStatic<VariableDeclarationImpl>(reader); | 1910 function->named_parameters().ReadFromStatic<VariableDeclarationImpl>(reader); |
| 1910 function->return_type_ = DartType::ReadFrom(reader); | 1911 function->return_type_ = DartType::ReadFrom(reader); |
| 1911 function->inferred_return_value_ = reader->ReadOptional<InferredValue>(); | 1912 function->inferred_return_value_ = reader->ReadOptional<InferredValue>(); |
| 1912 | 1913 |
| 1913 LabelScope<ReaderHelper, BlockStack<LabeledStatement> > labels( | 1914 LabelScope<ReaderHelper, BlockStack<LabeledStatement> > labels( |
| 1914 reader->helper()); | 1915 reader->helper()); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1931 | 1932 |
| 1932 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer, | 1933 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer, |
| 1933 intptr_t buffer_length) { | 1934 intptr_t buffer_length) { |
| 1934 kernel::Reader reader(buffer, buffer_length); | 1935 kernel::Reader reader(buffer, buffer_length); |
| 1935 return kernel::Program::ReadFrom(&reader); | 1936 return kernel::Program::ReadFrom(&reader); |
| 1936 } | 1937 } |
| 1937 | 1938 |
| 1938 | 1939 |
| 1939 } // namespace dart | 1940 } // namespace dart |
| 1940 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 1941 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
| OLD | NEW |