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

Side by Side Diff: src/typing.h

Issue 100093004: Collect type information based on stack allocated values for OSR. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add OBJECT_PRINT ifdef Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/typing.cc » ('j') | src/typing.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 return zone->New(static_cast<int>(size)); 51 return zone->New(static_cast<int>(size));
52 } 52 }
53 void operator delete(void* pointer, Zone* zone) { } 53 void operator delete(void* pointer, Zone* zone) { }
54 void operator delete(void* pointer) { } 54 void operator delete(void* pointer) { }
55 55
56 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); 56 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
57 57
58 private: 58 private:
59 explicit AstTyper(CompilationInfo* info); 59 explicit AstTyper(CompilationInfo* info);
60 60
61 Handle<Type> ObserveType(Object* value);
62 void ObserveTypesOnStack();
63 Handle<Type> GetObservedType(Variable* var);
64
61 static const int kNoVar = INT_MIN; 65 static const int kNoVar = INT_MIN;
62 typedef v8::internal::Effects<int, kNoVar> Effects; 66 typedef v8::internal::Effects<int, kNoVar> Effects;
63 typedef v8::internal::NestedEffects<int, kNoVar> Store; 67 typedef v8::internal::NestedEffects<int, kNoVar> Store;
64 68
65 CompilationInfo* info_; 69 CompilationInfo* info_;
66 TypeFeedbackOracle oracle_; 70 TypeFeedbackOracle oracle_;
67 Store store_; 71 Store store_;
72 ZoneList<Handle<Type> >* parameter_types_;
73 ZoneList<Handle<Type> >* stack_local_types_;
68 74
69 TypeFeedbackOracle* oracle() { return &oracle_; } 75 TypeFeedbackOracle* oracle() { return &oracle_; }
70 Zone* zone() const { return info_->zone(); } 76 Zone* zone() const { return info_->zone(); }
71 77
72 void NarrowType(Expression* e, Bounds b) { 78 void NarrowType(Expression* e, Bounds b) {
73 e->set_bounds(Bounds::Both(e->bounds(), b, isolate_)); 79 e->set_bounds(Bounds::Both(e->bounds(), b, isolate_));
74 } 80 }
75 void NarrowLowerType(Expression* e, Handle<Type> t) { 81 void NarrowLowerType(Expression* e, Handle<Type> t) {
76 e->set_bounds(Bounds::NarrowLower(e->bounds(), t, isolate_)); 82 e->set_bounds(Bounds::NarrowLower(e->bounds(), t, isolate_));
77 } 83 }
(...skipping 18 matching lines...) Expand all
96 #define DECLARE_VISIT(type) virtual void Visit##type(type* node); 102 #define DECLARE_VISIT(type) virtual void Visit##type(type* node);
97 AST_NODE_LIST(DECLARE_VISIT) 103 AST_NODE_LIST(DECLARE_VISIT)
98 #undef DECLARE_VISIT 104 #undef DECLARE_VISIT
99 105
100 DISALLOW_COPY_AND_ASSIGN(AstTyper); 106 DISALLOW_COPY_AND_ASSIGN(AstTyper);
101 }; 107 };
102 108
103 } } // namespace v8::internal 109 } } // namespace v8::internal
104 110
105 #endif // V8_TYPING_H_ 111 #endif // V8_TYPING_H_
OLDNEW
« no previous file with comments | « no previous file | src/typing.cc » ('j') | src/typing.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698