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

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

Issue 11418046: First part of static call cleanup: store static call targets into code object, referenced by code-o… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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/native_entry_test.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 2468 matching lines...) Expand 10 before | Expand all | Expand 10 after
2479 return raw_ptr()->object_table_; 2479 return raw_ptr()->object_table_;
2480 } 2480 }
2481 void set_object_table(const Array& array) const; 2481 void set_object_table(const Array& array) const;
2482 2482
2483 RawArray* stackmaps() const { 2483 RawArray* stackmaps() const {
2484 return raw_ptr()->stackmaps_; 2484 return raw_ptr()->stackmaps_;
2485 } 2485 }
2486 void set_stackmaps(const Array& maps) const; 2486 void set_stackmaps(const Array& maps) const;
2487 RawStackmap* GetStackmap(uword pc, Array* stackmaps, Stackmap* map) const; 2487 RawStackmap* GetStackmap(uword pc, Array* stackmaps, Stackmap* map) const;
2488 2488
2489 RawGrowableObjectArray* resolved_static_calls() const { 2489 enum {
2490 return raw_ptr()->resolved_static_calls_; 2490 kSCallTableOffsetEntry = 0,
2491 kSCallTableFunctionEntry = 1,
2492 kSCallTableCodeEntry = 2,
2493 kSCallTableEntryLength = 3,
2494 };
2495
2496 void set_static_calls_target_table(const Array& value) const;
2497 RawArray* static_calls_target_table() const {
2498 return raw_ptr()->static_calls_target_table_;
2491 } 2499 }
2492 void set_resolved_static_calls(const GrowableObjectArray& val) const; 2500
2501 // Returns null if there is no static call at 'pc'.
2502 RawFunction* GetStaticCallTargetFunctionAt(uword pc) const;
2503 // Aborts if there is no static call at 'pc'.
2504 void SetStaticCallTargetCodeAt(uword pc, const Code& code) const;
2493 2505
2494 class Comments : public ZoneAllocated { 2506 class Comments : public ZoneAllocated {
2495 public: 2507 public:
2496 static Comments& New(intptr_t count); 2508 static Comments& New(intptr_t count);
2497 2509
2498 intptr_t Length() const; 2510 intptr_t Length() const;
2499 2511
2500 void SetPCOffsetAt(intptr_t idx, intptr_t pc_offset); 2512 void SetPCOffsetAt(intptr_t idx, intptr_t pc_offset);
2501 void SetCommentAt(intptr_t idx, const String& comment); 2513 void SetCommentAt(intptr_t idx, const String& comment);
2502 2514
(...skipping 3418 matching lines...) Expand 10 before | Expand all | Expand 10 after
5921 if (this->CharAt(i) != str.CharAt(begin_index + i)) { 5933 if (this->CharAt(i) != str.CharAt(begin_index + i)) {
5922 return false; 5934 return false;
5923 } 5935 }
5924 } 5936 }
5925 return true; 5937 return true;
5926 } 5938 }
5927 5939
5928 } // namespace dart 5940 } // namespace dart
5929 5941
5930 #endif // VM_OBJECT_H_ 5942 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/native_entry_test.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698