Commit Graph

132 Commits

Author SHA1 Message Date
Joshua Warner
b853f1a594 remove redundant f2i & i2f aType parameter 2014-05-30 23:40:22 -06:00
Joshua Warner
c843a97e23 remove redundant f2f aType parameter 2014-05-30 23:40:21 -06:00
Joshua Warner
963b371e04 remove redundant load srcType parameter 2014-05-30 23:40:21 -06:00
Joshua Warner
6fdd5d13ca remove redundant return_ type parameter 2014-05-30 23:40:21 -06:00
Joshua Warner
746c0fa0e8 remove ir::Type::Invalid, no longer needed for Subroutine 2014-05-30 23:40:21 -06:00
Joshua Warner
5ad1a14a73 explode Subroutines in compile.cpp rather than handling them in Compiler 2014-05-30 23:40:21 -06:00
Joshua Warner
14c960ac6a improve Slice 2014-05-30 23:40:21 -06:00
Joshua Warner
cb7f570f20 begin enforcing more strong typing 2014-05-30 22:51:03 -06:00
Joshua Warner
43eb49cf53 fix sizing of some stack ints 2014-05-30 22:41:11 -06:00
Joshua Warner
f9cbca8f7d pair up stack for NativeCallingConvention 2014-05-30 22:41:11 -06:00
Joshua Warner
69edeaadee remove redundant Compiler::stackCall footprint argument 2014-05-30 22:41:11 -06:00
Joshua Warner
97ce7d2b4e pass CallEvent arguments in Slice as well 2014-05-30 22:41:10 -06:00
Joshua Warner
ad3ec1abf3 introduce Frame::stackCall util 2014-05-30 22:41:10 -06:00
Joshua Warner
479c056b2c move Compiler::Operand to ir::Value 2014-05-30 22:41:10 -06:00
Joshua Warner
865041b688 add asserts 2014-05-30 22:38:10 -06:00
Joshua Warner
42fec084b0 expose Value::type and add asserts 2014-05-30 22:16:39 -06:00
Joshua Warner
00253ce528 remove redundant Compiler::load srcSelectType parameter 2014-05-30 22:16:39 -06:00
Joshua Warner
26d8e8aa1f add Compiler::truncateThenExtend 2014-05-30 22:16:39 -06:00
Joshua Warner
99fa560257 merge Compiler::load and Compiler::loadz 2014-05-30 22:16:39 -06:00
Joshua Warner
85f114ea0f use ir::Type in Compiler::loadLocal 2014-05-30 22:16:39 -06:00
Joshua Warner
27ea503233 switch Compiler::load* to use ir::Type rather than sizes 2014-05-30 22:16:38 -06:00
Joshua Warner
9c98986f99 remove redundant Compiler::store dstType parameter 2014-05-30 22:16:38 -06:00
Joshua Warner
8b1739dc0f remove redundant Compiler::stackCall resultSize parameter 2014-05-30 22:16:38 -06:00
Joshua Warner
1d466a800e remove redundant Compiler::call resultSize parameter 2014-05-30 22:16:38 -06:00
Joshua Warner
9805ff94b4 remove redundant Compiler::memory scale parameter 2014-05-30 22:16:38 -06:00
Joshua Warner
2ed52c05a8 use ir::Type in Compiler::store 2014-05-30 21:19:33 -06:00
Joshua Warner
8af9bb8297 change Compiler::register_ to Compiler::threadRegister, since it was only used as such 2014-05-30 21:19:32 -06:00
Joshua Warner
2d444830d0 use ir::Type in Compiler::unaryOp and Compiler::binaryOp 2014-05-30 21:19:32 -06:00
Joshua Warner
6ed7681dc0 use ir::Type in f2i and friends, instead of aSize 2014-05-30 21:19:27 -06:00
Joshua Warner
704c05f818 use ir::Type in place of Compiler::OperandType 2014-05-29 15:30:46 -06:00
Joshua Warner
d8914a9646 use ir::Type in Compiler::initLocal 2014-05-29 15:30:46 -06:00
Joshua Warner
4bfb359cdd use ir::Type in Compiler::pop 2014-05-29 15:30:46 -06:00
Joshua Warner
13342d28be use ir::Type in Compiler::save 2014-05-29 15:30:46 -06:00
Joshua Warner
75f0812f7a remove unused Compiler::push method 2014-05-29 15:30:46 -06:00
Joshua Warner
49a5a9f398 use ir::Type in Compiler::push 2014-05-29 15:30:45 -06:00
Joshua Warner
d9fee1025c use ir::Type in Compiler::return_ 2014-05-29 15:30:45 -06:00
Joshua Warner
855534b152 introduce ir::Type and begin migrating i2f and friends to it 2014-05-29 15:30:45 -06:00
Joshua Warner
41adb74eb1 remove powerpc support 2014-04-29 13:26:40 -06:00
Joel Dice
9b7d0d1624 update copyright years 2014-04-23 15:33:41 -06:00
Joshua Warner
c37b13301a remove old unused code
Conflicts:
	include/avian/codegen/lir.h
