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

Side by Side Diff: src/asmjs/asm-typer.h

Issue 2553033002: [wasm] [asm.js] Avoid expensive GetLineNumber up front in asm-typer. (Closed)
Patch Set: Created 4 years 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 | « no previous file | src/asmjs/asm-typer.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 SRC_ASMJS_ASM_TYPER_H_ 5 #ifndef SRC_ASMJS_ASM_TYPER_H_
6 #define SRC_ASMJS_ASM_TYPER_H_ 6 #define SRC_ASMJS_ASM_TYPER_H_
7 7
8 #include <cstdint> 8 #include <cstdint>
9 #include <string> 9 #include <string>
10 #include <unordered_map>
10 #include <unordered_set> 11 #include <unordered_set>
11 12
12 #include "src/allocation.h" 13 #include "src/allocation.h"
13 #include "src/asmjs/asm-types.h" 14 #include "src/asmjs/asm-types.h"
14 #include "src/ast/ast-type-bounds.h" 15 #include "src/ast/ast-type-bounds.h"
15 #include "src/ast/ast-types.h" 16 #include "src/ast/ast-types.h"
16 #include "src/ast/ast.h" 17 #include "src/ast/ast.h"
17 #include "src/effects.h" 18 #include "src/effects.h"
18 #include "src/type-info.h" 19 #include "src/type-info.h"
19 #include "src/zone/zone-containers.h" 20 #include "src/zone/zone-containers.h"
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 // the module name. 384 // the module name.
384 VariableInfo* module_info_; 385 VariableInfo* module_info_;
385 Handle<String> module_name_; 386 Handle<String> module_name_;
386 387
387 // 3 Environments 388 // 3 Environments
388 ZoneHashMap global_scope_; // 3.1 Global environment 389 ZoneHashMap global_scope_; // 3.1 Global environment
389 ZoneHashMap local_scope_; // 3.2 Variable environment 390 ZoneHashMap local_scope_; // 3.2 Variable environment
390 391
391 std::uintptr_t stack_limit_; 392 std::uintptr_t stack_limit_;
392 bool stack_overflow_ = false; 393 bool stack_overflow_ = false;
393 ZoneMap<AstNode*, AsmType*> module_node_types_; 394 std::unordered_map<AstNode*, AsmType*> module_node_types_;
394 ZoneMap<AstNode*, AsmType*> function_node_types_; 395 std::unordered_map<AstNode*, AsmType*> function_node_types_;
395 static const int kErrorMessageLimit = 128; 396 static const int kErrorMessageLimit = 128;
396 AsmType* fround_type_; 397 AsmType* fround_type_;
397 AsmType* ffi_type_; 398 AsmType* ffi_type_;
398 char error_message_[kErrorMessageLimit]; 399 char error_message_[kErrorMessageLimit];
399 StdlibSet stdlib_uses_; 400 StdlibSet stdlib_uses_;
400 401
401 SourceLayoutTracker source_layout_; 402 SourceLayoutTracker source_layout_;
402 ReturnStatement* module_return_; 403 ReturnStatement* module_return_;
403 ZoneVector<Assignment*> function_pointer_tables_; 404 ZoneVector<Assignment*> function_pointer_tables_;
404 405
405 DISALLOW_IMPLICIT_CONSTRUCTORS(AsmTyper); 406 DISALLOW_IMPLICIT_CONSTRUCTORS(AsmTyper);
406 }; 407 };
407 408
408 } // namespace wasm 409 } // namespace wasm
409 } // namespace internal 410 } // namespace internal
410 } // namespace v8 411 } // namespace v8
411 412
412 #endif // SRC_ASMJS_ASM_TYPER_H_ 413 #endif // SRC_ASMJS_ASM_TYPER_H_
OLDNEW
« no previous file with comments | « no previous file | src/asmjs/asm-typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698