mirror of
https://github.com/corda/corda.git
synced 2025-01-16 01:40:17 +00:00
update references to class in fields and methods in updateBootstrapClass()
This commit is contained in:
parent
b8e009075c
commit
4020f13fb0
8
makefile
8
makefile
@ -36,7 +36,8 @@ stress-cflags = -DDEBUG_MEMORY -DDEBUG_MEMORY_MAJOR
|
||||
|
||||
cpp-objects = $(foreach x,$(1),$(patsubst $(2)/%.cpp,$(bld)/%.o,$(x)))
|
||||
asm-objects = $(foreach x,$(1),$(patsubst $(2)/%.S,$(bld)/%.o,$(x)))
|
||||
java-classes = $(foreach x,$(1),$(patsubst $(2)/%.java,$(bld)/%.class,$(x)))
|
||||
java-classes = \
|
||||
$(foreach x,$(1),$(patsubst $(2)/%.java,$(bld)/classes/%.class,$(x)))
|
||||
|
||||
stdcpp-sources = $(src)/stdc++.cpp
|
||||
stdcpp-objects = $(call cpp-objects,$(stdcpp-sources),$(src))
|
||||
@ -123,13 +124,12 @@ fast-objects = \
|
||||
fast-executable = $(bld)/fast-vm
|
||||
fast-cflags = $(fast) $(cflags)
|
||||
|
||||
classpath-sources = $(shell find %(classpath)/java -name '*.java')
|
||||
classpath-sources = $(shell find $(classpath)/java -name '*.java')
|
||||
classpath-classes = $(call java-classes,$(classpath-sources),$(classpath))
|
||||
|
||||
input = $(bld)/classes/TestExceptions.class
|
||||
input-depends = \
|
||||
$(bld)/classes/java/lang/System.class \
|
||||
$(bld)/classes/java/lang/Throwable.class \
|
||||
$(classpath-classes) \
|
||||
$(jni-library)
|
||||
|
||||
gen-run-arg = $(shell echo $(1) | sed -e 's:$(bld)/classes/\(.*\)\.class:\1:')
|
||||
|
14
src/vm.cpp
14
src/vm.cpp
@ -1996,6 +1996,20 @@ updateBootstrapClass(Thread* t, object bootstrapClass, object class_)
|
||||
|
||||
memcpy(bootstrapClass, class_, objectSize(t, class_) * BytesPerWord);
|
||||
|
||||
object fieldTable = classFieldTable(t, class_);
|
||||
if (fieldTable) {
|
||||
for (unsigned i = 0; i < arrayLength(t, fieldTable); ++i) {
|
||||
set(t, fieldClass(t, arrayBody(t, fieldTable, i)), bootstrapClass);
|
||||
}
|
||||
}
|
||||
|
||||
object methodTable = classMethodTable(t, class_);
|
||||
if (methodTable) {
|
||||
for (unsigned i = 0; i < arrayLength(t, methodTable); ++i) {
|
||||
set(t, methodClass(t, arrayBody(t, methodTable, i)), bootstrapClass);
|
||||
}
|
||||
}
|
||||
|
||||
enter(t, Thread::ActiveState);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user