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

Unified Diff: runtime/vm/object.h

Issue 2901533002: [kernel] Stream everything. Replace .kernel_function with .kernel_offset (Closed)
Patch Set: Fix for bad merge Created 3 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/kernel_to_il.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 7419287d79927ee72997d5fb8c29efd0cf733fa9..c6715d6f58a6b5115d9d5ac45eef6cad6bc208bf 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -2627,17 +2627,17 @@ class Function : public Object {
#endif
}
- void* kernel_function() const {
+ intptr_t kernel_offset() const {
#if defined(DART_PRECOMPILED_RUNTIME)
- return NULL;
+ return 0;
#else
- return raw_ptr()->kernel_function_;
+ return raw_ptr()->kernel_offset_;
#endif
}
- void set_kernel_function(void* kernel_function) const {
+ void set_kernel_offset(intptr_t kernel_offset) const {
#if !defined(DART_PRECOMPILED_RUNTIME)
- StoreNonPointer(&raw_ptr()->kernel_function_, kernel_function);
+ StoreNonPointer(&raw_ptr()->kernel_offset_, kernel_offset);
#endif
}
@@ -3181,17 +3181,17 @@ class Field : public Object {
set_kind_bits(DoubleInitializedBit::update(value, raw_ptr()->kind_bits_));
}
- void* kernel_field() const {
+ intptr_t kernel_offset() const {
#if defined(DART_PRECOMPILED_RUNTIME)
return NULL;
#else
- return raw_ptr()->kernel_field_;
+ return raw_ptr()->kernel_offset_;
#endif
}
- void set_kernel_field(void* kernel_field) const {
+ void set_kernel_offset(intptr_t kernel_offset) const {
#if !defined(DART_PRECOMPILED_RUNTIME)
- StoreNonPointer(&raw_ptr()->kernel_field_, kernel_field);
+ StoreNonPointer(&raw_ptr()->kernel_offset_, kernel_offset);
#endif
}
@@ -3605,6 +3605,12 @@ class Script : public Object {
}
void set_compile_time_constants(const Array& value) const;
+ const uint8_t* kernel_data() { return raw_ptr()->kernel_data_; }
+ void set_kernel_data(const uint8_t* kernel_data) const;
+
+ intptr_t kernel_data_size() { return raw_ptr()->kernel_data_size_; }
+ void set_kernel_data_size(const intptr_t kernel_data_size) const;
+
RawTypedData* kernel_string_offsets() const {
return raw_ptr()->kernel_string_offsets_;
}
@@ -3843,13 +3849,13 @@ class Library : public Object {
void AddClassMetadata(const Class& cls,
const Object& tl_owner,
TokenPosition token_pos,
- kernel::TreeNode* kernel_node = NULL) const;
+ intptr_t kernel_offset = 0) const;
void AddFieldMetadata(const Field& field,
TokenPosition token_pos,
- kernel::TreeNode* kernel_node = NULL) const;
+ intptr_t kernel_offset = 0) const;
void AddFunctionMetadata(const Function& func,
TokenPosition token_pos,
- kernel::TreeNode* kernel_node = NULL) const;
+ intptr_t kernel_offset = 0) const;
void AddLibraryMetadata(const Object& tl_owner,
TokenPosition token_pos) const;
void AddTypeParameterMetadata(const TypeParameter& param,
@@ -4018,7 +4024,7 @@ class Library : public Object {
void AddMetadata(const Object& owner,
const String& name,
TokenPosition token_pos,
- kernel::TreeNode* kernel_node = NULL) const;
+ intptr_t kernel_offset = 0) const;
FINAL_HEAP_OBJECT_IMPLEMENTATION(Library, Object);
« no previous file with comments | « runtime/vm/kernel_to_il.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698