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

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

Issue 23026004: Clean up VM class DartFunction. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/class_finalizer.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 VM_OBJECT_H_ 5 #ifndef VM_OBJECT_H_
6 #define VM_OBJECT_H_ 6 #define 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 5644 matching lines...) Expand 10 before | Expand all | Expand 10 after
5655 private: 5655 private:
5656 enum { 5656 enum {
5657 kTypeArguments = 1, 5657 kTypeArguments = 1,
5658 kDataOffset = 2, 5658 kDataOffset = 2,
5659 kOffsetInBytesOffset = 3, 5659 kOffsetInBytesOffset = 3,
5660 kLengthOffset = 4, 5660 kLengthOffset = 4,
5661 }; 5661 };
5662 }; 5662 };
5663 5663
5664 5664
5665 // DartFunction represents the abstract Dart class 'Function'.
5666 class DartFunction : public Instance {
5667 private:
5668 FINAL_HEAP_OBJECT_IMPLEMENTATION(DartFunction, Instance);
5669 friend class Class;
5670 friend class Instance;
5671 };
5672
5673
5674 class Closure : public AllStatic { 5665 class Closure : public AllStatic {
5675 public: 5666 public:
5676 static RawFunction* function(const Instance& closure) { 5667 static RawFunction* function(const Instance& closure) {
5677 return *FunctionAddr(closure); 5668 return *FunctionAddr(closure);
5678 } 5669 }
5679 static intptr_t function_offset() { 5670 static intptr_t function_offset() {
5680 return static_cast<intptr_t>(kFunctionOffset * kWordSize); 5671 return static_cast<intptr_t>(kFunctionOffset * kWordSize);
5681 } 5672 }
5682 5673
5683 static RawContext* context(const Instance& closure) { 5674 static RawContext* context(const Instance& closure) {
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
6058 6049
6059 6050
6060 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6051 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6061 intptr_t index) { 6052 intptr_t index) {
6062 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6053 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6063 } 6054 }
6064 6055
6065 } // namespace dart 6056 } // namespace dart
6066 6057
6067 #endif // VM_OBJECT_H_ 6058 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698