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

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: Fixing unit test- 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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 void FlushAssemblyCache(Isolate* isolate, Handle<FixedArray> functions) { 442 void FlushAssemblyCache(Isolate* isolate, Handle<FixedArray> functions) {
443 for (int i = 0; i < functions->length(); ++i) { 443 for (int i = 0; i < functions->length(); ++i) {
444 Handle<Code> code = functions->GetValueChecked<Code>(i); 444 Handle<Code> code = functions->GetValueChecked<Code>(i);
445 Assembler::FlushICache(isolate, code->instruction_start(), 445 Assembler::FlushICache(isolate, code->instruction_start(),
446 code->instruction_size()); 446 code->instruction_size());
447 } 447 }
448 } 448 }
449 449
450 } // namespace 450 } // namespace
451 451
452 WasmModule::WasmModule() 452 WasmModule::WasmModule(byte* module_start)
453 : module_start(nullptr), 453 : module_start(module_start),
454 module_end(nullptr), 454 module_end(nullptr),
455 min_mem_pages(0), 455 min_mem_pages(0),
456 max_mem_pages(0), 456 max_mem_pages(0),
457 mem_export(false), 457 mem_export(false),
458 mem_external(false), 458 mem_external(false),
459 start_function_index(-1), 459 start_function_index(-1),
460 origin(kWasmOrigin), 460 origin(kWasmOrigin),
461 globals_size(0), 461 globals_size(0),
462 indirect_table_size(0), 462 indirect_table_size(0),
463 pending_tasks(new base::Semaphore(0)) {} 463 pending_tasks(new base::Semaphore(0)) {}
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1547 return static_cast<int32_t>(HeapNumber::cast(*result)->value()); 1547 return static_cast<int32_t>(HeapNumber::cast(*result)->value());
1548 } 1548 }
1549 thrower.Error("WASM.compileRun() failed: Return value should be number"); 1549 thrower.Error("WASM.compileRun() failed: Return value should be number");
1550 return -1; 1550 return -1;
1551 } 1551 }
1552 1552
1553 } // namespace testing 1553 } // namespace testing
1554 } // namespace wasm 1554 } // namespace wasm
1555 } // namespace internal 1555 } // namespace internal
1556 } // namespace v8 1556 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698