| 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/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 20073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 20084 | 20084 |
| 20085 | 20085 |
| 20086 void Capability::PrintJSONImpl(JSONStream* stream, bool ref) const { | 20086 void Capability::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 20087 Instance::PrintJSONImpl(stream, ref); | 20087 Instance::PrintJSONImpl(stream, ref); |
| 20088 } | 20088 } |
| 20089 | 20089 |
| 20090 | 20090 |
| 20091 RawReceivePort* ReceivePort::New(Dart_Port id, | 20091 RawReceivePort* ReceivePort::New(Dart_Port id, |
| 20092 bool is_control_port, | 20092 bool is_control_port, |
| 20093 Heap::Space space) { | 20093 Heap::Space space) { |
| 20094 ASSERT(id != DART_ILLEGAL_PORT); | 20094 ASSERT(id != ILLEGAL_PORT); |
| 20095 Isolate* isolate = Isolate::Current(); | 20095 Isolate* isolate = Isolate::Current(); |
| 20096 const SendPort& send_port = | 20096 const SendPort& send_port = |
| 20097 SendPort::Handle(isolate, SendPort::New(id, isolate->origin_id())); | 20097 SendPort::Handle(isolate, SendPort::New(id, isolate->origin_id())); |
| 20098 | 20098 |
| 20099 ReceivePort& result = ReceivePort::Handle(isolate); | 20099 ReceivePort& result = ReceivePort::Handle(isolate); |
| 20100 { | 20100 { |
| 20101 RawObject* raw = Object::Allocate(ReceivePort::kClassId, | 20101 RawObject* raw = Object::Allocate(ReceivePort::kClassId, |
| 20102 ReceivePort::InstanceSize(), | 20102 ReceivePort::InstanceSize(), |
| 20103 space); | 20103 space); |
| 20104 NoSafepointScope no_safepoint; | 20104 NoSafepointScope no_safepoint; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 20125 | 20125 |
| 20126 | 20126 |
| 20127 RawSendPort* SendPort::New(Dart_Port id, Heap::Space space) { | 20127 RawSendPort* SendPort::New(Dart_Port id, Heap::Space space) { |
| 20128 return New(id, Isolate::Current()->origin_id(), space); | 20128 return New(id, Isolate::Current()->origin_id(), space); |
| 20129 } | 20129 } |
| 20130 | 20130 |
| 20131 | 20131 |
| 20132 RawSendPort* SendPort::New(Dart_Port id, | 20132 RawSendPort* SendPort::New(Dart_Port id, |
| 20133 Dart_Port origin_id, | 20133 Dart_Port origin_id, |
| 20134 Heap::Space space) { | 20134 Heap::Space space) { |
| 20135 ASSERT(id != DART_ILLEGAL_PORT); | 20135 ASSERT(id != ILLEGAL_PORT); |
| 20136 SendPort& result = SendPort::Handle(); | 20136 SendPort& result = SendPort::Handle(); |
| 20137 { | 20137 { |
| 20138 RawObject* raw = Object::Allocate(SendPort::kClassId, | 20138 RawObject* raw = Object::Allocate(SendPort::kClassId, |
| 20139 SendPort::InstanceSize(), | 20139 SendPort::InstanceSize(), |
| 20140 space); | 20140 space); |
| 20141 NoSafepointScope no_safepoint; | 20141 NoSafepointScope no_safepoint; |
| 20142 result ^= raw; | 20142 result ^= raw; |
| 20143 result.StoreNonPointer(&result.raw_ptr()->id_, id); | 20143 result.StoreNonPointer(&result.raw_ptr()->id_, id); |
| 20144 result.StoreNonPointer(&result.raw_ptr()->origin_id_, origin_id); | 20144 result.StoreNonPointer(&result.raw_ptr()->origin_id_, origin_id); |
| 20145 } | 20145 } |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 20730 return tag_label.ToCString(); | 20730 return tag_label.ToCString(); |
| 20731 } | 20731 } |
| 20732 | 20732 |
| 20733 | 20733 |
| 20734 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 20734 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 20735 Instance::PrintJSONImpl(stream, ref); | 20735 Instance::PrintJSONImpl(stream, ref); |
| 20736 } | 20736 } |
| 20737 | 20737 |
| 20738 | 20738 |
| 20739 } // namespace dart | 20739 } // namespace dart |
| OLD | NEW |