Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Side by Side Diff: src/asmjs/asm-wasm-builder.h

Issue 2404253002: [wasm] Provide better stack traces for asm.js code (Closed)
Patch Set: Address titzer's comments Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/asmjs/asm-js.cc ('k') | src/asmjs/asm-wasm-builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef V8_ASMJS_ASM_WASM_BUILDER_H_ 5 #ifndef V8_ASMJS_ASM_WASM_BUILDER_H_
6 #define V8_ASMJS_ASM_WASM_BUILDER_H_ 6 #define V8_ASMJS_ASM_WASM_BUILDER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/asmjs/asm-typer.h" 9 #include "src/asmjs/asm-typer.h"
10 #include "src/objects.h" 10 #include "src/objects.h"
11 #include "src/wasm/wasm-module-builder.h" 11 #include "src/wasm/wasm-module-builder.h"
12 #include "src/zone/zone.h" 12 #include "src/zone/zone.h"
13 13
14 namespace v8 { 14 namespace v8 {
15 namespace internal { 15 namespace internal {
16 16
17 class FunctionLiteral; 17 class FunctionLiteral;
18 18
19 namespace wasm { 19 namespace wasm {
20 20
21 class AsmWasmBuilder { 21 class AsmWasmBuilder {
22 public: 22 public:
23 struct Result {
24 ZoneBuffer* module_bytes;
25 ZoneBuffer* asm_offset_table;
26 };
27
23 explicit AsmWasmBuilder(Isolate* isolate, Zone* zone, FunctionLiteral* root, 28 explicit AsmWasmBuilder(Isolate* isolate, Zone* zone, FunctionLiteral* root,
24 AsmTyper* typer); 29 AsmTyper* typer);
25 ZoneBuffer* Run(Handle<FixedArray>* foreign_args); 30 Result Run(Handle<FixedArray>* foreign_args);
26 31
27 static const char* foreign_init_name; 32 static const char* foreign_init_name;
28 static const char* single_function_name; 33 static const char* single_function_name;
29 34
30 private: 35 private:
31 Isolate* isolate_; 36 Isolate* isolate_;
32 Zone* zone_; 37 Zone* zone_;
33 FunctionLiteral* literal_; 38 FunctionLiteral* literal_;
34 AsmTyper* typer_; 39 AsmTyper* typer_;
35 }; 40 };
36 } // namespace wasm 41 } // namespace wasm
37 } // namespace internal 42 } // namespace internal
38 } // namespace v8 43 } // namespace v8
39 44
40 #endif // V8_WASM_ASM_WASM_BUILDER_H_ 45 #endif // V8_WASM_ASM_WASM_BUILDER_H_
OLDNEW
« no previous file with comments | « src/asmjs/asm-js.cc ('k') | src/asmjs/asm-wasm-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698