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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 Visit(expr->value()); | 208 Visit(expr->value()); |
209 } | 209 } |
210 | 210 |
211 | 211 |
212 void BreakableStatementChecker::VisitThrow(Throw* expr) { | 212 void BreakableStatementChecker::VisitThrow(Throw* expr) { |
213 // Throw is breakable if the expression is. | 213 // Throw is breakable if the expression is. |
214 Visit(expr->exception()); | 214 Visit(expr->exception()); |
215 } | 215 } |
216 | 216 |
217 | 217 |
| 218 void BreakableStatementChecker::VisitIncrementOperation( |
| 219 IncrementOperation* expr) { |
| 220 UNREACHABLE(); |
| 221 } |
| 222 |
| 223 |
218 void BreakableStatementChecker::VisitProperty(Property* expr) { | 224 void BreakableStatementChecker::VisitProperty(Property* expr) { |
219 // Property load is breakable. | 225 // Property load is breakable. |
220 is_breakable_ = true; | 226 is_breakable_ = true; |
221 } | 227 } |
222 | 228 |
223 | 229 |
224 void BreakableStatementChecker::VisitCall(Call* expr) { | 230 void BreakableStatementChecker::VisitCall(Call* expr) { |
225 // Function calls both through IC and call stub are breakable. | 231 // Function calls both through IC and call stub are breakable. |
226 is_breakable_ = true; | 232 is_breakable_ = true; |
227 } | 233 } |
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1007 | 1013 |
1008 | 1014 |
1009 void FullCodeGenerator::VisitThrow(Throw* expr) { | 1015 void FullCodeGenerator::VisitThrow(Throw* expr) { |
1010 Comment cmnt(masm_, "[ Throw"); | 1016 Comment cmnt(masm_, "[ Throw"); |
1011 VisitForValue(expr->exception(), kStack); | 1017 VisitForValue(expr->exception(), kStack); |
1012 __ CallRuntime(Runtime::kThrow, 1); | 1018 __ CallRuntime(Runtime::kThrow, 1); |
1013 // Never returns here. | 1019 // Never returns here. |
1014 } | 1020 } |
1015 | 1021 |
1016 | 1022 |
| 1023 void FullCodeGenerator::VisitIncrementOperation(IncrementOperation* expr) { |
| 1024 UNREACHABLE(); |
| 1025 } |
| 1026 |
| 1027 |
1017 int FullCodeGenerator::TryFinally::Exit(int stack_depth) { | 1028 int FullCodeGenerator::TryFinally::Exit(int stack_depth) { |
1018 // The macros used here must preserve the result register. | 1029 // The macros used here must preserve the result register. |
1019 __ Drop(stack_depth); | 1030 __ Drop(stack_depth); |
1020 __ PopTryHandler(); | 1031 __ PopTryHandler(); |
1021 __ Call(finally_entry_); | 1032 __ Call(finally_entry_); |
1022 return 0; | 1033 return 0; |
1023 } | 1034 } |
1024 | 1035 |
1025 | 1036 |
1026 int FullCodeGenerator::TryCatch::Exit(int stack_depth) { | 1037 int FullCodeGenerator::TryCatch::Exit(int stack_depth) { |
1027 // The macros used here must preserve the result register. | 1038 // The macros used here must preserve the result register. |
1028 __ Drop(stack_depth); | 1039 __ Drop(stack_depth); |
1029 __ PopTryHandler(); | 1040 __ PopTryHandler(); |
1030 return 0; | 1041 return 0; |
1031 } | 1042 } |
1032 | 1043 |
1033 | 1044 |
1034 void FullCodeGenerator::EmitRegExpCloneResult(ZoneList<Expression*>* args) { | 1045 void FullCodeGenerator::EmitRegExpCloneResult(ZoneList<Expression*>* args) { |
1035 ASSERT(args->length() == 1); | 1046 ASSERT(args->length() == 1); |
1036 VisitForValue(args->at(0), kStack); | 1047 VisitForValue(args->at(0), kStack); |
1037 __ CallRuntime(Runtime::kRegExpCloneResult, 1); | 1048 __ CallRuntime(Runtime::kRegExpCloneResult, 1); |
1038 Apply(context_, result_register()); | 1049 Apply(context_, result_register()); |
1039 } | 1050 } |
1040 | 1051 |
1041 #undef __ | 1052 #undef __ |
1042 | 1053 |
1043 | 1054 |
1044 } } // namespace v8::internal | 1055 } } // namespace v8::internal |
OLD | NEW |