| 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 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1365 | 1365 |
| 1366 ClassFinalizer::VerifyBootstrapClasses(); | 1366 ClassFinalizer::VerifyBootstrapClasses(); |
| 1367 MarkInvisibleFunctions(); | 1367 MarkInvisibleFunctions(); |
| 1368 | 1368 |
| 1369 // Set up the intrinsic state of all functions (core, math and typed data). | 1369 // Set up the intrinsic state of all functions (core, math and typed data). |
| 1370 Intrinsifier::InitializeState(); | 1370 Intrinsifier::InitializeState(); |
| 1371 | 1371 |
| 1372 // Set up recognized state of all functions (core, math and typed data). | 1372 // Set up recognized state of all functions (core, math and typed data). |
| 1373 MethodRecognizer::InitializeState(); | 1373 MethodRecognizer::InitializeState(); |
| 1374 | 1374 |
| 1375 // Adds static const fields (class ids) to the class 'ClassID'); |
| 1376 lib = Library::LookupLibrary(Symbols::DartInternal()); |
| 1377 ASSERT(!lib.IsNull()); |
| 1378 cls = lib.LookupClassAllowPrivate(Symbols::ClassID()); |
| 1379 ASSERT(!cls.IsNull()); |
| 1380 Field& field = Field::Handle(isolate); |
| 1381 Smi& value = Smi::Handle(isolate); |
| 1382 String& field_name = String::Handle(isolate); |
| 1383 |
| 1384 #define CLASS_LIST_WITH_NULL(V) \ |
| 1385 V(Null) \ |
| 1386 CLASS_LIST_NO_OBJECT(V) |
| 1387 |
| 1388 #define ADD_SET_FIELD(clazz) \ |
| 1389 field_name = Symbols::New("cid"#clazz); \ |
| 1390 field = Field::New(field_name, true, false, true, cls, 0); \ |
| 1391 value = Smi::New(k##clazz##Cid); \ |
| 1392 field.set_value(value); \ |
| 1393 field.set_type(Type::Handle(Type::IntType())); \ |
| 1394 cls.AddField(field); \ |
| 1395 |
| 1396 CLASS_LIST_WITH_NULL(ADD_SET_FIELD) |
| 1397 #undef ADD_SET_FIELD |
| 1398 |
| 1375 return Error::null(); | 1399 return Error::null(); |
| 1376 } | 1400 } |
| 1377 | 1401 |
| 1378 | 1402 |
| 1379 void Object::InitFromSnapshot(Isolate* isolate) { | 1403 void Object::InitFromSnapshot(Isolate* isolate) { |
| 1380 TIMERSCOPE(isolate, time_bootstrap); | 1404 TIMERSCOPE(isolate, time_bootstrap); |
| 1381 ObjectStore* object_store = isolate->object_store(); | 1405 ObjectStore* object_store = isolate->object_store(); |
| 1382 | 1406 |
| 1383 Class& cls = Class::Handle(); | 1407 Class& cls = Class::Handle(); |
| 1384 | 1408 |
| (...skipping 17670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19055 return tag_label.ToCString(); | 19079 return tag_label.ToCString(); |
| 19056 } | 19080 } |
| 19057 | 19081 |
| 19058 | 19082 |
| 19059 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 19083 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 19060 Instance::PrintJSONImpl(stream, ref); | 19084 Instance::PrintJSONImpl(stream, ref); |
| 19061 } | 19085 } |
| 19062 | 19086 |
| 19063 | 19087 |
| 19064 } // namespace dart | 19088 } // namespace dart |
| OLD | NEW |