| 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 "src/arguments.h" | 7 #include "src/arguments.h" |
| 8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
| 9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
| 10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
| (...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 921 return isolate->heap()->ToBoolean(result.FromJust()); | 921 return isolate->heap()->ToBoolean(result.FromJust()); |
| 922 } | 922 } |
| 923 | 923 |
| 924 | 924 |
| 925 // ES6 section 7.4.7 CreateIterResultObject ( value, done ) | 925 // ES6 section 7.4.7 CreateIterResultObject ( value, done ) |
| 926 RUNTIME_FUNCTION(Runtime_CreateIterResultObject) { | 926 RUNTIME_FUNCTION(Runtime_CreateIterResultObject) { |
| 927 HandleScope scope(isolate); | 927 HandleScope scope(isolate); |
| 928 DCHECK_EQ(2, args.length()); | 928 DCHECK_EQ(2, args.length()); |
| 929 CONVERT_ARG_HANDLE_CHECKED(Object, value, 0); | 929 CONVERT_ARG_HANDLE_CHECKED(Object, value, 0); |
| 930 CONVERT_ARG_HANDLE_CHECKED(Object, done, 1); | 930 CONVERT_ARG_HANDLE_CHECKED(Object, done, 1); |
| 931 Handle<JSObject> result = | 931 return *isolate->factory()->NewJSIteratorResult(value, done->BooleanValue()); |
| 932 isolate->factory()->NewJSObjectFromMap(isolate->iterator_result_map()); | |
| 933 result->InObjectPropertyAtPut(JSIteratorResult::kValueIndex, *value); | |
| 934 result->InObjectPropertyAtPut(JSIteratorResult::kDoneIndex, *done); | |
| 935 return *result; | |
| 936 } | 932 } |
| 937 | 933 |
| 938 | 934 |
| 939 RUNTIME_FUNCTION(Runtime_IsAccessCheckNeeded) { | 935 RUNTIME_FUNCTION(Runtime_IsAccessCheckNeeded) { |
| 940 SealHandleScope shs(isolate); | 936 SealHandleScope shs(isolate); |
| 941 DCHECK_EQ(1, args.length()); | 937 DCHECK_EQ(1, args.length()); |
| 942 CONVERT_ARG_CHECKED(Object, object, 0); | 938 CONVERT_ARG_CHECKED(Object, object, 0); |
| 943 return isolate->heap()->ToBoolean(object->IsAccessCheckNeeded()); | 939 return isolate->heap()->ToBoolean(object->IsAccessCheckNeeded()); |
| 944 } | 940 } |
| 945 | 941 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 990 DCHECK(args.length() == 2); | 986 DCHECK(args.length() == 2); |
| 991 CONVERT_ARG_HANDLE_CHECKED(String, name, 0); | 987 CONVERT_ARG_HANDLE_CHECKED(String, name, 0); |
| 992 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); | 988 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); |
| 993 Handle<Module> module(isolate->context()->module()); | 989 Handle<Module> module(isolate->context()->module()); |
| 994 Module::StoreExport(module, name, value); | 990 Module::StoreExport(module, name, value); |
| 995 return isolate->heap()->undefined_value(); | 991 return isolate->heap()->undefined_value(); |
| 996 } | 992 } |
| 997 | 993 |
| 998 } // namespace internal | 994 } // namespace internal |
| 999 } // namespace v8 | 995 } // namespace v8 |
| OLD | NEW |