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

Unified Diff: runtime/vm/object.h

Issue 1410363005: Make ICData changes thread safe (first compute array, then set it). Install code in the main thread… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address comments Created 5 years, 2 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/isolate.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 72ca988e705b503c6098eaa2e2ba777e586496ad..f659536a8cf468f2f47ce657ceca65f8e0587d41 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -2024,7 +2024,7 @@ class ICData : public Object {
void set_arguments_descriptor(const Array& value) const;
void set_deopt_id(intptr_t value) const;
void SetNumArgsTested(intptr_t value) const;
- void set_ic_data(const Array& value) const;
+ void set_ic_data_array(const Array& value) const;
void set_state_bits(uint32_t bits) const;
enum {
@@ -2051,7 +2051,7 @@ class ICData : public Object {
#endif // DEBUG
intptr_t TestEntryLength() const;
- void WriteSentinel(const Array& data) const;
+ static void WriteSentinel(const Array& data, intptr_t test_entry_length);
FINAL_HEAP_OBJECT_IMPLEMENTATION(ICData, Object);
friend class Class;
@@ -2137,7 +2137,9 @@ class Function : public Object {
RawArray* parameter_names() const { return raw_ptr()->parameter_names_; }
void set_parameter_names(const Array& value) const;
+ // Not thread-safe; must be called in the main thread.
// Sets function's code and code's function.
+ void InstallOptimizedCode(const Code& code, bool is_osr) const;
void AttachCode(const Code& value) const;
void SetInstructions(const Code& value) const;
void ClearCode() const;
@@ -2664,6 +2666,7 @@ FOR_EACH_FUNCTION_KIND_BIT(DEFINE_ACCESSORS)
private:
void set_ic_data_array(const Array& value) const;
+ void SetInstructionsSafe(const Code& value) const;
enum KindTagBits {
kKindTagPos = 0,
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698