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

Unified Diff: src/variables.h

Issue 57052: * String type inference using compiler framework. (Closed)
Patch Set: Changes relative to head of bleeding edge (don't do diff with earlier versions) Created 11 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime.js ('k') | src/variables.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/variables.h
diff --git a/src/variables.h b/src/variables.h
index 00ba34557c4d7636ac01df26cbc28ddd8cc08218..275f498e82c5b5bafd91e9b36b7cf26cbd381613 100644
--- a/src/variables.h
+++ b/src/variables.h
@@ -64,14 +64,14 @@ class UseCount BASE_EMBEDDED {
// Variables and AST expression nodes can track their "type" to enable
// optimizations and removal of redundant checks when generating code.
-class StaticType BASE_EMBEDDED {
+class SmiAnalysis {
public:
enum Kind {
UNKNOWN,
LIKELY_SMI
};
- StaticType() : kind_(UNKNOWN) {}
+ SmiAnalysis() : kind_(UNKNOWN) {}
bool Is(Kind kind) const { return kind_ == kind; }
@@ -79,11 +79,11 @@ class StaticType BASE_EMBEDDED {
bool IsUnknown() const { return Is(UNKNOWN); }
bool IsLikelySmi() const { return Is(LIKELY_SMI); }
- void CopyFrom(StaticType* other) {
+ void CopyFrom(SmiAnalysis* other) {
kind_ = other->kind_;
}
- static const char* Type2String(StaticType* type);
+ static const char* Type2String(SmiAnalysis* type);
// LIKELY_SMI accessors
void SetAsLikelySmi() {
@@ -99,7 +99,7 @@ class StaticType BASE_EMBEDDED {
private:
Kind kind_;
- DISALLOW_COPY_AND_ASSIGN(StaticType);
+ DISALLOW_COPY_AND_ASSIGN(SmiAnalysis);
};
@@ -185,7 +185,7 @@ class Variable: public ZoneObject {
Expression* rewrite() const { return rewrite_; }
Slot* slot() const;
- StaticType* type() { return &type_; }
+ SmiAnalysis* type() { return &type_; }
private:
Variable(Scope* scope, Handle<String> name, Mode mode, bool is_valid_LHS,
@@ -205,7 +205,7 @@ class Variable: public ZoneObject {
UseCount obj_uses_; // uses of the object the variable points to
// Static type information
- StaticType type_;
+ SmiAnalysis type_;
// Code generation.
// rewrite_ is usually a Slot or a Property, but maybe any expression.
« no previous file with comments | « src/runtime.js ('k') | src/variables.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698