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

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

Issue 1850653003: Provide ability to patch external functions in a class that has already been finalized. The follow… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code-review Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/parser.cc ('k') | no next file » | 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 VM_RAW_OBJECT_H_ 5 #ifndef VM_RAW_OBJECT_H_
6 #define VM_RAW_OBJECT_H_ 6 #define VM_RAW_OBJECT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/atomic.h" 9 #include "vm/atomic.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 DISALLOW_IMPLICIT_CONSTRUCTORS(RawObject); 670 DISALLOW_IMPLICIT_CONSTRUCTORS(RawObject);
671 }; 671 };
672 672
673 673
674 class RawClass : public RawObject { 674 class RawClass : public RawObject {
675 public: 675 public:
676 enum ClassFinalizedState { 676 enum ClassFinalizedState {
677 kAllocated = 0, // Initial state. 677 kAllocated = 0, // Initial state.
678 kPreFinalized, // VM classes: size precomputed, but no checks done. 678 kPreFinalized, // VM classes: size precomputed, but no checks done.
679 kFinalized, // Class parsed, finalized and ready for use. 679 kFinalized, // Class parsed, finalized and ready for use.
680 kRefinalizeAfterPatch, // Class needs to be refinalized (patched).
680 }; 681 };
681 682
682 private: 683 private:
683 RAW_HEAP_OBJECT_IMPLEMENTATION(Class); 684 RAW_HEAP_OBJECT_IMPLEMENTATION(Class);
684 685
685 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } 686 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); }
686 RawString* name_; 687 RawString* name_;
687 NOT_IN_PRODUCT(RawString* user_name_); 688 NOT_IN_PRODUCT(RawString* user_name_);
688 RawArray* functions_; 689 RawArray* functions_;
689 RawArray* functions_hash_table_; 690 RawArray* functions_hash_table_;
(...skipping 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after
2365 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 2366 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
2366 kTypedDataInt8ArrayViewCid + 15); 2367 kTypedDataInt8ArrayViewCid + 15);
2367 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2368 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2368 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2369 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2369 return (kNullCid - kTypedDataInt8ArrayCid); 2370 return (kNullCid - kTypedDataInt8ArrayCid);
2370 } 2371 }
2371 2372
2372 } // namespace dart 2373 } // namespace dart
2373 2374
2374 #endif // VM_RAW_OBJECT_H_ 2375 #endif // VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698