| 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 #include <set> | 5 #include <set> |
| 6 | 6 |
| 7 #include "vm/kernel_to_il.h" | 7 #include "vm/kernel_to_il.h" |
| 8 | 8 |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/intermediate_language.h" | 10 #include "vm/intermediate_language.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 TranslationHelper::TranslationHelper(Thread* thread) | 70 TranslationHelper::TranslationHelper(Thread* thread) |
| 71 : thread_(thread), | 71 : thread_(thread), |
| 72 zone_(thread->zone()), | 72 zone_(thread->zone()), |
| 73 isolate_(thread->isolate()), | 73 isolate_(thread->isolate()), |
| 74 allocation_space_(thread->IsMutatorThread() ? Heap::kNew : Heap::kOld), | 74 allocation_space_(thread->IsMutatorThread() ? Heap::kNew : Heap::kOld), |
| 75 string_offsets_(TypedData::Handle(Z)), | 75 string_offsets_(TypedData::Handle(Z)), |
| 76 string_data_(TypedData::Handle(Z)), | 76 string_data_(TypedData::Handle(Z)), |
| 77 canonical_names_(TypedData::Handle(Z)) {} | 77 canonical_names_(TypedData::Handle(Z)) {} |
| 78 | 78 |
| 79 TranslationHelper::TranslationHelper(Thread* thread, |
| 80 dart::RawTypedData* string_offsets, |
| 81 dart::RawTypedData* string_data, |
| 82 dart::RawTypedData* canonical_names) |
| 83 : thread_(thread), |
| 84 zone_(thread->zone()), |
| 85 isolate_(thread->isolate()), |
| 86 allocation_space_(thread->IsMutatorThread() ? Heap::kNew : Heap::kOld), |
| 87 string_offsets_(TypedData::Handle(Z, string_offsets)), |
| 88 string_data_(TypedData::Handle(Z, string_data)), |
| 89 canonical_names_(TypedData::Handle(Z, canonical_names)) {} |
| 90 |
| 79 void TranslationHelper::SetStringOffsets(const TypedData& string_offsets) { | 91 void TranslationHelper::SetStringOffsets(const TypedData& string_offsets) { |
| 80 ASSERT(string_offsets_.IsNull()); | 92 ASSERT(string_offsets_.IsNull()); |
| 81 string_offsets_ = string_offsets.raw(); | 93 string_offsets_ = string_offsets.raw(); |
| 82 } | 94 } |
| 83 | 95 |
| 84 void TranslationHelper::SetStringData(const TypedData& string_data) { | 96 void TranslationHelper::SetStringData(const TypedData& string_data) { |
| 85 ASSERT(string_data_.IsNull()); | 97 ASSERT(string_data_.IsNull()); |
| 86 string_data_ = string_data.raw(); | 98 string_data_ = string_data.raw(); |
| 87 } | 99 } |
| 88 | 100 |
| (...skipping 2248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2337 StreamingFlowGraphBuilder streaming_flow_graph_builder( | 2349 StreamingFlowGraphBuilder streaming_flow_graph_builder( |
| 2338 &helper, zone_, script.kernel_data(), script.kernel_data_size()); | 2350 &helper, zone_, script.kernel_data(), script.kernel_data_size()); |
| 2339 return streaming_flow_graph_builder.GetLineStartsFor( | 2351 return streaming_flow_graph_builder.GetLineStartsFor( |
| 2340 script.kernel_script_index()); | 2352 script.kernel_script_index()); |
| 2341 } | 2353 } |
| 2342 | 2354 |
| 2343 } // namespace kernel | 2355 } // namespace kernel |
| 2344 } // namespace dart | 2356 } // namespace dart |
| 2345 | 2357 |
| 2346 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 2358 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
| OLD | NEW |