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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 Visit(stmt->expression()); | 89 Visit(stmt->expression()); |
90 } | 90 } |
91 | 91 |
92 | 92 |
93 void BreakableStatementChecker::VisitWithEnterStatement( | 93 void BreakableStatementChecker::VisitWithEnterStatement( |
94 WithEnterStatement* stmt) { | 94 WithEnterStatement* stmt) { |
95 Visit(stmt->expression()); | 95 Visit(stmt->expression()); |
96 } | 96 } |
97 | 97 |
98 | 98 |
99 void BreakableStatementChecker::VisitWithExitStatement( | 99 void BreakableStatementChecker::VisitContextExitStatement( |
100 WithExitStatement* stmt) { | 100 ContextExitStatement* stmt) { |
101 } | 101 } |
102 | 102 |
103 | 103 |
104 void BreakableStatementChecker::VisitSwitchStatement(SwitchStatement* stmt) { | 104 void BreakableStatementChecker::VisitSwitchStatement(SwitchStatement* stmt) { |
105 // Switch statements breakable if the tag expression is. | 105 // Switch statements breakable if the tag expression is. |
106 Visit(stmt->tag()); | 106 Visit(stmt->tag()); |
107 } | 107 } |
108 | 108 |
109 | 109 |
110 void BreakableStatementChecker::VisitDoWhileStatement(DoWhileStatement* stmt) { | 110 void BreakableStatementChecker::VisitDoWhileStatement(DoWhileStatement* stmt) { |
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
950 | 950 |
951 EmitReturnSequence(); | 951 EmitReturnSequence(); |
952 } | 952 } |
953 | 953 |
954 | 954 |
955 void FullCodeGenerator::VisitWithEnterStatement(WithEnterStatement* stmt) { | 955 void FullCodeGenerator::VisitWithEnterStatement(WithEnterStatement* stmt) { |
956 Comment cmnt(masm_, "[ WithEnterStatement"); | 956 Comment cmnt(masm_, "[ WithEnterStatement"); |
957 SetStatementPosition(stmt); | 957 SetStatementPosition(stmt); |
958 | 958 |
959 VisitForStackValue(stmt->expression()); | 959 VisitForStackValue(stmt->expression()); |
960 __ CallRuntime(Runtime::kPushContext, 1); | 960 __ CallRuntime(Runtime::kPushWithContext, 1); |
961 StoreToFrameField(StandardFrameConstants::kContextOffset, context_register()); | 961 StoreToFrameField(StandardFrameConstants::kContextOffset, context_register()); |
962 } | 962 } |
963 | 963 |
964 | 964 |
965 void FullCodeGenerator::VisitWithExitStatement(WithExitStatement* stmt) { | 965 void FullCodeGenerator::VisitContextExitStatement(ContextExitStatement* stmt) { |
966 Comment cmnt(masm_, "[ WithExitStatement"); | 966 Comment cmnt(masm_, "[ ContextExitStatement"); |
967 SetStatementPosition(stmt); | 967 SetStatementPosition(stmt); |
968 | 968 |
969 // Pop context. | 969 // Pop context. |
970 LoadContextField(context_register(), Context::PREVIOUS_INDEX); | 970 LoadContextField(context_register(), Context::PREVIOUS_INDEX); |
971 // Update local stack frame context field. | 971 // Update local stack frame context field. |
972 StoreToFrameField(StandardFrameConstants::kContextOffset, context_register()); | 972 StoreToFrameField(StandardFrameConstants::kContextOffset, context_register()); |
973 } | 973 } |
974 | 974 |
975 | 975 |
976 void FullCodeGenerator::VisitDoWhileStatement(DoWhileStatement* stmt) { | 976 void FullCodeGenerator::VisitDoWhileStatement(DoWhileStatement* stmt) { |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1290 __ Drop(stack_depth); | 1290 __ Drop(stack_depth); |
1291 __ PopTryHandler(); | 1291 __ PopTryHandler(); |
1292 return 0; | 1292 return 0; |
1293 } | 1293 } |
1294 | 1294 |
1295 | 1295 |
1296 #undef __ | 1296 #undef __ |
1297 | 1297 |
1298 | 1298 |
1299 } } // namespace v8::internal | 1299 } } // namespace v8::internal |
OLD | NEW |