| Index: src/typing.cc
|
| diff --git a/src/typing.cc b/src/typing.cc
|
| index 434aff349055d179256a501d2b18b6a137afaade..fdc4250f7bf7eafe57fa9679cd67cd4349de53b5 100644
|
| --- a/src/typing.cc
|
| +++ b/src/typing.cc
|
| @@ -389,6 +389,16 @@ void AstTyper::VisitLiteral(Literal* expr) {
|
| }
|
|
|
|
|
| +void AstTyper::VisitStringLiteral(StringLiteral* expr) {
|
| + VisitLiteral(expr);
|
| +}
|
| +
|
| +
|
| +void AstTyper::VisitNumberLiteral(NumberLiteral* expr) {
|
| + VisitLiteral(expr);
|
| +}
|
| +
|
| +
|
| void AstTyper::VisitRegExpLiteral(RegExpLiteral* expr) {
|
| NarrowType(expr, Bounds(Type::RegExp(zone())));
|
| }
|
| @@ -434,8 +444,8 @@ void AstTyper::VisitAssignment(Assignment* expr) {
|
| expr->set_is_uninitialized(oracle()->StoreIsUninitialized(id));
|
| if (!expr->IsUninitialized()) {
|
| if (prop->key()->IsPropertyName()) {
|
| - Literal* lit_key = prop->key()->AsLiteral();
|
| - ASSERT(lit_key != NULL && lit_key->value()->IsString());
|
| + StringLiteral* lit_key = prop->key()->AsStringLiteral();
|
| + ASSERT(lit_key != NULL);
|
| Handle<String> name = Handle<String>::cast(lit_key->value());
|
| oracle()->AssignmentReceiverTypes(id, name, expr->GetReceiverTypes());
|
| } else {
|
| @@ -482,9 +492,9 @@ void AstTyper::VisitProperty(Property* expr) {
|
| expr->set_is_uninitialized(oracle()->LoadIsUninitialized(id));
|
| if (!expr->IsUninitialized()) {
|
| if (expr->key()->IsPropertyName()) {
|
| - Literal* lit_key = expr->key()->AsLiteral();
|
| - ASSERT(lit_key != NULL && lit_key->value()->IsString());
|
| - Handle<String> name = Handle<String>::cast(lit_key->value());
|
| + StringLiteral* lit_key = expr->key()->AsStringLiteral();
|
| + ASSERT(lit_key != NULL);
|
| + Handle<String> name = lit_key->string();
|
| bool is_prototype;
|
| oracle()->PropertyReceiverTypes(
|
| id, name, expr->GetReceiverTypes(), &is_prototype);
|
|
|