Lines Matching refs:Method
67 unverifiable code. If class A refers to B, and B has a method that
100 has a method that creates a java.lang.String. The first time
180 Method* meth);
188 static void freeMethodInnards(Method* meth);
880 * passed into this method. "path" needs to be an absolute path (starting
1369 const Method* loadClass =
1854 * Load method definitions. We do this in two batches, direct then
1890 DexMethod method;
1893 newClass->directMethods = (Method*) dvmLinearAlloc(classLoader,
1894 count * sizeof(Method));
1896 dexReadClassDataMethod(&pEncodedData, &method, &lastIndex);
1897 loadMethodFromDex(newClass, &method, &newClass->directMethods[i]);
1914 DexMethod method;
1917 newClass->virtualMethods = (Method*) dvmLinearAlloc(classLoader,
1918 count * sizeof(Method));
1920 dexReadClassDataMethod(&pEncodedData, &method, &lastIndex);
1921 loadMethodFromDex(newClass, &method, &newClass->virtualMethods[i]);
2048 Method *directMethods = clazz->directMethods;
2060 Method *virtualMethods = clazz->virtualMethods;
2097 * Free anything in a Method that was allocated on the system heap.
2101 static void freeMethodInnards(Method* meth)
2129 * Clone a Method, making new copies of anything that will be freed up
2132 static void cloneMethod(Method* dst, const Method* src)
2139 memcpy(dst, src, sizeof(Method));
2149 Method* meth)
2166 * The Enum class declares a "final" finalize() method to
2227 void dvmMakeCodeReadWrite(Method* meth)
2256 void dvmMakeCodeReadOnly(Method* meth)
2756 /* no vtable; just set the method indices */
2779 * Populate interface method tables. Can alter the vtable.
2785 * Insert special-purpose "stub" method implementations.
2797 * Cache field and method info for the class Reference (as loaded
2858 * Create the virtual method table.
2894 clazz->vtable = (Method**) dvmLinearAlloc(clazz->classLoader,
2895 sizeof(Method*) * maxCount);
2910 Method* localMeth = &clazz->virtualMethods[i];
2914 Method* superMeth = clazz->vtable[si];
2920 LOGW("Method %s.%s overrides final %s.%s",
2939 //LOGV("+++ add method %s.%s",
2955 clazz->vtable = (Method **)dvmLinearRealloc(clazz->classLoader,
3015 Method** mirandaList = NULL;
3137 * need to convert the method reference into a vtable index. So, for
3186 * For each method listed in the interface's method list, find the
3187 * matching method in our class's method list. We want to favor the
3190 * superclass defines a private method and this class redefines
3192 * those don't end up in the virtual method table, so it shouldn't
3210 * abstract method declarations in MirandaAbstract.
3213 * so we accumulate the method list and do it all at once below.
3216 Method* imeth = &interface->virtualMethods[methIdx];
3255 mirandaList = (Method**)dvmLinearAlloc(
3257 mirandaAlloc * sizeof(Method*));
3260 mirandaList = (Method**)dvmLinearRealloc(
3262 mirandaList, mirandaAlloc * sizeof(Method*));
3268 * These may be redundant (e.g. method with same name and
3309 Method* newVirtualMethods;
3310 Method* meth;
3335 newVirtualMethods = (Method*) dvmLinearAlloc(clazz->classLoader,
3336 sizeof(Method) * (clazz->virtualMethodCount + mirandaCount));
3339 newVirtualMethods = (Method*) dvmLinearRealloc(clazz->classLoader,
3341 sizeof(Method) * (clazz->virtualMethodCount + mirandaCount));
3354 * method's methodIndex is the vtable index, and is the same
3358 * method declaration in it.
3362 Method* meth = newVirtualMethods;
3378 clazz->vtable = (Method**) dvmLinearRealloc(clazz->classLoader,
3380 sizeof(Method*) * (clazz->vtableCount + mirandaCount));
3392 * method definition from the interface and then replace a few
3395 * The Method will be an "abstract native", with nativeFunc set to
3407 /* point the new vtable entry at the new method */
3426 * that define the same method. (Not a problem if we only move the
3427 * zero-method interfaces to the end.)
3465 * NOTE: for Miranda methods, the method declaration is a clone of what
3469 * NOTE: this sets the "native" flag, giving us an "abstract native" method,
3478 Method* meth;
3967 * classes in method signatures during class init, so for now
3981 * For every component in the method descriptor, resolve the class in the
3988 static bool checkMethodDescriptorClasses(const Method* meth,
4021 * What we need to do is ensure that the classes named in the method
4028 * class Foo in a method signature (e.g. as the return type). Then,
4030 * different class loader. If the subclass overrides the method, it will
4032 * though the method signature strings are identical, they actually mean
4035 * A call to the method through a base-class reference would be treated
4036 * differently than a call to the method through a subclass reference, which
4038 * If the subclass doesn't override the base method, then there's no
4066 * Walk through every overridden method and compare resolved
4067 * descriptor components. We pull the Method structs out of
4079 const Method* meth;
4089 LOGW("Method mismatch: %s in %s (cl=%p) and super %s (cl=%p)",
4115 const Method* meth;
4122 LOGW("Method mismatch: %s in %s (cl=%p) and "
4236 const Method* method;
4466 method = dvmFindDirectMethodByDescriptor(clazz, "<clinit>", "()V");
4467 if (method == NULL) {
4472 dvmCallMethod(self, method, NULL, &unused);
4527 * Replace method->nativeFunc and method->insns with new values. This is
4528 * commonly performed after successful resolution of a native method.
4535 * nativeFunc must never be NULL for a native method.
4549 void dvmSetNativeFunc(Method* method, DalvikBridgeFunc func,
4552 ClassObject* clazz = method->clazz;
4562 method->insns = insns;
4564 (volatile int32_t*)(void*) &method->nativeFunc);
4567 method->nativeFunc = func;
4575 * Add a RegisterMap to a Method. This is done when we verify the class
4578 * and should be freed when the Method is discarded.
4580 void dvmSetRegisterMap(Method* method, const RegisterMap* pMap)
4582 ClassObject* clazz = method->clazz;
4584 method->registerMap != NULL) {
4587 method->clazz->descriptor, method->name);
4590 assert(!dvmIsNativeMethod(method) && !dvmIsAbstractMethod(method));
4596 method->registerMap = pMap;
4830 * Method Prototypes and Descriptors
4835 * Compare the two method names and prototypes, a la strcmp(). The
4839 int dvmCompareMethodNamesAndProtos(const Method* method1,
4840 const Method* method2)
4852 * Compare the two method names and prototypes, a la strcmp(), ignoring
4857 int dvmCompareMethodNamesAndParameterProtos(const Method* method1,
4858 const Method* method2)
4871 * a method, a la strcmp(). The name is considered the "major" order and
4876 const DexProto* proto, const Method* method)
4878 int result = strcmp(name, method->name);
4884 return dexProtoCompare(proto, &method->prototype);
4888 * Compare a (name, method descriptor) pair with the (name, prototype) of
4889 * a method, a la strcmp(). The name is considered the "major" order and
4894 const char* descriptor, const Method* method)
4896 int result = strcmp(name, method->name);
4902 return dvmCompareDescriptorAndMethodProto(descriptor, method);