OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 "vm/object.h" | 5 #include "vm/object.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 10870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10881 instrs.set_object_pool(Array::MakeArray(object_pool)); | 10881 instrs.set_object_pool(Array::MakeArray(object_pool)); |
10882 } | 10882 } |
10883 bool status = | 10883 bool status = |
10884 VirtualMemory::Protect(reinterpret_cast<void*>(instrs.raw_ptr()), | 10884 VirtualMemory::Protect(reinterpret_cast<void*>(instrs.raw_ptr()), |
10885 instrs.raw()->Size(), | 10885 instrs.raw()->Size(), |
10886 FLAG_write_protect_code | 10886 FLAG_write_protect_code |
10887 ? VirtualMemory::kReadExecute | 10887 ? VirtualMemory::kReadExecute |
10888 : VirtualMemory::kReadWriteExecute); | 10888 : VirtualMemory::kReadWriteExecute); |
10889 ASSERT(status); | 10889 ASSERT(status); |
10890 } | 10890 } |
| 10891 code.set_comments(assembler->GetCodeComments()); |
10891 return code.raw(); | 10892 return code.raw(); |
10892 } | 10893 } |
10893 | 10894 |
10894 | 10895 |
10895 RawCode* Code::FinalizeCode(const Function& function, | 10896 RawCode* Code::FinalizeCode(const Function& function, |
10896 Assembler* assembler, | 10897 Assembler* assembler, |
10897 bool optimized) { | 10898 bool optimized) { |
10898 // Calling ToFullyQualifiedCString is very expensive, try to avoid it. | 10899 // Calling ToFullyQualifiedCString is very expensive, try to avoid it. |
10899 if (CodeObservers::AreActive()) { | 10900 if (CodeObservers::AreActive()) { |
10900 return FinalizeCode(function.ToFullyQualifiedCString(), | 10901 return FinalizeCode(function.ToFullyQualifiedCString(), |
(...skipping 7651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18552 return tag_label.ToCString(); | 18553 return tag_label.ToCString(); |
18553 } | 18554 } |
18554 | 18555 |
18555 | 18556 |
18556 void UserTag::PrintToJSONStream(JSONStream* stream, bool ref) const { | 18557 void UserTag::PrintToJSONStream(JSONStream* stream, bool ref) const { |
18557 Instance::PrintToJSONStream(stream, ref); | 18558 Instance::PrintToJSONStream(stream, ref); |
18558 } | 18559 } |
18559 | 18560 |
18560 | 18561 |
18561 } // namespace dart | 18562 } // namespace dart |
OLD | NEW |