mirror of
https://github.com/corda/corda.git
synced 2025-02-27 03:27:34 +00:00
fix allocation of large objects in allocate2(); remove references to jscheme and SWT in makefile and test directory
This commit is contained in:
parent
cc84e61561
commit
cd990969cd
44
makefile
44
makefile
@ -15,11 +15,8 @@ cls = build/classes
|
|||||||
src = src
|
src = src
|
||||||
classpath = classpath
|
classpath = classpath
|
||||||
test = test
|
test = test
|
||||||
jscheme = $(HOME)/p/jscheme-7.2/src
|
|
||||||
swt = $(HOME)/p/swt-3.3-$(arch)/bin
|
|
||||||
|
|
||||||
input = $(cls)/GC.class
|
input = $(cls)/GC.class
|
||||||
swt-input = $(cls)/HelloSWT.class
|
|
||||||
|
|
||||||
cxx = g++
|
cxx = g++
|
||||||
cc = gcc
|
cc = gcc
|
||||||
@ -138,15 +135,10 @@ class-names = $(foreach x,$(1),$(call class-name,$(x)))
|
|||||||
flags = -cp $(cls)
|
flags = -cp $(cls)
|
||||||
args = $(flags) $(call class-name,$(input))
|
args = $(flags) $(call class-name,$(input))
|
||||||
|
|
||||||
jscheme-command = jscheme/REPL build/make.scm -main commandMain ""
|
|
||||||
|
|
||||||
swt-command = $(call class-name,$(swt-input))
|
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: $(executable) $(classpath-objects)
|
build: $(executable) $(classpath-objects)
|
||||||
|
|
||||||
$(input): $(classpath-objects)
|
$(input): $(classpath-objects)
|
||||||
$(swt-input): $(classpath-objects)
|
|
||||||
|
|
||||||
.PHONY: run
|
.PHONY: run
|
||||||
run: $(executable) $(input)
|
run: $(executable) $(input)
|
||||||
@ -162,41 +154,9 @@ vg: $(executable) $(input)
|
|||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: $(executable) $(classpath-objects) $(test-classes)
|
test: $(executable) $(classpath-objects) $(test-classes)
|
||||||
LD_LIBRARY_PATH=$(bld) /bin/bash $(test)/test.sh \
|
LD_LIBRARY_PATH=$(bld) /bin/bash $(test)/test.sh 2>/dev/null \
|
||||||
$(<) $(mode) "$(flags)" $(call class-names,$(test-classes))
|
$(<) $(mode) "$(flags)" $(call class-names,$(test-classes))
|
||||||
|
|
||||||
.PHONY: run-jscheme
|
|
||||||
run-jscheme: $(executable)
|
|
||||||
LD_LIBRARY_PATH=$(bld) $(<) -cp $(cls):$(jscheme) $(jscheme-command)
|
|
||||||
|
|
||||||
.PHONY: debug-jscheme
|
|
||||||
debug-jscheme: $(executable)
|
|
||||||
LD_LIBRARY_PATH=$(bld) $(db) $(<) -cp $(cls):$(jscheme) $(jscheme-command)
|
|
||||||
|
|
||||||
.PHONY: vg-jscheme
|
|
||||||
vg-jscheme: $(executable)
|
|
||||||
LD_LIBRARY_PATH=$(bld) $(vg) $(<) -cp $(cls):$(jscheme) $(jscheme-command)
|
|
||||||
|
|
||||||
.PHONY: profile-jscheme
|
|
||||||
profile-jscheme: $(executable)
|
|
||||||
opcontrol --start; \
|
|
||||||
echo '(+ 5 6)' | LD_LIBRARY_PATH=$(bld) \
|
|
||||||
$(<) -cp $(cls):$(jscheme) jscheme/REPL; \
|
|
||||||
opcontrol --stop; \
|
|
||||||
opreport -l $(<)
|
|
||||||
|
|
||||||
.PHONY: run-swt
|
|
||||||
run-swt: $(executable) $(swt-input)
|
|
||||||
LD_LIBRARY_PATH=$(bld) $(<) -cp $(cls):$(swt) $(swt-command)
|
|
||||||
|
|
||||||
.PHONY: debug-swt
|
|
||||||
debug-swt: $(executable) $(swt-input)
|
|
||||||
LD_LIBRARY_PATH=$(bld) $(db) $(<) -cp $(cls):$(swt) $(swt-command)
|
|
||||||
|
|
||||||
.PHONY: vg-swt
|
|
||||||
vg-swt: $(executable) $(swt-input)
|
|
||||||
LD_LIBRARY_PATH=$(bld) $(vg) $(<) -cp $(cls):$(swt) $(swt-command)
|
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
@echo "removing build"
|
@echo "removing build"
|
||||||
@ -218,7 +178,7 @@ $(bld)/type-generator.o: \
|
|||||||
define compile-class
|
define compile-class
|
||||||
@echo "compiling $(@)"
|
@echo "compiling $(@)"
|
||||||
@mkdir -p $(dir $(@))
|
@mkdir -p $(dir $(@))
|
||||||
$(javac) -bootclasspath $(classpath) -classpath $(classpath):$(swt) \
|
$(javac) -bootclasspath $(classpath) -classpath $(classpath) \
|
||||||
-d $(cls) $(<)
|
-d $(cls) $(<)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -14,8 +14,8 @@ const unsigned Top = ~static_cast<unsigned>(0);
|
|||||||
|
|
||||||
const unsigned InitialGen2CapacityInBytes = 4 * 1024 * 1024;
|
const unsigned InitialGen2CapacityInBytes = 4 * 1024 * 1024;
|
||||||
|
|
||||||
const bool Verbose = false;
|
const bool Verbose = true;
|
||||||
const bool Verbose2 = false;
|
const bool Verbose2 = true;
|
||||||
const bool Debug = false;
|
const bool Debug = false;
|
||||||
|
|
||||||
class Context;
|
class Context;
|
||||||
|
@ -1637,7 +1637,7 @@ allocate2(Thread* t, unsigned sizeInBytes)
|
|||||||
>= Thread::HeapSizeInWords)
|
>= Thread::HeapSizeInWords)
|
||||||
{
|
{
|
||||||
t->heap = 0;
|
t->heap = 0;
|
||||||
if (t->vm->heapPoolIndex < Machine::HeapPoolSize) {
|
if (t->large == 0 and t->vm->heapPoolIndex < Machine::HeapPoolSize) {
|
||||||
t->heap = static_cast<uintptr_t*>
|
t->heap = static_cast<uintptr_t*>
|
||||||
(t->vm->system->tryAllocate(Thread::HeapSizeInBytes));
|
(t->vm->system->tryAllocate(Thread::HeapSizeInBytes));
|
||||||
if (t->heap) {
|
if (t->heap) {
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
import org.eclipse.swt.SWT;
|
|
||||||
import org.eclipse.swt.layout.RowLayout;
|
|
||||||
import org.eclipse.swt.widgets.Display;
|
|
||||||
import org.eclipse.swt.widgets.Shell;
|
|
||||||
import org.eclipse.swt.widgets.Label;
|
|
||||||
|
|
||||||
public class HelloSWT {
|
|
||||||
public static void main (String[] args) {
|
|
||||||
Display display = new Display();
|
|
||||||
final Shell shell = new Shell(display);
|
|
||||||
RowLayout layout = new RowLayout();
|
|
||||||
layout.justify = true;
|
|
||||||
layout.pack = true;
|
|
||||||
shell.setLayout(layout);
|
|
||||||
shell.setText("Hello, World!");
|
|
||||||
Label label = new Label(shell, SWT.CENTER);
|
|
||||||
label.setText("Hello, world!");
|
|
||||||
shell.pack();
|
|
||||||
shell.open();
|
|
||||||
while (!shell.isDisposed()) {
|
|
||||||
if (!display.readAndDispatch()) display.sleep();
|
|
||||||
}
|
|
||||||
display.dispose();
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user