| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 70     Pair* pair = | 70     Pair* pair = | 
| 71         DirectChainedHashMap<RawPointerKeyValueTrait<K, V> >::Lookup(key); | 71         DirectChainedHashMap<RawPointerKeyValueTrait<K, V> >::Lookup(key); | 
| 72     if (pair == NULL) { | 72     if (pair == NULL) { | 
| 73       return V(); | 73       return V(); | 
| 74     } else { | 74     } else { | 
| 75       return pair->value; | 75       return pair->value; | 
| 76     } | 76     } | 
| 77   } | 77   } | 
| 78 }; | 78 }; | 
| 79 | 79 | 
| 80 template <typename K, typename V> |  | 
| 81 class MallocMap |  | 
| 82     : public MallocDirectChainedHashMap<RawPointerKeyValueTrait<K, V> > { |  | 
| 83  public: |  | 
| 84   typedef typename RawPointerKeyValueTrait<K, V>::Key Key; |  | 
| 85   typedef typename RawPointerKeyValueTrait<K, V>::Value Value; |  | 
| 86   typedef typename RawPointerKeyValueTrait<K, V>::Pair Pair; |  | 
| 87 |  | 
| 88   inline void Insert(const Key& key, const Value& value) { |  | 
| 89     Pair pair(key, value); |  | 
| 90     MallocDirectChainedHashMap<RawPointerKeyValueTrait<K, V> >::Insert(pair); |  | 
| 91   } |  | 
| 92 |  | 
| 93   inline V Lookup(const Key& key) { |  | 
| 94     Pair* pair = |  | 
| 95         MallocDirectChainedHashMap<RawPointerKeyValueTrait<K, V> >::Lookup(key); |  | 
| 96     if (pair == NULL) { |  | 
| 97       return V(); |  | 
| 98     } else { |  | 
| 99       return pair->value; |  | 
| 100     } |  | 
| 101   } |  | 
| 102 |  | 
| 103   inline Pair* LookupPair(const Key& key) { |  | 
| 104     return MallocDirectChainedHashMap<RawPointerKeyValueTrait<K, V> >::Lookup( |  | 
| 105         key); |  | 
| 106   } |  | 
| 107 }; |  | 
| 108 |  | 
| 109 class BreakableBlock; | 80 class BreakableBlock; | 
| 110 class CatchBlock; | 81 class CatchBlock; | 
| 111 class FlowGraphBuilder; | 82 class FlowGraphBuilder; | 
| 112 class SwitchBlock; | 83 class SwitchBlock; | 
| 113 class TryCatchBlock; | 84 class TryCatchBlock; | 
| 114 class TryFinallyBlock; | 85 class TryFinallyBlock; | 
| 115 | 86 | 
| 116 class Fragment { | 87 class Fragment { | 
| 117  public: | 88  public: | 
| 118   Instruction* entry; | 89   Instruction* entry; | 
| (...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 995 namespace kernel { | 966 namespace kernel { | 
| 996 | 967 | 
| 997 RawObject* EvaluateMetadata(TreeNode* const kernel_node); | 968 RawObject* EvaluateMetadata(TreeNode* const kernel_node); | 
| 998 RawObject* BuildParameterDescriptor(TreeNode* const kernel_node); | 969 RawObject* BuildParameterDescriptor(TreeNode* const kernel_node); | 
| 999 | 970 | 
| 1000 }  // namespace kernel | 971 }  // namespace kernel | 
| 1001 }  // namespace dart | 972 }  // namespace dart | 
| 1002 | 973 | 
| 1003 #endif  // !defined(DART_PRECOMPILED_RUNTIME) | 974 #endif  // !defined(DART_PRECOMPILED_RUNTIME) | 
| 1004 #endif  // RUNTIME_VM_KERNEL_TO_IL_H_ | 975 #endif  // RUNTIME_VM_KERNEL_TO_IL_H_ | 
| OLD | NEW | 
|---|