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

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: Removing spurious changes Created 4 years 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 | « 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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 559
560 Handle<Code> Compile() { 560 Handle<Code> Compile() {
561 InitializeDescriptor(); 561 InitializeDescriptor();
562 CallDescriptor* desc = descriptor_; 562 CallDescriptor* desc = descriptor_;
563 if (kPointerSize == 4) { 563 if (kPointerSize == 4) {
564 desc = testing_module_->GetI32WasmCallDescriptor(this->zone(), desc); 564 desc = testing_module_->GetI32WasmCallDescriptor(this->zone(), desc);
565 } 565 }
566 CompilationInfo info(debug_name_, this->isolate(), this->zone(), 566 CompilationInfo info(debug_name_, this->isolate(), this->zone(),
567 Code::ComputeFlags(Code::WASM_FUNCTION)); 567 Code::ComputeFlags(Code::WASM_FUNCTION));
568 std::unique_ptr<CompilationJob> job(Pipeline::NewWasmCompilationJob( 568 std::unique_ptr<CompilationJob> job(Pipeline::NewWasmCompilationJob(
569 &info, &jsgraph, desc, &source_position_table_)); 569 &info, &jsgraph, desc, &source_position_table_, nullptr));
570 if (job->ExecuteJob() != CompilationJob::SUCCEEDED || 570 if (job->ExecuteJob() != CompilationJob::SUCCEEDED ||
571 job->FinalizeJob() != CompilationJob::SUCCEEDED) 571 job->FinalizeJob() != CompilationJob::SUCCEEDED)
572 return Handle<Code>::null(); 572 return Handle<Code>::null();
573 573
574 Handle<Code> code = info.code(); 574 Handle<Code> code = info.code();
575 575
576 // Length is always 2, since usually <wasm_obj, func_index> is stored in 576 // Length is always 2, since usually <wasm_obj, func_index> is stored in
577 // the deopt data. Here, we only store the function index. 577 // the deopt data. Here, we only store the function index.
578 DCHECK(code->deoptimization_data() == nullptr || 578 DCHECK(code->deoptimization_data() == nullptr ||
579 code->deoptimization_data()->length() == 0); 579 code->deoptimization_data()->length() == 0);
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 // interpreter. 796 // interpreter.
797 #define WASM_EXEC_TEST(name) \ 797 #define WASM_EXEC_TEST(name) \
798 void RunWasm_##name(WasmExecutionMode execution_mode); \ 798 void RunWasm_##name(WasmExecutionMode execution_mode); \
799 TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \ 799 TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \
800 TEST(RunWasmInterpreted_##name) { RunWasm_##name(kExecuteInterpreted); } \ 800 TEST(RunWasmInterpreted_##name) { RunWasm_##name(kExecuteInterpreted); } \
801 void RunWasm_##name(WasmExecutionMode execution_mode) 801 void RunWasm_##name(WasmExecutionMode execution_mode)
802 802
803 } // namespace 803 } // namespace
804 804
805 #endif 805 #endif
OLDNEW
« no previous file with comments | « src/wasm/wasm-objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698