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

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

Issue 2500443004: [wasm] OOB traps: build protected instruction list during codegen (Closed)
Patch Set: Fixing Windows better Created 4 years, 1 month 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
« src/wasm/wasm-module.cc ('K') | « src/wasm/wasm-objects.h ('k') | no next file » | 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 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 554
555 Handle<Code> Compile() { 555 Handle<Code> Compile() {
556 InitializeDescriptor(); 556 InitializeDescriptor();
557 CallDescriptor* desc = descriptor_; 557 CallDescriptor* desc = descriptor_;
558 if (kPointerSize == 4) { 558 if (kPointerSize == 4) {
559 desc = testing_module_->GetI32WasmCallDescriptor(this->zone(), desc); 559 desc = testing_module_->GetI32WasmCallDescriptor(this->zone(), desc);
560 } 560 }
561 CompilationInfo info(debug_name_, this->isolate(), this->zone(), 561 CompilationInfo info(debug_name_, this->isolate(), this->zone(),
562 Code::ComputeFlags(Code::WASM_FUNCTION)); 562 Code::ComputeFlags(Code::WASM_FUNCTION));
563 std::unique_ptr<CompilationJob> job(Pipeline::NewWasmCompilationJob( 563 std::unique_ptr<CompilationJob> job(Pipeline::NewWasmCompilationJob(
564 &info, graph(), desc, &source_position_table_)); 564 &info, graph(), desc, &source_position_table_, nullptr));
565 if (job->ExecuteJob() != CompilationJob::SUCCEEDED || 565 if (job->ExecuteJob() != CompilationJob::SUCCEEDED ||
566 job->FinalizeJob() != CompilationJob::SUCCEEDED) 566 job->FinalizeJob() != CompilationJob::SUCCEEDED)
567 return Handle<Code>::null(); 567 return Handle<Code>::null();
568 568
569 Handle<Code> code = info.code(); 569 Handle<Code> code = info.code();
570 570
571 // Length is always 2, since usually <wasm_obj, func_index> is stored in 571 // Length is always 2, since usually <wasm_obj, func_index> is stored in
572 // the deopt data. Here, we only store the function index. 572 // the deopt data. Here, we only store the function index.
573 DCHECK(code->deoptimization_data() == nullptr || 573 DCHECK(code->deoptimization_data() == nullptr ||
574 code->deoptimization_data()->length() == 0); 574 code->deoptimization_data()->length() == 0);
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 // interpreter. 791 // interpreter.
792 #define WASM_EXEC_TEST(name) \ 792 #define WASM_EXEC_TEST(name) \
793 void RunWasm_##name(WasmExecutionMode execution_mode); \ 793 void RunWasm_##name(WasmExecutionMode execution_mode); \
794 TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \ 794 TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \
795 TEST(RunWasmInterpreted_##name) { RunWasm_##name(kExecuteInterpreted); } \ 795 TEST(RunWasmInterpreted_##name) { RunWasm_##name(kExecuteInterpreted); } \
796 void RunWasm_##name(WasmExecutionMode execution_mode) 796 void RunWasm_##name(WasmExecutionMode execution_mode)
797 797
798 } // namespace 798 } // namespace
799 799
800 #endif 800 #endif
OLDNEW
« src/wasm/wasm-module.cc ('K') | « src/wasm/wasm-objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698