| 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" |
| 11 #include "vm/visitor.h" | 11 #include "vm/visitor.h" |
| 12 | 12 |
| 13 namespace dart { | 13 namespace dart { |
| 14 | 14 |
| 15 DECLARE_FLAG(int, optimization_counter_threshold); | |
| 16 DECLARE_FLAG(bool, use_field_guards); | |
| 17 | |
| 18 #define NEW_OBJECT(type) \ | 15 #define NEW_OBJECT(type) \ |
| 19 ((kind == Snapshot::kFull) ? reader->New##type() : type::New()) | 16 ((kind == Snapshot::kFull) ? reader->New##type() : type::New()) |
| 20 | 17 |
| 21 #define NEW_OBJECT_WITH_LEN(type, len) \ | 18 #define NEW_OBJECT_WITH_LEN(type, len) \ |
| 22 ((kind == Snapshot::kFull) ? reader->New##type(len) : type::New(len)) | 19 ((kind == Snapshot::kFull) ? reader->New##type(len) : type::New(len)) |
| 23 | 20 |
| 24 #define NEW_OBJECT_WITH_LEN_SPACE(type, len, kind) \ | 21 #define NEW_OBJECT_WITH_LEN_SPACE(type, len, kind) \ |
| 25 ((kind == Snapshot::kFull) ? \ | 22 ((kind == Snapshot::kFull) ? \ |
| 26 reader->New##type(len) : type::New(len, HEAP_SPACE(kind))) | 23 reader->New##type(len) : type::New(len, HEAP_SPACE(kind))) |
| 27 | 24 |
| (...skipping 3706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3734 // We do not allow objects with native fields in an isolate message. | 3731 // We do not allow objects with native fields in an isolate message. |
| 3735 writer->SetWriteException(Exceptions::kArgument, | 3732 writer->SetWriteException(Exceptions::kArgument, |
| 3736 "Illegal argument in isolate message" | 3733 "Illegal argument in isolate message" |
| 3737 " : (object is a UserTag)"); | 3734 " : (object is a UserTag)"); |
| 3738 } else { | 3735 } else { |
| 3739 UNREACHABLE(); | 3736 UNREACHABLE(); |
| 3740 } | 3737 } |
| 3741 } | 3738 } |
| 3742 | 3739 |
| 3743 } // namespace dart | 3740 } // namespace dart |
| OLD | NEW |