| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/ast.h" | 7 #include "src/ast.h" |
| 8 #include "src/ast-numbering.h" | 8 #include "src/ast-numbering.h" |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1632 int parameters = fun->shared()->internal_formal_parameter_count(); | 1632 int parameters = fun->shared()->internal_formal_parameter_count(); |
| 1633 shared->set_internal_formal_parameter_count(parameters); | 1633 shared->set_internal_formal_parameter_count(parameters); |
| 1634 | 1634 |
| 1635 EmitNewClosure(shared, false); | 1635 EmitNewClosure(shared, false); |
| 1636 } | 1636 } |
| 1637 | 1637 |
| 1638 | 1638 |
| 1639 void FullCodeGenerator::VisitThrow(Throw* expr) { | 1639 void FullCodeGenerator::VisitThrow(Throw* expr) { |
| 1640 Comment cmnt(masm_, "[ Throw"); | 1640 Comment cmnt(masm_, "[ Throw"); |
| 1641 VisitForStackValue(expr->exception()); | 1641 VisitForStackValue(expr->exception()); |
| 1642 SetSourcePosition(expr->position()); |
| 1642 __ CallRuntime(Runtime::kThrow, 1); | 1643 __ CallRuntime(Runtime::kThrow, 1); |
| 1643 // Never returns here. | 1644 // Never returns here. |
| 1644 } | 1645 } |
| 1645 | 1646 |
| 1646 | 1647 |
| 1647 void FullCodeGenerator::EnterTryBlock(int index, Label* handler) { | 1648 void FullCodeGenerator::EnterTryBlock(int index, Label* handler) { |
| 1648 handler_table()->SetRangeStart(index, masm()->pc_offset()); | 1649 handler_table()->SetRangeStart(index, masm()->pc_offset()); |
| 1649 handler_table()->SetRangeHandler(index, handler->pos()); | 1650 handler_table()->SetRangeHandler(index, handler->pos()); |
| 1650 | 1651 |
| 1651 // Determine expression stack depth of try statement. | 1652 // Determine expression stack depth of try statement. |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1850 } | 1851 } |
| 1851 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); | 1852 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); |
| 1852 codegen_->scope_ = saved_scope_; | 1853 codegen_->scope_ = saved_scope_; |
| 1853 } | 1854 } |
| 1854 | 1855 |
| 1855 | 1856 |
| 1856 #undef __ | 1857 #undef __ |
| 1857 | 1858 |
| 1858 | 1859 |
| 1859 } } // namespace v8::internal | 1860 } } // namespace v8::internal |
| OLD | NEW |