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

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

Issue 2719603002: Rename Closure instance field type_arguments_ to instantiator_. (Closed)
Patch Set: work in progress Created 3 years, 9 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/precompiler.cc ('k') | runtime/vm/simulator_dbc.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_RAW_OBJECT_H_ 5 #ifndef RUNTIME_VM_RAW_OBJECT_H_
6 #define RUNTIME_VM_RAW_OBJECT_H_ 6 #define RUNTIME_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 1764 matching lines...) Expand 10 before | Expand all | Expand 10 after
1775 return reinterpret_cast<RawObject**>(&ptr()->mixin_types_); 1775 return reinterpret_cast<RawObject**>(&ptr()->mixin_types_);
1776 } 1776 }
1777 }; 1777 };
1778 1778
1779 1779
1780 class RawClosure : public RawInstance { 1780 class RawClosure : public RawInstance {
1781 private: 1781 private:
1782 RAW_HEAP_OBJECT_IMPLEMENTATION(Closure); 1782 RAW_HEAP_OBJECT_IMPLEMENTATION(Closure);
1783 1783
1784 RawObject** from() { 1784 RawObject** from() {
1785 return reinterpret_cast<RawObject**>(&ptr()->type_arguments_); 1785 return reinterpret_cast<RawObject**>(&ptr()->instantiator_);
1786 } 1786 }
1787 1787
1788 RawTypeArguments* type_arguments_; 1788 // No instance fields should be declared before the following 3 fields whose
1789 // offsets must be identical in Dart and C++.
1790
1791 // These 3 fields are also declared in the Dart source of class _Closure.
1792 RawTypeArguments* instantiator_;
1789 RawFunction* function_; 1793 RawFunction* function_;
1790 RawContext* context_; 1794 RawContext* context_;
1791 1795
1792 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->context_); } 1796 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->context_); }
1793 }; 1797 };
1794 1798
1795 1799
1796 class RawNumber : public RawInstance { 1800 class RawNumber : public RawInstance {
1797 RAW_OBJECT_IMPLEMENTATION(Number); 1801 RAW_OBJECT_IMPLEMENTATION(Number);
1798 }; 1802 };
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
2433 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 2437 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
2434 kTypedDataInt8ArrayViewCid + 15); 2438 kTypedDataInt8ArrayViewCid + 15);
2435 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2439 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2436 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2440 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2437 return (kNullCid - kTypedDataInt8ArrayCid); 2441 return (kNullCid - kTypedDataInt8ArrayCid);
2438 } 2442 }
2439 2443
2440 } // namespace dart 2444 } // namespace dart
2441 2445
2442 #endif // RUNTIME_VM_RAW_OBJECT_H_ 2446 #endif // RUNTIME_VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/precompiler.cc ('k') | runtime/vm/simulator_dbc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698