| 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_(Heap::kNew), |
| 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 ASSERT(thread->IsMutatorThread()); |
| 91 } |
| 92 |
| 79 void TranslationHelper::SetStringOffsets(const TypedData& string_offsets) { | 93 void TranslationHelper::SetStringOffsets(const TypedData& string_offsets) { |
| 80 ASSERT(string_offsets_.IsNull()); | 94 ASSERT(string_offsets_.IsNull()); |
| 81 string_offsets_ = string_offsets.raw(); | 95 string_offsets_ = string_offsets.raw(); |
| 82 } | 96 } |
| 83 | 97 |
| 84 void TranslationHelper::SetStringData(const TypedData& string_data) { | 98 void TranslationHelper::SetStringData(const TypedData& string_data) { |
| 85 ASSERT(string_data_.IsNull()); | 99 ASSERT(string_data_.IsNull()); |
| 86 string_data_ = string_data.raw(); | 100 string_data_ = string_data.raw(); |
| 87 } | 101 } |
| 88 | 102 |
| (...skipping 2248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2337 StreamingFlowGraphBuilder streaming_flow_graph_builder( | 2351 StreamingFlowGraphBuilder streaming_flow_graph_builder( |
| 2338 &helper, zone_, script.kernel_data(), script.kernel_data_size()); | 2352 &helper, zone_, script.kernel_data(), script.kernel_data_size()); |
| 2339 return streaming_flow_graph_builder.GetLineStartsFor( | 2353 return streaming_flow_graph_builder.GetLineStartsFor( |
| 2340 script.kernel_script_index()); | 2354 script.kernel_script_index()); |
| 2341 } | 2355 } |
| 2342 | 2356 |
| 2343 } // namespace kernel | 2357 } // namespace kernel |
| 2344 } // namespace dart | 2358 } // namespace dart |
| 2345 | 2359 |
| 2346 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 2360 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
| OLD | NEW |