| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-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 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1522 node->break_target()->Jump(); | 1522 node->break_target()->Jump(); |
| 1523 } | 1523 } |
| 1524 setup_default.Bind(); | 1524 setup_default.Bind(); |
| 1525 frame_->MergeTo(start_frame); | 1525 frame_->MergeTo(start_frame); |
| 1526 __ b(default_label); | 1526 __ b(default_label); |
| 1527 DeleteFrame(); | 1527 DeleteFrame(); |
| 1528 } | 1528 } |
| 1529 if (node->break_target()->is_linked()) { | 1529 if (node->break_target()->is_linked()) { |
| 1530 node->break_target()->Bind(); | 1530 node->break_target()->Bind(); |
| 1531 } | 1531 } |
| 1532 | |
| 1533 delete start_frame; | |
| 1534 } | 1532 } |
| 1535 | 1533 |
| 1536 | 1534 |
| 1537 void CodeGenerator::VisitSwitchStatement(SwitchStatement* node) { | 1535 void CodeGenerator::VisitSwitchStatement(SwitchStatement* node) { |
| 1538 #ifdef DEBUG | 1536 #ifdef DEBUG |
| 1539 int original_height = frame_->height(); | 1537 int original_height = frame_->height(); |
| 1540 #endif | 1538 #endif |
| 1541 VirtualFrame::SpilledScope spilled_scope(this); | 1539 VirtualFrame::SpilledScope spilled_scope(this); |
| 1542 Comment cmnt(masm_, "[ SwitchStatement"); | 1540 Comment cmnt(masm_, "[ SwitchStatement"); |
| 1543 CodeForStatementPosition(node); | 1541 CodeForStatementPosition(node); |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2125 __ ldr(r1, frame_->ElementAt(kNextIndex - 1)); | 2123 __ ldr(r1, frame_->ElementAt(kNextIndex - 1)); |
| 2126 __ str(r1, MemOperand(r3)); | 2124 __ str(r1, MemOperand(r3)); |
| 2127 // The code slot has already been dropped from the handler. | 2125 // The code slot has already been dropped from the handler. |
| 2128 frame_->Drop(StackHandlerConstants::kSize / kPointerSize - 1); | 2126 frame_->Drop(StackHandlerConstants::kSize / kPointerSize - 1); |
| 2129 | 2127 |
| 2130 if (!function_return_is_shadowed_ && i == kReturnShadowIndex) { | 2128 if (!function_return_is_shadowed_ && i == kReturnShadowIndex) { |
| 2131 frame_->PrepareForReturn(); | 2129 frame_->PrepareForReturn(); |
| 2132 } | 2130 } |
| 2133 shadows[i]->other_target()->Jump(); | 2131 shadows[i]->other_target()->Jump(); |
| 2134 } | 2132 } |
| 2135 delete shadows[i]; | |
| 2136 } | 2133 } |
| 2137 | 2134 |
| 2138 exit.Bind(); | 2135 exit.Bind(); |
| 2139 ASSERT(!has_valid_frame() || frame_->height() == original_height); | 2136 ASSERT(!has_valid_frame() || frame_->height() == original_height); |
| 2140 } | 2137 } |
| 2141 | 2138 |
| 2142 | 2139 |
| 2143 void CodeGenerator::VisitTryFinally(TryFinally* node) { | 2140 void CodeGenerator::VisitTryFinally(TryFinally* node) { |
| 2144 #ifdef DEBUG | 2141 #ifdef DEBUG |
| 2145 int original_height = frame_->height(); | 2142 int original_height = frame_->height(); |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2301 if (!function_return_is_shadowed_ && i == kReturnShadowIndex) { | 2298 if (!function_return_is_shadowed_ && i == kReturnShadowIndex) { |
| 2302 JumpTarget skip(this); | 2299 JumpTarget skip(this); |
| 2303 skip.Branch(ne); | 2300 skip.Branch(ne); |
| 2304 frame_->PrepareForReturn(); | 2301 frame_->PrepareForReturn(); |
| 2305 original->Jump(); | 2302 original->Jump(); |
| 2306 skip.Bind(); | 2303 skip.Bind(); |
| 2307 } else { | 2304 } else { |
| 2308 original->Branch(eq); | 2305 original->Branch(eq); |
| 2309 } | 2306 } |
| 2310 } | 2307 } |
| 2311 delete shadows[i]; | |
| 2312 } | 2308 } |
| 2313 | 2309 |
| 2314 if (has_valid_frame()) { | 2310 if (has_valid_frame()) { |
| 2315 // Check if we need to rethrow the exception. | 2311 // Check if we need to rethrow the exception. |
| 2316 JumpTarget exit(this); | 2312 JumpTarget exit(this); |
| 2317 __ cmp(r2, Operand(Smi::FromInt(THROWING))); | 2313 __ cmp(r2, Operand(Smi::FromInt(THROWING))); |
| 2318 exit.Branch(ne); | 2314 exit.Branch(ne); |
| 2319 | 2315 |
| 2320 // Rethrow exception. | 2316 // Rethrow exception. |
| 2321 frame_->EmitPush(r0); | 2317 frame_->EmitPush(r0); |
| (...skipping 2862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5184 __ mov(r2, Operand(0)); | 5180 __ mov(r2, Operand(0)); |
| 5185 __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION); | 5181 __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION); |
| 5186 __ Jump(Handle<Code>(Builtins::builtin(Builtins::ArgumentsAdaptorTrampoline)), | 5182 __ Jump(Handle<Code>(Builtins::builtin(Builtins::ArgumentsAdaptorTrampoline)), |
| 5187 RelocInfo::CODE_TARGET); | 5183 RelocInfo::CODE_TARGET); |
| 5188 } | 5184 } |
| 5189 | 5185 |
| 5190 | 5186 |
| 5191 #undef __ | 5187 #undef __ |
| 5192 | 5188 |
| 5193 } } // namespace v8::internal | 5189 } } // namespace v8::internal |
| OLD | NEW |