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

Side by Side Diff: src/typing-asm.h

Issue 1409763004: [types] Use the TypeCache consistently for common types. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/type-cache.cc ('k') | src/typing-asm.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_TYPING_ASM_H_ 5 #ifndef V8_TYPING_ASM_H_
6 #define V8_TYPING_ASM_H_ 6 #define V8_TYPING_ASM_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/ast.h" 9 #include "src/ast.h"
10 #include "src/effects.h" 10 #include "src/effects.h"
11 #include "src/type-info.h" 11 #include "src/type-info.h"
12 #include "src/types.h" 12 #include "src/types.h"
13 #include "src/zone.h" 13 #include "src/zone.h"
14 14
15 namespace v8 { 15 namespace v8 {
16 namespace internal { 16 namespace internal {
17 17
18 class ZoneTypeCache; 18 class TypeCache;
19 19
20 class AsmTyper : public AstVisitor { 20 class AsmTyper : public AstVisitor {
21 public: 21 public:
22 explicit AsmTyper(Isolate* isolate, Zone* zone, Script* script, 22 explicit AsmTyper(Isolate* isolate, Zone* zone, Script* script,
23 FunctionLiteral* root); 23 FunctionLiteral* root);
24 bool Validate(); 24 bool Validate();
25 const char* error_message() { return error_message_; } 25 const char* error_message() { return error_message_; }
26 26
27 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); 27 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
28 28
(...skipping 16 matching lines...) Expand all
45 ObjectTypeMap stdlib_heap_types_; 45 ObjectTypeMap stdlib_heap_types_;
46 ObjectTypeMap stdlib_math_types_; 46 ObjectTypeMap stdlib_math_types_;
47 47
48 // Map from Variable* to global/local variable Type*. 48 // Map from Variable* to global/local variable Type*.
49 ZoneHashMap global_variable_type_; 49 ZoneHashMap global_variable_type_;
50 ZoneHashMap local_variable_type_; 50 ZoneHashMap local_variable_type_;
51 51
52 bool in_function_; // In module function? 52 bool in_function_; // In module function?
53 bool building_function_tables_; 53 bool building_function_tables_;
54 54
55 ZoneTypeCache const& cache_; 55 TypeCache const& cache_;
56 56
57 static const int kErrorMessageLimit = 100; 57 static const int kErrorMessageLimit = 100;
58 char error_message_[kErrorMessageLimit]; 58 char error_message_[kErrorMessageLimit];
59 59
60 static const int kMaxUncombinedAdditiveSteps = 1 << 20; 60 static const int kMaxUncombinedAdditiveSteps = 1 << 20;
61 static const int kMaxUncombinedMultiplicativeSteps = 1; 61 static const int kMaxUncombinedMultiplicativeSteps = 1;
62 62
63 void InitializeStdlib(); 63 void InitializeStdlib();
64 64
65 void VisitDeclarations(ZoneList<Declaration*>* d) override; 65 void VisitDeclarations(ZoneList<Declaration*>* d) override;
(...skipping 23 matching lines...) Expand all
89 #define DECLARE_VISIT(type) virtual void Visit##type(type* node) override; 89 #define DECLARE_VISIT(type) virtual void Visit##type(type* node) override;
90 AST_NODE_LIST(DECLARE_VISIT) 90 AST_NODE_LIST(DECLARE_VISIT)
91 #undef DECLARE_VISIT 91 #undef DECLARE_VISIT
92 92
93 DISALLOW_COPY_AND_ASSIGN(AsmTyper); 93 DISALLOW_COPY_AND_ASSIGN(AsmTyper);
94 }; 94 };
95 } // namespace internal 95 } // namespace internal
96 } // namespace v8 96 } // namespace v8
97 97
98 #endif // V8_TYPING_ASM_H_ 98 #endif // V8_TYPING_ASM_H_
OLDNEW
« no previous file with comments | « src/type-cache.cc ('k') | src/typing-asm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698