OLD | NEW |
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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 DCHECK_EQ(index, result); | 467 DCHECK_EQ(index, result); |
468 return result; | 468 return result; |
469 } | 469 } |
470 | 470 |
471 Handle<Code> Compile() { | 471 Handle<Code> Compile() { |
472 InitializeDescriptor(); | 472 InitializeDescriptor(); |
473 CallDescriptor* desc = descriptor_; | 473 CallDescriptor* desc = descriptor_; |
474 if (kPointerSize == 4) { | 474 if (kPointerSize == 4) { |
475 desc = testing_module_->GetI32WasmCallDescriptor(this->zone(), desc); | 475 desc = testing_module_->GetI32WasmCallDescriptor(this->zone(), desc); |
476 } | 476 } |
477 CompilationInfo info("wasm compile", this->isolate(), this->zone()); | 477 CompilationInfo info("wasm compile", this->isolate(), this->zone(), |
| 478 Code::ComputeFlags(Code::WASM_FUNCTION)); |
478 Handle<Code> result = | 479 Handle<Code> result = |
479 Pipeline::GenerateCodeForTesting(&info, desc, this->graph()); | 480 Pipeline::GenerateCodeForTesting(&info, desc, this->graph()); |
480 #ifdef ENABLE_DISASSEMBLER | 481 #ifdef ENABLE_DISASSEMBLER |
481 if (!result.is_null() && FLAG_print_opt_code) { | 482 if (!result.is_null() && FLAG_print_opt_code) { |
482 OFStream os(stdout); | 483 OFStream os(stdout); |
483 result->Disassemble("wasm code", os); | 484 result->Disassemble("wasm code", os); |
484 } | 485 } |
485 #endif | 486 #endif |
486 | 487 |
487 return result; | 488 return result; |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 if (p1 == MachineType::None()) return 1; | 618 if (p1 == MachineType::None()) return 1; |
618 if (p2 == MachineType::None()) return 2; | 619 if (p2 == MachineType::None()) return 2; |
619 if (p3 == MachineType::None()) return 3; | 620 if (p3 == MachineType::None()) return 3; |
620 return 4; | 621 return 4; |
621 } | 622 } |
622 }; | 623 }; |
623 | 624 |
624 } // namespace | 625 } // namespace |
625 | 626 |
626 #endif | 627 #endif |
OLD | NEW |