Commit Graph

  • b888894fbb Use CursorBase utility functions to reduce repositioning clutter. Dan Gohman 2017-09-20 06:58:45 -07:00
  • 144d39a53d Minor code simplification. Dan Gohman 2017-09-19 14:04:03 -07:00
  • 5194298d9b Fix a typo in a comment. Dan Gohman 2017-09-19 14:03:54 -07:00
  • fb827a2d4b Add func_addr encodings for Intel. Jakob Stoklund Olesen 2017-09-19 16:33:38 -07:00
  • d92686d1cd Add a func_addr instruction. Jakob Stoklund Olesen 2017-09-19 15:54:02 -07:00
  • 0cfea8858a Add uext() and sext() builder methods to ArgumentType. Jakob Stoklund Olesen 2017-09-19 12:59:07 -07:00
  • 1fdeddd0d3 Add Intel encodings for floating point load/store instructions. Jakob Stoklund Olesen 2017-09-18 18:23:53 -07:00
  • 88348368a8 Add custom legalization for floating point constants. Jakob Stoklund Olesen 2017-09-18 13:27:25 -07:00
  • d2273c73ea Make the verifier accept any of the legal encodings of an instruction Angus Holder 2017-09-18 20:41:01 +01:00
  • da4cde8117 Always insert the entry EBB before translating any WASM. Jakob Stoklund Olesen 2017-09-18 11:53:32 -07:00
  • f5f37ac4a6 Use FlagsOrIsa to avoid requiring a --isa argument in cton-util wasm. Dan Gohman 2017-09-15 15:43:47 -07:00
  • 446fcdd7c5 Fix the REX bits for load/store instruction encodings. Jakob Stoklund Olesen 2017-09-15 13:02:36 -07:00
  • cc3707706c Write and parse value locations for EBB arguments Jakob Stoklund Olesen 2017-09-15 11:21:29 -07:00
  • 24a5a02752 Add a RegDiversions::display() function. Jakob Stoklund Olesen 2017-09-15 10:48:53 -07:00
  • b3a952ed67 Change the license to MIT/Apache-2.0. Dan Gohman 2017-09-15 09:58:09 -07:00
  • cba7a03275 Give better verifier errors for missing instruction encodings. Jakob Stoklund Olesen 2017-09-15 09:32:56 -07:00
  • 1349a6bdbc Always require a Flags reference for verifying functions. Jakob Stoklund Olesen 2017-09-14 17:40:43 -07:00
  • 9e77af25a3 Add settings and isa command-line options to cton-util wasm. (#158) Dan Gohman 2017-09-14 17:41:43 -07:00
  • 0737aa48f2 Add legalization for imul_imm. Jakob Stoklund Olesen 2017-09-14 16:05:42 -07:00
  • bbe056bf9d Make passes assert their dependencies consistently. (#156) Dan Gohman 2017-09-14 14:38:53 -07:00
  • 39992014e0 Make FuncEnvironment callbacks take an &mut self parameter. Jakob Stoklund Olesen 2017-09-14 12:25:59 -07:00
  • 78c39ce078 Don't silently ignore argument or value locations. (#157) Dan Gohman 2017-09-14 09:26:37 -07:00
  • 45f50120ef Handle special-purpose arguments in the Intel ABI. Jakob Stoklund Olesen 2017-09-13 12:04:14 -07:00
  • eb42a2547e Add helper routines for special-purpose arguments. Jakob Stoklund Olesen 2017-09-13 11:35:33 -07:00
  • ef27c3daf0 Add an AsRef implementation to FuncName so we can read its contents. Jakob Stoklund Olesen 2017-09-13 09:34:05 -07:00
  • 5845f56cda Add x86-64 encodings for call instructions. Jakob Stoklund Olesen 2017-09-12 13:32:04 -07:00
  • f5639a66e6 Flush stdout before writing to stderr. Dan Gohman 2017-09-12 16:35:45 -07:00
  • c7bd842ee3 Refactor code to use Context::verify instead of doing it manually. Dan Gohman 2017-09-12 16:25:15 -07:00
  • e2f0fe58d1 Move logic out of cton-util wasm. Dan Gohman 2017-09-12 16:15:22 -07:00
  • 9d0d6b5a1b Move verify calls out of Context. Dan Gohman 2017-09-12 15:38:30 -07:00
  • 69f8174c03 Move ensure_domtree out of Context and into DominatorTree. Dan Gohman 2017-09-12 13:47:17 -07:00
  • c7b1bb5f9e Simplify using map_err and expect. Dan Gohman 2017-09-12 12:51:34 -07:00
  • ddf967962f Use --all in some scripts. (#154) Dan Gohman 2017-09-12 13:27:58 -07:00
  • 1ab207b93c Add support for emitting code with a single return at the end. (#153) Dan Gohman 2017-09-12 13:27:36 -07:00
  • 2e046d68ce Remove obsolete derivations of Hash. Dan Gohman 2017-09-12 12:28:25 -07:00
  • 9b5295f3e2 Add a spiderwasm_prologue_words setting. Jakob Stoklund Olesen 2017-09-11 13:32:55 -07:00
  • cc35b5e724 Flush the debug trace file after each dbg!(). Jakob Stoklund Olesen 2017-09-12 08:59:35 -07:00
  • ddd398b790 Remove a redundant copy of pretty_verifier_error. Dan Gohman 2017-09-12 09:00:32 -07:00
  • de27abcb2b Change translate_module to use FuncTranslator. Dan Gohman 2017-09-11 16:37:50 -07:00
  • 95e2566d6f Use TranslationState's popn/peekn functions. (#151) Dan Gohman 2017-09-11 13:58:49 -07:00
  • 9bce21c17c Update to wasmparser 0.9.4 for a bugfix in create_binary_reader. Dan Gohman 2017-09-11 11:34:39 -07:00
  • f8f6878b2c Switch to wasmparser's create_binary_reader() API for reading function bodies. Dan Gohman 2017-09-02 04:14:11 -07:00
  • 25af6d380b Add a return_at_end setting. Jakob Stoklund Olesen 2017-09-11 11:04:38 -07:00
  • 7bf2747e1e Replace a match with a ?. Dan Gohman 2017-09-11 08:32:02 -07:00
  • a2542ed71d Replace a match with a .unwrap_or_default(). Dan Gohman 2017-09-11 08:31:35 -07:00
  • 47bc963ba5 Add a JumpTableData::with_capacity and use it. Dan Gohman 2017-09-10 16:17:03 -07:00
  • 620f1f49e2 Move several functions from FunctionBuilder to Function. Dan Gohman 2017-09-07 12:02:45 -07:00
  • 2fa0a7a3a4 Fix a confusion between EndDataSectionEntry and EndDataSectionEntryBody. Dan Gohman 2017-09-08 17:12:32 -07:00
  • 3775fa4867 Update to wasmparser 0.9.3. Dan Gohman 2017-09-08 16:16:19 -07:00
  • 0c16f13c6b Add a Function::clear() method. Jakob Stoklund Olesen 2017-09-08 14:53:55 -07:00
  • 439a40e5e4 Add a WebAssembly function translator. Jakob Stoklund Olesen 2017-09-01 13:19:31 -07:00
  • c0f3eaafbc Publically declare GlobalValue. Dan Gohman 2017-09-07 04:42:01 -07:00
  • 388a96421b Add documentation comments to GlobalValue's fields. Dan Gohman 2017-09-07 04:40:06 -07:00
  • d6f6af104b Make translate_operator() generic on FuncEnvironment. Jakob Stoklund Olesen 2017-09-06 16:24:55 -07:00
  • 062dd41c93 Don't export the 'Local' type from cton_wasm. Jakob Stoklund Olesen 2017-09-06 15:56:39 -07:00
  • b10faca534 Move translate_grow_memory and translate_current_memory too. Jakob Stoklund Olesen 2017-09-06 15:44:23 -07:00
  • 26048c2ecc Move WasmRuntime::translate_call_indirect() into FuncEnvironment. Jakob Stoklund Olesen 2017-09-06 15:06:28 -07:00
  • dc2bee9cef Add a FuncEnvironment::make_direct_func() callback. Jakob Stoklund Olesen 2017-09-06 11:44:52 -07:00
  • 45b093ea59 Use write_all() to write to write an entire string rather than write(). Dan Gohman 2017-09-06 08:50:57 -07:00
  • 27e9e16077 Add a FuncEnvironment::make_indirect_sig() callback. Jakob Stoklund Olesen 2017-09-06 10:28:11 -07:00
  • 73f5adb19d Clippy cleanups. Dan Gohman 2017-09-06 09:36:25 -07:00
  • cb7e66d12a Fix missing documentation comment. Dan Gohman 2017-09-06 09:19:34 -07:00
  • 6c80e81c6c Remove trivial numeric casts. Dan Gohman 2017-09-06 09:18:18 -07:00
  • 54a3f1fcd4 Fix redundant qualification. Dan Gohman 2017-09-06 08:59:10 -07:00
  • 6c30cf8f00 Enable deny(missing_docs) in the wasmstandalone library. Dan Gohman 2017-09-06 08:54:30 -07:00
  • 3868467917 Format with rustfmt 0.9.0. Dan Gohman 2017-09-06 08:37:12 -07:00
  • d0fe50a2a8 Check in the wasmstandalone code. Dan Gohman 2017-09-05 17:06:51 -07:00
  • 320c88f365 Rename cretonne_wasm to cton_wasm, for consistency with the other libraries. Dan Gohman 2017-09-05 16:27:38 -07:00
  • d3712575b5 Use mem::replace instead of mem::swap when it's cleaner. Dan Gohman 2017-09-05 13:55:33 -07:00
  • 0ac1d0dd94 Add FuncEnvironment trait. Jakob Stoklund Olesen 2017-09-05 13:11:35 -07:00
  • 19c8ba5021 Eliminate the sig argument to translate_operator. Jakob Stoklund Olesen 2017-09-05 11:51:32 -07:00
  • 2671cbb092 Add TranslationState::in_unreachable_code(). Jakob Stoklund Olesen 2017-09-05 11:46:08 -07:00
  • 6f864f2926 Move translation state initialization into a method. Jakob Stoklund Olesen 2017-09-05 10:52:31 -07:00
  • ef3ea72422 Avoid calling Vec::split_off, avoiding more heap allocations. Dan Gohman 2017-09-05 09:15:29 -07:00
  • 9ea40ad44a Replace SSABuilder's variables HashMaps with EntityMaps. (#150) Dan Gohman 2017-09-02 04:11:51 -07:00
  • 03939e4f9f Move TranslationState into its own module. Jakob Stoklund Olesen 2017-09-01 15:06:27 -07:00
  • 6762194801 Move stack and control_stack into TranslationState. Jakob Stoklund Olesen 2017-09-01 14:27:25 -07:00
  • 0c2ab06e66 Make EntitySet::contains return false for out-of-bounds indices. Dan Gohman 2017-09-01 13:25:37 -07:00
  • de92b2b967 Use Vec::resize. Dan Gohman 2017-09-01 13:20:03 -07:00
  • 52cbbcd069 Add a CtonError::InvalidInput variant. Jakob Stoklund Olesen 2017-09-01 13:06:05 -07:00
  • 8237893113 Eliminate a temporary heap allocation when splitting a critical edge. Dan Gohman 2017-09-01 12:50:51 -07:00
  • d4c53935b4 Introduce EntitySet, and use it to replace the HashSet in the frontend. Dan Gohman 2017-09-01 10:13:41 -07:00
  • fe12fe0e63 Avoid unneeded calls to .as_slice(). Dan Gohman 2017-09-01 10:12:23 -07:00
  • 9d2fbdae62 Avoid cloning a jump argument vector to the heap. Dan Gohman 2017-09-01 10:16:30 -07:00
  • 28779dc7e4 Avoid allocating jump arguments on the heap. Dan Gohman 2017-09-01 12:11:30 -07:00
  • 9bc4264a33 Update dependency to wasmparser v0.8.2. Jakob Stoklund Olesen 2017-09-01 09:31:05 -07:00
  • 7049cc78ae Refactor out an append helper function for SideEffects. Dan Gohman 2017-08-31 17:49:39 -07:00
  • ec3972f515 Avoid allocating a vector for predecessor variables in the single-value case. Dan Gohman 2017-08-31 17:42:19 -07:00
  • 52335c9e0f Delete an obsolete TODO comment. Dan Gohman 2017-08-31 17:06:14 -07:00
  • 566c772e20 Eliminate more unnecessary calls to .iter(). Dan Gohman 2017-08-31 16:51:06 -07:00
  • de02976162 Minor comment cleanups. Dan Gohman 2017-08-31 16:16:08 -07:00
  • 1d03244e90 Use debug_assert instead of assert in code where performance is important. Dan Gohman 2017-08-31 16:36:18 -07:00
  • 583487bfac Refactor the non-local case of use_var into a separate function. Dan Gohman 2017-08-31 16:30:00 -07:00
  • e3227e38ce Avoid cloning precessor lists to the heap. Dan Gohman 2017-08-31 16:09:26 -07:00
  • 539a5b3378 Avoid a heap allocation for a block's undef_variables. Dan Gohman 2017-08-31 14:56:27 -07:00
  • 79f257060f Inline resolve_undef_vars, and collapse the resulting redundancy. Dan Gohman 2017-08-31 14:49:53 -07:00
  • 2d9b902d2e Clean up a redundant cast. Dan Gohman 2017-08-31 14:35:19 -07:00
  • 7be0abb442 Remove an unneeded extern crate. Dan Gohman 2017-08-31 14:15:25 -07:00
  • 0cacba15b9 Replace as casts with type-conversion functions. Dan Gohman 2017-07-13 16:37:07 -07:00
  • af74cdf364 Cretonne's top-level tools don't need to directly depend on wasmparser. Dan Gohman 2017-08-31 13:40:35 -07:00