Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 49 CodeGenSelector() | 49 CodeGenSelector() |
| 50 : has_supported_syntax_(true), | 50 : has_supported_syntax_(true), |
| 51 context_(Expression::kUninitialized) { | 51 context_(Expression::kUninitialized) { |
| 52 } | 52 } |
| 53 | 53 |
| 54 CodeGenTag Select(FunctionLiteral* fun); | 54 CodeGenTag Select(FunctionLiteral* fun); |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 // Visit an expression in a given expression context. | 57 // Visit an expression in a given expression context. |
| 58 void ProcessExpression(Expression* expr, Expression::Context context) { | 58 void ProcessExpression(Expression* expr, Expression::Context context) { |
| 59 ASSERT_EQ(Expression::kUninitialized, expr->context()); | |
|
Kevin Millikin (Chromium)
2009/12/08 09:35:54
As we discussed, change this to
ASSERT(expr->cont
| |
| 59 Expression::Context saved = context_; | 60 Expression::Context saved = context_; |
| 60 context_ = context; | 61 context_ = context; |
| 61 Visit(expr); | 62 Visit(expr); |
| 62 expr->set_context(context); | 63 expr->set_context(context); |
| 63 context_ = saved; | 64 context_ = saved; |
| 64 } | 65 } |
| 65 | 66 |
| 66 void VisitDeclarations(ZoneList<Declaration*>* decls); | 67 void VisitDeclarations(ZoneList<Declaration*>* decls); |
| 67 void VisitStatements(ZoneList<Statement*>* stmts); | 68 void VisitStatements(ZoneList<Statement*>* stmts); |
| 68 | 69 |
| (...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1119 | 1120 |
| 1120 void CodeGenSelector::VisitThisFunction(ThisFunction* expr) { | 1121 void CodeGenSelector::VisitThisFunction(ThisFunction* expr) { |
| 1121 BAILOUT("ThisFunction"); | 1122 BAILOUT("ThisFunction"); |
| 1122 } | 1123 } |
| 1123 | 1124 |
| 1124 #undef BAILOUT | 1125 #undef BAILOUT |
| 1125 #undef CHECK_BAILOUT | 1126 #undef CHECK_BAILOUT |
| 1126 | 1127 |
| 1127 | 1128 |
| 1128 } } // namespace v8::internal | 1129 } } // namespace v8::internal |
| OLD | NEW |