| 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/bigint_operations.h" | 10 #include "vm/bigint_operations.h" |
| (...skipping 7140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7151 Instructions& instrs = | 7151 Instructions& instrs = |
| 7152 Instructions::ZoneHandle(Instructions::New(assembler->CodeSize())); | 7152 Instructions::ZoneHandle(Instructions::New(assembler->CodeSize())); |
| 7153 | 7153 |
| 7154 // Copy the instructions into the instruction area and apply all fixups. | 7154 // Copy the instructions into the instruction area and apply all fixups. |
| 7155 // Embedded pointers are still in handles at this point. | 7155 // Embedded pointers are still in handles at this point. |
| 7156 MemoryRegion region(reinterpret_cast<void*>(instrs.EntryPoint()), | 7156 MemoryRegion region(reinterpret_cast<void*>(instrs.EntryPoint()), |
| 7157 instrs.size()); | 7157 instrs.size()); |
| 7158 assembler->FinalizeInstructions(region); | 7158 assembler->FinalizeInstructions(region); |
| 7159 Dart_FileWriterFunction perf_events_writer = Dart::perf_events_writer(); | 7159 Dart_FileWriterFunction perf_events_writer = Dart::perf_events_writer(); |
| 7160 if (perf_events_writer != NULL) { | 7160 if (perf_events_writer != NULL) { |
| 7161 const char* format = "%x %x %s\n"; | 7161 const char* format = "%" PRIxPTR " %" PRIxPTR " %s\n"; |
| 7162 uword addr = instrs.EntryPoint(); | 7162 uword addr = instrs.EntryPoint(); |
| 7163 uword size = instrs.size(); | 7163 uword size = instrs.size(); |
| 7164 intptr_t len = OS::SNPrint(NULL, 0, format, addr, size, name); | 7164 intptr_t len = OS::SNPrint(NULL, 0, format, addr, size, name); |
| 7165 char* buffer = Isolate::Current()->current_zone()->Alloc<char>(len + 1); | 7165 char* buffer = Isolate::Current()->current_zone()->Alloc<char>(len + 1); |
| 7166 OS::SNPrint(buffer, len + 1, format, addr, size, name); | 7166 OS::SNPrint(buffer, len + 1, format, addr, size, name); |
| 7167 (*perf_events_writer)(buffer, len); | 7167 (*perf_events_writer)(buffer, len); |
| 7168 } | 7168 } |
| 7169 DebugInfo* pprof_symbol_generator = Dart::pprof_symbol_generator(); | 7169 DebugInfo* pprof_symbol_generator = Dart::pprof_symbol_generator(); |
| 7170 if (pprof_symbol_generator != NULL) { | 7170 if (pprof_symbol_generator != NULL) { |
| 7171 ASSERT(strlen(name) != 0); | 7171 ASSERT(strlen(name) != 0); |
| (...skipping 3963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11135 } | 11135 } |
| 11136 return result.raw(); | 11136 return result.raw(); |
| 11137 } | 11137 } |
| 11138 | 11138 |
| 11139 | 11139 |
| 11140 const char* WeakProperty::ToCString() const { | 11140 const char* WeakProperty::ToCString() const { |
| 11141 return "WeakProperty"; | 11141 return "WeakProperty"; |
| 11142 } | 11142 } |
| 11143 | 11143 |
| 11144 } // namespace dart | 11144 } // namespace dart |
| OLD | NEW |