| 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 | 4 |
| 5 #ifndef RUNTIME_VM_KERNEL_TO_IL_H_ | 5 #ifndef RUNTIME_VM_KERNEL_TO_IL_H_ |
| 6 #define RUNTIME_VM_KERNEL_TO_IL_H_ | 6 #define RUNTIME_VM_KERNEL_TO_IL_H_ |
| 7 | 7 |
| 8 #if !defined(DART_PRECOMPILED_RUNTIME) | 8 #if !defined(DART_PRECOMPILED_RUNTIME) |
| 9 | 9 |
| 10 #include "vm/growable_array.h" | 10 #include "vm/growable_array.h" |
| (...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1035 Value* Pop(); | 1035 Value* Pop(); |
| 1036 Fragment Drop(); | 1036 Fragment Drop(); |
| 1037 | 1037 |
| 1038 bool IsInlining() { return exit_collector_ != NULL; } | 1038 bool IsInlining() { return exit_collector_ != NULL; } |
| 1039 | 1039 |
| 1040 Token::Kind MethodKind(const dart::String& name); | 1040 Token::Kind MethodKind(const dart::String& name); |
| 1041 | 1041 |
| 1042 void InlineBailout(const char* reason); | 1042 void InlineBailout(const char* reason); |
| 1043 | 1043 |
| 1044 TranslationHelper translation_helper_; | 1044 TranslationHelper translation_helper_; |
| 1045 Thread* thread_; | |
| 1046 Zone* zone_; | 1045 Zone* zone_; |
| 1047 | 1046 |
| 1048 // The node we are currently compiling (e.g. FunctionNode, Constructor, | 1047 // The node we are currently compiling (e.g. FunctionNode, Constructor, |
| 1049 // Field) | 1048 // Field) |
| 1050 TreeNode* node_; | 1049 TreeNode* node_; |
| 1051 | 1050 |
| 1052 ParsedFunction* parsed_function_; | 1051 ParsedFunction* parsed_function_; |
| 1053 intptr_t osr_id_; | 1052 intptr_t osr_id_; |
| 1054 const ZoneGrowableArray<const ICData*>& ic_data_array_; | 1053 const ZoneGrowableArray<const ICData*>& ic_data_array_; |
| 1055 InlineExitCollector* exit_collector_; | 1054 InlineExitCollector* exit_collector_; |
| 1056 | 1055 |
| 1057 intptr_t next_block_id_; | 1056 intptr_t next_block_id_; |
| 1058 intptr_t AllocateBlockId() { return next_block_id_++; } | 1057 intptr_t AllocateBlockId() { return next_block_id_++; } |
| 1059 | 1058 |
| 1060 intptr_t GetNextDeoptId() { | |
| 1061 // TODO(rmacnak): Record current scope / context level. | |
| 1062 return thread_->GetNextDeoptId(); | |
| 1063 } | |
| 1064 | |
| 1065 intptr_t next_function_id_; | 1059 intptr_t next_function_id_; |
| 1066 intptr_t AllocateFunctionId() { return next_function_id_++; } | 1060 intptr_t AllocateFunctionId() { return next_function_id_++; } |
| 1067 | 1061 |
| 1068 intptr_t context_depth_; | 1062 intptr_t context_depth_; |
| 1069 intptr_t loop_depth_; | 1063 intptr_t loop_depth_; |
| 1070 intptr_t try_depth_; | 1064 intptr_t try_depth_; |
| 1071 intptr_t catch_depth_; | 1065 intptr_t catch_depth_; |
| 1072 intptr_t for_in_depth_; | 1066 intptr_t for_in_depth_; |
| 1073 Fragment fragment_; | 1067 Fragment fragment_; |
| 1074 Value* stack_; | 1068 Value* stack_; |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1367 namespace kernel { | 1361 namespace kernel { |
| 1368 | 1362 |
| 1369 RawObject* EvaluateMetadata(const dart::Field& metadata_field); | 1363 RawObject* EvaluateMetadata(const dart::Field& metadata_field); |
| 1370 RawObject* BuildParameterDescriptor(const Function& function); | 1364 RawObject* BuildParameterDescriptor(const Function& function); |
| 1371 | 1365 |
| 1372 } // namespace kernel | 1366 } // namespace kernel |
| 1373 } // namespace dart | 1367 } // namespace dart |
| 1374 | 1368 |
| 1375 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 1369 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
| 1376 #endif // RUNTIME_VM_KERNEL_TO_IL_H_ | 1370 #endif // RUNTIME_VM_KERNEL_TO_IL_H_ |
| OLD | NEW |