2014-03-16 19:41:48 -06:00
Joel Dice
918b7828f1 fix StackOverflowError stack walking in tails=true builds
The various Architecture::nextFrame implementations were not walking
the stack correctly when a StackOverflowError was thrown.  The
throwStackOverflow thunk is called before the frame of the most
recently called method has been fully created, and because tails=true
builds use a different calling convention, we need to treat this
situation carefully when building a stack trace or unwinding.
Otherwise, we will skip past all the java frames to the next native
frame, which is what was happening.
2014-03-14 09:59:04 -06:00
Joel Dice
1cd822b23e Merge pull request #180 from joshuawarner32/move-allocator
Move allocator & Slice into util
2014-02-27 08:55:24 -07:00
Joshua Warner
e6eead07fa call vm::dynamicCall directly, instead of through System 2014-02-26 15:10:41 -07:00
Joshua Warner
db19c7b3a2 add Slice::resize and Slice::alloc 2014-02-25 20:34:03 -07:00
Joshua Warner
a807966143 use Slice<uint8_t> in FixedAllocator 2014-02-25 20:34:03 -07:00
Joshua Warner
b083f3df04 move fixed allocator out of machine.h 2014-02-25 20:34:03 -07:00
Joshua Warner
f69f86b487 move Slice out of object-writer, to be more general 2014-02-25 20:34:03 -07:00
Joshua Warner
52b23b8a6a move Allocator to include, properly namespaced 2014-02-25 19:13:41 -07:00
Joshua Warner
bc9f7d2f87 refactor SignalRegistrar interface 2014-02-21 23:37:32 -07:00
Joshua Warner
ca7d51edb3 add crash function to match the semantics of System::abort 2014-02-21 23:37:28 -07:00
Joshua Warner
730dade53e break out signal handling from System 2014-02-21 23:36:40 -07:00
Joshua Warner
5ffdfecdc2 remove vm from code paths, to match namespacing 2014-02-21 13:32:28 -07:00
Joshua Warner
fa65c67fbf Extract independent runtime thunks into their own file 2013-12-18 22:46:58 -07:00
Joshua Warner
eab36b3a23 Remove boilerplate code (nullaryOp methods in Compiler) 2013-12-18 16:51:20 -07:00
Joshua Warner
bd7b66a898 Remove boilerplate code (unaryOp methods in Compiler) 2013-12-18 16:43:15 -07:00
Joshua Warner
07d0f1172f Remove boilerplate code (float binaryOp methods in Compiler) 2013-12-18 15:22:38 -07:00
Joshua Warner
d5c1a094ca Remove boilerplate code (general binaryOp methods in Compiler) 2013-12-18 15:11:30 -07:00
Joshua Warner
b66a8549fd Remove boilerplate code (jump* methods in Compiler) 2013-12-18 14:38:05 -07:00
Joshua Warner
06432253ba consolidate many implicit list types into one 2013-12-11 10:54:50 -07:00
Johannes Schindelin
18aeeae0e8 Implement Runtime#{free,total}Memory()
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-04 15:19:06 -06:00
Joshua Warner
2800ffe826 rename JNIEXPORT to AVIAN_EXPORT in common.h, to avoid conflicting with jni.h 2013-11-08 08:35:17 -07:00
Joel Dice
87b02eb949 update copyright years
Previously, I used a shell script to extract modification date ranges
from the Git history, but that was complicated and unreliable, so now
every file just gets the same year range in its copyright header.  If
someone needs to know when a specific file was modified and by whom,
they can look at the Git history themselves; no need to include it
redundantly in the header.
2013-07-02 20:52:38 -06:00
Joel Dice
3c44cdc50b fix unintentionally retained finalizables and improve low mem performance
Objects which are eligable for finalization must be retained until
after their finalize methods are called.  However, the VM must
determine the entire set of such objects before retaining any of them;
otherwise the process of retaining a given object may cause others to
become reachable and thus be considered ineligible for finalization
even though they are only reachable via other finalizable objects.
The end result of this mistake is that only a few of the objects which
are finalizable will be recognized at each GC cycle, so it requires
many such cycles to find them all, and if new objects become
finalizable at a faster rate, the VM will never catch up and
eventually run out of memory.

