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

Side by Side Diff: src/compiler/typer.h

Issue 658543002: Better typing and type verification (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/schedule.cc ('k') | src/compiler/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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_COMPILER_TYPER_H_ 5 #ifndef V8_COMPILER_TYPER_H_
6 #define V8_COMPILER_TYPER_H_ 6 #define V8_COMPILER_TYPER_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
11 #include "src/compiler/opcodes.h" 11 #include "src/compiler/opcodes.h"
12 #include "src/types.h" 12 #include "src/types.h"
13 13
14 namespace v8 { 14 namespace v8 {
15 namespace internal { 15 namespace internal {
16 namespace compiler { 16 namespace compiler {
17 17
18 class Typer { 18 class Typer {
19 public: 19 public:
20 explicit Typer(Zone* zone); 20 explicit Typer(Graph* graph, MaybeHandle<Context> context);
21 ~Typer();
21 22
22 void Init(Node* node); 23 void Run();
23 void Run(Graph* graph, MaybeHandle<Context> context); 24 void Narrow(Node* node);
24 void Narrow(Graph* graph, Node* node, MaybeHandle<Context> context);
25 void Widen(Graph* graph, Node* node, MaybeHandle<Context> context);
26 25
27 void DecorateGraph(Graph* graph); 26 Graph* graph() { return graph_; }
28 27 MaybeHandle<Context> context() { return context_; }
29 Zone* zone() { return zone_; } 28 Zone* zone() { return graph_->zone(); }
30 Isolate* isolate() { return zone_->isolate(); } 29 Isolate* isolate() { return zone()->isolate(); }
31 30
32 private: 31 private:
33 class Visitor; 32 class Visitor;
34 class RunVisitor; 33 class RunVisitor;
35 class NarrowVisitor; 34 class NarrowVisitor;
36 class WidenVisitor; 35 class WidenVisitor;
36 class Decorator;
37 37
38 Zone* zone_; 38 Graph* graph_;
39 MaybeHandle<Context> context_;
40 Decorator* decorator_;
41
39 Type* number_fun0_; 42 Type* number_fun0_;
40 Type* number_fun1_; 43 Type* number_fun1_;
41 Type* number_fun2_; 44 Type* number_fun2_;
42 Type* weakint_fun1_; 45 Type* weakint_fun1_;
43 Type* imul_fun_; 46 Type* imul_fun_;
44 Type* random_fun_; 47 Type* random_fun_;
45 Type* array_buffer_fun_; 48 Type* array_buffer_fun_;
46 Type* int8_array_fun_; 49 Type* int8_array_fun_;
47 Type* int16_array_fun_; 50 Type* int16_array_fun_;
48 Type* int32_array_fun_; 51 Type* int32_array_fun_;
49 Type* uint8_array_fun_; 52 Type* uint8_array_fun_;
50 Type* uint16_array_fun_; 53 Type* uint16_array_fun_;
51 Type* uint32_array_fun_; 54 Type* uint32_array_fun_;
52 Type* float32_array_fun_; 55 Type* float32_array_fun_;
53 Type* float64_array_fun_; 56 Type* float64_array_fun_;
54 }; 57 };
55 } 58 }
56 } 59 }
57 } // namespace v8::internal::compiler 60 } // namespace v8::internal::compiler
58 61
59 #endif // V8_COMPILER_TYPER_H_ 62 #endif // V8_COMPILER_TYPER_H_
OLDNEW
« no previous file with comments | « src/compiler/schedule.cc ('k') | src/compiler/typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698