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

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

Issue 1294113004: VM: Link native calls lazily. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: addressed comments Created 5 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
« no previous file with comments | « runtime/vm/instructions_arm.cc ('k') | runtime/vm/instructions_arm64.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 // Classes that describe assembly patterns as used by inline caches. 4 // Classes that describe assembly patterns as used by inline caches.
5 5
6 #ifndef VM_INSTRUCTIONS_ARM64_H_ 6 #ifndef VM_INSTRUCTIONS_ARM64_H_
7 #define VM_INSTRUCTIONS_ARM64_H_ 7 #define VM_INSTRUCTIONS_ARM64_H_
8 8
9 #ifndef VM_INSTRUCTIONS_H_ 9 #ifndef VM_INSTRUCTIONS_H_
10 #error Do not include instructions_arm64.h directly; use instructions.h instead. 10 #error Do not include instructions_arm64.h directly; use instructions.h instead.
11 #endif 11 #endif
12 12
13 #include "vm/constants_arm64.h" 13 #include "vm/constants_arm64.h"
14 #include "vm/native_entry.h"
14 #include "vm/object.h" 15 #include "vm/object.h"
15 16
16 namespace dart { 17 namespace dart {
17 18
18 class InstructionPattern : public AllStatic { 19 class InstructionPattern : public AllStatic {
19 public: 20 public:
20 // Decodes a load sequence ending at 'end' (the last instruction of the 21 // Decodes a load sequence ending at 'end' (the last instruction of the
21 // load sequence is the instruction before the one at end). Returns the 22 // load sequence is the instruction before the one at end). Returns the
22 // address of the first instruction in the sequence. Returns the register 23 // address of the first instruction in the sequence. Returns the register
23 // being loaded and the loaded object in the output parameters 'reg' and 24 // being loaded and the loaded object in the output parameters 'reg' and
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 uword end_; 76 uword end_;
76 uword ic_data_load_end_; 77 uword ic_data_load_end_;
77 78
78 intptr_t target_address_pool_index_; 79 intptr_t target_address_pool_index_;
79 ICData& ic_data_; 80 ICData& ic_data_;
80 81
81 DISALLOW_COPY_AND_ASSIGN(CallPattern); 82 DISALLOW_COPY_AND_ASSIGN(CallPattern);
82 }; 83 };
83 84
84 85
86 class NativeCallPattern : public ValueObject {
87 public:
88 NativeCallPattern(uword pc, const Code& code);
89
90 uword target() const;
91 void set_target(uword target_address) const;
92
93 NativeFunction native_function() const;
94 void set_native_function(NativeFunction target) const;
95
96 private:
97 const ObjectPool& object_pool_;
98
99 uword end_;
100 intptr_t native_function_pool_index_;
101 intptr_t target_address_pool_index_;
102
103 DISALLOW_COPY_AND_ASSIGN(NativeCallPattern);
104 };
105
106
85 class JumpPattern : public ValueObject { 107 class JumpPattern : public ValueObject {
86 public: 108 public:
87 JumpPattern(uword pc, const Code& code); 109 JumpPattern(uword pc, const Code& code);
88 110
89 static const int kLengthInBytes = 5 * Instr::kInstrSize; 111 static const int kLengthInBytes = 5 * Instr::kInstrSize;
90 112
91 int pattern_length_in_bytes() const { 113 int pattern_length_in_bytes() const {
92 return kLengthInBytes; 114 return kLengthInBytes;
93 } 115 }
94 116
(...skipping 21 matching lines...) Expand all
116 138
117 bool IsValid() const; 139 bool IsValid() const;
118 140
119 private: 141 private:
120 const uword pc_; 142 const uword pc_;
121 }; 143 };
122 144
123 } // namespace dart 145 } // namespace dart
124 146
125 #endif // VM_INSTRUCTIONS_ARM64_H_ 147 #endif // VM_INSTRUCTIONS_ARM64_H_
OLDNEW
« no previous file with comments | « runtime/vm/instructions_arm.cc ('k') | runtime/vm/instructions_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698