| 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/native_entry.h" | 5 #include "vm/native_entry.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" |
| (...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 field.set_guarded_cid(reader->Read<int32_t>()); | 865 field.set_guarded_cid(reader->Read<int32_t>()); |
| 866 field.set_is_nullable(reader->Read<int32_t>()); | 866 field.set_is_nullable(reader->Read<int32_t>()); |
| 867 field.set_kind_bits(reader->Read<uint8_t>()); | 867 field.set_kind_bits(reader->Read<uint8_t>()); |
| 868 field.set_kernel_field(NULL); | 868 field.set_kernel_field(NULL); |
| 869 | 869 |
| 870 // Set all the object fields. | 870 // Set all the object fields. |
| 871 READ_OBJECT_FIELDS(field, field.raw()->from(), field.raw()->to_snapshot(kind), | 871 READ_OBJECT_FIELDS(field, field.raw()->from(), field.raw()->to_snapshot(kind), |
| 872 kAsReference); | 872 kAsReference); |
| 873 field.StorePointer(&field.raw_ptr()->dependent_code_, Array::null()); | 873 field.StorePointer(&field.raw_ptr()->dependent_code_, Array::null()); |
| 874 | 874 |
| 875 if (!FLAG_use_field_guards) { | 875 if (!reader->isolate()->use_field_guards()) { |
| 876 field.set_guarded_cid(kDynamicCid); | 876 field.set_guarded_cid(kDynamicCid); |
| 877 field.set_is_nullable(true); | 877 field.set_is_nullable(true); |
| 878 field.set_guarded_list_length(Field::kNoFixedLength); | 878 field.set_guarded_list_length(Field::kNoFixedLength); |
| 879 field.set_guarded_list_length_in_object_offset(Field::kUnknownLengthOffset); | 879 field.set_guarded_list_length_in_object_offset(Field::kUnknownLengthOffset); |
| 880 } else { | 880 } else { |
| 881 field.InitializeGuardedListLengthInObjectOffset(); | 881 field.InitializeGuardedListLengthInObjectOffset(); |
| 882 } | 882 } |
| 883 | 883 |
| 884 return field.raw(); | 884 return field.raw(); |
| 885 } | 885 } |
| (...skipping 2182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3068 // We do not allow objects with native fields in an isolate message. | 3068 // We do not allow objects with native fields in an isolate message. |
| 3069 writer->SetWriteException(Exceptions::kArgument, | 3069 writer->SetWriteException(Exceptions::kArgument, |
| 3070 "Illegal argument in isolate message" | 3070 "Illegal argument in isolate message" |
| 3071 " : (object is a UserTag)"); | 3071 " : (object is a UserTag)"); |
| 3072 } else { | 3072 } else { |
| 3073 UNREACHABLE(); | 3073 UNREACHABLE(); |
| 3074 } | 3074 } |
| 3075 } | 3075 } |
| 3076 | 3076 |
| 3077 } // namespace dart | 3077 } // namespace dart |
| OLD | NEW |