File tree Expand file tree Collapse file tree 4 files changed +17
-28
lines changed Expand file tree Collapse file tree 4 files changed +17
-28
lines changed Original file line number Diff line number Diff line change 2
2
# source emsdk_set_env.sh
3
3
4
4
5
- emcc --bind -s MODULARIZE=1 test2.cpp -o test2.js
6
- emcc --bind -s MODULARIZE=1 test1.cpp -o test1.js
5
+ emcc --bind test2.cpp -o test2.js
6
+ emcc --bind test1.cpp -o test1.js
Original file line number Diff line number Diff line change 38
38
</ head >
39
39
< body >
40
40
< textarea id ="output " rows ="8 "> </ textarea > < br >
41
- < button id ='testbutton '> Test!</ button >
41
+ < button id ='testbutton1 '> Test1!</ button >
42
+ < button id ='testbutton2 '> Test2!</ button >
42
43
< script src ="test1.js "> </ script >
44
+ < script src ="test2.js "> </ script >
43
45
< script >
44
46
//
45
- // document.getElementById("testbutton").addEventListener('click', function (){
46
-
47
+ document . getElementById ( "testbutton1" ) . addEventListener ( 'click' , function ( ) {
47
48
// var com = new Module.Common();
48
-
49
- console . log ( "testbutton" ) ;
49
+ console . log ( "testbutton1" ) ;
50
50
var t1 = new Module . Test1 ( ) ;
51
51
console . log ( t1 . generate1 ( ) ) ;
52
- // });
53
- </ script >
54
- < script src =" test2.js " > </ script >
55
- < script >
52
+ } ) ;
53
+
54
+ document . getElementById ( "testbutton2" ) . addEventListener ( 'click' , function ( ) {
55
+ console . log ( "testbutton1" ) ;
56
56
var t2 = new Module . Test2 ( ) ;
57
- console . log ( t2 . generate2 ( ) ) ;
57
+ console . log ( t2 . generate2 ( ) ) ;
58
+ } ) ;
58
59
</ script >
59
60
</ body >
60
61
</ html >
Original file line number Diff line number Diff line change 1
- var Module = function(Module) {
2
- Module = Module || {};
3
-
4
1
// The Module object: Our interface to the outside world. We import
5
2
// and export values on it, and do the work to get that through
6
3
// closure compiler if necessary. There are various ways Module can be used:
@@ -14477,6 +14474,3 @@ run();
14477
14474
14478
14475
14479
14476
14480
-
14481
- return Module;
14482
- };
Original file line number Diff line number Diff line change 1
- var Module = function(Module) {
2
- Module = Module || {};
3
-
4
1
// The Module object: Our interface to the outside world. We import
5
2
// and export values on it, and do the work to get that through
6
3
// closure compiler if necessary. There are various ways Module can be used:
@@ -10148,7 +10145,7 @@ function __ZNK10__cxxabiv121__vmi_class_type_info16search_below_dstEPNS_19__dyna
10148
10145
$30 = (($this) + 8|0);
10149
10146
$31 = (($info) + 24|0);
10150
10147
$does_dst_type_point_to_our_static_type$0$off0 = 0;$is_dst_type_derived_from_static_type$0$off0 = 0;$p$0 = $23;
10151
- L37 : while(1) {
10148
+ L34 : while(1) {
10152
10149
$32 = ($p$0>>>0)<($26>>>0);
10153
10150
if (!($32)) {
10154
10151
$does_dst_type_point_to_our_static_type$0$off0$lcssa = $does_dst_type_point_to_our_static_type$0$off0;$is_dst_type_derived_from_static_type$2$off0 = $is_dst_type_derived_from_static_type$0$off0;
@@ -10180,7 +10177,7 @@ function __ZNK10__cxxabiv121__vmi_class_type_info16search_below_dstEPNS_19__dyna
10180
10177
if ($46) {
10181
10178
$does_dst_type_point_to_our_static_type$0$off0$lcssa = $does_dst_type_point_to_our_static_type$0$off0;$is_dst_type_derived_from_static_type$2$off0 = 1;
10182
10179
label = 20;
10183
- break L37 ;
10180
+ break L34 ;
10184
10181
} else {
10185
10182
$does_dst_type_point_to_our_static_type$1$off0 = $does_dst_type_point_to_our_static_type$0$off0;$is_dst_type_derived_from_static_type$1$off0 = 1;
10186
10183
break;
@@ -10190,14 +10187,14 @@ function __ZNK10__cxxabiv121__vmi_class_type_info16search_below_dstEPNS_19__dyna
10190
10187
$40 = ($39|0)==(1);
10191
10188
if ($40) {
10192
10189
label = 25;
10193
- break L37 ;
10190
+ break L34 ;
10194
10191
}
10195
10192
$41 = HEAP32[$30>>2]|0;
10196
10193
$42 = $41 & 2;
10197
10194
$43 = ($42|0)==(0);
10198
10195
if ($43) {
10199
10196
label = 25;
10200
- break L37 ;
10197
+ break L34 ;
10201
10198
} else {
10202
10199
$does_dst_type_point_to_our_static_type$1$off0 = 1;$is_dst_type_derived_from_static_type$1$off0 = 1;
10203
10200
}
@@ -14477,6 +14474,3 @@ run();
14477
14474
14478
14475
14479
14476
14480
-
14481
- return Module;
14482
- };
You can’t perform that action at this time.
0 commit comments