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/elapsed-timer.h" | 9 #include "src/base/platform/elapsed-timer.h" |
10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
(...skipping 2704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2715 SNPrintF(buffer, "%s#%d:%.*s", message, index, func_name.length(), | 2715 SNPrintF(buffer, "%s#%d:%.*s", message, index, func_name.length(), |
2716 func_name.start()); | 2716 func_name.start()); |
2717 Handle<String> name_str = | 2717 Handle<String> name_str = |
2718 isolate->factory()->NewStringFromAsciiChecked(buffer.start()); | 2718 isolate->factory()->NewStringFromAsciiChecked(buffer.start()); |
2719 Handle<String> script_str = | 2719 Handle<String> script_str = |
2720 isolate->factory()->NewStringFromAsciiChecked("(WASM)"); | 2720 isolate->factory()->NewStringFromAsciiChecked("(WASM)"); |
2721 Handle<Code> code = info->code(); | 2721 Handle<Code> code = info->code(); |
2722 Handle<SharedFunctionInfo> shared = | 2722 Handle<SharedFunctionInfo> shared = |
2723 isolate->factory()->NewSharedFunctionInfo(name_str, code, false); | 2723 isolate->factory()->NewSharedFunctionInfo(name_str, code, false); |
2724 PROFILE(isolate, CodeCreateEvent(tag, AbstractCode::cast(*code), *shared, | 2724 PROFILE(isolate, CodeCreateEvent(tag, AbstractCode::cast(*code), *shared, |
2725 info, *script_str, 0, 0)); | 2725 *script_str, 0, 0)); |
2726 } | 2726 } |
2727 } | 2727 } |
2728 | 2728 |
2729 Handle<JSFunction> CompileJSToWasmWrapper( | 2729 Handle<JSFunction> CompileJSToWasmWrapper( |
2730 Isolate* isolate, wasm::ModuleEnv* module, Handle<String> name, | 2730 Isolate* isolate, wasm::ModuleEnv* module, Handle<String> name, |
2731 Handle<Code> wasm_code, Handle<JSObject> module_object, uint32_t index) { | 2731 Handle<Code> wasm_code, Handle<JSObject> module_object, uint32_t index) { |
2732 wasm::WasmFunction* func = &module->module->functions[index]; | 2732 wasm::WasmFunction* func = &module->module->functions[index]; |
2733 | 2733 |
2734 //---------------------------------------------------------------------------- | 2734 //---------------------------------------------------------------------------- |
2735 // Create the JSFunction object. | 2735 // Create the JSFunction object. |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3108 const wasm::WasmFunction* function) { | 3108 const wasm::WasmFunction* function) { |
3109 WasmCompilationUnit* unit = | 3109 WasmCompilationUnit* unit = |
3110 CreateWasmCompilationUnit(thrower, isolate, module_env, function, 0); | 3110 CreateWasmCompilationUnit(thrower, isolate, module_env, function, 0); |
3111 ExecuteCompilation(unit); | 3111 ExecuteCompilation(unit); |
3112 return FinishCompilation(unit); | 3112 return FinishCompilation(unit); |
3113 } | 3113 } |
3114 | 3114 |
3115 } // namespace compiler | 3115 } // namespace compiler |
3116 } // namespace internal | 3116 } // namespace internal |
3117 } // namespace v8 | 3117 } // namespace v8 |
OLD | NEW |