| 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 1971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1982 isolate->cpu_profiler()->is_profiling()) { | 1982 isolate->cpu_profiler()->is_profiling()) { |
| 1983 ScopedVector<char> buffer(128); | 1983 ScopedVector<char> buffer(128); |
| 1984 SNPrintF(buffer, "%s#%d:%s", message, index, func_name); | 1984 SNPrintF(buffer, "%s#%d:%s", message, index, func_name); |
| 1985 Handle<String> name_str = | 1985 Handle<String> name_str = |
| 1986 isolate->factory()->NewStringFromAsciiChecked(buffer.start()); | 1986 isolate->factory()->NewStringFromAsciiChecked(buffer.start()); |
| 1987 Handle<String> script_str = | 1987 Handle<String> script_str = |
| 1988 isolate->factory()->NewStringFromAsciiChecked("(WASM)"); | 1988 isolate->factory()->NewStringFromAsciiChecked("(WASM)"); |
| 1989 Handle<Code> code = info->code(); | 1989 Handle<Code> code = info->code(); |
| 1990 Handle<SharedFunctionInfo> shared = | 1990 Handle<SharedFunctionInfo> shared = |
| 1991 isolate->factory()->NewSharedFunctionInfo(name_str, code, false); | 1991 isolate->factory()->NewSharedFunctionInfo(name_str, code, false); |
| 1992 PROFILE(isolate, | 1992 PROFILE(isolate, CodeCreateEvent(tag, AbstractCode::cast(*code), *shared, |
| 1993 CodeCreateEvent(tag, *code, *shared, info, *script_str, 0, 0)); | 1993 info, *script_str, 0, 0)); |
| 1994 } | 1994 } |
| 1995 } | 1995 } |
| 1996 | 1996 |
| 1997 Handle<JSFunction> CompileJSToWasmWrapper( | 1997 Handle<JSFunction> CompileJSToWasmWrapper( |
| 1998 Isolate* isolate, wasm::ModuleEnv* module, Handle<String> name, | 1998 Isolate* isolate, wasm::ModuleEnv* module, Handle<String> name, |
| 1999 Handle<Code> wasm_code, Handle<JSObject> module_object, uint32_t index) { | 1999 Handle<Code> wasm_code, Handle<JSObject> module_object, uint32_t index) { |
| 2000 wasm::WasmFunction* func = &module->module->functions->at(index); | 2000 wasm::WasmFunction* func = &module->module->functions->at(index); |
| 2001 | 2001 |
| 2002 //---------------------------------------------------------------------------- | 2002 //---------------------------------------------------------------------------- |
| 2003 // Create the JSFunction object. | 2003 // Create the JSFunction object. |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2254 module_env->module->GetName(function.name_offset)); | 2254 module_env->module->GetName(function.name_offset)); |
| 2255 } | 2255 } |
| 2256 | 2256 |
| 2257 return code; | 2257 return code; |
| 2258 } | 2258 } |
| 2259 | 2259 |
| 2260 | 2260 |
| 2261 } // namespace compiler | 2261 } // namespace compiler |
| 2262 } // namespace internal | 2262 } // namespace internal |
| 2263 } // namespace v8 | 2263 } // namespace v8 |
| OLD | NEW |