Skip to content

Commit 2da4ff8

Browse files
committed
Add static and default interface methods support
1 parent 18a569d commit 2da4ff8

File tree

6 files changed

+2
-32
lines changed

6 files changed

+2
-32
lines changed

test-app/build-tools/android-metadata-generator/src/src/com/telerik/metadata/ClassDirectory.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ private static void readDirectory(ClassDirectory dir, String path)
4040
throws IOException {
4141
List<File> subDirs = new ArrayList<File>();
4242
File currentDir = new File(path);
43-
File[] files = currentDir.listFiles();
44-
for (File file : files) {
43+
for (File file : currentDir.listFiles()) {
4544
if (file.isFile()) {
4645
String name = file.getName();
4746
if (name.endsWith(CLASS_EXT)) {

test-app/build-tools/android-metadata-generator/src/src/com/telerik/metadata/bcl/MethodInfo.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
import org.apache.bcel.classfile.Method;
77
import org.apache.bcel.generic.Type;
88

9-
import java.lang.reflect.Modifier;
10-
119
public class MethodInfo implements MethodDescriptor {
1210
private final Method m;
1311

test-app/runtime/src/main/cpp/DesugaredInterfaceCompanionClassNameResolver.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
//
2-
// Created by Vladimir Mutafov on 16.11.18.
3-
//
4-
51
#include "DesugaredInterfaceCompanionClassNameResolver.h"
62

73
std::string DesugaredInterfaceCompanionClassNameResolver::resolveD8InterfaceCompanionClassName(

test-app/runtime/src/main/cpp/DesugaredInterfaceCompanionClassNameResolver.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
//
2-
// Created by Vladimir Mutafov on 16.11.18.
3-
//
4-
51
#ifndef TEST_APP_DESUGAREDINTERFACECOMPANIONCLASSNAMERESOLVER_H
62
#define TEST_APP_DESUGAREDINTERFACECOMPANIONCLASSNAMERESOLVER_H
73

test-app/runtime/src/main/cpp/MetadataNode.cpp

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -424,22 +424,6 @@ vector<MetadataNode::MethodCallbackData*> MetadataNode::SetInstanceMethodsFromSt
424424

425425
uint8_t* curPtr = s_metadataReader.GetValueData() + treeNode->offsetValue + 1;
426426

427-
auto origin = Constants::APP_ROOT_FOLDER_PATH + GetOrCreateInternal(treeNode)->m_name;
428-
429-
if(origin == "/data/data/org.nativescript.tsapp/files/app/com/vm/java/statics/test/impl/CarProducer"){
430-
DEBUG_WRITE_FORCE("::entry CarProducer");
431-
for(int i= 0; i<baseInstanceMethodsCallbackData.size(); i+=1){
432-
auto asd = baseInstanceMethodsCallbackData.at(i);
433-
434-
for(int k=0; k<asd->candidates.size(); k+=1){
435-
auto entry22 = asd->candidates.at(k);
436-
DEBUG_WRITE_FORCE("::entry %s", entry22.name.c_str());
437-
}
438-
439-
}
440-
}
441-
442-
443427
auto nodeType = s_metadataReader.GetNodeType(treeNode);
444428

445429
auto curType = s_metadataReader.ReadTypeName(treeNode);
@@ -456,7 +440,7 @@ vector<MetadataNode::MethodCallbackData*> MetadataNode::SetInstanceMethodsFromSt
456440
string lastMethodName;
457441
MethodCallbackData* callbackData = nullptr;
458442

459-
//auto origin = Constants::APP_ROOT_FOLDER_PATH + GetOrCreateInternal(treeNode)->m_name;
443+
auto origin = Constants::APP_ROOT_FOLDER_PATH + GetOrCreateInternal(treeNode)->m_name;
460444
for (auto i = 0; i < instanceMethodCount; i++) {
461445
auto entry = s_metadataReader.ReadInstanceMethodEntry(&curPtr);
462446

@@ -476,7 +460,6 @@ vector<MetadataNode::MethodCallbackData*> MetadataNode::SetInstanceMethodsFromSt
476460
}
477461

478462
auto funcData = External::New(isolate, callbackData);
479-
DEBUG_WRITE_FORCE("::test!!!!!!!!!!!!!! %s :::::: %s",origin.c_str(), entry.name.c_str());
480463
auto funcTemplate = FunctionTemplate::New(isolate, MethodCallback, funcData);
481464

482465
auto funcName = ConvertToV8String(entry.name);

test-app/runtime/src/main/cpp/com_tns_Runtime.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#include "Runtime.h"
33
#include "NativeScriptException.h"
44
#include "CallbackHandlers.h"
5-
#include "NativeScriptAssert.h"
6-
#include "ArgConverter.h"
75
#include <sstream>
86

97
using namespace std;

0 commit comments

Comments
 (0)