| 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/bigint_operations.h" | 10 #include "vm/bigint_operations.h" |
| (...skipping 7148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7159 } | 7159 } |
| 7160 ASSERT(Object::code_class() != Class::null()); | 7160 ASSERT(Object::code_class() != Class::null()); |
| 7161 Code& result = Code::Handle(); | 7161 Code& result = Code::Handle(); |
| 7162 { | 7162 { |
| 7163 uword size = Code::InstanceSize(pointer_offsets_length); | 7163 uword size = Code::InstanceSize(pointer_offsets_length); |
| 7164 RawObject* raw = Object::Allocate(Code::kClassId, size, Heap::kOld); | 7164 RawObject* raw = Object::Allocate(Code::kClassId, size, Heap::kOld); |
| 7165 NoGCScope no_gc; | 7165 NoGCScope no_gc; |
| 7166 result ^= raw; | 7166 result ^= raw; |
| 7167 result.set_pointer_offsets_length(pointer_offsets_length); | 7167 result.set_pointer_offsets_length(pointer_offsets_length); |
| 7168 result.set_is_optimized(false); | 7168 result.set_is_optimized(false); |
| 7169 result.set_is_alive(true); |
| 7169 result.set_comments(Comments::New(0)); | 7170 result.set_comments(Comments::New(0)); |
| 7170 } | 7171 } |
| 7171 return result.raw(); | 7172 return result.raw(); |
| 7172 } | 7173 } |
| 7173 | 7174 |
| 7174 | 7175 |
| 7175 RawCode* Code::FinalizeCode(const char* name, Assembler* assembler) { | 7176 RawCode* Code::FinalizeCode(const char* name, Assembler* assembler) { |
| 7176 ASSERT(assembler != NULL); | 7177 ASSERT(assembler != NULL); |
| 7177 | 7178 |
| 7178 // Allocate the Instructions object. | 7179 // Allocate the Instructions object. |
| (...skipping 4020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11199 } | 11200 } |
| 11200 return result.raw(); | 11201 return result.raw(); |
| 11201 } | 11202 } |
| 11202 | 11203 |
| 11203 | 11204 |
| 11204 const char* WeakProperty::ToCString() const { | 11205 const char* WeakProperty::ToCString() const { |
| 11205 return "_WeakProperty"; | 11206 return "_WeakProperty"; |
| 11206 } | 11207 } |
| 11207 | 11208 |
| 11208 } // namespace dart | 11209 } // namespace dart |
| OLD | NEW |