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

Side by Side Diff: src/wasm/wasm-module.cc

Issue 2137993003: [wasm] Adding feature to JIT a wasm function at runtime and hook up the compiled code into the indi… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Changed casting Created 4 years, 5 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 #include "src/base/atomic-utils.h" 5 #include "src/base/atomic-utils.h"
6 #include "src/macro-assembler.h" 6 #include "src/macro-assembler.h"
7 #include "src/objects.h" 7 #include "src/objects.h"
8 #include "src/property-descriptor.h" 8 #include "src/property-descriptor.h"
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 bool modified = LinkFunction(code, imports, Code::WASM_TO_JS_FUNCTION); 401 bool modified = LinkFunction(code, imports, Code::WASM_TO_JS_FUNCTION);
402 if (modified) { 402 if (modified) {
403 Assembler::FlushICache(isolate, code->instruction_start(), 403 Assembler::FlushICache(isolate, code->instruction_start(),
404 code->instruction_size()); 404 code->instruction_size());
405 } 405 }
406 } 406 }
407 } 407 }
408 408
409 } // namespace 409 } // namespace
410 410
411 WasmModule::WasmModule() 411 WasmModule::WasmModule(byte* module_start)
412 : module_start(nullptr), 412 : module_start(module_start),
413 module_end(nullptr), 413 module_end(nullptr),
414 min_mem_pages(0), 414 min_mem_pages(0),
415 max_mem_pages(0), 415 max_mem_pages(0),
416 mem_export(false), 416 mem_export(false),
417 mem_external(false), 417 mem_external(false),
418 start_function_index(-1), 418 start_function_index(-1),
419 origin(kWasmOrigin), 419 origin(kWasmOrigin),
420 globals_size(0), 420 globals_size(0),
421 indirect_table_size(0), 421 indirect_table_size(0),
422 pending_tasks(new base::Semaphore(0)) {} 422 pending_tasks(new base::Semaphore(0)) {}
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after
1369 return static_cast<int32_t>(HeapNumber::cast(*result)->value()); 1369 return static_cast<int32_t>(HeapNumber::cast(*result)->value());
1370 } 1370 }
1371 thrower.Error("WASM.compileRun() failed: Return value should be number"); 1371 thrower.Error("WASM.compileRun() failed: Return value should be number");
1372 return -1; 1372 return -1;
1373 } 1373 }
1374 1374
1375 } // namespace testing 1375 } // namespace testing
1376 } // namespace wasm 1376 } // namespace wasm
1377 } // namespace internal 1377 } // namespace internal
1378 } // namespace v8 1378 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698