| 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 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1975 isolate->cpu_profiler()->is_profiling()) { | 1975 isolate->cpu_profiler()->is_profiling()) { |
| 1976 ScopedVector<char> buffer(128); | 1976 ScopedVector<char> buffer(128); |
| 1977 SNPrintF(buffer, "%s#%d:%s", message, index, func_name); | 1977 SNPrintF(buffer, "%s#%d:%s", message, index, func_name); |
| 1978 Handle<String> name_str = | 1978 Handle<String> name_str = |
| 1979 isolate->factory()->NewStringFromAsciiChecked(buffer.start()); | 1979 isolate->factory()->NewStringFromAsciiChecked(buffer.start()); |
| 1980 Handle<String> script_str = | 1980 Handle<String> script_str = |
| 1981 isolate->factory()->NewStringFromAsciiChecked("(WASM)"); | 1981 isolate->factory()->NewStringFromAsciiChecked("(WASM)"); |
| 1982 Handle<Code> code = info->code(); | 1982 Handle<Code> code = info->code(); |
| 1983 Handle<SharedFunctionInfo> shared = | 1983 Handle<SharedFunctionInfo> shared = |
| 1984 isolate->factory()->NewSharedFunctionInfo(name_str, code, false); | 1984 isolate->factory()->NewSharedFunctionInfo(name_str, code, false); |
| 1985 PROFILE(isolate, | 1985 PROFILE(isolate, CodeCreateEvent(tag, AbstractCode::cast(*code), *shared, |
| 1986 CodeCreateEvent(tag, *code, *shared, info, *script_str, 0, 0)); | 1986 info, *script_str, 0, 0)); |
| 1987 } | 1987 } |
| 1988 } | 1988 } |
| 1989 | 1989 |
| 1990 Handle<JSFunction> CompileJSToWasmWrapper( | 1990 Handle<JSFunction> CompileJSToWasmWrapper( |
| 1991 Isolate* isolate, wasm::ModuleEnv* module, Handle<String> name, | 1991 Isolate* isolate, wasm::ModuleEnv* module, Handle<String> name, |
| 1992 Handle<Code> wasm_code, Handle<JSObject> module_object, uint32_t index) { | 1992 Handle<Code> wasm_code, Handle<JSObject> module_object, uint32_t index) { |
| 1993 wasm::WasmFunction* func = &module->module->functions->at(index); | 1993 wasm::WasmFunction* func = &module->module->functions->at(index); |
| 1994 | 1994 |
| 1995 //---------------------------------------------------------------------------- | 1995 //---------------------------------------------------------------------------- |
| 1996 // Create the JSFunction object. | 1996 // Create the JSFunction object. |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2247 module_env->module->GetName(function.name_offset)); | 2247 module_env->module->GetName(function.name_offset)); |
| 2248 } | 2248 } |
| 2249 | 2249 |
| 2250 return code; | 2250 return code; |
| 2251 } | 2251 } |
| 2252 | 2252 |
| 2253 | 2253 |
| 2254 } // namespace compiler | 2254 } // namespace compiler |
| 2255 } // namespace internal | 2255 } // namespace internal |
| 2256 } // namespace v8 | 2256 } // namespace v8 |
| OLD | NEW |