Skip to content

Commit 1239af6

Browse files
committed
Remove unused code
1 parent bead988 commit 1239af6

File tree

3 files changed

+7
-39
lines changed

3 files changed

+7
-39
lines changed

integration_tests/test_complex.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,11 @@ def test_complex_not():
132132

133133
def check():
134134
test_real_imag()
135-
# test_complex()
136-
# test_complex_abs()
137-
# test_complex_binop_32()
138-
# test_complex_binop_64()
139-
# test_complex_unary_minus()
140-
# test_complex_not()
135+
test_complex()
136+
test_complex_abs()
137+
test_complex_binop_32()
138+
test_complex_binop_64()
139+
test_complex_unary_minus()
140+
test_complex_not()
141141

142142
check()

src/libasr/codegen/asr_to_wasm.cpp

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2364,37 +2364,6 @@ class ASRToWASMVisitor : public ASR::BaseVisitor<ASRToWASMVisitor> {
23642364
}
23652365
}
23662366

2367-
// void visit_ComplexConstant(const ASR::ComplexConstant_t &x) {
2368-
// double re = x.m_re;
2369-
// double im = x.m_im;
2370-
// int a_kind = ASRUtils::extract_kind_from_ttype_t(x.m_type);
2371-
// switch( a_kind ) {
2372-
// case 4: {
2373-
// wasm::emit_i32_const(m_code_section, m_al, avail_mem_loc);
2374-
// wasm::emit_f32_const(m_code_section, m_al, re);
2375-
// wasm::emit_f32_store(m_code_section, m_al, wasm::mem_align::b8, 0);
2376-
// wasm::emit_i32_const(m_code_section, m_al, avail_mem_loc + a_kind);
2377-
// wasm::emit_f32_const(m_code_section, m_al, im);
2378-
// wasm::emit_f32_store(m_code_section, m_al, wasm::mem_align::b8, 0);
2379-
// break;
2380-
// }
2381-
// case 8: {
2382-
// wasm::emit_i32_const(m_code_section, m_al, avail_mem_loc);
2383-
// wasm::emit_f64_const(m_code_section, m_al, re);
2384-
// wasm::emit_f64_store(m_code_section, m_al, wasm::mem_align::b8, 0);
2385-
// wasm::emit_i32_const(m_code_section, m_al, avail_mem_loc + a_kind);
2386-
// wasm::emit_f64_const(m_code_section, m_al, im);
2387-
// wasm::emit_f64_store(m_code_section, m_al, wasm::mem_align::b8, 0);
2388-
// break;
2389-
// }
2390-
// default: {
2391-
// throw CodeGenError("kind type is not supported");
2392-
// }
2393-
// }
2394-
// wasm::emit_i32_const(m_code_section, m_al, avail_mem_loc);
2395-
// avail_mem_loc += a_kind * 2;
2396-
// }
2397-
23982367
void visit_ComplexConstant(const ASR::ComplexConstant_t &x) {
23992368
int a_kind = ASRUtils::extract_kind_from_ttype_t(x.m_type);
24002369
switch( a_kind ) {

src/libasr/codegen/wasm_decoder.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <libasr/containers.h>
99
#include <libasr/codegen/wasm_utils.h>
1010

11-
#define WAT_DEBUG
11+
// #define WAT_DEBUG
1212

1313
#ifdef WAT_DEBUG
1414
#define DEBUG(s) std::cout << s << std::endl
@@ -110,7 +110,6 @@ class WASMDecoder {
110110

111111
for (uint32_t i = 0; i < no_of_func_types; i++) {
112112
if (read_b8(wasm_bytes, offset) != 0x60) {
113-
std::cerr << "i = " << i << std::endl;
114113
throw CodeGenError("Invalid type section");
115114
}
116115

0 commit comments

Comments
 (0)