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 1926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1937 isolate->cpu_profiler()->is_profiling()) { | 1937 isolate->cpu_profiler()->is_profiling()) { |
1938 ScopedVector<char> buffer(128); | 1938 ScopedVector<char> buffer(128); |
1939 SNPrintF(buffer, "%s#%d:%s", message, index, func_name); | 1939 SNPrintF(buffer, "%s#%d:%s", message, index, func_name); |
1940 Handle<String> name_str = | 1940 Handle<String> name_str = |
1941 isolate->factory()->NewStringFromAsciiChecked(buffer.start()); | 1941 isolate->factory()->NewStringFromAsciiChecked(buffer.start()); |
1942 Handle<String> script_str = | 1942 Handle<String> script_str = |
1943 isolate->factory()->NewStringFromAsciiChecked("(WASM)"); | 1943 isolate->factory()->NewStringFromAsciiChecked("(WASM)"); |
1944 Handle<Code> code = info->code(); | 1944 Handle<Code> code = info->code(); |
1945 Handle<SharedFunctionInfo> shared = | 1945 Handle<SharedFunctionInfo> shared = |
1946 isolate->factory()->NewSharedFunctionInfo(name_str, code, false); | 1946 isolate->factory()->NewSharedFunctionInfo(name_str, code, false); |
1947 PROFILE(isolate, | 1947 PROFILE(isolate, CodeCreateEvent(tag, AbstractCode::cast(*code), *shared, |
1948 CodeCreateEvent(tag, *code, *shared, info, *script_str, 0, 0)); | 1948 info, *script_str, 0, 0)); |
1949 } | 1949 } |
1950 } | 1950 } |
1951 | 1951 |
1952 Handle<JSFunction> CompileJSToWasmWrapper( | 1952 Handle<JSFunction> CompileJSToWasmWrapper( |
1953 Isolate* isolate, wasm::ModuleEnv* module, Handle<String> name, | 1953 Isolate* isolate, wasm::ModuleEnv* module, Handle<String> name, |
1954 Handle<Code> wasm_code, Handle<JSObject> module_object, uint32_t index) { | 1954 Handle<Code> wasm_code, Handle<JSObject> module_object, uint32_t index) { |
1955 wasm::WasmFunction* func = &module->module->functions->at(index); | 1955 wasm::WasmFunction* func = &module->module->functions->at(index); |
1956 | 1956 |
1957 //---------------------------------------------------------------------------- | 1957 //---------------------------------------------------------------------------- |
1958 // Create the JSFunction object. | 1958 // Create the JSFunction object. |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2209 module_env->module->GetName(function.name_offset)); | 2209 module_env->module->GetName(function.name_offset)); |
2210 } | 2210 } |
2211 | 2211 |
2212 return code; | 2212 return code; |
2213 } | 2213 } |
2214 | 2214 |
2215 | 2215 |
2216 } // namespace compiler | 2216 } // namespace compiler |
2217 } // namespace internal | 2217 } // namespace internal |
2218 } // namespace v8 | 2218 } // namespace v8 |
OLD | NEW |