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/snapshot.h" | 5 #include "vm/snapshot.h" |
6 | 6 |
7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
8 #include "vm/bootstrap.h" | 8 #include "vm/bootstrap.h" |
9 #include "vm/class_finalizer.h" | 9 #include "vm/class_finalizer.h" |
10 #include "vm/dart.h" | 10 #include "vm/dart.h" |
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 for (uword* cursor = reinterpret_cast<uword*>(beginning); | 769 for (uword* cursor = reinterpret_cast<uword*>(beginning); |
770 cursor < reinterpret_cast<uword*>(entry); | 770 cursor < reinterpret_cast<uword*>(entry); |
771 cursor++) { | 771 cursor++) { |
772 WriteWordLiteral(*cursor); | 772 WriteWordLiteral(*cursor); |
773 } | 773 } |
774 } | 774 } |
775 | 775 |
776 // 2. Write a label at the entry point. | 776 // 2. Write a label at the entry point. |
777 owner = code.owner(); | 777 owner = code.owner(); |
778 if (owner.IsNull()) { | 778 if (owner.IsNull()) { |
779 const char* name = StubCode::NameOfStub(insns.EntryPoint()); | 779 const char* name = StubCode::NameOfStub(insns.UncheckedEntryPoint()); |
780 assembly_stream_.Print("Precompiled_Stub_%s:\n", name); | 780 assembly_stream_.Print("Precompiled_Stub_%s:\n", name); |
781 } else if (owner.IsClass()) { | 781 } else if (owner.IsClass()) { |
782 str = Class::Cast(owner).Name(); | 782 str = Class::Cast(owner).Name(); |
783 const char* name = str.ToCString(); | 783 const char* name = str.ToCString(); |
784 EnsureIdentifier(const_cast<char*>(name)); | 784 EnsureIdentifier(const_cast<char*>(name)); |
785 assembly_stream_.Print("Precompiled_AllocationStub_%s_%" Pd ":\n", | 785 assembly_stream_.Print("Precompiled_AllocationStub_%s_%" Pd ":\n", |
786 name, i); | 786 name, i); |
787 } else if (owner.IsFunction()) { | 787 } else if (owner.IsFunction()) { |
788 const char* name = Function::Cast(owner).ToQualifiedCString(); | 788 const char* name = Function::Cast(owner).ToQualifiedCString(); |
789 EnsureIdentifier(const_cast<char*>(name)); | 789 EnsureIdentifier(const_cast<char*>(name)); |
(...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1935 if (setjmp(*jump.Set()) == 0) { | 1935 if (setjmp(*jump.Set()) == 0) { |
1936 NoSafepointScope no_safepoint; | 1936 NoSafepointScope no_safepoint; |
1937 WriteObject(obj.raw()); | 1937 WriteObject(obj.raw()); |
1938 } else { | 1938 } else { |
1939 ThrowException(exception_type(), exception_msg()); | 1939 ThrowException(exception_type(), exception_msg()); |
1940 } | 1940 } |
1941 } | 1941 } |
1942 | 1942 |
1943 | 1943 |
1944 } // namespace dart | 1944 } // namespace dart |
OLD | NEW |