This patch fixes the above mistake and also includes tuning to
minimize the need for GC in low memory situations.
2013-03-07 20:32:02 -07:00
Joel Dice
b3978c0a0a fix msvc build 2013-03-04 11:09:59 -07:00
Joshua Warner
9327043bc5 Merge branch 'master' into wip
Conflicts:
	makefile
	src/codegen/arm/assembler.cpp
	src/codegen/powerpc/assembler.cpp
	src/codegen/x86/assembler.cpp
2013-02-27 19:27:07 -07:00
Joel Dice
5e2d00010b move headers from src to src/avian
This is necessary to avoid name conflicts on various platforms.  For
example, iOS has its own util.h, and Windows has a process.h.  By
including our version as e.g. "avian/util.h", we avoid confusion with
the system version.
2013-02-27 13:33:29 -07:00
Joshua Warner
4c8b593539 break Architecture out of Assembler 2013-02-23 23:03:01 -07:00
Joshua Warner
d1a149a0a1 audit-codegen prototype working 2013-02-21 21:57:53 -07:00
Joshua Warner
aaa076f1df move arg-parser.h to include 2013-02-21 20:14:37 -07:00
Joshua Warner
fe7bb5e640 Merge branch 'master' into wip
Conflicts:
	makefile
2013-02-21 19:33:38 -07:00
Joshua Warner
af0e7767eb Merge branch 'master' of github.com:ReadyTalk/avian
Conflicts:
	makefile
2013-02-21 16:23:22 -07:00
Joshua Warner
ab9f9550cf move tokenizer.h to include/avian/util/string.h, merge in the String declaration from object-writer/tools.h 2013-02-21 16:18:20 -07:00
Joshua Warner
48691bb50a move stream.h to include, and type-generator to src/tools 2013-02-20 21:26:34 -07:00
Joshua Warner
f17b8cef08 move system.h to include 2013-02-20 20:42:09 -07:00
Joel Dice
f04f444f23 modify (THREAD_)RUNTIME_ARRAY definition so RUNTIME_ARRAY_BODY must be used
Previously, if you forgot to use RUNTIME_ARRAY_BODY to reference an
array declared with (THREAD_)RUNTIME_ARRAY, you wouldn't get a
compiler error until you tried to build on e.g. MSVC, where
runtime-sized stack arrays aren't supported.  This change ensures you
find out regardless of what compiler you're using, which ought to
protect us from regressions going forward.
2013-02-20 17:20:17 -07:00
Joshua Warner
1f0833252d Merge branch 'master' into wip
Conflicts:
	src/codegen/compiler/event.cpp
	src/codegen/x86/assembler.cpp
	src/common.h
2013-02-20 11:27:39 -07:00
Joshua Warner
24ff91c229 move heap.h to include 2013-02-20 10:23:20 -07:00
Joshua Warner
52b2fd74ef move math functions out of common.h, and into include/avian/util/math.h 2013-02-20 07:51:57 -07:00
Joshua Warner
b9e281612b move runtime-array to include 2013-02-19 22:56:05 -07:00
Joshua Warner
263c0dee4f move abort.h to include, add namespacing 2013-02-19 22:51:38 -07:00
Joshua Warner
987af120d8 move codegen headers to include/ 2013-02-19 22:21:22 -07:00
Joshua Warner
77365dfcc1 move binary-to-object to new tree structure 2013-02-19 20:23:11 -07:00