OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 6035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6046 | 6046 |
6047 | 6047 |
6048 void HGraphBuilder::VisitDeclaration(Declaration* decl) { | 6048 void HGraphBuilder::VisitDeclaration(Declaration* decl) { |
6049 HandleDeclaration(decl->proxy(), decl->mode(), decl->fun()); | 6049 HandleDeclaration(decl->proxy(), decl->mode(), decl->fun()); |
6050 } | 6050 } |
6051 | 6051 |
6052 | 6052 |
6053 void HGraphBuilder::HandleDeclaration(VariableProxy* proxy, | 6053 void HGraphBuilder::HandleDeclaration(VariableProxy* proxy, |
6054 VariableMode mode, | 6054 VariableMode mode, |
6055 FunctionLiteral* function) { | 6055 FunctionLiteral* function) { |
6056 if (mode == LET) return Bailout("unsupported let declaration"); | 6056 if (mode == LET || mode == CONST_HARMONY) { |
| 6057 return Bailout("unsupported harmony declaration"); |
| 6058 } |
6057 Variable* var = proxy->var(); | 6059 Variable* var = proxy->var(); |
6058 switch (var->location()) { | 6060 switch (var->location()) { |
6059 case Variable::UNALLOCATED: | 6061 case Variable::UNALLOCATED: |
6060 return Bailout("unsupported global declaration"); | 6062 return Bailout("unsupported global declaration"); |
6061 case Variable::PARAMETER: | 6063 case Variable::PARAMETER: |
6062 case Variable::LOCAL: | 6064 case Variable::LOCAL: |
6063 case Variable::CONTEXT: | 6065 case Variable::CONTEXT: |
6064 if (mode == CONST || function != NULL) { | 6066 if (mode == CONST || function != NULL) { |
6065 HValue* value = NULL; | 6067 HValue* value = NULL; |
6066 if (mode == CONST) { | 6068 if (mode == CONST) { |
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7013 } | 7015 } |
7014 } | 7016 } |
7015 | 7017 |
7016 #ifdef DEBUG | 7018 #ifdef DEBUG |
7017 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 7019 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
7018 if (allocator_ != NULL) allocator_->Verify(); | 7020 if (allocator_ != NULL) allocator_->Verify(); |
7019 #endif | 7021 #endif |
7020 } | 7022 } |
7021 | 7023 |
7022 } } // namespace v8::internal | 7024 } } // namespace v8::internal |
OLD | NEW |