Revision: 3478 Author: [email protected] Date: Wed Dec 16 22:21:50 2009 Log: - Undo unfortunate renaming of StaticType.
Review URL: http://codereview.chromium.org/506050 http://code.google.com/p/v8/source/detail?r=3478 Modified: /branches/bleeding_edge/src/ast.h /branches/bleeding_edge/src/ia32/codegen-ia32.cc /branches/bleeding_edge/src/ia32/codegen-ia32.h /branches/bleeding_edge/src/prettyprinter.cc /branches/bleeding_edge/src/prettyprinter.h /branches/bleeding_edge/src/rewriter.cc /branches/bleeding_edge/src/variables.cc /branches/bleeding_edge/src/variables.h ======================================= --- /branches/bleeding_edge/src/ast.h Fri Dec 11 08:09:16 2009 +++ /branches/bleeding_edge/src/ast.h Wed Dec 16 22:21:50 2009 @@ -192,13 +192,13 @@ virtual void MarkAsStatement() { /* do nothing */ } // Static type information for this expression. - SmiAnalysis* type() { return &type_; } + StaticType* type() { return &type_; } Context context() { return context_; } void set_context(Context context) { context_ = context; } private: - SmiAnalysis type_; + StaticType type_; Context context_; }; ======================================= --- /branches/bleeding_edge/src/ia32/codegen-ia32.cc Wed Dec 16 07:43:20 2009 +++ /branches/bleeding_edge/src/ia32/codegen-ia32.cc Wed Dec 16 22:21:50 2009 @@ -818,7 +818,7 @@ void CodeGenerator::GenericBinaryOperation(Token::Value op, - SmiAnalysis* type, + StaticType* type, OverwriteMode overwrite_mode) { Comment cmnt(masm_, "[ BinaryOperation"); Comment cmnt_token(masm_, Token::String(op)); @@ -1499,7 +1499,7 @@ void CodeGenerator::ConstantSmiBinaryOperation(Token::Value op, Result* operand, Handle<Object> value, - SmiAnalysis* type, + StaticType* type, bool reversed, OverwriteMode overwrite_mode) { // NOTE: This is an attempt to inline (a bit) more of the code for @@ -6446,7 +6446,7 @@ // a loop and the key is likely to be a smi. Property* property = expression()->AsProperty(); ASSERT(property != NULL); - SmiAnalysis* key_smi_analysis = property->key()->type(); + StaticType* key_smi_analysis = property->key()->type(); if (cgen_->loop_nesting() > 0 && key_smi_analysis->IsLikelySmi()) { Comment cmnt(masm, "[ Inlined store to keyed Property"); ======================================= --- /branches/bleeding_edge/src/ia32/codegen-ia32.h Fri Dec 11 02:40:01 2009 +++ /branches/bleeding_edge/src/ia32/codegen-ia32.h Wed Dec 16 22:21:50 2009 @@ -434,7 +434,7 @@ void GenericBinaryOperation( Token::Value op, - SmiAnalysis* type, + StaticType* type, OverwriteMode overwrite_mode); // If possible, combine two constant smi values using op to produce @@ -447,7 +447,7 @@ void ConstantSmiBinaryOperation(Token::Value op, Result* operand, Handle<Object> constant_operand, - SmiAnalysis* type, + StaticType* type, bool reversed, OverwriteMode overwrite_mode); ======================================= --- /branches/bleeding_edge/src/prettyprinter.cc Thu Nov 5 09:25:50 2009 +++ /branches/bleeding_edge/src/prettyprinter.cc Wed Dec 16 22:21:50 2009 @@ -594,11 +594,11 @@ ast_printer_->inc_indent(); } - explicit IndentedScope(const char* txt, SmiAnalysis* type = NULL) { + explicit IndentedScope(const char* txt, StaticType* type = NULL) { ast_printer_->PrintIndented(txt); if ((type != NULL) && (type->IsKnown())) { ast_printer_->Print(" (type = "); - ast_printer_->Print(SmiAnalysis::Type2String(type)); + ast_printer_->Print(StaticType::Type2String(type)); ast_printer_->Print(")"); } ast_printer_->Print("\n"); @@ -657,7 +657,7 @@ void AstPrinter::PrintLiteralWithModeIndented(const char* info, Variable* var, Handle<Object> value, - SmiAnalysis* type) { + StaticType* type) { if (var == NULL) { PrintLiteralIndented(info, value, true); } else { @@ -665,7 +665,7 @@ if (type->IsKnown()) { OS::SNPrintF(buf, "%s (mode = %s, type = %s)", info, Variable::Mode2String(var->mode()), - SmiAnalysis::Type2String(type)); + StaticType::Type2String(type)); } else { OS::SNPrintF(buf, "%s (mode = %s)", info, Variable::Mode2String(var->mode())); @@ -1072,7 +1072,7 @@ OS::SNPrintF(buf, "%s %s (type = %s)", (node->is_prefix() ? "PRE" : "POST"), Token::Name(node->op()), - SmiAnalysis::Type2String(node->type())); + StaticType::Type2String(node->type())); } else { OS::SNPrintF(buf, "%s %s", (node->is_prefix() ? "PRE" : "POST"), Token::Name(node->op())); ======================================= --- /branches/bleeding_edge/src/prettyprinter.h Mon Oct 12 08:06:28 2009 +++ /branches/bleeding_edge/src/prettyprinter.h Wed Dec 16 22:21:50 2009 @@ -102,7 +102,7 @@ void PrintLiteralWithModeIndented(const char* info, Variable* var, Handle<Object> value, - SmiAnalysis* type); + StaticType* type); void PrintLabelsIndented(const char* info, ZoneStringList* labels); void inc_indent() { indent_++; } ======================================= --- /branches/bleeding_edge/src/rewriter.cc Mon Oct 12 06:14:06 2009 +++ /branches/bleeding_edge/src/rewriter.cc Wed Dec 16 22:21:50 2009 @@ -367,7 +367,7 @@ if (proxy != NULL) { Variable* var = proxy->AsVariable(); if (var != NULL) { - SmiAnalysis* var_type = var->type(); + StaticType* var_type = var->type(); if (var_type->IsUnknown()) { var_type->CopyFrom(node->type()); } else if (var_type->IsLikelySmi()) { ======================================= --- /branches/bleeding_edge/src/variables.cc Wed Jun 24 01:01:38 2009 +++ /branches/bleeding_edge/src/variables.cc Wed Dec 16 22:21:50 2009 @@ -86,10 +86,10 @@ // ---------------------------------------------------------------------------- -// Implementation SmiAnalysis. +// Implementation StaticType. -const char* SmiAnalysis::Type2String(SmiAnalysis* type) { +const char* StaticType::Type2String(StaticType* type) { switch (type->kind_) { case UNKNOWN: return "UNKNOWN"; ======================================= --- /branches/bleeding_edge/src/variables.h Tue Sep 29 06:28:30 2009 +++ /branches/bleeding_edge/src/variables.h Wed Dec 16 22:21:50 2009 @@ -65,14 +65,14 @@ // Variables and AST expression nodes can track their "type" to enable // optimizations and removal of redundant checks when generating code. -class SmiAnalysis { +class StaticType { public: enum Kind { UNKNOWN, LIKELY_SMI }; - SmiAnalysis() : kind_(UNKNOWN) {} + StaticType() : kind_(UNKNOWN) {} bool Is(Kind kind) const { return kind_ == kind; } @@ -80,11 +80,11 @@ bool IsUnknown() const { return Is(UNKNOWN); } bool IsLikelySmi() const { return Is(LIKELY_SMI); } - void CopyFrom(SmiAnalysis* other) { + void CopyFrom(StaticType* other) { kind_ = other->kind_; } - static const char* Type2String(SmiAnalysis* type); + static const char* Type2String(StaticType* type); // LIKELY_SMI accessors void SetAsLikelySmi() { @@ -100,7 +100,7 @@ private: Kind kind_; - DISALLOW_COPY_AND_ASSIGN(SmiAnalysis); + DISALLOW_COPY_AND_ASSIGN(StaticType); }; @@ -203,7 +203,7 @@ Expression* rewrite() const { return rewrite_; } Slot* slot() const; - SmiAnalysis* type() { return &type_; } + StaticType* type() { return &type_; } private: Scope* scope_; @@ -220,7 +220,7 @@ UseCount obj_uses_; // uses of the object the variable points to // Static type information - SmiAnalysis type_; + StaticType type_; // Code generation. // rewrite_ is usually a Slot or a Property, but may be any expression. -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
