Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: test/cctest/wasm/wasm-run-utils.h

Issue 1742073002: [wasm] Properly plumb the origin of the WASM module from asm.js translation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/cctest/wasm/test-run-wasm.cc ('k') | test/mjsunit/wasm/asm-wasm.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WASM_RUN_UTILS_H 5 #ifndef WASM_RUN_UTILS_H
6 #define WASM_RUN_UTILS_H 6 #define WASM_RUN_UTILS_H
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 module_.shared_isolate = CcTest::InitIsolateOnce(); 84 module_.shared_isolate = CcTest::InitIsolateOnce();
85 module = &module_; 85 module = &module_;
86 instance = &instance_; 86 instance = &instance_;
87 instance->module = &module_; 87 instance->module = &module_;
88 instance->globals_start = global_data; 88 instance->globals_start = global_data;
89 instance->globals_size = kMaxGlobalsSize; 89 instance->globals_size = kMaxGlobalsSize;
90 instance->mem_start = nullptr; 90 instance->mem_start = nullptr;
91 instance->mem_size = 0; 91 instance->mem_size = 0;
92 instance->function_code = nullptr; 92 instance->function_code = nullptr;
93 linker = nullptr; 93 linker = nullptr;
94 asm_js = false; 94 origin = kWasmOrigin;
95 memset(global_data, 0, sizeof(global_data)); 95 memset(global_data, 0, sizeof(global_data));
96 } 96 }
97 97
98 ~TestingModule() { 98 ~TestingModule() {
99 if (instance->mem_start) { 99 if (instance->mem_start) {
100 free(instance->mem_start); 100 free(instance->mem_start);
101 } 101 }
102 if (instance->function_code) { 102 if (instance->function_code) {
103 delete instance->function_code; 103 delete instance->function_code;
104 } 104 }
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 if (p1 == MachineType::None()) return 1; 627 if (p1 == MachineType::None()) return 1;
628 if (p2 == MachineType::None()) return 2; 628 if (p2 == MachineType::None()) return 2;
629 if (p3 == MachineType::None()) return 3; 629 if (p3 == MachineType::None()) return 3;
630 return 4; 630 return 4;
631 } 631 }
632 }; 632 };
633 633
634 } // namespace 634 } // namespace
635 635
636 #endif 636 #endif
OLDNEW
« no previous file with comments | « test/cctest/wasm/test-run-wasm.cc ('k') | test/mjsunit/wasm/asm-wasm.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698