| 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 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1645 Handle<Code> construct_stub = Handle<Code>(fun->shared()->construct_stub()); | 1645 Handle<Code> construct_stub = Handle<Code>(fun->shared()->construct_stub()); |
| 1646 Handle<SharedFunctionInfo> shared = | 1646 Handle<SharedFunctionInfo> shared = |
| 1647 isolate()->factory()->NewSharedFunctionInfo( | 1647 isolate()->factory()->NewSharedFunctionInfo( |
| 1648 name, literals, FunctionKind::kNormalFunction, code, | 1648 name, literals, FunctionKind::kNormalFunction, code, |
| 1649 Handle<ScopeInfo>(fun->shared()->scope_info()), | 1649 Handle<ScopeInfo>(fun->shared()->scope_info()), |
| 1650 Handle<TypeFeedbackVector>(fun->shared()->feedback_vector())); | 1650 Handle<TypeFeedbackVector>(fun->shared()->feedback_vector())); |
| 1651 shared->set_construct_stub(*construct_stub); | 1651 shared->set_construct_stub(*construct_stub); |
| 1652 | 1652 |
| 1653 // Copy the function data to the shared function info. | 1653 // Copy the function data to the shared function info. |
| 1654 shared->set_function_data(fun->shared()->function_data()); | 1654 shared->set_function_data(fun->shared()->function_data()); |
| 1655 int parameters = fun->shared()->internal_formal_parameter_count(); | 1655 int parameters = fun->shared()->formal_parameter_count(); |
| 1656 shared->set_internal_formal_parameter_count(parameters); | 1656 shared->set_formal_parameter_count(parameters); |
| 1657 | 1657 |
| 1658 EmitNewClosure(shared, false); | 1658 EmitNewClosure(shared, false); |
| 1659 } | 1659 } |
| 1660 | 1660 |
| 1661 | 1661 |
| 1662 void FullCodeGenerator::VisitThrow(Throw* expr) { | 1662 void FullCodeGenerator::VisitThrow(Throw* expr) { |
| 1663 Comment cmnt(masm_, "[ Throw"); | 1663 Comment cmnt(masm_, "[ Throw"); |
| 1664 VisitForStackValue(expr->exception()); | 1664 VisitForStackValue(expr->exception()); |
| 1665 __ CallRuntime(Runtime::kThrow, 1); | 1665 __ CallRuntime(Runtime::kThrow, 1); |
| 1666 // Never returns here. | 1666 // Never returns here. |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1829 } | 1829 } |
| 1830 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); | 1830 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); |
| 1831 codegen_->scope_ = saved_scope_; | 1831 codegen_->scope_ = saved_scope_; |
| 1832 } | 1832 } |
| 1833 | 1833 |
| 1834 | 1834 |
| 1835 #undef __ | 1835 #undef __ |
| 1836 | 1836 |
| 1837 | 1837 |
| 1838 } } // namespace v8::internal | 1838 } } // namespace v8::internal |
| OLD | NEW |