Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Side by Side Diff: runtime/vm/object.h

Issue 2525623002: VM: [Kernel] Split kernel API into 3 steps: ([read binary], parse-binary, bootstrap, load program) (Closed)
Patch Set: addressed comments Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/kernel_reader.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef RUNTIME_VM_OBJECT_H_ 5 #ifndef RUNTIME_VM_OBJECT_H_
6 #define RUNTIME_VM_OBJECT_H_ 6 #define RUNTIME_VM_OBJECT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 11 matching lines...) Expand all
22 #include "vm/raw_object.h" 22 #include "vm/raw_object.h"
23 #include "vm/report.h" 23 #include "vm/report.h"
24 #include "vm/scanner.h" 24 #include "vm/scanner.h"
25 #include "vm/tags.h" 25 #include "vm/tags.h"
26 #include "vm/thread.h" 26 #include "vm/thread.h"
27 #include "vm/token_position.h" 27 #include "vm/token_position.h"
28 28
29 namespace dart { 29 namespace dart {
30 30
31 // Forward declarations. 31 // Forward declarations.
32 namespace kernel {
33 class Program;
34 }
35
32 #define DEFINE_FORWARD_DECLARATION(clazz) class clazz; 36 #define DEFINE_FORWARD_DECLARATION(clazz) class clazz;
33 CLASS_LIST(DEFINE_FORWARD_DECLARATION) 37 CLASS_LIST(DEFINE_FORWARD_DECLARATION)
34 #undef DEFINE_FORWARD_DECLARATION 38 #undef DEFINE_FORWARD_DECLARATION
35 class Api; 39 class Api;
36 class ArgumentsDescriptor; 40 class ArgumentsDescriptor;
37 class Assembler; 41 class Assembler;
38 class Closure; 42 class Closure;
39 class Code; 43 class Code;
40 class DisassemblyFormatter; 44 class DisassemblyFormatter;
41 class DeoptInstr; 45 class DeoptInstr;
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 } 524 }
521 static RawClass* subtypetestcache_class() { return subtypetestcache_class_; } 525 static RawClass* subtypetestcache_class() { return subtypetestcache_class_; }
522 526
523 // Initialize the VM isolate. 527 // Initialize the VM isolate.
524 static void InitNull(Isolate* isolate); 528 static void InitNull(Isolate* isolate);
525 static void InitOnce(Isolate* isolate); 529 static void InitOnce(Isolate* isolate);
526 static void FinalizeVMIsolate(Isolate* isolate); 530 static void FinalizeVMIsolate(Isolate* isolate);
527 531
528 // Initialize a new isolate either from a Kernel IR, from source, or from a 532 // Initialize a new isolate either from a Kernel IR, from source, or from a
529 // snapshot. 533 // snapshot.
530 static RawError* Init(Isolate* isolate, 534 static RawError* Init(Isolate* isolate, kernel::Program* program);
531 const uint8_t* kernel,
532 intptr_t kernel_length);
533 535
534 static void MakeUnusedSpaceTraversable(const Object& obj, 536 static void MakeUnusedSpaceTraversable(const Object& obj,
535 intptr_t original_size, 537 intptr_t original_size,
536 intptr_t used_size); 538 intptr_t used_size);
537 539
538 static intptr_t InstanceSize() { 540 static intptr_t InstanceSize() {
539 return RoundedAllocationSize(sizeof(RawObject)); 541 return RoundedAllocationSize(sizeof(RawObject));
540 } 542 }
541 543
542 static void VerifyBuiltinVtables(); 544 static void VerifyBuiltinVtables();
(...skipping 8321 matching lines...) Expand 10 before | Expand all | Expand 10 after
8864 8866
8865 inline void TypeArguments::SetHash(intptr_t value) const { 8867 inline void TypeArguments::SetHash(intptr_t value) const {
8866 // This is only safe because we create a new Smi, which does not cause 8868 // This is only safe because we create a new Smi, which does not cause
8867 // heap allocation. 8869 // heap allocation.
8868 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); 8870 StoreSmi(&raw_ptr()->hash_, Smi::New(value));
8869 } 8871 }
8870 8872
8871 } // namespace dart 8873 } // namespace dart
8872 8874
8873 #endif // RUNTIME_VM_OBJECT_H_ 8875 #endif // RUNTIME_VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/kernel_reader.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698