OLD | NEW |
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/compiler/wasm-compiler.h" | 5 #include "src/compiler/wasm-compiler.h" |
6 | 6 |
7 #include "src/isolate-inl.h" | 7 #include "src/isolate-inl.h" |
8 | 8 |
9 #include "src/base/platform/platform.h" | 9 #include "src/base/platform/platform.h" |
10 | 10 |
(...skipping 2051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2062 os << "Compiling WASM function #" << index << ":"; | 2062 os << "Compiling WASM function #" << index << ":"; |
2063 if (function.name_offset > 0) { | 2063 if (function.name_offset > 0) { |
2064 os << module_env->module->GetName(function.name_offset); | 2064 os << module_env->module->GetName(function.name_offset); |
2065 } | 2065 } |
2066 os << std::endl; | 2066 os << std::endl; |
2067 } | 2067 } |
2068 // Initialize the function environment for decoding. | 2068 // Initialize the function environment for decoding. |
2069 wasm::FunctionEnv env; | 2069 wasm::FunctionEnv env; |
2070 env.module = module_env; | 2070 env.module = module_env; |
2071 env.sig = function.sig; | 2071 env.sig = function.sig; |
2072 env.local_int32_count = function.local_int32_count; | 2072 env.local_i32_count = function.local_i32_count; |
2073 env.local_int64_count = function.local_int64_count; | 2073 env.local_i64_count = function.local_i64_count; |
2074 env.local_float32_count = function.local_float32_count; | 2074 env.local_f32_count = function.local_f32_count; |
2075 env.local_float64_count = function.local_float64_count; | 2075 env.local_f64_count = function.local_f64_count; |
2076 env.SumLocals(); | 2076 env.SumLocals(); |
2077 | 2077 |
2078 // Create a TF graph during decoding. | 2078 // Create a TF graph during decoding. |
2079 Zone zone; | 2079 Zone zone; |
2080 Graph graph(&zone); | 2080 Graph graph(&zone); |
2081 CommonOperatorBuilder common(&zone); | 2081 CommonOperatorBuilder common(&zone); |
2082 MachineOperatorBuilder machine( | 2082 MachineOperatorBuilder machine( |
2083 &zone, MachineType::PointerRepresentation(), | 2083 &zone, MachineType::PointerRepresentation(), |
2084 InstructionSelector::SupportedMachineOperatorFlags()); | 2084 InstructionSelector::SupportedMachineOperatorFlags()); |
2085 JSGraph jsgraph(isolate, &graph, &common, nullptr, nullptr, &machine); | 2085 JSGraph jsgraph(isolate, &graph, &common, nullptr, nullptr, &machine); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2130 module_env->module->GetName(function.name_offset)); | 2130 module_env->module->GetName(function.name_offset)); |
2131 } | 2131 } |
2132 | 2132 |
2133 return code; | 2133 return code; |
2134 } | 2134 } |
2135 | 2135 |
2136 | 2136 |
2137 } // namespace compiler | 2137 } // namespace compiler |
2138 } // namespace internal | 2138 } // namespace internal |
2139 } // namespace v8 | 2139 } // namespace v8 |
OLD | NEW |