| 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/bigint_operations.h" | 5 #include "vm/bigint_operations.h" |
| 6 #include "vm/object.h" | 6 #include "vm/object.h" |
| 7 #include "vm/object_store.h" | 7 #include "vm/object_store.h" |
| 8 #include "vm/snapshot.h" | 8 #include "vm/snapshot.h" |
| 9 #include "vm/stub_code.h" | 9 #include "vm/stub_code.h" |
| 10 #include "vm/symbols.h" | 10 #include "vm/symbols.h" |
| 11 #include "vm/trace_buffer.h" | |
| 12 #include "vm/visitor.h" | 11 #include "vm/visitor.h" |
| 13 | 12 |
| 14 namespace dart { | 13 namespace dart { |
| 15 | 14 |
| 16 #define NEW_OBJECT(type) \ | 15 #define NEW_OBJECT(type) \ |
| 17 ((kind == Snapshot::kFull) ? reader->New##type() : type::New()) | 16 ((kind == Snapshot::kFull) ? reader->New##type() : type::New()) |
| 18 | 17 |
| 19 #define NEW_OBJECT_WITH_LEN(type, len) \ | 18 #define NEW_OBJECT_WITH_LEN(type, len) \ |
| 20 ((kind == Snapshot::kFull) ? reader->New##type(len) : type::New(len)) | 19 ((kind == Snapshot::kFull) ? reader->New##type(len) : type::New(len)) |
| 21 | 20 |
| (...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 // Set all the non object fields. | 694 // Set all the non object fields. |
| 696 func.set_token_pos(reader->ReadIntptrValue()); | 695 func.set_token_pos(reader->ReadIntptrValue()); |
| 697 func.set_end_token_pos(reader->ReadIntptrValue()); | 696 func.set_end_token_pos(reader->ReadIntptrValue()); |
| 698 func.set_usage_counter(reader->ReadIntptrValue()); | 697 func.set_usage_counter(reader->ReadIntptrValue()); |
| 699 func.set_num_fixed_parameters(reader->ReadIntptrValue()); | 698 func.set_num_fixed_parameters(reader->ReadIntptrValue()); |
| 700 func.set_num_optional_parameters(reader->ReadIntptrValue()); | 699 func.set_num_optional_parameters(reader->ReadIntptrValue()); |
| 701 func.set_deoptimization_counter(reader->ReadIntptrValue()); | 700 func.set_deoptimization_counter(reader->ReadIntptrValue()); |
| 702 func.set_kind_tag(reader->Read<uint16_t>()); | 701 func.set_kind_tag(reader->Read<uint16_t>()); |
| 703 func.set_optimized_instruction_count(reader->Read<uint16_t>()); | 702 func.set_optimized_instruction_count(reader->Read<uint16_t>()); |
| 704 func.set_optimized_call_site_count(reader->Read<uint16_t>()); | 703 func.set_optimized_call_site_count(reader->Read<uint16_t>()); |
| 705 func.set_log(new TraceBuffer()); | |
| 706 | 704 |
| 707 // Set all the object fields. | 705 // Set all the object fields. |
| 708 // TODO(5411462): Need to assert No GC can happen here, even though | 706 // TODO(5411462): Need to assert No GC can happen here, even though |
| 709 // allocations may happen. | 707 // allocations may happen. |
| 710 intptr_t num_flds = (func.raw()->to() - func.raw()->from()); | 708 intptr_t num_flds = (func.raw()->to() - func.raw()->from()); |
| 711 for (intptr_t i = 0; i <= num_flds; i++) { | 709 for (intptr_t i = 0; i <= num_flds; i++) { |
| 712 *(func.raw()->from() + i) = reader->ReadObjectRef(); | 710 *(func.raw()->from() + i) = reader->ReadObjectRef(); |
| 713 } | 711 } |
| 714 | 712 |
| 715 // TODO(zra): Remove when arm64 is ready. | 713 // TODO(zra): Remove when arm64 is ready. |
| (...skipping 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2712 // We do not allow objects with native fields in an isolate message. | 2710 // We do not allow objects with native fields in an isolate message. |
| 2713 writer->SetWriteException(Exceptions::kArgument, | 2711 writer->SetWriteException(Exceptions::kArgument, |
| 2714 "Illegal argument in isolate message" | 2712 "Illegal argument in isolate message" |
| 2715 " : (object is a UserTag)"); | 2713 " : (object is a UserTag)"); |
| 2716 } else { | 2714 } else { |
| 2717 UNREACHABLE(); | 2715 UNREACHABLE(); |
| 2718 } | 2716 } |
| 2719 } | 2717 } |
| 2720 | 2718 |
| 2721 } // namespace dart | 2719 } // namespace dart |
| OLD | NEW |