| 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 void set_labels(BlockStack<LabeledStatement>* labels) { labels_ = labels; } | 311 void set_labels(BlockStack<LabeledStatement>* labels) { labels_ = labels; } |
| 312 | 312 |
| 313 CanonicalName* GetCanonicalName(int index) { return canonical_names_[index]; } | 313 CanonicalName* GetCanonicalName(int index) { return canonical_names_[index]; } |
| 314 void SetCanonicalName(int index, CanonicalName* name) { | 314 void SetCanonicalName(int index, CanonicalName* name) { |
| 315 canonical_names_[index] = name; | 315 canonical_names_[index] = name; |
| 316 } | 316 } |
| 317 void SetCanonicalNameCount(int count) { canonical_names_.SetLength(count); } | 317 void SetCanonicalNameCount(int count) { canonical_names_.SetLength(count); } |
| 318 | 318 |
| 319 private: | 319 private: |
| 320 Program* program_; | 320 Program* program_; |
| 321 MallocGrowableArray<Ref<CanonicalName> > canonical_names_; | 321 MallocGrowableArray<CanonicalName*> canonical_names_; |
| 322 BlockStack<VariableDeclaration> scope_; | 322 BlockStack<VariableDeclaration> scope_; |
| 323 BlockStack<TypeParameter> type_parameters_; | 323 BlockStack<TypeParameter> type_parameters_; |
| 324 BlockStack<SwitchCase> switch_cases_; | 324 BlockStack<SwitchCase> switch_cases_; |
| 325 BlockStack<LabeledStatement>* labels_; | 325 BlockStack<LabeledStatement>* labels_; |
| 326 }; | 326 }; |
| 327 | 327 |
| 328 | 328 |
| 329 class Reader { | 329 class Reader { |
| 330 public: | 330 public: |
| 331 Reader(const uint8_t* buffer, int64_t size) | 331 Reader(const uint8_t* buffer, int64_t size) |
| (...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1925 | 1925 |
| 1926 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer, | 1926 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer, |
| 1927 intptr_t buffer_length) { | 1927 intptr_t buffer_length) { |
| 1928 kernel::Reader reader(buffer, buffer_length); | 1928 kernel::Reader reader(buffer, buffer_length); |
| 1929 return kernel::Program::ReadFrom(&reader); | 1929 return kernel::Program::ReadFrom(&reader); |
| 1930 } | 1930 } |
| 1931 | 1931 |
| 1932 | 1932 |
| 1933 } // namespace dart | 1933 } // namespace dart |
| 1934 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 1934 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
| OLD | NEW |