| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "src/accessors.h" | 9 #include "src/accessors.h" |
| 10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
| (...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 Handle<Context> current(isolate->context()); | 694 Handle<Context> current(isolate->context()); |
| 695 Handle<Context> context = | 695 Handle<Context> context = |
| 696 isolate->factory()->NewWithContext(function, current, extension_object); | 696 isolate->factory()->NewWithContext(function, current, extension_object); |
| 697 isolate->set_context(*context); | 697 isolate->set_context(*context); |
| 698 return *context; | 698 return *context; |
| 699 } | 699 } |
| 700 | 700 |
| 701 | 701 |
| 702 RUNTIME_FUNCTION(Runtime_PushCatchContext) { | 702 RUNTIME_FUNCTION(Runtime_PushCatchContext) { |
| 703 HandleScope scope(isolate); | 703 HandleScope scope(isolate); |
| 704 DCHECK_EQ(3, args.length()); | 704 DCHECK_EQ(4, args.length()); |
| 705 CONVERT_ARG_HANDLE_CHECKED(String, name, 0); | 705 CONVERT_ARG_HANDLE_CHECKED(String, name, 0); |
| 706 CONVERT_ARG_HANDLE_CHECKED(Object, thrown_object, 1); | 706 CONVERT_ARG_HANDLE_CHECKED(Object, thrown_object, 1); |
| 707 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 2); | 707 CONVERT_ARG_HANDLE_CHECKED(ScopeInfo, scope_info, 2); |
| 708 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 3); |
| 708 Handle<Context> current(isolate->context()); | 709 Handle<Context> current(isolate->context()); |
| 709 Handle<Context> context = isolate->factory()->NewCatchContext( | 710 Handle<Context> context = isolate->factory()->NewCatchContext( |
| 710 function, current, name, thrown_object); | 711 function, current, scope_info, name, thrown_object); |
| 711 isolate->set_context(*context); | 712 isolate->set_context(*context); |
| 712 return *context; | 713 return *context; |
| 713 } | 714 } |
| 714 | 715 |
| 715 | 716 |
| 716 RUNTIME_FUNCTION(Runtime_PushBlockContext) { | 717 RUNTIME_FUNCTION(Runtime_PushBlockContext) { |
| 717 HandleScope scope(isolate); | 718 HandleScope scope(isolate); |
| 718 DCHECK_EQ(2, args.length()); | 719 DCHECK_EQ(2, args.length()); |
| 719 CONVERT_ARG_HANDLE_CHECKED(ScopeInfo, scope_info, 0); | 720 CONVERT_ARG_HANDLE_CHECKED(ScopeInfo, scope_info, 0); |
| 720 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 1); | 721 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 1); |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 930 RUNTIME_FUNCTION(Runtime_StoreLookupSlot_Strict) { | 931 RUNTIME_FUNCTION(Runtime_StoreLookupSlot_Strict) { |
| 931 HandleScope scope(isolate); | 932 HandleScope scope(isolate); |
| 932 DCHECK_EQ(2, args.length()); | 933 DCHECK_EQ(2, args.length()); |
| 933 CONVERT_ARG_HANDLE_CHECKED(String, name, 0); | 934 CONVERT_ARG_HANDLE_CHECKED(String, name, 0); |
| 934 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); | 935 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); |
| 935 RETURN_RESULT_OR_FAILURE(isolate, StoreLookupSlot(name, value, STRICT)); | 936 RETURN_RESULT_OR_FAILURE(isolate, StoreLookupSlot(name, value, STRICT)); |
| 936 } | 937 } |
| 937 | 938 |
| 938 } // namespace internal | 939 } // namespace internal |
| 939 } // namespace v8 | 940 } // namespace v8 |
| OLD | NEW |