Home | History | Annotate | Download | only in docs

Lines Matching full:code

19 Basic familiarity with the Android platform, source code structure, and
27 The native code in the core libraries (chiefly <code>libcore</code>,
28 but also <code>dalvik/vm/native</code>) is written in C/C++ and is expected
31 The core libraries pull in code from many other projects, including
54 The code lives in <code>dalvik/vm/arch/*</code>, with the FFI-based version
58 <code>void dvmPlatformInvoke(void* pEnv, ClassObject* clazz, int argInfo,
60 JValue* pReturn)</code>
64 <code>return_type func(JNIEnv* pEnv, Object* this [, <i>args</i>])<br></code>
66 <code>return_type func(JNIEnv* pEnv, ClassObject* clazz [, <i>args</i>])</code>
68 The role of <code>dvmPlatformInvoke</code> is to convert the values in
69 <code>argv</code> into C-style calling conventions, call the method, and
70 then place the return type into <code>pReturn</code> (a union that holds
71 all of the basic JNI types). The code may use the method signature
99 be controlled with the <code>dalvik.vm.execution-mode</code> system
102 <code>adb shell "echo dalvik.vm.execution-mode = int:portable >> /data/local.prop"</code>
132 or simply continue on to additional code outside the basic space. Some of
144 <code>dalvik/vm/mterp/out</code> directory.
146 The interpreter sources live in <code>dalvik/vm/mterp</code>. If you
147 haven't yet, you should read <code>dalvik/vm/mterp/README.txt</code> now.
157 let's call it <code>myarch</code>.
158 <li>Make a copy of <code>dalvik/vm/mterp/config-allstubs</code> to
159 <code>dalvik/vm/mterp/config-myarch</code>.
160 <li>Create a <code>dalvik/vm/mterp/myarch</code> directory to hold your
162 <li>Add <code>myarch</code> to the list in
163 <code>dalvik/vm/mterp/rebuild.sh</code>.
164 <li>Make sure <code>dalvik/vm/Android.mk</code> will find the files for
165 your architecture. If <code>$(TARGET_ARCH)</code> is configured this
169 <code>dalvik/vm/Dvm.mk</code> to always be <code>false</code>.
177 <li>In the <code>dalvik/vm/mterp</code> directory, regenerate the contents
178 of the files in <code>dalvik/vm/mterp/out</code> by executing
179 <code>./rebuild.sh</code>. Note there are two files, one in C and one
181 <li>In the <code>dalvik</code> directory, regenerate the
182 <code>libdvm.so</code> library with <code>mm</code>. You can also use
183 <code>mmm dalvik/vm</code> from the top of the tree.
187 a device with <code>adb sync</code> or <code>adb push</code>. If you're
188 using the emulator, you need to add <code>make snod</code> (System image,
193 works by examining <code>dalvik/vm/mterp/cstubs/entry.c</code>. The
194 code runs in a loop, pulling out the next opcode, and invoking the
211 <code>dalvik/vm/mterp/myarch/stub.S</code> that contains one line:
215 Then, in <code>dalvik/vm/mterp/config-myarch</code>, add this below the
216 <code>handler-size</code> directive:
222 Regenerate the sources with <code>./rebuild.sh</code>, and take a look
223 inside <code>dalvik/vm/mterp/out/InterpAsm-myarch.S</code>. You should
225 <code>dvmAsmInstructionStart</code> label. The <code>stub.S</code>
226 code will be used anywhere you don't provide an assembly implementation.
228 Note that each block begins with a <code>.balign 64</code> directive.
230 <code>${opcode}</code> text changed into an opcode name, which should
231 be used to call the C implementation (<code>dvmMterp_${opcode}</code>).
233 The actual contents of <code>stub.S</code> are up to you to define.
234 See <code>entry.S</code> and <code>stub.S</code> in the <code>armv5te</code>
235 or <code>x86</code> directories for working examples.
238 able to use most of the existing code and just provide replacements for
239 a few instructions. Look at the <code>vm/mterp/config-*</code> files
253 <code>dalvik/vm/mterp/c/OP_*</code>).
263 of <code>OP_NOP</code>. For demonstration purposes, fake it for now by
264 putting this into <code>dalvik/vm/mterp/myarch/OP_NOP.S</code>:
269 Then, in the <code>op-start</code> section of <code>config-myarch</code>, add:
275 <code>myarch</code> directory instead of the C version from the <code>c</code>
278 Execute <code>./rebuild.sh</code>. Look at <code>InterpAsm-myarch.S</code>
279 and <code>InterpC-myarch.c</code> in the <code>out</code> directory. You
280 will see that the <code>OP_NOP</code> stub wrapper has been replaced with our
281 new code in the assembly file, and the C stub implementation is no longer
288 <a href="porting-proto.c.txt">porting-proto.c</a> sample code can be
313 See the <code>entry.S</code> file in <code>x86</code> or <code>armv5te</code>
321 A number of VM tests can be found in <code>dalvik/tests</code>. The most
322 useful during interpreter development is <code>003-omnibus-opcodes</code>,
332 the test against your desktop VM by specifying <code>--reference</code>
334 <code>--portable</code> and <code>--fast</code> to explictly specify
337 Some instructions are replaced by <code>dexopt</code>, notably when
340 <code>--no-optimize</code> option.
345 call. For an example, look at <code>common_squeak</code> in
346 <code>dalvik/vm/mterp/armv5te/footer.S</code>.
358 The <code>System.arraycopy()</code> function is heavily used. The
366 See the comments in <code>dalvik/vm/native/java_lang_System.c</code>