Lines Matching refs:isolate
86 if (!(value)) return isolate->ThrowIllegalOperation();
90 isolate->ThrowIllegalOperation(); \
168 Isolate* isolate = context->GetIsolate(); in ComputeObjectLiteralMap() local
196 isolate->factory()->NewFixedArray(number_of_string_keys); in ComputeObjectLiteralMap()
208 return isolate->factory()->ObjectLiteralMapFromCache(context, keys); in ComputeObjectLiteralMap()
211 return Map::Create(isolate, number_of_properties); in ComputeObjectLiteralMap()
216 Isolate* isolate,
222 Isolate* isolate, in CreateObjectLiteralBoilerplate() argument
248 isolate->heap()->InNewSpace(*literals) ? NOT_TENURED : TENURED; in CreateObjectLiteralBoilerplate()
251 isolate->factory()->NewJSObjectFromMap(map, pretenure_flag); in CreateObjectLiteralBoilerplate()
268 Handle<Object> key(constant_properties->get(index+0), isolate); in CreateObjectLiteralBoilerplate()
269 Handle<Object> value(constant_properties->get(index+1), isolate); in CreateObjectLiteralBoilerplate()
275 isolate, value, in CreateObjectLiteralBoilerplate()
276 CreateLiteralBoilerplate(isolate, literals, array), in CreateObjectLiteralBoilerplate()
284 if (value->IsUninitialized()) value = handle(Smi::FromInt(0), isolate); in CreateObjectLiteralBoilerplate()
295 if (value->IsUninitialized()) value = handle(Smi::FromInt(0), isolate); in CreateObjectLiteralBoilerplate()
305 Handle<String> name = isolate->factory()->NewStringFromAsciiChecked(str); in CreateObjectLiteralBoilerplate()
313 RETURN_ON_EXCEPTION(isolate, maybe_result, Object); in CreateObjectLiteralBoilerplate()
332 Isolate* isolate) { in TransitionElements() argument
333 HandleScope scope(isolate); in TransitionElements()
335 isolate->ThrowIllegalOperation(); in TransitionElements()
344 isolate->ThrowIllegalOperation(); in TransitionElements()
350 Isolate* isolate, in CreateArrayLiteralBoilerplate() argument
358 isolate->heap()->InNewSpace(*literals) ? NOT_TENURED : TENURED; in CreateArrayLiteralBoilerplate()
361 isolate->factory()->NewJSObject(constructor, pretenure_flag)); in CreateArrayLiteralBoilerplate()
370 Context* native_context = isolate->context()->native_context(); in CreateArrayLiteralBoilerplate()
379 copied_elements_values = isolate->factory()->CopyFixedDoubleArray( in CreateArrayLiteralBoilerplate()
385 isolate->heap()->fixed_cow_array_map()); in CreateArrayLiteralBoilerplate()
399 isolate->factory()->CopyFixedArray(fixed_array_values); in CreateArrayLiteralBoilerplate()
408 isolate, result, in CreateArrayLiteralBoilerplate()
409 CreateLiteralBoilerplate(isolate, literals, fa), in CreateArrayLiteralBoilerplate()
425 Isolate* isolate, in CreateLiteralBoilerplate() argument
432 return CreateObjectLiteralBoilerplate(isolate, in CreateLiteralBoilerplate()
438 return CreateObjectLiteralBoilerplate(isolate, in CreateLiteralBoilerplate()
445 isolate, literals, elements); in CreateLiteralBoilerplate()
454 HandleScope scope(isolate); in RUNTIME_FUNCTION()
466 Handle<Object> literal_site(literals->get(literals_index), isolate); in RUNTIME_FUNCTION()
469 if (*literal_site == isolate->heap()->undefined_value()) { in RUNTIME_FUNCTION()
472 isolate, raw_boilerplate, in RUNTIME_FUNCTION()
474 isolate, in RUNTIME_FUNCTION()
481 AllocationSiteCreationContext creation_context(isolate); in RUNTIME_FUNCTION()
484 isolate, in RUNTIME_FUNCTION()
493 isolate); in RUNTIME_FUNCTION()
496 AllocationSiteUsageContext usage_context(isolate, site, true); in RUNTIME_FUNCTION()
502 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, copy, maybe_copy); in RUNTIME_FUNCTION()
508 Isolate* isolate, in GetLiteralAllocationSite() argument
513 Handle<Object> literal_site(literals->get(literals_index), isolate); in GetLiteralAllocationSite()
515 if (*literal_site == isolate->heap()->undefined_value()) { in GetLiteralAllocationSite()
516 DCHECK(*elements != isolate->heap()->empty_fixed_array()); in GetLiteralAllocationSite()
519 isolate, boilerplate, in GetLiteralAllocationSite()
520 Runtime::CreateArrayLiteralBoilerplate(isolate, literals, elements), in GetLiteralAllocationSite()
523 AllocationSiteCreationContext creation_context(isolate); in GetLiteralAllocationSite()
540 static MaybeHandle<JSObject> CreateArrayLiteralImpl(Isolate* isolate, in CreateArrayLiteralImpl() argument
549 isolate, site, in CreateArrayLiteralImpl()
550 GetLiteralAllocationSite(isolate, literals, literals_index, elements), in CreateArrayLiteralImpl()
555 AllocationSiteUsageContext usage_context(isolate, site, enable_mementos); in CreateArrayLiteralImpl()
568 HandleScope scope(isolate); in RUNTIME_FUNCTION()
576 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, in RUNTIME_FUNCTION()
577 CreateArrayLiteralImpl(isolate, literals, literals_index, elements, in RUNTIME_FUNCTION()
584 HandleScope scope(isolate); in RUNTIME_FUNCTION()
591 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, in RUNTIME_FUNCTION()
592 CreateArrayLiteralImpl(isolate, literals, literals_index, elements, in RUNTIME_FUNCTION()
599 HandleScope scope(isolate); in RUNTIME_FUNCTION()
603 Handle<Symbol> symbol = isolate->factory()->NewSymbol(); in RUNTIME_FUNCTION()
610 HandleScope scope(isolate); in RUNTIME_FUNCTION()
614 Handle<Symbol> symbol = isolate->factory()->NewPrivateSymbol(); in RUNTIME_FUNCTION()
621 HandleScope scope(isolate); in RUNTIME_FUNCTION()
625 Handle<Symbol> symbol = isolate->factory()->NewPrivateOwnSymbol(); in RUNTIME_FUNCTION()
632 HandleScope scope(isolate); in RUNTIME_FUNCTION()
635 Handle<JSObject> registry = isolate->GetSymbolRegistry(); in RUNTIME_FUNCTION()
636 Handle<String> part = isolate->factory()->private_intern_string(); in RUNTIME_FUNCTION()
639 isolate, privates, Object::GetPropertyOrElement(registry, part)); in RUNTIME_FUNCTION()
642 isolate, symbol, Object::GetPropertyOrElement(privates, name)); in RUNTIME_FUNCTION()
645 symbol = isolate->factory()->NewPrivateSymbol(); in RUNTIME_FUNCTION()
656 HandleScope scope(isolate); in RUNTIME_FUNCTION()
659 return *Object::ToObject(isolate, symbol).ToHandleChecked(); in RUNTIME_FUNCTION()
664 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
672 HandleScope scope(isolate); in RUNTIME_FUNCTION()
674 return *isolate->GetSymbolRegistry(); in RUNTIME_FUNCTION()
679 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
682 return isolate->heap()->ToBoolean(symbol->is_private()); in RUNTIME_FUNCTION()
687 HandleScope scope(isolate); in RUNTIME_FUNCTION()
691 if (!prototype->IsJSReceiver()) prototype = isolate->factory()->null_value(); in RUNTIME_FUNCTION()
692 return *isolate->factory()->NewJSProxy(handler, prototype); in RUNTIME_FUNCTION()
697 HandleScope scope(isolate); in RUNTIME_FUNCTION()
704 if (!prototype->IsJSReceiver()) prototype = isolate->factory()->null_value(); in RUNTIME_FUNCTION()
705 return *isolate->factory()->NewJSFunctionProxy( in RUNTIME_FUNCTION()
711 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
714 return isolate->heap()->ToBoolean(obj->IsJSProxy()); in RUNTIME_FUNCTION()
719 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
722 return isolate->heap()->ToBoolean(obj->IsJSFunctionProxy()); in RUNTIME_FUNCTION()
727 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
735 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
743 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
751 HandleScope scope(isolate); in RUNTIME_FUNCTION()
755 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
759 void Runtime::FreeArrayBuffer(Isolate* isolate, in FreeArrayBuffer() argument
768 isolate, phantom_array_buffer->byte_length()); in FreeArrayBuffer()
770 reinterpret_cast<v8::Isolate*>(isolate) in FreeArrayBuffer()
780 void Runtime::SetupArrayBuffer(Isolate* isolate, in SetupArrayBuffer() argument
795 isolate->factory()->NewNumberFromSize(allocated_length); in SetupArrayBuffer()
799 array_buffer->set_weak_next(isolate->heap()->array_buffers_list()); in SetupArrayBuffer()
800 isolate->heap()->set_array_buffers_list(*array_buffer); in SetupArrayBuffer()
801 array_buffer->set_weak_first_view(isolate->heap()->undefined_value()); in SetupArrayBuffer()
806 Isolate* isolate, in SetupArrayBufferAllocatingData() argument
824 SetupArrayBuffer(isolate, array_buffer, false, data, allocated_length); in SetupArrayBufferAllocatingData()
826 reinterpret_cast<v8::Isolate*>(isolate) in SetupArrayBufferAllocatingData()
834 Isolate* isolate = array_buffer->GetIsolate(); in NeuterArrayBuffer() local
835 for (Handle<Object> view_obj(array_buffer->weak_first_view(), isolate); in NeuterArrayBuffer()
845 view_obj = handle(view->weak_next(), isolate); in NeuterArrayBuffer()
852 HandleScope scope(isolate); in RUNTIME_FUNCTION()
861 if (!TryNumberToSize(isolate, *byteLength, &allocated_length)) { in RUNTIME_FUNCTION()
863 isolate, NewRangeError("invalid_array_buffer_length", in RUNTIME_FUNCTION()
866 if (!Runtime::SetupArrayBufferAllocatingData(isolate, in RUNTIME_FUNCTION()
869 isolate, NewRangeError("invalid_array_buffer_length", in RUNTIME_FUNCTION()
877 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
885 HandleScope scope(isolate); in RUNTIME_FUNCTION()
892 RUNTIME_ASSERT(TryNumberToSize(isolate, *first, &start)); in RUNTIME_FUNCTION()
893 size_t target_length = NumberToSize(isolate, target->byte_length()); in RUNTIME_FUNCTION()
895 if (target_length == 0) return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
897 size_t source_byte_length = NumberToSize(isolate, source->byte_length()); in RUNTIME_FUNCTION()
903 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
908 HandleScope scope(isolate); in RUNTIME_FUNCTION()
911 return isolate->heap()->ToBoolean(object->IsJSArrayBufferView()); in RUNTIME_FUNCTION()
916 HandleScope scope(isolate); in RUNTIME_FUNCTION()
921 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
925 size_t byte_length = NumberToSize(isolate, array_buffer->byte_length()); in RUNTIME_FUNCTION()
929 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
958 HandleScope scope(isolate); in RUNTIME_FUNCTION()
983 RUNTIME_ASSERT(TryNumberToSize(isolate, *byte_offset_object, &byte_offset)); in RUNTIME_FUNCTION()
984 RUNTIME_ASSERT(TryNumberToSize(isolate, *byte_length_object, &byte_length)); in RUNTIME_FUNCTION()
989 NumberToSize(isolate, buffer->byte_length()); in RUNTIME_FUNCTION()
1001 isolate, NewRangeError("invalid_typed_array_length", in RUNTIME_FUNCTION()
1012 Handle<Object> length_obj = isolate->factory()->NewNumberFromSize(length); in RUNTIME_FUNCTION()
1024 isolate->factory()->NewExternalArray( in RUNTIME_FUNCTION()
1033 holder->set_weak_next(isolate->heap()->undefined_value()); in RUNTIME_FUNCTION()
1035 isolate->factory()->NewFixedTypedArray( in RUNTIME_FUNCTION()
1039 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
1049 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1072 Handle<JSArrayBuffer> buffer = isolate->factory()->NewJSArrayBuffer(); in RUNTIME_FUNCTION()
1075 length_obj = Handle<Object>(JSTypedArray::cast(*source)->length(), isolate); in RUNTIME_FUNCTION()
1078 RUNTIME_ASSERT(TryNumberToSize(isolate, *length_obj, &length)); in RUNTIME_FUNCTION()
1083 isolate, NewRangeError("invalid_typed_array_length", in RUNTIME_FUNCTION()
1111 isolate, buffer, byte_length, false)) { in RUNTIME_FUNCTION()
1113 isolate, NewRangeError("invalid_array_buffer_length", in RUNTIME_FUNCTION()
1120 isolate->factory()->NewNumberFromSize(byte_length)); in RUNTIME_FUNCTION()
1127 isolate->factory()->NewExternalArray( in RUNTIME_FUNCTION()
1142 NumberToSize(isolate, typed_array->byte_offset()); in RUNTIME_FUNCTION()
1147 return isolate->heap()->true_value(); in RUNTIME_FUNCTION()
1151 return isolate->heap()->false_value(); in RUNTIME_FUNCTION()
1157 HandleScope scope(isolate); \
1171 HandleScope scope(isolate); in BUFFER_VIEW_GETTER()
1194 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1198 isolate, in RUNTIME_FUNCTION()
1212 RUNTIME_ASSERT(TryNumberToSize(isolate, *offset_obj, &offset)); in RUNTIME_FUNCTION()
1213 size_t target_length = NumberToSize(isolate, target->length()); in RUNTIME_FUNCTION()
1214 size_t source_length = NumberToSize(isolate, source->length()); in RUNTIME_FUNCTION()
1215 size_t target_byte_length = NumberToSize(isolate, target->byte_length()); in RUNTIME_FUNCTION()
1216 size_t source_byte_length = NumberToSize(isolate, source->byte_length()); in RUNTIME_FUNCTION()
1220 isolate, NewRangeError("typed_array_set_source_too_large", in RUNTIME_FUNCTION()
1224 size_t target_offset = NumberToSize(isolate, target->byte_offset()); in RUNTIME_FUNCTION()
1225 size_t source_offset = NumberToSize(isolate, source->byte_offset()); in RUNTIME_FUNCTION()
1265 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1281 TryNumberToSize(isolate, buffer->byte_length(), &buffer_length)); in RUNTIME_FUNCTION()
1282 RUNTIME_ASSERT(TryNumberToSize(isolate, *byte_offset, &offset)); in RUNTIME_FUNCTION()
1283 RUNTIME_ASSERT(TryNumberToSize(isolate, *byte_length, &length)); in RUNTIME_FUNCTION()
1299 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
1331 Isolate* isolate, in DataViewGetValue() argument
1337 if (!TryNumberToSize(isolate, *byte_offset_obj, &byte_offset)) { in DataViewGetValue()
1343 NumberToSize(isolate, data_view->byte_offset()); in DataViewGetValue()
1345 NumberToSize(isolate, data_view->byte_length()); in DataViewGetValue()
1359 NumberToSize(isolate, buffer->byte_length()) in DataViewGetValue()
1375 Isolate* isolate, in DataViewSetValue() argument
1381 if (!TryNumberToSize(isolate, *byte_offset_obj, &byte_offset)) { in DataViewSetValue()
1387 NumberToSize(isolate, data_view->byte_offset()); in DataViewSetValue()
1389 NumberToSize(isolate, data_view->byte_length()); in DataViewSetValue()
1404 NumberToSize(isolate, buffer->byte_length()) in DataViewSetValue()
1419 HandleScope scope(isolate); \
1425 if (DataViewGetValue(isolate, holder, offset, is_little_endian, \
1427 return *isolate->factory()->Converter(result); \
1430 isolate, NewRangeError("invalid_data_view_accessor_offset", \
1501 HandleScope scope(isolate); \
1508 if (DataViewSetValue(isolate, holder, offset, is_little_endian, v)) { \
1509 return isolate->heap()->undefined_value(); \
1512 isolate, NewRangeError("invalid_data_view_accessor_offset", \
1530 HandleScope scope(isolate); in DATA_VIEW_SETTER()
1533 Handle<OrderedHashSet> table = isolate->factory()->NewOrderedHashSet(); in DATA_VIEW_SETTER()
1540 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1552 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1557 return isolate->heap()->ToBoolean(table->Contains(key)); in RUNTIME_FUNCTION()
1562 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1570 return isolate->heap()->ToBoolean(was_present); in RUNTIME_FUNCTION()
1575 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1581 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
1586 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1595 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1606 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
1611 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
1620 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1623 Handle<OrderedHashMap> table = isolate->factory()->NewOrderedHashMap(); in RUNTIME_FUNCTION()
1630 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1635 Handle<Object> lookup(table->Lookup(key), isolate); in RUNTIME_FUNCTION()
1636 return lookup->IsTheHole() ? isolate->heap()->undefined_value() : *lookup; in RUNTIME_FUNCTION()
1641 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1646 Handle<Object> lookup(table->Lookup(key), isolate); in RUNTIME_FUNCTION()
1647 return isolate->heap()->ToBoolean(!lookup->IsTheHole()); in RUNTIME_FUNCTION()
1652 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1661 return isolate->heap()->ToBoolean(was_present); in RUNTIME_FUNCTION()
1666 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1672 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
1677 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1690 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1699 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1711 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
1716 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1721 isolate->factory()->NewFixedArray(table->NumberOfElements() * 2); in RUNTIME_FUNCTION()
1726 Handle<Object> key(table->KeyAt(i), isolate); in RUNTIME_FUNCTION()
1735 return *isolate->factory()->NewJSArrayWithElements(entries); in RUNTIME_FUNCTION()
1740 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
1749 Isolate* isolate, in WeakCollectionInitialize() argument
1752 Handle<ObjectHashTable> table = ObjectHashTable::New(isolate, 0); in WeakCollectionInitialize()
1759 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1762 return *WeakCollectionInitialize(isolate, weak_collection); in RUNTIME_FUNCTION()
1767 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1775 Handle<Object> lookup(table->Lookup(key), isolate); in RUNTIME_FUNCTION()
1776 return lookup->IsTheHole() ? isolate->heap()->undefined_value() : *lookup; in RUNTIME_FUNCTION()
1781 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1789 Handle<Object> lookup(table->Lookup(key), isolate); in RUNTIME_FUNCTION()
1790 return isolate->heap()->ToBoolean(!lookup->IsTheHole()); in RUNTIME_FUNCTION()
1795 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1807 return isolate->heap()->ToBoolean(was_present); in RUNTIME_FUNCTION()
1812 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1828 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1833 isolate->factory()->NewFixedArray(table->NumberOfElements()); in RUNTIME_FUNCTION()
1838 Handle<Object> key(table->KeyAt(i), isolate); in RUNTIME_FUNCTION()
1845 return *isolate->factory()->NewJSArrayWithElements(values); in RUNTIME_FUNCTION()
1850 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1855 PrototypeIterator iter(isolate, obj, PrototypeIterator::START_AT_RECEIVER); in RUNTIME_FUNCTION()
1858 !isolate->MayNamedAccess( in RUNTIME_FUNCTION()
1860 isolate->factory()->proto_string(), v8::ACCESS_GET)) { in RUNTIME_FUNCTION()
1861 isolate->ReportFailedAccessCheck( in RUNTIME_FUNCTION()
1864 RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate); in RUNTIME_FUNCTION()
1865 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
1877 Isolate* isolate, Handle<Object> receiver) { in GetPrototypeSkipHiddenPrototypes() argument
1878 PrototypeIterator iter(isolate, receiver); in GetPrototypeSkipHiddenPrototypes()
1890 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1898 isolate, result, JSObject::SetPrototype(obj, prototype, false)); in RUNTIME_FUNCTION()
1904 HandleScope scope(isolate); in RUNTIME_FUNCTION()
1909 !isolate->MayNamedAccess( in RUNTIME_FUNCTION()
1910 obj, isolate->factory()->proto_string(), v8::ACCESS_SET)) { in RUNTIME_FUNCTION()
1911 isolate->ReportFailedAccessCheck(obj, v8::ACCESS_SET); in RUNTIME_FUNCTION()
1912 RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate); in RUNTIME_FUNCTION()
1913 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
1916 Handle<Object> old_value = GetPrototypeSkipHiddenPrototypes(isolate, obj); in RUNTIME_FUNCTION()
1919 isolate, result, in RUNTIME_FUNCTION()
1922 Handle<Object> new_value = GetPrototypeSkipHiddenPrototypes(isolate, obj); in RUNTIME_FUNCTION()
1925 isolate->factory()->proto_string(), in RUNTIME_FUNCTION()
1932 isolate, result, in RUNTIME_FUNCTION()
1939 HandleScope shs(isolate); in RUNTIME_FUNCTION()
1944 PrototypeIterator iter(isolate, V, PrototypeIterator::START_AT_RECEIVER); in RUNTIME_FUNCTION()
1947 if (iter.IsAtEnd()) return isolate->heap()->false_value(); in RUNTIME_FUNCTION()
1948 if (iter.IsAtEnd(O)) return isolate->heap()->true_value(); in RUNTIME_FUNCTION()
1966 MUST_USE_RESULT static MaybeHandle<Object> GetOwnProperty(Isolate* isolate, in GetOwnProperty() argument
1969 Heap* heap = isolate->heap(); in GetOwnProperty()
1970 Factory* factory = isolate->factory(); in GetOwnProperty()
1991 ASSIGN_RETURN_ON_EXCEPTION(isolate, value, in GetOwnProperty()
1992 Runtime::GetElementOrCharAt(isolate, obj, index), Object); in GetOwnProperty()
2011 isolate, value, Object::GetProperty(&it), Object); in GetOwnProperty()
2014 DCHECK(!isolate->has_pending_exception()); in GetOwnProperty()
2022 Handle<Object> getter(accessors->GetComponent(ACCESSOR_GETTER), isolate); in GetOwnProperty()
2023 Handle<Object> setter(accessors->GetComponent(ACCESSOR_SETTER), isolate); in GetOwnProperty()
2043 HandleScope scope(isolate); in RUNTIME_FUNCTION()
2049 isolate, result, GetOwnProperty(isolate, obj, name)); in RUNTIME_FUNCTION()
2055 HandleScope scope(isolate); in RUNTIME_FUNCTION()
2060 isolate, result, JSObject::PreventExtensions(obj)); in RUNTIME_FUNCTION()
2066 HandleScope scope(isolate); in RUNTIME_FUNCTION()
2071 Handle<Symbol> home_object_symbol(isolate->heap()->home_object_symbol()); in RUNTIME_FUNCTION()
2080 return isolate->heap()->home_object_symbol(); in RUNTIME_FUNCTION()
2085 HandleScope scope(isolate); in RUNTIME_FUNCTION()
2092 !isolate->MayNamedAccess(home_object, name, v8::ACCESS_GET)) { in RUNTIME_FUNCTION()
2093 isolate->ReportFailedAccessCheck(home_object, v8::ACCESS_GET); in RUNTIME_FUNCTION()
2094 RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate); in RUNTIME_FUNCTION()
2097 PrototypeIterator iter(isolate, home_object); in RUNTIME_FUNCTION()
2099 if (!proto->IsJSReceiver()) return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
2103 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, Object::GetProperty(&it)); in RUNTIME_FUNCTION()
2109 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
2113 PrototypeIterator iter(isolate, obj); in RUNTIME_FUNCTION()
2114 if (iter.IsAtEnd()) return isolate->heap()->false_value(); in RUNTIME_FUNCTION()
2118 return isolate->heap()->ToBoolean(obj->map()->is_extensible()); in RUNTIME_FUNCTION()
2123 HandleScope scope(isolate); in RUNTIME_FUNCTION()
2130 isolate, result, RegExpImpl::Compile(re, pattern, flags)); in RUNTIME_FUNCTION()
2136 HandleScope scope(isolate); in RUNTIME_FUNCTION()
2140 return *isolate->factory()->CreateApiFunction(data, prototype); in RUNTIME_FUNCTION()
2145 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
2149 return isolate->heap()->ToBoolean(result); in RUNTIME_FUNCTION()
2154 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
2173 HandleScope scope(isolate); in RUNTIME_FUNCTION()
2184 return isolate->heap()->ToBoolean(needs_access_checks); in RUNTIME_FUNCTION()
2189 HandleScope scope(isolate); in RUNTIME_FUNCTION()
2198 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
2202 static Object* ThrowRedeclarationError(Isolate* isolate, Handle<String> name) { in ThrowRedeclarationError() argument
2203 HandleScope scope(isolate); in ThrowRedeclarationError()
2206 isolate, NewTypeError("var_redeclaration", HandleVector(args, 1))); in ThrowRedeclarationError()
2211 static Object* DeclareGlobals(Isolate* isolate, Handle<GlobalObject> global, in DeclareGlobals() argument
2218 if (!maybe.has_value) return isolate->heap()->exception(); in DeclareGlobals()
2223 if (is_const) return ThrowRedeclarationError(isolate, name); in DeclareGlobals()
2226 if (is_var) return isolate->heap()->undefined_value(); in DeclareGlobals()
2241 return ThrowRedeclarationError(isolate, name); in DeclareGlobals()
2249 RETURN_FAILURE_ON_EXCEPTION(isolate, JSObject::SetOwnPropertyIgnoreAttributes( in DeclareGlobals()
2252 return isolate->heap()->undefined_value(); in DeclareGlobals()
2257 HandleScope scope(isolate); in RUNTIME_FUNCTION()
2259 Handle<GlobalObject> global(isolate->global_object()); in RUNTIME_FUNCTION()
2268 HandleScope scope(isolate); in RUNTIME_FUNCTION()
2270 Handle<Object> initial_value(pairs->get(i + 1), isolate); in RUNTIME_FUNCTION()
2286 isolate->factory()->NewFunctionFromSharedFunctionInfo(shared, context, in RUNTIME_FUNCTION()
2290 value = isolate->factory()->undefined_value(); in RUNTIME_FUNCTION()
2302 Object* result = DeclareGlobals(isolate, global, name, value, in RUNTIME_FUNCTION()
2305 if (isolate->has_pending_exception()) return result; in RUNTIME_FUNCTION()
2308 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
2313 HandleScope scope(isolate); in RUNTIME_FUNCTION()
2326 Handle<GlobalObject> global(isolate->context()->global_object()); in RUNTIME_FUNCTION()
2329 isolate, result, Object::SetProperty(global, name, value, strict_mode)); in RUNTIME_FUNCTION()
2335 HandleScope handle_scope(isolate); in RUNTIME_FUNCTION()
2343 Handle<GlobalObject> global = isolate->global_object(); in RUNTIME_FUNCTION()
2366 RETURN_FAILURE_ON_EXCEPTION(isolate, JSObject::SetOwnPropertyIgnoreAttributes( in RUNTIME_FUNCTION()
2374 HandleScope scope(isolate); in RUNTIME_FUNCTION()
2404 : Handle<Object>::cast(isolate->factory()->undefined_value()); in RUNTIME_FUNCTION()
2411 return DeclareGlobals(isolate, Handle<JSGlobalObject>::cast(holder), name, in RUNTIME_FUNCTION()
2418 return ThrowRedeclarationError(isolate, name); in RUNTIME_FUNCTION()
2422 if (is_var) return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
2428 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
2439 isolate->factory()->NewJSObject(isolate->context_extension_function()); in RUNTIME_FUNCTION()
2443 RETURN_FAILURE_ON_EXCEPTION(isolate, JSObject::SetOwnPropertyIgnoreAttributes( in RUNTIME_FUNCTION()
2446 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
2451 HandleScope scope(isolate); in RUNTIME_FUNCTION()
2488 holder = handle(context_arg->extension(), isolate); in RUNTIME_FUNCTION()
2498 if (!maybe.has_value) return isolate->heap()->exception(); in RUNTIME_FUNCTION()
2512 isolate, JSObject::SetOwnPropertyIgnoreAttributes( in RUNTIME_FUNCTION()
2520 HandleScope scope(isolate); in RUNTIME_FUNCTION()
2534 HandleScope scope(isolate); in RUNTIME_FUNCTION()
2544 isolate->counters()->regexp_entry_runtime()->Increment(); in RUNTIME_FUNCTION()
2547 isolate, result, in RUNTIME_FUNCTION()
2554 HandleScope handle_scope(isolate); in RUNTIME_FUNCTION()
2560 Handle<FixedArray> elements = isolate->factory()->NewFixedArray(size); in RUNTIME_FUNCTION()
2561 Handle<Map> regexp_map(isolate->native_context()->regexp_result_map()); in RUNTIME_FUNCTION()
2563 isolate->factory()->NewJSObjectFromMap(regexp_map, NOT_TENURED, false); in RUNTIME_FUNCTION()
2575 HandleScope scope(isolate); in RUNTIME_FUNCTION()
2581 if (source->length() == 0) source = isolate->factory()->query_colon_string(); in RUNTIME_FUNCTION()
2584 if (!global->IsTrue()) global = isolate->factory()->false_value(); in RUNTIME_FUNCTION()
2587 if (!ignoreCase->IsTrue()) ignoreCase = isolate->factory()->false_value(); in RUNTIME_FUNCTION()
2590 if (!multiline->IsTrue()) multiline = isolate->factory()->false_value(); in RUNTIME_FUNCTION()
2593 if (!sticky->IsTrue()) sticky = isolate->factory()->false_value(); in RUNTIME_FUNCTION()
2624 Handle<Object> zero(Smi::FromInt(0), isolate); in RUNTIME_FUNCTION()
2625 Factory* factory = isolate->factory(); in RUNTIME_FUNCTION()
2645 HandleScope scope(isolate); in RUNTIME_FUNCTION()
2653 prototype->set_elements(isolate->heap()->empty_fixed_array()); in RUNTIME_FUNCTION()
2658 static void InstallBuiltin(Isolate* isolate, in InstallBuiltin() argument
2662 Handle<String> key = isolate->factory()->InternalizeUtf8String(name); in InstallBuiltin()
2663 Handle<Code> code(isolate->builtins()->builtin(builtin_name)); in InstallBuiltin()
2665 isolate->factory()->NewFunctionWithoutPrototype(key, code); in InstallBuiltin()
2672 HandleScope scope(isolate); in RUNTIME_FUNCTION()
2675 isolate->factory()->NewJSObject(isolate->object_function()); in RUNTIME_FUNCTION()
2677 InstallBuiltin(isolate, holder, "pop", Builtins::kArrayPop); in RUNTIME_FUNCTION()
2678 InstallBuiltin(isolate, holder, "push", Builtins::kArrayPush); in RUNTIME_FUNCTION()
2679 InstallBuiltin(isolate, holder, "shift", Builtins::kArrayShift); in RUNTIME_FUNCTION()
2680 InstallBuiltin(isolate, holder, "unshift", Builtins::kArrayUnshift); in RUNTIME_FUNCTION()
2681 InstallBuiltin(isolate, holder, "slice", Builtins::kArraySlice); in RUNTIME_FUNCTION()
2682 InstallBuiltin(isolate, holder, "splice", Builtins::kArraySplice); in RUNTIME_FUNCTION()
2683 InstallBuiltin(isolate, holder, "concat", Builtins::kArrayConcat); in RUNTIME_FUNCTION()
2690 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
2694 HandleScope scope(isolate); in RUNTIME_FUNCTION()
2697 isolate, delegate, in RUNTIME_FUNCTION()
2699 isolate, Handle<JSReceiver>(callable))); in RUNTIME_FUNCTION()
2704 return isolate->heap()->ToBoolean(shared->strict_mode() == SLOPPY); in RUNTIME_FUNCTION()
2709 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
2714 HandleScope scope(isolate); in RUNTIME_FUNCTION()
2717 isolate, delegate, in RUNTIME_FUNCTION()
2719 isolate, Handle<JSReceiver>(callable))); in RUNTIME_FUNCTION()
2726 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
2736 HandleScope scope(isolate); in RUNTIME_FUNCTION()
2754 isolate, regexp, in RUNTIME_FUNCTION()
2762 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
2771 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
2777 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
2782 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
2785 return isolate->heap()->ToBoolean( in RUNTIME_FUNCTION()
2791 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
2795 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
2800 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
2803 return isolate->heap()->ToBoolean(f->shared()->is_generator()); in RUNTIME_FUNCTION()
2808 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
2811 return isolate->heap()->ToBoolean(f->shared()->is_arrow()); in RUNTIME_FUNCTION()
2816 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
2819 return isolate->heap()->ToBoolean(f->shared()->is_concise_method()); in RUNTIME_FUNCTION()
2824 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
2830 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
2835 HandleScope scope(isolate); in RUNTIME_FUNCTION()
2839 Handle<Object> script = Handle<Object>(fun->shared()->script(), isolate); in RUNTIME_FUNCTION()
2840 if (!script->IsScript()) return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
2847 HandleScope scope(isolate); in RUNTIME_FUNCTION()
2857 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
2867 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
2881 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
2887 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
2892 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
2900 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
2905 HandleScope scope(isolate); in RUNTIME_FUNCTION()
2917 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
2921 return isolate->heap()->ToBoolean(f->shared()->IsApiFunction()); in RUNTIME_FUNCTION()
2926 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
2930 return isolate->heap()->ToBoolean(f->IsBuiltin()); in RUNTIME_FUNCTION()
2935 HandleScope scope(isolate); in RUNTIME_FUNCTION()
2946 return isolate->heap()->exception(); in RUNTIME_FUNCTION()
2982 isolate->factory()->NewFixedArray(number_of_literals, TENURED); in RUNTIME_FUNCTION()
2990 if (isolate->logger()->is_logging_code_events() || in RUNTIME_FUNCTION()
2991 isolate->cpu_profiler()->is_profiling()) { in RUNTIME_FUNCTION()
2992 isolate->logger()->LogExistingFunction( in RUNTIME_FUNCTION()
3001 HandleScope scope(isolate); in RUNTIME_FUNCTION()
3004 JavaScriptFrameIterator it(isolate); in RUNTIME_FUNCTION()
3013 generator = isolate->factory()->NewJSGeneratorObject(function); in RUNTIME_FUNCTION()
3019 generator->set_operand_stack(isolate->heap()->empty_fixed_array()); in RUNTIME_FUNCTION()
3027 HandleScope handle_scope(isolate); in RUNTIME_FUNCTION()
3031 JavaScriptFrameIterator stack_iterator(isolate); in RUNTIME_FUNCTION()
3051 isolate->heap()->empty_fixed_array()); in RUNTIME_FUNCTION()
3059 isolate->factory()->NewFixedArray(operands_count); in RUNTIME_FUNCTION()
3065 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
3077 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
3082 JavaScriptFrameIterator stack_iterator(isolate); in RUNTIME_FUNCTION()
3106 generator_object->set_operand_stack(isolate->heap()->empty_fixed_array()); in RUNTIME_FUNCTION()
3116 return isolate->Throw(value); in RUNTIME_FUNCTION()
3120 return isolate->ThrowIllegalOperation(); in RUNTIME_FUNCTION()
3125 HandleScope scope(isolate); in RUNTIME_FUNCTION()
3132 THROW_NEW_ERROR_RETURN_FAILURE(isolate, NewError(message, argv)); in RUNTIME_FUNCTION()
3137 HandleScope scope(isolate); in RUNTIME_FUNCTION()
3147 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, JSObject::Freeze(object)); in RUNTIME_FUNCTION()
3153 HandleScope handle_scope(isolate); in RUNTIME_FUNCTION()
3165 return isolate->heap()->nan_value(); in RUNTIME_FUNCTION()
3173 HandleScope handlescope(isolate); in RUNTIME_FUNCTION()
3178 return *isolate->factory()->LookupSingleCharacterStringFromCode(code); in RUNTIME_FUNCTION()
3180 return isolate->heap()->empty_string(); in RUNTIME_FUNCTION()
3186 explicit FixedArrayBuilder(Isolate* isolate, int initial_capacity) in FixedArrayBuilder() argument
3187 : array_(isolate->factory()->NewFixedArrayWithHoles(initial_capacity)), in FixedArrayBuilder()
3289 array_builder_(heap->isolate(), estimated_part_count), in ReplacementStringBuilder()
3340 Isolate* isolate = heap_->isolate(); in ToString() local
3342 return isolate->factory()->empty_string(); in ToString()
3349 isolate, seq, in ToString()
3350 isolate->factory()->NewRawOneByteString(character_count_), in ToString()
3364 isolate, seq, in ToString()
3365 isolate->factory()->NewRawTwoByteString(character_count_), in ToString()
3623 Isolate* isolate = replacement->GetIsolate(); in Compile() local
3632 isolate->factory()->NewSubString(replacement, from, to), zone()); in Compile()
3722 void FindStringIndices(Isolate* isolate, in FindStringIndices() argument
3733 StringSearch<PatternChar, SubjectChar> search(isolate, pattern); in FindStringIndices()
3744 void FindStringIndicesDispatch(Isolate* isolate, in FindStringIndicesDispatch() argument
3765 FindStringIndices(isolate, in FindStringIndicesDispatch()
3773 FindStringIndices(isolate, in FindStringIndicesDispatch()
3792 FindStringIndices(isolate, in FindStringIndicesDispatch()
3808 FindStringIndices(isolate, in FindStringIndicesDispatch()
3823 Isolate* isolate, in StringReplaceGlobalAtomRegExpWithString() argument
3831 ZoneScope zone_scope(isolate->runtime_zone()); in StringReplaceGlobalAtomRegExpWithString()
3841 isolate, *subject, pattern, &indices, 0xffffffff, zone_scope.zone()); in StringReplaceGlobalAtomRegExpWithString()
3865 maybe_res = isolate->factory()->NewRawOneByteString(result_len); in StringReplaceGlobalAtomRegExpWithString()
3867 maybe_res = isolate->factory()->NewRawTwoByteString(result_len); in StringReplaceGlobalAtomRegExpWithString()
3870 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, untyped_res, maybe_res); in StringReplaceGlobalAtomRegExpWithString()
3911 Isolate* isolate, in StringReplaceGlobalRegExpWithString() argument
3923 ZoneScope zone_scope(isolate->runtime_zone()); in StringReplaceGlobalRegExpWithString()
3934 isolate, subject, regexp, replacement, last_match_info); in StringReplaceGlobalRegExpWithString()
3937 isolate, subject, regexp, replacement, last_match_info); in StringReplaceGlobalRegExpWithString()
3941 RegExpImpl::GlobalCache global_cache(regexp, subject, true, isolate); in StringReplaceGlobalRegExpWithString()
3942 if (global_cache.HasException()) return isolate->heap()->exception(); in StringReplaceGlobalRegExpWithString()
3946 if (global_cache.HasException()) return isolate->heap()->exception(); in StringReplaceGlobalRegExpWithString()
3954 ReplacementStringBuilder builder(isolate->heap(), in StringReplaceGlobalRegExpWithString()
3988 if (global_cache.HasException()) return isolate->heap()->exception(); in StringReplaceGlobalRegExpWithString()
4001 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, builder.ToString()); in StringReplaceGlobalRegExpWithString()
4008 Isolate* isolate, in StringReplaceGlobalRegExpWithEmptyString() argument
4016 Handle<String> empty_string = isolate->factory()->empty_string(); in StringReplaceGlobalRegExpWithEmptyString()
4019 isolate, subject, regexp, empty_string, last_match_info); in StringReplaceGlobalRegExpWithEmptyString()
4022 isolate, subject, regexp, empty_string, last_match_info); in StringReplaceGlobalRegExpWithEmptyString()
4026 RegExpImpl::GlobalCache global_cache(regexp, subject, true, isolate); in StringReplaceGlobalRegExpWithEmptyString()
4027 if (global_cache.HasException()) return isolate->heap()->exception(); in StringReplaceGlobalRegExpWithEmptyString()
4031 if (global_cache.HasException()) return isolate->heap()->exception(); in StringReplaceGlobalRegExpWithEmptyString()
4041 if (new_length == 0) return isolate->heap()->empty_string(); in StringReplaceGlobalRegExpWithEmptyString()
4046 isolate->factory()->NewRawOneByteString(new_length).ToHandleChecked()); in StringReplaceGlobalRegExpWithEmptyString()
4049 isolate->factory()->NewRawTwoByteString(new_length).ToHandleChecked()); in StringReplaceGlobalRegExpWithEmptyString()
4068 if (global_cache.HasException()) return isolate->heap()->exception(); in StringReplaceGlobalRegExpWithEmptyString()
4082 if (position == 0) return isolate->heap()->empty_string(); in StringReplaceGlobalRegExpWithEmptyString()
4093 Heap* heap = isolate->heap(); in StringReplaceGlobalRegExpWithEmptyString()
4106 HandleScope scope(isolate); in RUNTIME_FUNCTION()
4122 isolate, subject, regexp, last_match_info); in RUNTIME_FUNCTION()
4125 isolate, subject, regexp, last_match_info); in RUNTIME_FUNCTION()
4132 isolate, subject, regexp, replacement, last_match_info); in RUNTIME_FUNCTION()
4138 MaybeHandle<String> StringReplaceOneCharWithString(Isolate* isolate, in StringReplaceOneCharWithString() argument
4144 StackLimitCheck stackLimitCheck(isolate); in StringReplaceOneCharWithString()
4155 isolate, first, search, replace, found, recursion_limit) in StringReplaceOneCharWithString()
4159 if (*found) return isolate->factory()->NewConsString(new_first, second); in StringReplaceOneCharWithString()
4163 isolate, second, search, replace, found, recursion_limit) in StringReplaceOneCharWithString()
4167 if (*found) return isolate->factory()->NewConsString(first, new_second); in StringReplaceOneCharWithString()
4171 int index = Runtime::StringMatch(isolate, subject, search, 0); in StringReplaceOneCharWithString()
4174 Handle<String> first = isolate->factory()->NewSubString(subject, 0, index); in StringReplaceOneCharWithString()
4177 isolate, cons1, in StringReplaceOneCharWithString()
4178 isolate->factory()->NewConsString(first, replace), in StringReplaceOneCharWithString()
4181 isolate->factory()->NewSubString(subject, index + 1, subject->length()); in StringReplaceOneCharWithString()
4182 return isolate->factory()->NewConsString(cons1, second); in StringReplaceOneCharWithString()
4188 HandleScope scope(isolate); in RUNTIME_FUNCTION()
4200 isolate, subject, search, replace, &found, kRecursionLimit) in RUNTIME_FUNCTION()
4204 if (isolate->has_pending_exception()) return isolate->heap()->exception(); in RUNTIME_FUNCTION()
4208 isolate, result, in RUNTIME_FUNCTION()
4210 isolate, subject, search, replace, &found, kRecursionLimit)); in RUNTIME_FUNCTION()
4218 int Runtime::StringMatch(Isolate* isolate, in StringMatch() argument
4243 return SearchString(isolate, in StringMatch()
4248 return SearchString(isolate, in StringMatch()
4255 return SearchString(isolate, in StringMatch()
4260 return SearchString(isolate, in StringMatch()
4268 HandleScope scope(isolate); in RUNTIME_FUNCTION()
4279 int position = Runtime::StringMatch(isolate, sub, pat, start_index); in RUNTIME_FUNCTION()
4320 HandleScope scope(isolate); in RUNTIME_FUNCTION()
4379 HandleScope handle_scope(isolate); in RUNTIME_FUNCTION()
4423 HandleScope scope(isolate); in RUNTIME_FUNCTION()
4444 isolate->counters()->sub_string_runtime()->Increment(); in RUNTIME_FUNCTION()
4446 return *isolate->factory()->NewSubString(string, start, end); in RUNTIME_FUNCTION()
4451 HandleScope handles(isolate); in RUNTIME_FUNCTION()
4454 return *isolate->factory()->InternalizeString(string); in RUNTIME_FUNCTION()
4459 HandleScope handles(isolate); in RUNTIME_FUNCTION()
4468 RegExpImpl::GlobalCache global_cache(regexp, subject, true, isolate); in RUNTIME_FUNCTION()
4469 if (global_cache.HasException()) return isolate->heap()->exception(); in RUNTIME_FUNCTION()
4473 ZoneScope zone_scope(isolate->runtime_zone()); in RUNTIME_FUNCTION()
4483 if (global_cache.HasException()) return isolate->heap()->exception(); in RUNTIME_FUNCTION()
4487 return isolate->heap()->null_value(); in RUNTIME_FUNCTION()
4496 Handle<FixedArray> elements = isolate->factory()->NewFixedArray(matches); in RUNTIME_FUNCTION()
4498 isolate->factory()->NewSubString(subject, offsets.at(0), offsets.at(1)); in RUNTIME_FUNCTION()
4501 HandleScope temp_scope(isolate); in RUNTIME_FUNCTION()
4505 isolate->factory()->NewProperSubString(subject, from, to); in RUNTIME_FUNCTION()
4508 Handle<JSArray> result = isolate->factory()->NewJSArrayWithElements(elements); in RUNTIME_FUNCTION()
4518 Isolate* isolate, in SearchRegExpMultiple() argument
4533 isolate->heap(), in SearchRegExpMultiple()
4536 RegExpResultsCache::REGEXP_MULTIPLE_INDICES), isolate); in SearchRegExpMultiple()
4554 RegExpImpl::GlobalCache global_cache(regexp, subject, true, isolate); in SearchRegExpMultiple()
4555 if (global_cache.HasException()) return isolate->heap()->exception(); in SearchRegExpMultiple()
4562 result_elements = isolate->factory()->NewFixedArrayWithHoles(16); in SearchRegExpMultiple()
4588 HandleScope temp_scope(isolate); in SearchRegExpMultiple()
4591 match = isolate->factory()->NewProperSubString(subject, in SearchRegExpMultiple()
4595 match = isolate->factory()->NewSubString(subject, in SearchRegExpMultiple()
4605 isolate->factory()->NewFixedArray(3 + capture_count); in SearchRegExpMultiple()
4614 isolate->factory()->NewSubString(subject, start, end); in SearchRegExpMultiple()
4618 elements->set(i, isolate->heap()->undefined_value()); in SearchRegExpMultiple()
4623 builder.Add(*isolate->factory()->NewJSArrayWithElements(elements)); in SearchRegExpMultiple()
4630 if (global_cache.HasException()) return isolate->heap()->exception(); in SearchRegExpMultiple()
4651 RegExpResultsCache::Enter(isolate, in SearchRegExpMultiple()
4653 handle(regexp->data(), isolate), in SearchRegExpMultiple()
4659 return isolate->heap()->null_value(); // No matches at all. in SearchRegExpMultiple()
4668 HandleScope handles(isolate); in RUNTIME_FUNCTION()
4683 isolate, subject, regexp, last_match_info, result_array); in RUNTIME_FUNCTION()
4686 isolate, subject, regexp, last_match_info, result_array); in RUNTIME_FUNCTION()
4692 HandleScope scope(isolate); in RUNTIME_FUNCTION()
4703 return *isolate->factory()-> in RUNTIME_FUNCTION()
4711 return isolate->heap()->nan_string(); in RUNTIME_FUNCTION()
4715 return isolate->heap()->minus_infinity_string(); in RUNTIME_FUNCTION()
4717 return isolate->heap()->infinity_string(); in RUNTIME_FUNCTION()
4720 Handle<String> result = isolate->factory()->NewStringFromAsciiChecked(str); in RUNTIME_FUNCTION()
4727 HandleScope scope(isolate); in RUNTIME_FUNCTION()
4737 Handle<String> result = isolate->factory()->NewStringFromAsciiChecked(str); in RUNTIME_FUNCTION()
4744 HandleScope scope(isolate); in RUNTIME_FUNCTION()
4753 Handle<String> result = isolate->factory()->NewStringFromAsciiChecked(str); in RUNTIME_FUNCTION()
4760 HandleScope scope(isolate); in RUNTIME_FUNCTION()
4769 Handle<String> result = isolate->factory()->NewStringFromAsciiChecked(str); in RUNTIME_FUNCTION()
4776 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
4780 return isolate->heap()->ToBoolean(Smi::IsValid(number)); in RUNTIME_FUNCTION()
4796 MaybeHandle<Object> Runtime::GetElementOrCharAt(Isolate* isolate, in GetElementOrCharAt() argument
4815 PrototypeIterator iter(isolate, object); in GetElementOrCharAt()
4816 return Object::GetElement(isolate, PrototypeIterator::GetCurrent(iter), in GetElementOrCharAt()
4819 return Object::GetElement(isolate, object, index); in GetElementOrCharAt()
4825 static MaybeHandle<Name> ToName(Isolate* isolate, Handle<Object> key) { in ToName() argument
4831 isolate, converted, Execution::ToString(isolate, key), Name); in ToName()
4837 MaybeHandle<Object> Runtime::HasObjectProperty(Isolate* isolate, in HasObjectProperty() argument
4848 ASSIGN_RETURN_ON_EXCEPTION(isolate, name, ToName(isolate, key), Object); in HasObjectProperty()
4854 return isolate->factory()->ToBoolean(maybe.value); in HasObjectProperty()
4858 MaybeHandle<Object> Runtime::GetObjectProperty(Isolate* isolate, in GetObjectProperty() argument
4863 THROW_NEW_ERROR(isolate, NewTypeError("non_object_property_load", in GetObjectProperty()
4871 return GetElementOrCharAt(isolate, object, index); in GetObjectProperty()
4876 ASSIGN_RETURN_ON_EXCEPTION(isolate, name, ToName(isolate, key), Object); in GetObjectProperty()
4881 return GetElementOrCharAt(isolate, object, index); in GetObjectProperty()
4889 HandleScope scope(isolate); in RUNTIME_FUNCTION()
4896 isolate, result, in RUNTIME_FUNCTION()
4897 Runtime::GetObjectProperty(isolate, object, key)); in RUNTIME_FUNCTION()
4904 HandleScope scope(isolate); in RUNTIME_FUNCTION()
4930 Handle<Map> receiver_map(receiver->map(), isolate); in RUNTIME_FUNCTION()
4931 KeyedLookupCache* keyed_lookup_cache = isolate->keyed_lookup_cache(); in RUNTIME_FUNCTION()
4985 isolate, TransitionElements(js_object, elements_kind, isolate)); in RUNTIME_FUNCTION()
5004 isolate, result, in RUNTIME_FUNCTION()
5005 Runtime::GetObjectProperty(isolate, receiver_obj, key_obj)); in RUNTIME_FUNCTION()
5016 static Handle<Object> InstantiateAccessorComponent(Isolate* isolate, in InstantiateAccessorComponent() argument
5018 if (component->IsUndefined()) return isolate->factory()->undefined_value(); in InstantiateAccessorComponent()
5026 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5038 isolate, JSObject::DefineAccessor( in RUNTIME_FUNCTION()
5039 object, name, InstantiateAccessorComponent(isolate, getter), in RUNTIME_FUNCTION()
5040 InstantiateAccessorComponent(isolate, setter), in RUNTIME_FUNCTION()
5042 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
5053 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5068 isolate, JSObject::DefineAccessor(obj, name, getter, setter, attr)); in RUNTIME_FUNCTION()
5070 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
5081 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5092 if (!isolate->MayNamedAccess(js_object, name, v8::ACCESS_SET)) { in RUNTIME_FUNCTION()
5093 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
5105 isolate, result, in RUNTIME_FUNCTION()
5114 isolate, result, in RUNTIME_FUNCTION()
5122 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5130 MaybeHandle<Object> Runtime::SetObjectProperty(Isolate* isolate, in SetObjectProperty() argument
5137 THROW_NEW_ERROR(isolate, NewTypeError("non_object_property_store", in SetObjectProperty()
5148 isolate, name_object, Execution::ToString(isolate, key), Object); in SetObjectProperty()
5178 isolate, value, Execution::ToNumber(isolate, value), Object); in SetObjectProperty()
5198 isolate, value, Execution::ToNumber(isolate, value), Object); in SetObjectProperty()
5212 isolate, converted, Execution::ToString(isolate, key), Object); in SetObjectProperty()
5230 Isolate* isolate = js_object->GetIsolate(); in DefineObjectProperty() local
5264 isolate, converted, Execution::ToString(isolate, key), Object); in DefineObjectProperty()
5277 MaybeHandle<Object> Runtime::DeleteObjectProperty(Isolate* isolate, in DeleteObjectProperty() argument
5291 return isolate->factory()->true_value(); in DeleteObjectProperty()
5304 isolate, converted, Execution::ToString(isolate, key), Object); in DeleteObjectProperty()
5314 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5326 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5344 if (!maybe.has_value) return isolate->heap()->exception(); in RUNTIME_FUNCTION()
5350 isolate, result, in RUNTIME_FUNCTION()
5357 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5382 if (!maybe.has_value) return isolate->heap()->exception(); in RUNTIME_FUNCTION()
5388 isolate, in RUNTIME_FUNCTION()
5395 isolate, result, in RUNTIME_FUNCTION()
5402 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5413 isolate, result, in RUNTIME_FUNCTION()
5414 Runtime::SetObjectProperty(isolate, object, key, value, strict_mode)); in RUNTIME_FUNCTION()
5422 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5440 isolate, result, JSObject::SetElement(object, index, value, attributes, in RUNTIME_FUNCTION()
5447 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5460 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
5469 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
5474 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
5482 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
5487 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5548 if (!isolate->debug()->is_active() || !isolate->debug()->StepInActive()) { in RUNTIME_FUNCTION()
5549 return isolate->heap()->false_value(); in RUNTIME_FUNCTION()
5553 return isolate->heap()->ToBoolean( in RUNTIME_FUNCTION()
5562 Debug* debug = isolate->debug(); in RUNTIME_FUNCTION()
5563 if (!debug->IsStepping()) return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
5565 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5573 Handle<JSGeneratorObject>::cast(object)->function(), isolate); in RUNTIME_FUNCTION()
5580 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
5586 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5588 isolate->PushPromise(promise); in RUNTIME_FUNCTION()
5589 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
5595 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
5596 isolate->PopPromise(); in RUNTIME_FUNCTION()
5597 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
5603 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5605 isolate->debug()->OnPromiseEvent(data); in RUNTIME_FUNCTION()
5606 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
5612 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5615 isolate->debug()->OnPromiseReject(promise, value); in RUNTIME_FUNCTION()
5616 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
5622 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5624 isolate->debug()->OnAsyncTaskEvent(data); in RUNTIME_FUNCTION()
5625 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
5630 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5639 isolate, result, in RUNTIME_FUNCTION()
5645 static Object* HasOwnPropertyImplementation(Isolate* isolate, in HasOwnPropertyImplementation() argument
5649 if (!maybe.has_value) return isolate->heap()->exception(); in HasOwnPropertyImplementation()
5650 if (maybe.value) return isolate->heap()->true_value(); in HasOwnPropertyImplementation()
5654 PrototypeIterator iter(isolate, object); in HasOwnPropertyImplementation()
5662 isolate, Handle<JSObject>::cast(PrototypeIterator::GetCurrent(iter)), in HasOwnPropertyImplementation()
5665 RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate); in HasOwnPropertyImplementation()
5666 return isolate->heap()->false_value(); in HasOwnPropertyImplementation()
5671 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5686 if (!maybe.has_value) return isolate->heap()->exception(); in RUNTIME_FUNCTION()
5687 DCHECK(!isolate->has_pending_exception()); in RUNTIME_FUNCTION()
5689 return isolate->heap()->true_value(); in RUNTIME_FUNCTION()
5695 return isolate->heap()->false_value(); in RUNTIME_FUNCTION()
5698 return HasOwnPropertyImplementation(isolate, in RUNTIME_FUNCTION()
5705 return isolate->heap()->true_value(); in RUNTIME_FUNCTION()
5708 return isolate->heap()->false_value(); in RUNTIME_FUNCTION()
5713 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5719 if (!maybe.has_value) return isolate->heap()->exception(); in RUNTIME_FUNCTION()
5720 return isolate->heap()->ToBoolean(maybe.value); in RUNTIME_FUNCTION()
5725 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5731 if (!maybe.has_value) return isolate->heap()->exception(); in RUNTIME_FUNCTION()
5732 return isolate->heap()->ToBoolean(maybe.value); in RUNTIME_FUNCTION()
5737 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5745 if (!maybe.has_value) return isolate->heap()->exception(); in RUNTIME_FUNCTION()
5747 return isolate->heap()->ToBoolean((maybe.value & DONT_ENUM) == 0); in RUNTIME_FUNCTION()
5752 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5757 isolate->counters()->for_in()->Increment(); in RUNTIME_FUNCTION()
5760 isolate, elements, in RUNTIME_FUNCTION()
5762 return *isolate->factory()->NewJSArrayWithElements(elements); in RUNTIME_FUNCTION()
5772 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
5779 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5783 isolate, content, in RUNTIME_FUNCTION()
5810 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5813 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
5824 !isolate->MayNamedAccess( in RUNTIME_FUNCTION()
5825 obj, isolate->factory()->undefined_value(), v8::ACCESS_KEYS)) { in RUNTIME_FUNCTION()
5826 isolate->ReportFailedAccessCheck(obj, v8::ACCESS_KEYS); in RUNTIME_FUNCTION()
5827 RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate); in RUNTIME_FUNCTION()
5828 return *isolate->factory()->NewJSArray(0); in RUNTIME_FUNCTION()
5830 PrototypeIterator iter(isolate, obj); in RUNTIME_FUNCTION()
5841 PrototypeIterator iter(isolate, obj, PrototypeIterator::START_AT_RECEIVER); in RUNTIME_FUNCTION()
5848 !isolate->MayNamedAccess(jsproto, in RUNTIME_FUNCTION()
5849 isolate->factory()->undefined_value(), in RUNTIME_FUNCTION()
5851 isolate->ReportFailedAccessCheck(jsproto, v8::ACCESS_KEYS); in RUNTIME_FUNCTION()
5852 RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate); in RUNTIME_FUNCTION()
5853 return *isolate->factory()->NewJSArray(0); in RUNTIME_FUNCTION()
5865 isolate->factory()->NewFixedArray(total_property_count); in RUNTIME_FUNCTION()
5871 PrototypeIterator iter(isolate, obj, PrototypeIterator::START_AT_RECEIVER); in RUNTIME_FUNCTION()
5885 if (names->get(k) != isolate->heap()->hidden_string()) { in RUNTIME_FUNCTION()
5888 names->set(j, isolate->heap()->hidden_string()); in RUNTIME_FUNCTION()
5910 names = isolate->factory()->NewFixedArray( in RUNTIME_FUNCTION()
5915 if (name == isolate->heap()->hidden_string()) { in RUNTIME_FUNCTION()
5924 return *isolate->factory()->NewJSArrayWithElements(names); in RUNTIME_FUNCTION()
5931 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5934 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
5939 Handle<FixedArray> names = isolate->factory()->NewFixedArray(n); in RUNTIME_FUNCTION()
5941 return *isolate->factory()->NewJSArrayWithElements(names); in RUNTIME_FUNCTION()
5948 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5966 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5976 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
5983 HandleScope scope(isolate); in RUNTIME_FUNCTION()
5993 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
5998 HandleScope scope(isolate); in RUNTIME_FUNCTION()
6006 !isolate->MayNamedAccess( in RUNTIME_FUNCTION()
6007 object, isolate->factory()->undefined_value(), v8::ACCESS_KEYS)) { in RUNTIME_FUNCTION()
6008 isolate->ReportFailedAccessCheck(object, v8::ACCESS_KEYS); in RUNTIME_FUNCTION()
6009 RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate); in RUNTIME_FUNCTION()
6010 return *isolate->factory()->NewJSArray(0); in RUNTIME_FUNCTION()
6013 PrototypeIterator iter(isolate, object); in RUNTIME_FUNCTION()
6015 if (iter.IsAtEnd()) return *isolate->factory()->NewJSArray(0); in RUNTIME_FUNCTION()
6021 isolate, contents, in RUNTIME_FUNCTION()
6028 Handle<FixedArray> copy = isolate->factory()->NewFixedArray(length); in RUNTIME_FUNCTION()
6035 HandleScope scope(isolate); in RUNTIME_FUNCTION()
6036 Handle<Object> entry_handle(entry, isolate); in RUNTIME_FUNCTION()
6038 isolate->factory()->NumberToString(entry_handle); in RUNTIME_FUNCTION()
6042 return *isolate->factory()->NewJSArrayWithElements(copy); in RUNTIME_FUNCTION()
6047 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
6052 JavaScriptFrameIterator it(isolate); in RUNTIME_FUNCTION()
6066 HandleScope scope(isolate); in RUNTIME_FUNCTION()
6069 if (symbol->Equals(isolate->native_context()->iterator_symbol())) { in RUNTIME_FUNCTION()
6070 return isolate->native_context()->array_values_iterator(); in RUNTIME_FUNCTION()
6075 isolate, result, in RUNTIME_FUNCTION()
6076 Object::GetProperty(isolate->initial_object_prototype(), in RUNTIME_FUNCTION()
6084 isolate, converted, Execution::ToString(isolate, raw_key)); in RUNTIME_FUNCTION()
6092 Handle<Object> initial_prototype(isolate->initial_object_prototype()); in RUNTIME_FUNCTION()
6095 isolate, result, in RUNTIME_FUNCTION()
6096 Object::GetElement(isolate, initial_prototype, index)); in RUNTIME_FUNCTION()
6102 if (String::Equals(isolate->factory()->length_string(), key)) { in RUNTIME_FUNCTION()
6105 if (String::Equals(isolate->factory()->callee_string(), key)) { in RUNTIME_FUNCTION()
6109 isolate, NewTypeError("strict_arguments_callee", in RUNTIME_FUNCTION()
6118 isolate, result, in RUNTIME_FUNCTION()
6119 Object::GetProperty(isolate->initial_object_prototype(), key)); in RUNTIME_FUNCTION()
6125 HandleScope scope(isolate); in RUNTIME_FUNCTION()
6136 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
6140 return isolate->heap()->ToBoolean(object->BooleanValue()); in RUNTIME_FUNCTION()
6147 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
6150 if (obj->IsNumber()) return isolate->heap()->number_string(); in RUNTIME_FUNCTION()
6155 return isolate->heap()->undefined_string(); in RUNTIME_FUNCTION()
6160 return isolate->heap()->string_string(); in RUNTIME_FUNCTION()
6166 return isolate->heap()->boolean_string(); in RUNTIME_FUNCTION()
6169 return isolate->heap()->object_string(); in RUNTIME_FUNCTION()
6172 return isolate->heap()->undefined_string(); in RUNTIME_FUNCTION()
6174 return isolate->heap()->symbol_string(); in RUNTIME_FUNCTION()
6177 return isolate->heap()->function_string(); in RUNTIME_FUNCTION()
6181 return isolate->heap()->object_string(); in RUNTIME_FUNCTION()
6187 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
6196 return isolate->heap()->ToBoolean(value == 0); in RUNTIME_FUNCTION()
6199 return isolate->heap()->ToBoolean(value != 0); in RUNTIME_FUNCTION()
6201 return isolate->heap()->ToBoolean(value < 0); in RUNTIME_FUNCTION()
6203 return isolate->heap()->ToBoolean(value > 0); in RUNTIME_FUNCTION()
6205 return isolate->heap()->ToBoolean(value <= 0); in RUNTIME_FUNCTION()
6207 return isolate->heap()->ToBoolean(value >= 0); in RUNTIME_FUNCTION()
6210 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
6238 HandleScope handle_scope(isolate); in RUNTIME_FUNCTION()
6254 return isolate->heap()->nan_value(); in RUNTIME_FUNCTION()
6261 return isolate->heap()->nan_value(); in RUNTIME_FUNCTION()
6268 if (d == 0) return isolate->heap()->minus_zero_value(); in RUNTIME_FUNCTION()
6295 return *isolate->factory()->NewNumber(StringToDouble( in RUNTIME_FUNCTION()
6296 isolate->unicode_cache(), *subject, flags)); in RUNTIME_FUNCTION()
6301 HandleScope scope(isolate); in RUNTIME_FUNCTION()
6305 if (length == 0) return isolate->heap()->empty_string(); in RUNTIME_FUNCTION()
6309 isolate, result, isolate->factory()->NewRawOneByteString(length)); in RUNTIME_FUNCTION()
6312 isolate, result, isolate->factory()->NewRawTwoByteString(length)); in RUNTIME_FUNCTION()
6319 HandleScope scope(isolate); in RUNTIME_FUNCTION()
6329 HandleScope scope(isolate); in RUNTIME_FUNCTION()
6336 isolate, result, in RUNTIME_FUNCTION()
6338 ? URIEscape::Escape<uint8_t>(isolate, source) in RUNTIME_FUNCTION()
6339 : URIEscape::Escape<uc16>(isolate, source)); in RUNTIME_FUNCTION()
6345 HandleScope scope(isolate); in RUNTIME_FUNCTION()
6352 isolate, result, in RUNTIME_FUNCTION()
6354 ? URIUnescape::Unescape<uint8_t>(isolate, source) in RUNTIME_FUNCTION()
6355 : URIUnescape::Unescape<uc16>(isolate, source)); in RUNTIME_FUNCTION()
6361 HandleScope scope(isolate); in RUNTIME_FUNCTION()
6366 isolate, result, BasicJsonStringifier::StringifyString(isolate, string)); in RUNTIME_FUNCTION()
6372 HandleScope scope(isolate); in RUNTIME_FUNCTION()
6375 BasicJsonStringifier stringifier(isolate); in RUNTIME_FUNCTION()
6378 isolate, result, stringifier.Stringify(object)); in RUNTIME_FUNCTION()
6384 HandleScope handle_scope(isolate); in RUNTIME_FUNCTION()
6399 isolate->unicode_cache(), flat.ToOneByteVector(), radix); in RUNTIME_FUNCTION()
6402 isolate->unicode_cache(), flat.ToUC16Vector(), radix); in RUNTIME_FUNCTION()
6406 return *isolate->factory()->NewNumber(value); in RUNTIME_FUNCTION()
6411 HandleScope shs(isolate); in RUNTIME_FUNCTION()
6416 double value = StringToDouble(isolate->unicode_cache(), *subject, in RUNTIME_FUNCTION()
6419 return *isolate->factory()->NewNumber(value); in RUNTIME_FUNCTION()
6434 Isolate* isolate, in ConvertCaseHelper() argument
6454 isolate->runtime_state()->string_iterator()); in ConvertCaseHelper()
6506 THROW_NEW_ERROR_RETURN_FAILURE(isolate, in ConvertCaseHelper()
6662 Isolate* isolate, in ConvertCase() argument
6678 isolate->factory()->NewRawOneByteString(length).ToHandleChecked(); in ConvertCase()
6694 result = isolate->factory()->NewRawOneByteString(length).ToHandleChecked(); in ConvertCase()
6696 result = isolate->factory()->NewRawTwoByteString(length).ToHandleChecked(); in ConvertCase()
6699 Object* answer = ConvertCaseHelper(isolate, *s, *result, length, mapping); in ConvertCase()
6706 isolate, result, isolate->factory()->NewRawOneByteString(length)); in ConvertCase()
6710 isolate, result, isolate->factory()->NewRawTwoByteString(length)); in ConvertCase()
6712 return ConvertCaseHelper(isolate, *s, *result, length, mapping); in ConvertCase()
6717 HandleScope scope(isolate); in RUNTIME_FUNCTION()
6721 s, isolate, isolate->runtime_state()->to_lower_mapping()); in RUNTIME_FUNCTION()
6726 HandleScope scope(isolate); in RUNTIME_FUNCTION()
6730 s, isolate, isolate->runtime_state()->to_upper_mapping()); in RUNTIME_FUNCTION()
6735 HandleScope scope(isolate); in RUNTIME_FUNCTION()
6746 UnicodeCache* unicode_cache = isolate->unicode_cache(); in RUNTIME_FUNCTION()
6763 return *isolate->factory()->NewSubString(string, left, right); in RUNTIME_FUNCTION()
6768 HandleScope handle_scope(isolate); in RUNTIME_FUNCTION()
6781 RegExpResultsCache::Lookup(isolate->heap(), in RUNTIME_FUNCTION()
6785 isolate); in RUNTIME_FUNCTION()
6789 isolate->factory()->NewJSArrayWithElements( in RUNTIME_FUNCTION()
6804 ZoneScope zone_scope(isolate->runtime_zone()); in RUNTIME_FUNCTION()
6810 FindStringIndicesDispatch(isolate, *subject, *pattern, in RUNTIME_FUNCTION()
6822 Handle<JSArray> result = isolate->factory()->NewJSArray(part_count); in RUNTIME_FUNCTION()
6836 HandleScope local_loop_handle(isolate); in RUNTIME_FUNCTION()
6839 isolate->factory()->NewProperSubString(subject, part_start, part_end); in RUNTIME_FUNCTION()
6846 RegExpResultsCache::Enter(isolate, in RUNTIME_FUNCTION()
6892 HandleScope scope(isolate); in RUNTIME_FUNCTION()
6904 elements = isolate->factory()->NewUninitializedFixedArray(length); in RUNTIME_FUNCTION()
6912 position = CopyCachedOneByteCharsToArray(isolate->heap(), chars.start(), in RUNTIME_FUNCTION()
6916 isolate->heap()->undefined_value(), in RUNTIME_FUNCTION()
6920 elements = isolate->factory()->NewFixedArray(length); in RUNTIME_FUNCTION()
6924 isolate->factory()->LookupSingleCharacterStringFromCode(s->Get(i)); in RUNTIME_FUNCTION()
6934 return *isolate->factory()->NewJSArrayWithElements(elements); in RUNTIME_FUNCTION()
6939 HandleScope scope(isolate); in RUNTIME_FUNCTION()
6942 return *Object::ToObject(isolate, value).ToHandleChecked(); in RUNTIME_FUNCTION()
6954 HandleScope scope(isolate); in RUNTIME_FUNCTION()
6958 return *isolate->factory()->NumberToString(number); in RUNTIME_FUNCTION()
6963 HandleScope scope(isolate); in RUNTIME_FUNCTION()
6967 return *isolate->factory()->NumberToString(number, false); in RUNTIME_FUNCTION()
6972 HandleScope scope(isolate); in RUNTIME_FUNCTION()
6976 return *isolate->factory()->NewNumber(DoubleToInteger(number)); in RUNTIME_FUNCTION()
6981 HandleScope scope(isolate); in RUNTIME_FUNCTION()
6989 return *isolate->factory()->NewNumber(double_value); in RUNTIME_FUNCTION()
6994 HandleScope scope(isolate); in RUNTIME_FUNCTION()
6998 return *isolate->factory()->NewNumberFromUint(number); in RUNTIME_FUNCTION()
7003 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7007 return *isolate->factory()->NewNumberFromInt(DoubleToInt32(number)); in RUNTIME_FUNCTION()
7014 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
7027 return isolate->heap()->nan_value(); in RUNTIME_FUNCTION()
7032 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7034 return *isolate->factory()->NewHeapNumber(0); in RUNTIME_FUNCTION()
7039 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7044 return *isolate->factory()->NewNumber(x + y); in RUNTIME_FUNCTION()
7049 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7054 return *isolate->factory()->NewNumber(x - y); in RUNTIME_FUNCTION()
7059 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7064 return *isolate->factory()->NewNumber(x * y); in RUNTIME_FUNCTION()
7069 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7073 return *isolate->factory()->NewNumber(-x); in RUNTIME_FUNCTION()
7078 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7083 return *isolate->factory()->NewNumber(x / y); in RUNTIME_FUNCTION()
7088 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7093 return *isolate->factory()->NewNumber(modulo(x, y)); in RUNTIME_FUNCTION()
7098 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7106 return *isolate->factory()->NewNumberFromInt(product); in RUNTIME_FUNCTION()
7111 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7115 isolate->counters()->string_add_runtime()->Increment(); in RUNTIME_FUNCTION()
7118 isolate, result, isolate->factory()->NewConsString(str1, str2)); in RUNTIME_FUNCTION()
7218 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7223 THROW_NEW_ERROR_RETURN_FAILURE(isolate, NewInvalidStringLengthError()); in RUNTIME_FUNCTION()
7229 TryNumberToSize(isolate, array->length(), &actual_array_length)); in RUNTIME_FUNCTION()
7241 return isolate->Throw(isolate->heap()->illegal_argument_string()); in RUNTIME_FUNCTION()
7254 return isolate->heap()->empty_string(); in RUNTIME_FUNCTION()
7264 return isolate->Throw(isolate->heap()->illegal_argument_string()); in RUNTIME_FUNCTION()
7270 isolate, answer, in RUNTIME_FUNCTION()
7271 isolate->factory()->NewRawOneByteString(length)); in RUNTIME_FUNCTION()
7280 isolate, answer, in RUNTIME_FUNCTION()
7281 isolate->factory()->NewRawTwoByteString(length)); in RUNTIME_FUNCTION()
7292 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7297 THROW_NEW_ERROR_RETURN_FAILURE(isolate, NewInvalidStringLengthError()); in RUNTIME_FUNCTION()
7309 return isolate->heap()->empty_string(); in RUNTIME_FUNCTION()
7321 THROW_NEW_ERROR_RETURN_FAILURE(isolate, NewInvalidStringLengthError()); in RUNTIME_FUNCTION()
7339 isolate, answer, in RUNTIME_FUNCTION()
7340 isolate->factory()->NewRawTwoByteString(length)); in RUNTIME_FUNCTION()
7418 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7483 THROW_NEW_ERROR_RETURN_FAILURE(isolate, NewInvalidStringLengthError()); in RUNTIME_FUNCTION()
7487 Handle<SeqOneByteString> result = isolate->factory()->NewRawOneByteString( in RUNTIME_FUNCTION()
7497 Handle<SeqTwoByteString> result = isolate->factory()->NewRawTwoByteString( in RUNTIME_FUNCTION()
7511 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7516 return *isolate->factory()->NewNumberFromInt(x | y); in RUNTIME_FUNCTION()
7521 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7526 return *isolate->factory()->NewNumberFromInt(x & y); in RUNTIME_FUNCTION()
7531 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7536 return *isolate->factory()->NewNumberFromInt(x ^ y); in RUNTIME_FUNCTION()
7541 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7546 return *isolate->factory()->NewNumberFromInt(x << (y & 0x1f)); in RUNTIME_FUNCTION()
7551 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7556 return *isolate->factory()->NewNumberFromUint(x >> (y & 0x1f)); in RUNTIME_FUNCTION()
7561 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7566 return *isolate->factory()->NewNumberFromInt( in RUNTIME_FUNCTION()
7572 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
7591 HandleScope handle_scope(isolate); in RUNTIME_FUNCTION()
7609 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
7625 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
7700 HandleScope handle_scope(isolate); in RUNTIME_FUNCTION()
7706 isolate->counters()->string_compare_runtime()->Increment(); in RUNTIME_FUNCTION()
7768 HandleScope scope(isolate); \
7770 isolate->counters()->math_##name()->Increment(); \
7772 return *isolate->factory()->NewHeapNumber(std::name(x)); \
7783 HandleScope scope(isolate); in RUNTIME_UNARY_MATH()
7788 return *isolate->factory()->NewNumber(static_cast<int32_t>(integer)); in RUNTIME_UNARY_MATH()
7793 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7796 return *isolate->factory()->NewNumber( in RUNTIME_FUNCTION()
7802 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7807 return *isolate->factory()->NewNumber(uint64_to_double(result)); in RUNTIME_FUNCTION()
7812 HandleScope handle_scope(isolate); in RUNTIME_FUNCTION()
7815 Factory* factory = isolate->factory(); in RUNTIME_FUNCTION()
7832 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7834 isolate->counters()->math_atan2()->Increment(); in RUNTIME_FUNCTION()
7850 return *isolate->factory()->NewNumber(result); in RUNTIME_FUNCTION()
7855 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7857 isolate->counters()->math_exp()->Increment(); in RUNTIME_FUNCTION()
7861 return *isolate->factory()->NewNumber(fast_exp(x)); in RUNTIME_FUNCTION()
7866 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7868 isolate->counters()->math_floor()->Increment(); in RUNTIME_FUNCTION()
7871 return *isolate->factory()->NewNumber(Floor(x)); in RUNTIME_FUNCTION()
7878 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7880 isolate->counters()->math_pow()->Increment(); in RUNTIME_FUNCTION()
7888 return *isolate->factory()->NewNumber(power_double_int(x, y)); in RUNTIME_FUNCTION()
7893 if (std::isnan(result)) return isolate->heap()->nan_value(); in RUNTIME_FUNCTION()
7894 return *isolate->factory()->NewNumber(result); in RUNTIME_FUNCTION()
7901 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7903 isolate->counters()->math_pow()->Increment(); in RUNTIME_FUNCTION()
7911 if (std::isnan(result)) return isolate->heap()->nan_value(); in RUNTIME_FUNCTION()
7912 return *isolate->factory()->NewNumber(result); in RUNTIME_FUNCTION()
7918 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7921 isolate->counters()->math_round()->Increment(); in RUNTIME_FUNCTION()
7936 if (sign) return isolate->heap()->minus_zero_value(); in RUNTIME_FUNCTION()
7953 if (sign && value >= -0.5) return isolate->heap()->minus_zero_value(); in RUNTIME_FUNCTION()
7956 return *isolate->factory()->NewNumber(Floor(value + 0.5)); in RUNTIME_FUNCTION()
7961 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7963 isolate->counters()->math_sqrt()->Increment(); in RUNTIME_FUNCTION()
7966 return *isolate->factory()->NewNumber(fast_sqrt(x)); in RUNTIME_FUNCTION()
7971 HandleScope scope(isolate); in RUNTIME_FUNCTION()
7976 return *isolate->factory()->NewNumber(xf); in RUNTIME_FUNCTION()
7981 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
7987 int days = isolate->date_cache()->DaysFromYearMonth(year, month); in RUNTIME_FUNCTION()
7994 HandleScope scope(isolate); in RUNTIME_FUNCTION()
8001 DateCache* date_cache = isolate->date_cache(); in RUNTIME_FUNCTION()
8006 value = isolate->factory()->nan_value(); in RUNTIME_FUNCTION()
8011 value = isolate->factory()->nan_value(); in RUNTIME_FUNCTION()
8017 value = isolate->factory()->nan_value(); in RUNTIME_FUNCTION()
8020 value = isolate->factory()->NewNumber(DoubleToInteger(time)); in RUNTIME_FUNCTION()
8028 static Handle<JSObject> NewSloppyArguments(Isolate* isolate, in NewSloppyArguments() argument
8033 isolate->factory()->NewArgumentsObject(callee, argument_count); in NewSloppyArguments()
8041 isolate->factory()->NewFixedArray(mapped_count + 2, NOT_TENURED); in NewSloppyArguments()
8043 isolate->heap()->sloppy_arguments_elements_map()); in NewSloppyArguments()
8053 Handle<Context> context(isolate->context()); in NewSloppyArguments()
8055 isolate->factory()->NewFixedArray(argument_count, NOT_TENURED); in NewSloppyArguments()
8108 isolate->factory()->NewFixedArray(argument_count, NOT_TENURED); in NewSloppyArguments()
8119 static Handle<JSObject> NewStrictArguments(Isolate* isolate, in NewStrictArguments() argument
8124 isolate->factory()->NewArgumentsObject(callee, argument_count); in NewStrictArguments()
8128 isolate->factory()->NewUninitializedFixedArray(argument_count); in NewStrictArguments()
8141 HandleScope scope(isolate); in RUNTIME_FUNCTION()
8144 JavaScriptFrameIterator it(isolate); in RUNTIME_FUNCTION()
8154 ? *NewStrictArguments(isolate, callee, parameters, argument_count) in RUNTIME_FUNCTION()
8155 : *NewSloppyArguments(isolate, callee, parameters, argument_count); in RUNTIME_FUNCTION()
8160 HandleScope scope(isolate); in RUNTIME_FUNCTION()
8165 return *NewSloppyArguments(isolate, callee, parameters, argument_count); in RUNTIME_FUNCTION()
8170 HandleScope scope(isolate); in RUNTIME_FUNCTION()
8175 return *NewStrictArguments(isolate, callee, parameters, argument_count); in RUNTIME_FUNCTION()
8180 HandleScope scope(isolate); in RUNTIME_FUNCTION()
8183 Handle<Context> context(isolate->context()); in RUNTIME_FUNCTION()
8185 return *isolate->factory()->NewFunctionFromSharedFunctionInfo(shared, context, in RUNTIME_FUNCTION()
8191 HandleScope scope(isolate); in RUNTIME_FUNCTION()
8200 return *isolate->factory()->NewFunctionFromSharedFunctionInfo( in RUNTIME_FUNCTION()
8209 Isolate* isolate, in GetCallerArguments() argument
8213 JavaScriptFrameIterator it(isolate); in GetCallerArguments()
8230 slot_refs.Prepare(isolate); in GetCallerArguments()
8232 Handle<Object> val = slot_refs.GetNext(isolate, 0); in GetCallerArguments()
8235 slot_refs.Finish(isolate); in GetCallerArguments()
8247 Handle<Object> val = Handle<Object>(frame->GetParameter(i), isolate); in GetCallerArguments()
8256 HandleScope scope(isolate); in RUNTIME_FUNCTION()
8268 GetCallerArguments(isolate, 0, &argc); in RUNTIME_FUNCTION()
8285 isolate->factory()->NewFixedArray(old_bindings->length() + argc); in RUNTIME_FUNCTION()
8287 isolate); in RUNTIME_FUNCTION()
8294 new_bindings = isolate->factory()->NewFixedArray(array_size); in RUNTIME_FUNCTION()
8304 isolate->heap()->fixed_cow_array_map()); in RUNTIME_FUNCTION()
8311 isolate->native_context()->bound_function_map()); in RUNTIME_FUNCTION()
8313 Handle<String> length_string = isolate->factory()->length_string(); in RUNTIME_FUNCTION()
8317 isolate, in RUNTIME_FUNCTION()
8325 HandleScope handles(isolate); in RUNTIME_FUNCTION()
8332 RUNTIME_ASSERT(bindings->map() == isolate->heap()->fixed_cow_array_map()); in RUNTIME_FUNCTION()
8333 return *isolate->factory()->NewJSArrayWithElements(bindings); in RUNTIME_FUNCTION()
8336 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
8341 HandleScope scope(isolate); in RUNTIME_FUNCTION()
8354 isolate); in RUNTIME_FUNCTION()
8360 GetCallerArguments(isolate, bound_argc, &total_argc); in RUNTIME_FUNCTION()
8363 JSFunction::kBoundArgumentsStartIndex + i), isolate); in RUNTIME_FUNCTION()
8368 isolate, bound_function, in RUNTIME_FUNCTION()
8369 Execution::TryGetConstructorDelegate(isolate, bound_function)); in RUNTIME_FUNCTION()
8375 isolate, result, in RUNTIME_FUNCTION()
8382 static Object* Runtime_NewObjectHelper(Isolate* isolate, in Runtime_NewObjectHelper() argument
8388 THROW_NEW_ERROR_RETURN_FAILURE(isolate, in Runtime_NewObjectHelper()
8398 THROW_NEW_ERROR_RETURN_FAILURE(isolate, in Runtime_NewObjectHelper()
8402 Debug* debug = isolate->debug(); in Runtime_NewObjectHelper()
8421 return isolate->global_proxy(); in Runtime_NewObjectHelper()
8431 result = isolate->factory()->NewJSObject(function); in Runtime_NewObjectHelper()
8433 result = isolate->factory()->NewJSObjectWithMemento(function, site); in Runtime_NewObjectHelper()
8436 isolate->counters()->constructed_objects()->Increment(); in Runtime_NewObjectHelper()
8437 isolate->counters()->constructed_objects_runtime()->Increment(); in Runtime_NewObjectHelper()
8444 HandleScope scope(isolate); in RUNTIME_FUNCTION()
8447 return Runtime_NewObjectHelper(isolate, in RUNTIME_FUNCTION()
8454 HandleScope scope(isolate); in RUNTIME_FUNCTION()
8463 return Runtime_NewObjectHelper(isolate, constructor, site); in RUNTIME_FUNCTION()
8468 HandleScope scope(isolate); in RUNTIME_FUNCTION()
8474 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
8479 HandleScope scope(isolate); in RUNTIME_FUNCTION()
8494 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, code, in RUNTIME_FUNCTION()
8504 HandleScope scope(isolate); in RUNTIME_FUNCTION()
8510 if (!isolate->use_crankshaft() || in RUNTIME_FUNCTION()
8512 isolate->DebuggerHasBreakPoints()) { in RUNTIME_FUNCTION()
8520 isolate->DebuggerHasBreakPoints() ? "T" : "F"); in RUNTIME_FUNCTION()
8551 void VisitThread(Isolate* isolate, ThreadLocalTop* top) { in VisitThread() argument
8552 JavaScriptFrameIterator it(isolate, top); in VisitThread()
8566 HandleScope scope(isolate); in RUNTIME_FUNCTION()
8568 Deoptimizer* deoptimizer = Deoptimizer::Grab(isolate); in RUNTIME_FUNCTION()
8571 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
8576 HandleScope scope(isolate); in RUNTIME_FUNCTION()
8581 Deoptimizer* deoptimizer = Deoptimizer::Grab(isolate); in RUNTIME_FUNCTION()
8591 JavaScriptFrameIterator it(isolate); in RUNTIME_FUNCTION()
8602 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
8608 isolate->thread_manager()->IterateArchivedThreads(&activations_finder); in RUNTIME_FUNCTION()
8630 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
8635 HandleScope scope(isolate); in RUNTIME_FUNCTION()
8638 if (!function->IsOptimized()) return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
8642 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
8647 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
8652 HandleScope scope(isolate); in RUNTIME_FUNCTION()
8660 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
8665 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
8668 return isolate->heap()->true_value(); in RUNTIME_FUNCTION()
8670 return isolate->heap()->false_value(); in RUNTIME_FUNCTION()
8676 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
8678 return isolate->heap()->ToBoolean( in RUNTIME_FUNCTION()
8679 isolate->concurrent_recompilation_enabled()); in RUNTIME_FUNCTION()
8684 HandleScope scope(isolate); in RUNTIME_FUNCTION()
8695 if (function->IsOptimized()) return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
8705 DCHECK(BackEdgeTable::Verify(isolate, unoptimized)); in RUNTIME_FUNCTION()
8706 isolate->runtime_profiler()->AttemptOnStackReplacement( in RUNTIME_FUNCTION()
8709 isolate->concurrent_recompilation_enabled()) { in RUNTIME_FUNCTION()
8714 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
8719 HandleScope scope(isolate); in RUNTIME_FUNCTION()
8723 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
8728 HandleScope scope(isolate); in RUNTIME_FUNCTION()
8730 if (!isolate->use_crankshaft()) { in RUNTIME_FUNCTION()
8741 if (isolate->concurrent_recompilation_enabled() && in RUNTIME_FUNCTION()
8744 isolate->optimizing_compiler_thread()->InstallOptimizedFunctions(); in RUNTIME_FUNCTION()
8768 RUNTIME_ASSERT(isolate->concurrent_recompilation_enabled()); in RUNTIME_FUNCTION()
8769 isolate->optimizing_compiler_thread()->Unblock(); in RUNTIME_FUNCTION()
8770 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
8775 HandleScope scope(isolate); in RUNTIME_FUNCTION()
8782 static bool IsSuitableForOnStackReplacement(Isolate* isolate, in IsSuitableForOnStackReplacement() argument
8786 if (!isolate->use_crankshaft() || !current_code->optimizable()) return false; in IsSuitableForOnStackReplacement()
8792 for (JavaScriptFrameIterator it(isolate); !it.done(); it.Advance()) { in IsSuitableForOnStackReplacement()
8802 HandleScope scope(isolate); in RUNTIME_FUNCTION()
8814 JavaScriptFrameIterator it(isolate); in RUNTIME_FUNCTION()
8836 isolate->concurrent_osr_enabled() && in RUNTIME_FUNCTION()
8846 OptimizingCompilerThread* thread = isolate->optimizing_compiler_thread(); in RUNTIME_FUNCTION()
8866 } else if (IsSuitableForOnStackReplacement(isolate, function, caller_code)) { in RUNTIME_FUNCTION()
8875 result.is_identical_to(isolate->builtins()->InOptimizationQueue())) { in RUNTIME_FUNCTION()
8882 BackEdgeTable::Revert(isolate, *caller_code); in RUNTIME_FUNCTION()
8920 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
8925 isolate->heap()->set_allocation_timeout(timeout); in RUNTIME_FUNCTION()
8931 isolate->heap()->EnableInlineAllocation(); in RUNTIME_FUNCTION()
8933 isolate->heap()->DisableInlineAllocation(); in RUNTIME_FUNCTION()
8937 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
8942 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
8944 RUNTIME_ASSERT(isolate->bootstrapper()->IsActive()); in RUNTIME_FUNCTION()
8945 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
8950 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
8952 RUNTIME_ASSERT(isolate->bootstrapper()->IsActive()); in RUNTIME_FUNCTION()
8953 return isolate->heap()->nan_value(); in RUNTIME_FUNCTION()
8958 HandleScope scope(isolate); in RUNTIME_FUNCTION()
8971 if (argv == NULL) return isolate->StackOverflow(); in RUNTIME_FUNCTION()
8976 argv[i] = Handle<Object>(args[1 + i], isolate); in RUNTIME_FUNCTION()
8980 Handle<Object> hreceiver(receiver, isolate); in RUNTIME_FUNCTION()
8983 isolate, result, in RUNTIME_FUNCTION()
8984 Execution::Call(isolate, hfun, hreceiver, argc, argv, true)); in RUNTIME_FUNCTION()
8990 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9010 if (argv == NULL) return isolate->StackOverflow(); in RUNTIME_FUNCTION()
9016 isolate, argv[i], in RUNTIME_FUNCTION()
9017 Object::GetElement(isolate, arguments, offset + i)); in RUNTIME_FUNCTION()
9022 isolate, result, in RUNTIME_FUNCTION()
9023 Execution::Call(isolate, fun, receiver, argc, argv, true)); in RUNTIME_FUNCTION()
9029 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9033 return *Execution::GetFunctionDelegate(isolate, object); in RUNTIME_FUNCTION()
9038 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9042 return *Execution::GetConstructorDelegate(isolate, object); in RUNTIME_FUNCTION()
9047 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9053 isolate->factory()->NewGlobalContext(function, scope_info); in RUNTIME_FUNCTION()
9055 DCHECK(function->context() == isolate->context()); in RUNTIME_FUNCTION()
9063 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9068 DCHECK(function->context() == isolate->context()); in RUNTIME_FUNCTION()
9070 return *isolate->factory()->NewFunctionContext(length, function); in RUNTIME_FUNCTION()
9075 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9083 Object::ToObject(isolate, args.at<Object>(0)); in RUNTIME_FUNCTION()
9087 isolate, NewTypeError("with_expression", HandleVector(&handle, 1))); in RUNTIME_FUNCTION()
9096 function = handle(isolate->native_context()->closure()); in RUNTIME_FUNCTION()
9101 Handle<Context> current(isolate->context()); in RUNTIME_FUNCTION()
9102 Handle<Context> context = isolate->factory()->NewWithContext( in RUNTIME_FUNCTION()
9104 isolate->set_context(*context); in RUNTIME_FUNCTION()
9110 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9119 function = handle(isolate->native_context()->closure()); in RUNTIME_FUNCTION()
9123 Handle<Context> current(isolate->context()); in RUNTIME_FUNCTION()
9124 Handle<Context> context = isolate->factory()->NewCatchContext( in RUNTIME_FUNCTION()
9126 isolate->set_context(*context); in RUNTIME_FUNCTION()
9132 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9140 function = handle(isolate->native_context()->closure()); in RUNTIME_FUNCTION()
9144 Handle<Context> current(isolate->context()); in RUNTIME_FUNCTION()
9145 Handle<Context> context = isolate->factory()->NewBlockContext( in RUNTIME_FUNCTION()
9147 isolate->set_context(*context); in RUNTIME_FUNCTION()
9153 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
9156 return isolate->heap()->ToBoolean(obj->IsJSModule()); in RUNTIME_FUNCTION()
9161 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
9167 Context* host = Context::cast(isolate->context())->global_context(); in RUNTIME_FUNCTION()
9169 DCHECK(context->previous() == isolate->context()); in RUNTIME_FUNCTION()
9170 isolate->set_context(context); in RUNTIME_FUNCTION()
9177 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9178 Factory* factory = isolate->factory(); in RUNTIME_FUNCTION()
9182 Context* previous = isolate->context(); in RUNTIME_FUNCTION()
9186 isolate->set_context(*context); in RUNTIME_FUNCTION()
9196 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9199 Context* host_context = isolate->context(); in RUNTIME_FUNCTION()
9245 DCHECK(!isolate->has_pending_exception()); in RUNTIME_FUNCTION()
9246 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
9251 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9269 return isolate->heap()->true_value(); in RUNTIME_FUNCTION()
9274 return isolate->heap()->false_value(); in RUNTIME_FUNCTION()
9283 isolate, result, in RUNTIME_FUNCTION()
9343 static Object* ComputeReceiverForNonGlobal(Isolate* isolate, in ComputeReceiverForNonGlobal() argument
9346 Context* top = isolate->context(); in ComputeReceiverForNonGlobal()
9359 return isolate->heap()->undefined_value(); in ComputeReceiverForNonGlobal()
9363 static ObjectPair LoadLookupSlotHelper(Arguments args, Isolate* isolate, in LoadLookupSlotHelper() argument
9365 HandleScope scope(isolate); in LoadLookupSlotHelper()
9369 return MakePair(isolate->ThrowIllegalOperation(), NULL); in LoadLookupSlotHelper()
9383 if (isolate->has_pending_exception()) { in LoadLookupSlotHelper()
9384 return MakePair(isolate->heap()->exception(), NULL); in LoadLookupSlotHelper()
9392 Handle<Object> receiver = isolate->factory()->undefined_value(); in LoadLookupSlotHelper()
9401 isolate->factory()->NewReferenceError("not_defined", in LoadLookupSlotHelper()
9403 if (maybe_error.ToHandle(&error)) isolate->Throw(*error); in LoadLookupSlotHelper()
9404 return MakePair(isolate->heap()->exception(), NULL); in LoadLookupSlotHelper()
9415 value = isolate->heap()->undefined_value(); in LoadLookupSlotHelper()
9439 ? Object::cast(isolate->heap()->undefined_value()) in LoadLookupSlotHelper()
9441 : ComputeReceiverForNonGlobal(isolate, JSObject::cast(*object)), in LoadLookupSlotHelper()
9442 isolate); in LoadLookupSlotHelper()
9448 isolate, value, in LoadLookupSlotHelper()
9450 MakePair(isolate->heap()->exception(), NULL)); in LoadLookupSlotHelper()
9457 MaybeHandle<Object> maybe_error = isolate->factory()->NewReferenceError( in LoadLookupSlotHelper()
9459 if (maybe_error.ToHandle(&error)) isolate->Throw(*error); in LoadLookupSlotHelper()
9460 return MakePair(isolate->heap()->exception(), NULL); in LoadLookupSlotHelper()
9463 return MakePair(isolate->heap()->undefined_value(), in LoadLookupSlotHelper()
9464 isolate->heap()->undefined_value()); in LoadLookupSlotHelper()
9470 return LoadLookupSlotHelper(args, isolate, true); in RUNTIME_FUNCTION_RETURN_PAIR()
9475 return LoadLookupSlotHelper(args, isolate, false); in RUNTIME_FUNCTION_RETURN_PAIR()
9480 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9498 if (isolate->has_pending_exception()) return isolate->heap()->exception(); in RUNTIME_FUNCTION()
9507 isolate, in RUNTIME_FUNCTION()
9523 isolate, NewReferenceError("not_defined", HandleVector(&name, 1))); in RUNTIME_FUNCTION()
9530 isolate, Object::SetProperty(object, name, value, strict_mode)); in RUNTIME_FUNCTION()
9537 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9540 return isolate->Throw(args[0]); in RUNTIME_FUNCTION()
9545 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9548 return isolate->ReThrow(args[0]); in RUNTIME_FUNCTION()
9553 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
9555 return isolate->PromoteScheduledException(); in RUNTIME_FUNCTION()
9560 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9564 isolate, NewReferenceError("not_defined", HandleVector(&name, 1))); in RUNTIME_FUNCTION()
9569 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9572 isolate, NewReferenceError("non_method", HandleVector<Object>(NULL, 0))); in RUNTIME_FUNCTION()
9577 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9580 isolate, in RUNTIME_FUNCTION()
9586 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9589 isolate, NewTypeError("not_date_object", HandleVector<Object>(NULL, 0))); in RUNTIME_FUNCTION()
9594 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
9598 StackLimitCheck check(isolate); in RUNTIME_FUNCTION()
9600 return isolate->StackOverflow(); in RUNTIME_FUNCTION()
9603 return isolate->stack_guard()->HandleInterrupts(); in RUNTIME_FUNCTION()
9608 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9613 StackLimitCheck check(isolate); in RUNTIME_FUNCTION()
9615 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
9616 return isolate->StackOverflow(); in RUNTIME_FUNCTION()
9619 isolate->optimizing_compiler_thread()->InstallOptimizedFunctions(); in RUNTIME_FUNCTION()
9626 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
9628 return isolate->stack_guard()->HandleInterrupts(); in RUNTIME_FUNCTION()
9632 static int StackSize(Isolate* isolate) { in StackSize() argument
9634 for (JavaScriptFrameIterator it(isolate); !it.done(); it.Advance()) n++; in StackSize()
9639 static void PrintTransition(Isolate* isolate, Object* result) { in PrintTransition() argument
9642 int n = StackSize(isolate); in PrintTransition()
9650 JavaScriptFrame::PrintTop(isolate, stdout, true, false); in PrintTransition()
9662 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
9664 PrintTransition(isolate, NULL); in RUNTIME_FUNCTION()
9665 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
9670 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
9673 PrintTransition(isolate, obj); in RUNTIME_FUNCTION()
9679 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
9687 JavaScriptFrameIterator it(isolate); in RUNTIME_FUNCTION()
9710 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
9712 isolate->PrintStack(stdout); in RUNTIME_FUNCTION()
9713 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
9718 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9720 if (FLAG_log_timer_events) LOG(isolate, CurrentTimeEvent()); in RUNTIME_FUNCTION()
9729 millis += Floor(isolate->heap()->synthetic_time()); in RUNTIME_FUNCTION()
9733 return *isolate->factory()->NewNumber(millis); in RUNTIME_FUNCTION()
9738 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9757 isolate->unicode_cache()); in RUNTIME_FUNCTION()
9762 isolate->unicode_cache()); in RUNTIME_FUNCTION()
9768 return isolate->heap()->null_value(); in RUNTIME_FUNCTION()
9774 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9781 isolate->date_cache()->LocalTimezone(static_cast<int64_t>(x)); in RUNTIME_FUNCTION()
9782 Handle<String> result = isolate->factory()->NewStringFromUtf8( in RUNTIME_FUNCTION()
9789 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9795 int64_t time = isolate->date_cache()->ToUTC(static_cast<int64_t>(x)); in RUNTIME_FUNCTION()
9797 return *isolate->factory()->NewNumber(static_cast<double>(time)); in RUNTIME_FUNCTION()
9802 HandleScope hs(isolate); in RUNTIME_FUNCTION()
9804 if (!isolate->eternal_handles()->Exists(EternalHandles::DATE_CACHE_VERSION)) { in RUNTIME_FUNCTION()
9806 isolate->factory()->NewFixedArray(1, TENURED); in RUNTIME_FUNCTION()
9808 isolate->eternal_handles()->CreateSingleton( in RUNTIME_FUNCTION()
9809 isolate, *date_cache_version, EternalHandles::DATE_CACHE_VERSION); in RUNTIME_FUNCTION()
9812 Handle<FixedArray>::cast(isolate->eternal_handles()->GetSingleton( in RUNTIME_FUNCTION()
9816 isolate->factory()->NewJSObject(isolate->array_function()); in RUNTIME_FUNCTION()
9823 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
9826 if (!global->IsJSGlobalObject()) return isolate->heap()->null_value(); in RUNTIME_FUNCTION()
9832 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
9835 if (!global->IsJSGlobalObject()) return isolate->heap()->false_value(); in RUNTIME_FUNCTION()
9836 return isolate->heap()->ToBoolean( in RUNTIME_FUNCTION()
9842 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9850 isolate, result, in RUNTIME_FUNCTION()
9857 bool CodeGenerationFromStringsAllowed(Isolate* isolate, in CodeGenerationFromStringsAllowed() argument
9862 isolate->allow_code_gen_callback(); in CodeGenerationFromStringsAllowed()
9868 VMState<EXTERNAL> state(isolate); in CodeGenerationFromStringsAllowed()
9875 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9881 Handle<Context> context(isolate->native_context()); in RUNTIME_FUNCTION()
9886 !CodeGenerationFromStringsAllowed(isolate, context)) { in RUNTIME_FUNCTION()
9890 isolate, NewEvalError("code_gen_from_strings", in RUNTIME_FUNCTION()
9897 Handle<SharedFunctionInfo> outer_info(context->closure()->shared(), isolate); in RUNTIME_FUNCTION()
9900 isolate, fun, in RUNTIME_FUNCTION()
9908 static ObjectPair CompileGlobalEval(Isolate* isolate, in CompileGlobalEval() argument
9914 Handle<Context> context = Handle<Context>(isolate->context()); in CompileGlobalEval()
9920 !CodeGenerationFromStringsAllowed(isolate, native_context)) { in CompileGlobalEval()
9924 MaybeHandle<Object> maybe_error = isolate->factory()->NewEvalError( in CompileGlobalEval()
9926 if (maybe_error.ToHandle(&error)) isolate->Throw(*error); in CompileGlobalEval()
9927 return MakePair(isolate->heap()->exception(), NULL); in CompileGlobalEval()
9935 isolate, compiled, in CompileGlobalEval()
9939 MakePair(isolate->heap()->exception(), NULL)); in CompileGlobalEval()
9945 HandleScope scope(isolate); in RUNTIME_FUNCTION_RETURN_PAIR()
9955 if (*callee != isolate->native_context()->global_eval_fun() || in RUNTIME_FUNCTION_RETURN_PAIR()
9957 return MakePair(*callee, isolate->heap()->undefined_value()); in RUNTIME_FUNCTION_RETURN_PAIR()
9965 isolate); in RUNTIME_FUNCTION_RETURN_PAIR()
9966 return CompileGlobalEval(isolate, in RUNTIME_FUNCTION_RETURN_PAIR()
9976 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9982 return *isolate->factory()->NewFillerObject(size, false, NEW_SPACE); in RUNTIME_FUNCTION()
9987 HandleScope scope(isolate); in RUNTIME_FUNCTION()
9996 return *isolate->factory()->NewFillerObject(size, double_align, space); in RUNTIME_FUNCTION()
10004 HandleScope scope(isolate); in RUNTIME_FUNCTION()
10012 if (elements->get(i) == *element) return isolate->heap()->false_value(); in RUNTIME_FUNCTION()
10017 isolate, in RUNTIME_FUNCTION()
10019 return isolate->heap()->true_value(); in RUNTIME_FUNCTION()
10036 ArrayConcatVisitor(Isolate* isolate, in ArrayConcatVisitor() argument
10039 isolate_(isolate), in ArrayConcatVisitor()
10041 isolate->global_handles()->Create(*storage))), in ArrayConcatVisitor()
10222 static void IterateExternalArrayElements(Isolate* isolate, in IterateExternalArrayElements() argument
10235 HandleScope loop_scope(isolate); in IterateExternalArrayElements()
10237 isolate); in IterateExternalArrayElements()
10242 HandleScope loop_scope(isolate); in IterateExternalArrayElements()
10245 Handle<Smi> e(Smi::FromInt(static_cast<int>(val)), isolate); in IterateExternalArrayElements()
10249 isolate->factory()->NewNumber(static_cast<ElementType>(val)); in IterateExternalArrayElements()
10256 HandleScope loop_scope(isolate); in IterateExternalArrayElements()
10257 Handle<Object> e = isolate->factory()->NewNumber(array->get_scalar(j)); in IterateExternalArrayElements()
10275 Isolate* isolate = object->GetIsolate(); in CollectElementIndices() local
10314 HandleScope loop_scope(isolate); in CollectElementIndices()
10315 Handle<Object> k(dict->KeyAt(j), isolate); in CollectElementIndices()
10349 Object::GetProperty(object, isolate->factory()->length_string()); in CollectElementIndices()
10362 PrototypeIterator iter(isolate, object); in CollectElementIndices()
10383 static bool IterateElements(Isolate* isolate, in IterateElements() argument
10398 HandleScope loop_scope(isolate); in IterateElements()
10399 Handle<Object> element_value(elements->get(j), isolate); in IterateElements()
10409 isolate, element_value, in IterateElements()
10410 Object::GetElement(isolate, receiver, j), false); in IterateElements()
10432 HandleScope loop_scope(isolate); in IterateElements()
10436 isolate->factory()->NewNumber(double_value); in IterateElements()
10446 isolate, element_value, in IterateElements()
10447 Object::GetElement(isolate, receiver, j), false); in IterateElements()
10464 HandleScope loop_scope(isolate); in IterateElements()
10468 isolate, element, in IterateElements()
10469 Object::GetElement(isolate, receiver, index), in IterateElements()
10483 Handle<Smi> e(Smi::FromInt(pixels->get_scalar(j)), isolate); in IterateElements()
10490 isolate, receiver, true, true, visitor); in IterateElements()
10495 isolate, receiver, true, true, visitor); in IterateElements()
10500 isolate, receiver, true, true, visitor); in IterateElements()
10505 isolate, receiver, true, true, visitor); in IterateElements()
10510 isolate, receiver, true, false, visitor); in IterateElements()
10515 isolate, receiver, true, false, visitor); in IterateElements()
10520 isolate, receiver, false, false, visitor); in IterateElements()
10525 isolate, receiver, false, false, visitor); in IterateElements()
10544 HandleScope handle_scope(isolate); in RUNTIME_FUNCTION()
10562 HandleScope loop_scope(isolate); in RUNTIME_FUNCTION()
10563 Handle<Object> obj(elements->get(i), isolate); in RUNTIME_FUNCTION()
10612 isolate->factory()->NewFixedDoubleArray(estimate_result_length); in RUNTIME_FUNCTION()
10619 Handle<Object> obj(elements->get(i), isolate); in RUNTIME_FUNCTION()
10680 Handle<JSArray> array = isolate->factory()->NewJSArray(0); in RUNTIME_FUNCTION()
10696 storage = isolate->factory()->NewFixedArrayWithHoles( in RUNTIME_FUNCTION()
10703 SeededNumberDictionary::New(isolate, at_least_space_for)); in RUNTIME_FUNCTION()
10706 ArrayConcatVisitor visitor(isolate, storage, fast_case); in RUNTIME_FUNCTION()
10709 Handle<Object> obj(elements->get(i), isolate); in RUNTIME_FUNCTION()
10712 if (!IterateElements(isolate, array, &visitor)) { in RUNTIME_FUNCTION()
10713 return isolate->heap()->exception(); in RUNTIME_FUNCTION()
10723 isolate, in RUNTIME_FUNCTION()
10733 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
10754 HandleScope scope(isolate); in RUNTIME_FUNCTION()
10764 HandleScope scope(isolate); in RUNTIME_FUNCTION()
10787 HandleScope scope(isolate); in RUNTIME_FUNCTION()
10790 Handle<FixedArrayBase> elements(array->elements(), isolate); in RUNTIME_FUNCTION()
10791 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
10830 HandleScope scope(isolate); in RUNTIME_FUNCTION()
10835 Handle<FixedArray> keys = isolate->factory()->empty_fixed_array(); in RUNTIME_FUNCTION()
10836 for (PrototypeIterator iter(isolate, array, in RUNTIME_FUNCTION()
10844 return *isolate->factory()->NewNumberFromUint(length); in RUNTIME_FUNCTION()
10849 isolate->factory()->NewFixedArray(current->NumberOfOwnElements(NONE)); in RUNTIME_FUNCTION()
10852 isolate, keys, FixedArray::UnionOfKeys(keys, current_keys)); in RUNTIME_FUNCTION()
10860 return *isolate->factory()->NewJSArrayWithElements(keys); in RUNTIME_FUNCTION()
10865 return *isolate->factory()->NewNumberFromUint(Min(actual_length, length)); in RUNTIME_FUNCTION()
10871 HandleScope scope(isolate); in RUNTIME_FUNCTION()
10877 if (!receiver->IsJSObject()) return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
10880 isolate, result, in RUNTIME_FUNCTION()
10887 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
10889 isolate->debug()->HandleDebugBreak(); in RUNTIME_FUNCTION()
10890 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
10911 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
10918 isolate->debug()->SetEventListener(callback, data); in RUNTIME_FUNCTION()
10920 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
10925 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
10927 isolate->stack_guard()->RequestDebugBreak(); in RUNTIME_FUNCTION()
10928 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
10944 return it->isolate()->factory()->undefined_value(); in DebugGetProperty()
10948 return it->isolate()->factory()->undefined_value(); in DebugGetProperty()
10955 result = handle(it->isolate()->pending_exception(), it->isolate()); in DebugGetProperty()
10956 it->isolate()->clear_pending_exception(); in DebugGetProperty()
10967 return it->isolate()->factory()->undefined_value(); in DebugGetProperty()
10979 HandleScope scope(isolate); in RUNTIME_FUNCTION()
10992 SaveContext save(isolate); in RUNTIME_FUNCTION()
10993 if (isolate->debug()->in_debug_scope()) { in RUNTIME_FUNCTION()
10994 isolate->set_context(*isolate->debug()->debugger_entry()->GetContext()); in RUNTIME_FUNCTION()
11001 Handle<FixedArray> details = isolate->factory()->NewFixedArray(2); in RUNTIME_FUNCTION()
11004 isolate, element_or_char, in RUNTIME_FUNCTION()
11005 Runtime::GetElementOrCharAt(isolate, obj, index)); in RUNTIME_FUNCTION()
11009 return *isolate->factory()->NewJSArrayWithElements(details); in RUNTIME_FUNCTION()
11015 if (!it.IsFound()) return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
11026 isolate->factory()->NewFixedArray(has_js_accessors ? 6 : 3); in RUNTIME_FUNCTION()
11034 2, isolate->heap()->ToBoolean(it.state() == LookupIterator::INTERCEPTOR)); in RUNTIME_FUNCTION()
11037 details->set(3, isolate->heap()->ToBoolean(has_caught)); in RUNTIME_FUNCTION()
11042 return *isolate->factory()->NewJSArrayWithElements(details); in RUNTIME_FUNCTION()
11047 HandleScope scope(isolate); in RUNTIME_FUNCTION()
11062 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
11072 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
11082 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
11094 HandleScope scope(isolate); in RUNTIME_FUNCTION()
11102 isolate, result, JSObject::GetProperty(obj, name)); in RUNTIME_FUNCTION()
11111 HandleScope scope(isolate); in RUNTIME_FUNCTION()
11118 isolate, result, JSObject::GetElementWithInterceptor(obj, obj, index)); in RUNTIME_FUNCTION()
11123 static bool CheckExecutionState(Isolate* isolate, int break_id) { in CheckExecutionState() argument
11124 return !isolate->debug()->debug_context().is_null() && in CheckExecutionState()
11125 isolate->debug()->break_id() != 0 && in CheckExecutionState()
11126 isolate->debug()->break_id() == break_id; in CheckExecutionState()
11131 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
11134 RUNTIME_ASSERT(CheckExecutionState(isolate, break_id)); in RUNTIME_FUNCTION()
11135 return isolate->heap()->true_value(); in RUNTIME_FUNCTION()
11140 HandleScope scope(isolate); in RUNTIME_FUNCTION()
11143 RUNTIME_ASSERT(CheckExecutionState(isolate, break_id)); in RUNTIME_FUNCTION()
11147 StackFrame::Id id = isolate->debug()->break_frame_id(); in RUNTIME_FUNCTION()
11153 for (JavaScriptFrameIterator it(isolate, id); !it.done(); it.Advance()) { in RUNTIME_FUNCTION()
11169 Isolate* isolate) in FrameInspector() argument
11170 : frame_(frame), deoptimized_frame_(NULL), isolate_(isolate) { in FrameInspector()
11174 frame, inlined_jsframe_index, isolate); in FrameInspector()
11257 static SaveContext* FindSavedContextForFrame(Isolate* isolate, in FindSavedContextForFrame() argument
11259 SaveContext* save = isolate->save_context(); in FindSavedContextForFrame()
11303 HandleScope scope(isolate); in RUNTIME_FUNCTION()
11306 RUNTIME_ASSERT(CheckExecutionState(isolate, break_id)); in RUNTIME_FUNCTION()
11309 Heap* heap = isolate->heap(); in RUNTIME_FUNCTION()
11312 StackFrame::Id id = isolate->debug()->break_frame_id(); in RUNTIME_FUNCTION()
11318 JavaScriptFrameIterator it(isolate, id); in RUNTIME_FUNCTION()
11323 FrameInspector frame_inspector(it.frame(), inlined_jsframe_index, isolate); in RUNTIME_FUNCTION()
11328 SaveContext* save = FindSavedContextForFrame(isolate, it.frame()); in RUNTIME_FUNCTION()
11331 Handle<Object> frame_id(WrapFrameId(it.frame()->id()), isolate); in RUNTIME_FUNCTION()
11343 DCHECK(*scope_info != ScopeInfo::Empty(isolate)); in RUNTIME_FUNCTION()
11355 isolate->factory()->NewFixedArray(local_count * 2); in RUNTIME_FUNCTION()
11392 at_return = isolate->debug()->IsBreakAtReturn(it.frame()); in RUNTIME_FUNCTION()
11397 Handle<Object> return_value = isolate->factory()->undefined_value(); in RUNTIME_FUNCTION()
11399 StackFrameIterator it2(isolate); in RUNTIME_FUNCTION()
11414 isolate); in RUNTIME_FUNCTION()
11447 Handle<FixedArray> details = isolate->factory()->NewFixedArray(details_size); in RUNTIME_FUNCTION()
11480 if (*save->context() == *isolate->debug()->debug_context()) { in RUNTIME_FUNCTION()
11523 Handle<Object> receiver(it.frame()->receiver(), isolate); in RUNTIME_FUNCTION()
11539 if (!Object::ToObject(isolate, receiver, native_context) in RUNTIME_FUNCTION()
11549 return *isolate->factory()->NewJSArrayWithElements(details); in RUNTIME_FUNCTION()
11567 Isolate* isolate, in MaterializeStackLocalsWithFrameInspector() argument
11580 HandleScope scope(isolate); in MaterializeStackLocalsWithFrameInspector()
11583 : isolate->heap()->undefined_value(), in MaterializeStackLocalsWithFrameInspector()
11584 isolate); in MaterializeStackLocalsWithFrameInspector()
11588 isolate, in MaterializeStackLocalsWithFrameInspector()
11589 Runtime::SetObjectProperty(isolate, target, name, value, SLOPPY), in MaterializeStackLocalsWithFrameInspector()
11597 Handle<Object> value(frame_inspector->GetExpression(i), isolate); in MaterializeStackLocalsWithFrameInspector()
11601 isolate, in MaterializeStackLocalsWithFrameInspector()
11602 Runtime::SetObjectProperty(isolate, target, name, value, SLOPPY), in MaterializeStackLocalsWithFrameInspector()
11610 static void UpdateStackLocalsFromMaterializedObject(Isolate* isolate, in UpdateStackLocalsFromMaterializedObject() argument
11632 HandleScope scope(isolate); in UpdateStackLocalsFromMaterializedObject()
11642 HandleScope scope(isolate); in UpdateStackLocalsFromMaterializedObject()
11645 handle(scope_info->StackLocalName(i), isolate)).ToHandleChecked(); in UpdateStackLocalsFromMaterializedObject()
11652 Isolate* isolate, in MaterializeLocalContext() argument
11656 HandleScope scope(isolate); in MaterializeLocalContext()
11678 isolate, keys, in MaterializeLocalContext()
11688 isolate, value, Object::GetPropertyOrElement(ext, key), JSObject); in MaterializeLocalContext()
11690 isolate, in MaterializeLocalContext()
11691 Runtime::SetObjectProperty(isolate, target, key, value, SLOPPY), in MaterializeLocalContext()
11702 Isolate* isolate, in MaterializeLocalScope() argument
11705 FrameInspector frame_inspector(frame, inlined_jsframe_index, isolate); in MaterializeLocalScope()
11709 isolate->factory()->NewJSObject(isolate->object_function()); in MaterializeLocalScope()
11711 isolate, local_scope, in MaterializeLocalScope()
11713 isolate, local_scope, function, &frame_inspector), in MaterializeLocalScope()
11716 return MaterializeLocalContext(isolate, local_scope, function, frame); in MaterializeLocalScope()
11721 static bool SetContextLocalValue(Isolate* isolate, in SetContextLocalValue() argument
11743 static bool SetLocalVariableValue(Isolate* isolate, in SetLocalVariableValue() argument
11761 HandleScope scope(isolate); in SetLocalVariableValue()
11771 HandleScope scope(isolate); in SetLocalVariableValue()
11783 isolate, scope_info, function_context, variable_name, new_value)) { in SetLocalVariableValue()
11798 Runtime::SetObjectProperty(isolate, ext, variable_name, new_value, in SetLocalVariableValue()
11813 Isolate* isolate, in MaterializeClosure() argument
11823 isolate->factory()->NewJSObject(isolate->object_function()); in MaterializeClosure()
11837 isolate, keys, in MaterializeClosure()
11841 HandleScope scope(isolate); in MaterializeClosure()
11847 isolate, value, Object::GetPropertyOrElement(ext, key), JSObject); in MaterializeClosure()
11849 isolate, in MaterializeClosure()
11860 static bool SetClosureVariableValue(Isolate* isolate, in SetClosureVariableValue() argument
11871 isolate, scope_info, context, variable_name, new_value)) { in SetClosureVariableValue()
11896 Isolate* isolate, in MaterializeCatchScope() argument
11901 isolate); in MaterializeCatchScope()
11903 isolate->factory()->NewJSObject(isolate->object_function()); in MaterializeCatchScope()
11905 isolate, in MaterializeCatchScope()
11912 static bool SetCatchVariableValue(Isolate* isolate, in SetCatchVariableValue() argument
11929 Isolate* isolate, in MaterializeBlockScope() argument
11937 isolate->factory()->NewJSObject(isolate->object_function()); in MaterializeBlockScope()
11952 Isolate* isolate, in MaterializeModuleScope() argument
11960 isolate->factory()->NewJSObject(isolate->object_function()); in MaterializeModuleScope()
11988 ScopeIterator(Isolate* isolate, in ScopeIterator() argument
11992 : isolate_(isolate), in ScopeIterator()
12003 if (shared_info->script() == isolate->heap()->undefined_value()) { in ScopeIterator()
12011 if (!isolate->debug()->EnsureDebugInfo(shared_info, function_)) { in ScopeIterator()
12082 ScopeIterator(Isolate* isolate, in ScopeIterator() argument
12084 : isolate_(isolate), in ScopeIterator()
12340 HandleScope scope(isolate); in RUNTIME_FUNCTION()
12343 RUNTIME_ASSERT(CheckExecutionState(isolate, break_id)); in RUNTIME_FUNCTION()
12349 JavaScriptFrameIterator it(isolate, id); in RUNTIME_FUNCTION()
12354 for (ScopeIterator it(isolate, frame, 0); in RUNTIME_FUNCTION()
12368 HandleScope scope(isolate); in RUNTIME_FUNCTION()
12371 RUNTIME_ASSERT(CheckExecutionState(isolate, break_id)); in RUNTIME_FUNCTION()
12377 JavaScriptFrameIterator frame_it(isolate, id); in RUNTIME_FUNCTION()
12387 if (!isolate->debug()->EnsureDebugInfo(shared, fun)) { in RUNTIME_FUNCTION()
12388 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
12394 Handle<JSArray> array(isolate->factory()->NewJSArray(10)); in RUNTIME_FUNCTION()
12407 StackFrame::Id break_frame_id = isolate->debug()->break_frame_id(); in RUNTIME_FUNCTION()
12414 JavaScriptFrameIterator additional_frame_it(isolate, break_frame_id); in RUNTIME_FUNCTION()
12421 if (break_location_iterator.IsStepInLocation(isolate)) { in RUNTIME_FUNCTION()
12424 isolate, in RUNTIME_FUNCTION()
12426 Handle<Object>(position_value, isolate), in RUNTIME_FUNCTION()
12448 Isolate* isolate, in MaterializeScopeDetails() argument
12452 Handle<FixedArray> details = isolate->factory()->NewFixedArray(details_size); in MaterializeScopeDetails()
12458 isolate, scope_object, it->ScopeObject(), JSObject); in MaterializeScopeDetails()
12461 return isolate->factory()->NewJSArrayWithElements(details); in MaterializeScopeDetails()
12475 HandleScope scope(isolate); in RUNTIME_FUNCTION()
12478 RUNTIME_ASSERT(CheckExecutionState(isolate, break_id)); in RUNTIME_FUNCTION()
12486 JavaScriptFrameIterator frame_it(isolate, id); in RUNTIME_FUNCTION()
12491 ScopeIterator it(isolate, frame, inlined_jsframe_index); in RUNTIME_FUNCTION()
12496 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
12500 isolate, details, MaterializeScopeDetails(isolate, &it)); in RUNTIME_FUNCTION()
12515 HandleScope scope(isolate); in RUNTIME_FUNCTION()
12518 RUNTIME_ASSERT(CheckExecutionState(isolate, break_id)); in RUNTIME_FUNCTION()
12531 JavaScriptFrameIterator frame_it(isolate, id); in RUNTIME_FUNCTION()
12535 ScopeIterator it(isolate, frame, inlined_jsframe_index, ignore_nested_scopes); in RUNTIME_FUNCTION()
12539 isolate, details, MaterializeScopeDetails(isolate, &it)); in RUNTIME_FUNCTION()
12543 Handle<FixedArray> array = isolate->factory()->NewFixedArray(result.length()); in RUNTIME_FUNCTION()
12547 return *isolate->factory()->NewJSArrayWithElements(array); in RUNTIME_FUNCTION()
12552 HandleScope scope(isolate); in RUNTIME_FUNCTION()
12560 for (ScopeIterator it(isolate, fun); !it.Done(); it.Next()) { in RUNTIME_FUNCTION()
12569 HandleScope scope(isolate); in RUNTIME_FUNCTION()
12578 ScopeIterator it(isolate, fun); in RUNTIME_FUNCTION()
12583 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
12588 isolate, details, MaterializeScopeDetails(isolate, &it)); in RUNTIME_FUNCTION()
12616 HandleScope scope(isolate); in RUNTIME_FUNCTION()
12627 RUNTIME_ASSERT(CheckExecutionState(isolate, break_id)); in RUNTIME_FUNCTION()
12634 JavaScriptFrameIterator frame_it(isolate, id); in RUNTIME_FUNCTION()
12637 ScopeIterator it(isolate, frame, inlined_jsframe_index); in RUNTIME_FUNCTION()
12641 ScopeIterator it(isolate, fun); in RUNTIME_FUNCTION()
12645 return isolate->heap()->ToBoolean(res); in RUNTIME_FUNCTION()
12650 HandleScope scope(isolate); in RUNTIME_FUNCTION()
12655 StackFrameLocator locator(isolate); in RUNTIME_FUNCTION()
12657 for (ScopeIterator it(isolate, frame, 0); in RUNTIME_FUNCTION()
12663 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
12668 HandleScope scope(isolate); in RUNTIME_FUNCTION()
12671 RUNTIME_ASSERT(CheckExecutionState(isolate, break_id)); in RUNTIME_FUNCTION()
12676 isolate->thread_manager()->FirstThreadStateInUse(); in RUNTIME_FUNCTION()
12699 HandleScope scope(isolate); in RUNTIME_FUNCTION()
12702 RUNTIME_ASSERT(CheckExecutionState(isolate, break_id)); in RUNTIME_FUNCTION()
12708 isolate->factory()->NewFixedArray(kThreadDetailsSize); in RUNTIME_FUNCTION()
12714 isolate->heap()->true_value()); in RUNTIME_FUNCTION()
12721 isolate->thread_manager()->FirstThreadStateInUse(); in RUNTIME_FUNCTION()
12727 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
12732 isolate->heap()->false_value()); in RUNTIME_FUNCTION()
12738 return *isolate->factory()->NewJSArrayWithElements(details); in RUNTIME_FUNCTION()
12745 HandleScope scope(isolate); in RUNTIME_FUNCTION()
12748 isolate->debug()->set_disable_break(disable_break); in RUNTIME_FUNCTION()
12749 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
12759 HandleScope scope(isolate); in RUNTIME_FUNCTION()
12766 return isolate->ThrowIllegalOperation(); in RUNTIME_FUNCTION()
12775 if (break_locations->IsUndefined()) return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
12777 return *isolate->factory()->NewJSArrayWithElements( in RUNTIME_FUNCTION()
12787 HandleScope scope(isolate); in RUNTIME_FUNCTION()
12796 RUNTIME_ASSERT(isolate->debug()->SetBreakPoint( in RUNTIME_FUNCTION()
12811 HandleScope scope(isolate); in RUNTIME_FUNCTION()
12820 return isolate->ThrowIllegalOperation(); in RUNTIME_FUNCTION()
12830 if (!isolate->debug()->SetBreakPointForScript(script, break_point_object_arg, in RUNTIME_FUNCTION()
12833 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
12843 HandleScope scope(isolate); in RUNTIME_FUNCTION()
12848 isolate->debug()->ClearBreakPoint(break_point_object_arg); in RUNTIME_FUNCTION()
12850 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
12858 HandleScope scope(isolate); in RUNTIME_FUNCTION()
12867 isolate->debug()->ChangeBreakOnException(type, enable); in RUNTIME_FUNCTION()
12868 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
12875 HandleScope scope(isolate); in RUNTIME_FUNCTION()
12880 bool result = isolate->debug()->IsBreakOnException(type); in RUNTIME_FUNCTION()
12891 HandleScope scope(isolate); in RUNTIME_FUNCTION()
12894 RUNTIME_ASSERT(CheckExecutionState(isolate, break_id)); in RUNTIME_FUNCTION()
12897 return isolate->Throw(isolate->heap()->illegal_argument_string()); in RUNTIME_FUNCTION()
12916 return isolate->Throw(isolate->heap()->illegal_argument_string()); in RUNTIME_FUNCTION()
12921 return isolate->ThrowIllegalOperation(); in RUNTIME_FUNCTION()
12927 return isolate->Throw(isolate->heap()->illegal_argument_string()); in RUNTIME_FUNCTION()
12931 isolate->debug()->ClearStepping(); in RUNTIME_FUNCTION()
12934 isolate->debug()->PrepareStep(static_cast<StepAction>(step_action), in RUNTIME_FUNCTION()
12937 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
12943 HandleScope scope(isolate); in RUNTIME_FUNCTION()
12945 isolate->debug()->ClearStepping(); in RUNTIME_FUNCTION()
12946 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
12953 Isolate* isolate, in MaterializeArgumentsObject() argument
12960 target, isolate->factory()->arguments_string()); in MaterializeArgumentsObject()
12967 Handle<String> arguments_str = isolate->factory()->arguments_string(); in MaterializeArgumentsObject()
12969 isolate, in MaterializeArgumentsObject()
12977 static MaybeHandle<Object> DebugEvaluate(Isolate* isolate, in DebugEvaluate() argument
12985 Handle<JSFunction> closure(context->closure(), isolate); in DebugEvaluate()
12986 context = isolate->factory()->NewWithContext(closure, context, extension); in DebugEvaluate()
12991 isolate, eval_fun, in DebugEvaluate()
13002 isolate, result, in DebugEvaluate()
13003 Execution::Call(isolate, eval_fun, receiver, 0, NULL), in DebugEvaluate()
13009 PrototypeIterator iter(isolate, result); in DebugEvaluate()
13015 isolate->debug()->ClearStepping(); in DebugEvaluate()
13020 static Handle<JSObject> NewJSObjectWithNullProto(Isolate* isolate) { in NewJSObjectWithNullProto() argument
13022 isolate->factory()->NewJSObject(isolate->object_function()); in NewJSObjectWithNullProto()
13024 new_map->set_prototype(*isolate->factory()->null_value()); in NewJSObjectWithNullProto()
13036 HandleScope scope(isolate); in RUNTIME_FUNCTION()
13042 RUNTIME_ASSERT(CheckExecutionState(isolate, break_id)); in RUNTIME_FUNCTION()
13051 DisableBreak disable_break_scope(isolate->debug(), disable_break); in RUNTIME_FUNCTION()
13055 JavaScriptFrameIterator it(isolate, id); in RUNTIME_FUNCTION()
13057 FrameInspector frame_inspector(frame, inlined_jsframe_index, isolate); in RUNTIME_FUNCTION()
13063 SaveContext* save = FindSavedContextForFrame(isolate, frame); in RUNTIME_FUNCTION()
13065 SaveContext savex(isolate); in RUNTIME_FUNCTION()
13066 isolate->set_context(*(save->context())); in RUNTIME_FUNCTION()
13073 Handle<JSObject> materialized = NewJSObjectWithNullProto(isolate); in RUNTIME_FUNCTION()
13076 isolate, materialized, in RUNTIME_FUNCTION()
13078 isolate, materialized, function, &frame_inspector)); in RUNTIME_FUNCTION()
13081 isolate, materialized, in RUNTIME_FUNCTION()
13082 MaterializeArgumentsObject(isolate, materialized, function)); in RUNTIME_FUNCTION()
13085 context = isolate->factory()->NewWithContext(function, context, materialized); in RUNTIME_FUNCTION()
13087 Handle<Object> receiver(frame->receiver(), isolate); in RUNTIME_FUNCTION()
13090 isolate, result, in RUNTIME_FUNCTION()
13091 DebugEvaluate(isolate, outer_info, in RUNTIME_FUNCTION()
13096 isolate, materialized, function, frame, inlined_jsframe_index); in RUNTIME_FUNCTION()
13103 HandleScope scope(isolate); in RUNTIME_FUNCTION()
13109 RUNTIME_ASSERT(CheckExecutionState(isolate, break_id)); in RUNTIME_FUNCTION()
13116 DisableBreak disable_break_scope(isolate->debug(), disable_break); in RUNTIME_FUNCTION()
13119 SaveContext save(isolate); in RUNTIME_FUNCTION()
13121 while (top != NULL && *top->context() == *isolate->debug()->debug_context()) { in RUNTIME_FUNCTION()
13125 isolate->set_context(*top->context()); in RUNTIME_FUNCTION()
13130 Handle<Context> context = isolate->native_context(); in RUNTIME_FUNCTION()
13132 Handle<SharedFunctionInfo> outer_info(context->closure()->shared(), isolate); in RUNTIME_FUNCTION()
13135 isolate, result, in RUNTIME_FUNCTION()
13136 DebugEvaluate(isolate, outer_info, in RUNTIME_FUNCTION()
13143 HandleScope scope(isolate); in RUNTIME_FUNCTION()
13147 Handle<FixedArray> instances = isolate->debug()->GetLoadedScripts(); in RUNTIME_FUNCTION()
13163 isolate->factory()->NewJSObject(isolate->array_function()); in RUNTIME_FUNCTION()
13175 Isolate* isolate = target->GetIsolate(); in DebugReferencedBy() local
13176 SealHandleScope shs(isolate); in DebugReferencedBy()
13200 for (PrototypeIterator iter(isolate, obj); !iter.IsAtEnd(); in DebugReferencedBy()
13240 HandleScope scope(isolate); in RUNTIME_FUNCTION()
13254 JSFunction::cast(isolate->sloppy_arguments_map()->constructor())); in RUNTIME_FUNCTION()
13260 Heap* heap = isolate->heap(); in RUNTIME_FUNCTION()
13270 Handle<FixedArray> instances = isolate->factory()->NewFixedArray(count); in RUNTIME_FUNCTION()
13281 Handle<JSFunction> constructor = isolate->array_function(); in RUNTIME_FUNCTION()
13283 Handle<JSObject> result = isolate->factory()->NewJSObject(constructor); in RUNTIME_FUNCTION()
13325 HandleScope scope(isolate); in RUNTIME_FUNCTION()
13338 Heap* heap = isolate->heap(); in RUNTIME_FUNCTION()
13350 Handle<FixedArray> instances = isolate->factory()->NewFixedArray(count); in RUNTIME_FUNCTION()
13363 Handle<JSFunction> array_function = isolate->array_function(); in RUNTIME_FUNCTION()
13364 Handle<JSObject> result = isolate->factory()->NewJSObject(array_function); in RUNTIME_FUNCTION()
13373 HandleScope shs(isolate); in RUNTIME_FUNCTION()
13376 return *GetPrototypeSkipHiddenPrototypes(isolate, obj); in RUNTIME_FUNCTION()
13382 HandleScope scope(isolate); in RUNTIME_FUNCTION()
13395 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
13400 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
13403 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
13408 HandleScope scope(isolate); in RUNTIME_FUNCTION()
13414 return isolate->heap()->exception(); in RUNTIME_FUNCTION()
13420 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
13425 HandleScope scope(isolate); in RUNTIME_FUNCTION()
13431 return isolate->heap()->exception(); in RUNTIME_FUNCTION()
13437 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
13442 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
13480 HandleScope scope(isolate); in RUNTIME_FUNCTION()
13481 CHECK(isolate->debug()->live_edit_enabled()); in RUNTIME_FUNCTION()
13491 array = isolate->factory()->NewFixedArray(kBufferSize); in RUNTIME_FUNCTION()
13493 Heap* heap = isolate->heap(); in RUNTIME_FUNCTION()
13501 array = isolate->factory()->NewFixedArray(number); in RUNTIME_FUNCTION()
13508 Handle<JSArray> result = isolate->factory()->NewJSArrayWithElements(array); in RUNTIME_FUNCTION()
13525 HandleScope scope(isolate); in RUNTIME_FUNCTION()
13526 CHECK(isolate->debug()->live_edit_enabled()); in RUNTIME_FUNCTION()
13536 isolate, result, LiveEdit::GatherCompileInfo(script_handle, source)); in RUNTIME_FUNCTION()
13545 HandleScope scope(isolate); in RUNTIME_FUNCTION()
13546 CHECK(isolate->debug()->live_edit_enabled()); in RUNTIME_FUNCTION()
13562 return isolate->heap()->null_value(); in RUNTIME_FUNCTION()
13568 HandleScope scope(isolate); in RUNTIME_FUNCTION()
13569 CHECK(isolate->debug()->live_edit_enabled()); in RUNTIME_FUNCTION()
13575 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
13581 HandleScope scope(isolate); in RUNTIME_FUNCTION()
13582 CHECK(isolate->debug()->live_edit_enabled()); in RUNTIME_FUNCTION()
13589 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
13595 HandleScope scope(isolate); in RUNTIME_FUNCTION()
13596 CHECK(isolate->debug()->live_edit_enabled()); in RUNTIME_FUNCTION()
13606 script_object = Handle<Object>(script, isolate); in RUNTIME_FUNCTION()
13615 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
13622 HandleScope scope(isolate); in RUNTIME_FUNCTION()
13623 CHECK(isolate->debug()->live_edit_enabled()); in RUNTIME_FUNCTION()
13635 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
13645 HandleScope scope(isolate); in RUNTIME_FUNCTION()
13646 CHECK(isolate->debug()->live_edit_enabled()); in RUNTIME_FUNCTION()
13653 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
13662 HandleScope scope(isolate); in RUNTIME_FUNCTION()
13663 CHECK(isolate->debug()->live_edit_enabled()); in RUNTIME_FUNCTION()
13672 Object::GetElement(isolate, shared_array, i).ToHandleChecked(); in RUNTIME_FUNCTION()
13686 HandleScope scope(isolate); in RUNTIME_FUNCTION()
13687 CHECK(isolate->debug()->live_edit_enabled()); in RUNTIME_FUNCTION()
13699 HandleScope scope(isolate); in RUNTIME_FUNCTION()
13700 CHECK(isolate->debug()->live_edit_enabled()); in RUNTIME_FUNCTION()
13703 RUNTIME_ASSERT(CheckExecutionState(isolate, break_id)); in RUNTIME_FUNCTION()
13706 Heap* heap = isolate->heap(); in RUNTIME_FUNCTION()
13709 StackFrame::Id id = isolate->debug()->break_frame_id(); in RUNTIME_FUNCTION()
13715 JavaScriptFrameIterator it(isolate, id); in RUNTIME_FUNCTION()
13722 return *(isolate->factory()->InternalizeUtf8String(error_message)); in RUNTIME_FUNCTION()
13731 HandleScope scope(isolate); in RUNTIME_FUNCTION()
13732 CHECK(isolate->debug()->live_edit_enabled()); in RUNTIME_FUNCTION()
13737 Handle<Code> code(function->code(), isolate); in RUNTIME_FUNCTION()
13741 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
13769 HandleScope scope(isolate); in RUNTIME_FUNCTION()
13776 maybe_result = Execution::Call(isolate, in RUNTIME_FUNCTION()
13782 DebugScope debug_scope(isolate->debug()); in RUNTIME_FUNCTION()
13783 maybe_result = Execution::Call(isolate, in RUNTIME_FUNCTION()
13790 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, maybe_result); in RUNTIME_FUNCTION()
13797 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
13803 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
13810 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
13812 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, "%CollectGarbage"); in RUNTIME_FUNCTION()
13813 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
13819 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
13821 int usage = static_cast<int>(isolate->heap()->SizeOfObjects()); in RUNTIME_FUNCTION()
13823 return *isolate->factory()->NewNumberFromInt(usage); in RUNTIME_FUNCTION()
13831 HandleScope scope(isolate); in RUNTIME_FUNCTION()
13832 Factory* factory = isolate->factory(); in RUNTIME_FUNCTION()
13866 HandleScope scope(isolate); in RUNTIME_FUNCTION()
13867 Factory* factory = isolate->factory(); in RUNTIME_FUNCTION()
13888 factory->NewJSObject(isolate->object_function()); in RUNTIME_FUNCTION()
13901 RETURN_FAILURE_ON_EXCEPTION(isolate, in RUNTIME_FUNCTION()
13914 HandleScope scope(isolate); in RUNTIME_FUNCTION()
13915 Factory* factory = isolate->factory(); in RUNTIME_FUNCTION()
13935 HandleScope scope(isolate); in RUNTIME_FUNCTION()
13936 Factory* factory = isolate->factory(); in RUNTIME_FUNCTION()
13952 isolate, locale_id, Object::GetElement(isolate, input, i)); in RUNTIME_FUNCTION()
13954 return isolate->Throw(*factory->illegal_argument_string()); in RUNTIME_FUNCTION()
13969 return isolate->Throw(*factory->illegal_argument_string()); in RUNTIME_FUNCTION()
14002 return isolate->Throw(*factory->illegal_argument_string()); in RUNTIME_FUNCTION()
14005 Handle<JSObject> result = factory->NewJSObject(isolate->object_function()); in RUNTIME_FUNCTION()
14020 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14026 if (!input->IsJSObject()) return isolate->heap()->false_value(); in RUNTIME_FUNCTION()
14029 Handle<String> marker = isolate->factory()->intl_initialized_marker_string(); in RUNTIME_FUNCTION()
14030 Handle<Object> tag(obj->GetHiddenProperty(marker), isolate); in RUNTIME_FUNCTION()
14031 return isolate->heap()->ToBoolean(!tag->IsTheHole()); in RUNTIME_FUNCTION()
14036 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14043 if (!input->IsJSObject()) return isolate->heap()->false_value(); in RUNTIME_FUNCTION()
14046 Handle<String> marker = isolate->factory()->intl_initialized_marker_string(); in RUNTIME_FUNCTION()
14047 Handle<Object> tag(obj->GetHiddenProperty(marker), isolate); in RUNTIME_FUNCTION()
14048 return isolate->heap()->ToBoolean( in RUNTIME_FUNCTION()
14054 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14062 Handle<String> marker = isolate->factory()->intl_initialized_marker_string(); in RUNTIME_FUNCTION()
14065 marker = isolate->factory()->intl_impl_object_string(); in RUNTIME_FUNCTION()
14068 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
14073 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14081 THROW_NEW_ERROR_RETURN_FAILURE(isolate, in RUNTIME_FUNCTION()
14087 Handle<String> marker = isolate->factory()->intl_impl_object_string(); in RUNTIME_FUNCTION()
14088 Handle<Object> impl(obj->GetHiddenProperty(marker), isolate); in RUNTIME_FUNCTION()
14091 THROW_NEW_ERROR_RETURN_FAILURE(isolate, in RUNTIME_FUNCTION()
14099 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14108 I18N::GetTemplate(isolate); in RUNTIME_FUNCTION()
14113 isolate, local_object, in RUNTIME_FUNCTION()
14118 isolate, locale, options, resolved); in RUNTIME_FUNCTION()
14120 if (!date_format) return isolate->ThrowIllegalOperation(); in RUNTIME_FUNCTION()
14124 Factory* factory = isolate->factory(); in RUNTIME_FUNCTION()
14130 Handle<Object> wrapper = isolate->global_handles()->Create(*local_object); in RUNTIME_FUNCTION()
14139 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14148 isolate, value, Execution::ToNumber(isolate, date)); in RUNTIME_FUNCTION()
14151 DateFormat::UnpackDateFormat(isolate, date_format_holder); in RUNTIME_FUNCTION()
14152 if (!date_format) return isolate->ThrowIllegalOperation(); in RUNTIME_FUNCTION()
14159 isolate, result_str, in RUNTIME_FUNCTION()
14160 isolate->factory()->NewStringFromTwoByte( in RUNTIME_FUNCTION()
14169 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14179 DateFormat::UnpackDateFormat(isolate, date_format_holder); in RUNTIME_FUNCTION()
14180 if (!date_format) return isolate->ThrowIllegalOperation(); in RUNTIME_FUNCTION()
14184 if (U_FAILURE(status)) return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
14188 isolate, result, in RUNTIME_FUNCTION()
14189 Execution::NewDate(isolate, static_cast<double>(date))); in RUNTIME_FUNCTION()
14196 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14205 I18N::GetTemplate(isolate); in RUNTIME_FUNCTION()
14210 isolate, local_object, in RUNTIME_FUNCTION()
14215 isolate, locale, options, resolved); in RUNTIME_FUNCTION()
14217 if (!number_format) return isolate->ThrowIllegalOperation(); in RUNTIME_FUNCTION()
14221 Factory* factory = isolate->factory(); in RUNTIME_FUNCTION()
14226 Handle<Object> wrapper = isolate->global_handles()->Create(*local_object); in RUNTIME_FUNCTION()
14235 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14244 isolate, value, Execution::ToNumber(isolate, number)); in RUNTIME_FUNCTION()
14247 NumberFormat::UnpackNumberFormat(isolate, number_format_holder); in RUNTIME_FUNCTION()
14248 if (!number_format) return isolate->ThrowIllegalOperation(); in RUNTIME_FUNCTION()
14255 isolate, result_str, in RUNTIME_FUNCTION()
14256 isolate->factory()->NewStringFromTwoByte( in RUNTIME_FUNCTION()
14265 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14275 NumberFormat::UnpackNumberFormat(isolate, number_format_holder); in RUNTIME_FUNCTION()
14276 if (!number_format) return isolate->ThrowIllegalOperation(); in RUNTIME_FUNCTION()
14287 if (U_FAILURE(status)) return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
14291 return *isolate->factory()->NewNumber(result.getDouble()); in RUNTIME_FUNCTION()
14293 return *isolate->factory()->NewNumberFromInt(result.getLong()); in RUNTIME_FUNCTION()
14295 return *isolate->factory()->NewNumber( in RUNTIME_FUNCTION()
14298 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
14304 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14312 Handle<ObjectTemplateInfo> collator_template = I18N::GetTemplate(isolate); in RUNTIME_FUNCTION()
14317 isolate, local_object, Execution::InstantiateObject(collator_template)); in RUNTIME_FUNCTION()
14321 isolate, locale, options, resolved); in RUNTIME_FUNCTION()
14323 if (!collator) return isolate->ThrowIllegalOperation(); in RUNTIME_FUNCTION()
14327 Factory* factory = isolate->factory(); in RUNTIME_FUNCTION()
14332 Handle<Object> wrapper = isolate->global_handles()->Create(*local_object); in RUNTIME_FUNCTION()
14341 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14349 icu::Collator* collator = Collator::UnpackCollator(isolate, collator_holder); in RUNTIME_FUNCTION()
14350 if (!collator) return isolate->ThrowIllegalOperation(); in RUNTIME_FUNCTION()
14362 if (U_FAILURE(status)) return isolate->ThrowIllegalOperation(); in RUNTIME_FUNCTION()
14364 return *isolate->factory()->NewNumberFromInt(result); in RUNTIME_FUNCTION()
14369 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14389 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
14394 isolate, result_str, in RUNTIME_FUNCTION()
14395 isolate->factory()->NewStringFromTwoByte( in RUNTIME_FUNCTION()
14404 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14413 I18N::GetTemplate2(isolate); in RUNTIME_FUNCTION()
14418 isolate, local_object, in RUNTIME_FUNCTION()
14423 isolate, locale, options, resolved); in RUNTIME_FUNCTION()
14425 if (!break_iterator) return isolate->ThrowIllegalOperation(); in RUNTIME_FUNCTION()
14431 Factory* factory = isolate->factory(); in RUNTIME_FUNCTION()
14438 Handle<Object> wrapper = isolate->global_handles()->Create(*local_object); in RUNTIME_FUNCTION()
14447 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14455 BreakIterator::UnpackBreakIterator(isolate, break_iterator_holder); in RUNTIME_FUNCTION()
14456 if (!break_iterator) return isolate->ThrowIllegalOperation(); in RUNTIME_FUNCTION()
14469 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
14474 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14481 BreakIterator::UnpackBreakIterator(isolate, break_iterator_holder); in RUNTIME_FUNCTION()
14482 if (!break_iterator) return isolate->ThrowIllegalOperation(); in RUNTIME_FUNCTION()
14484 return *isolate->factory()->NewNumberFromInt(break_iterator->first()); in RUNTIME_FUNCTION()
14489 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14496 BreakIterator::UnpackBreakIterator(isolate, break_iterator_holder); in RUNTIME_FUNCTION()
14497 if (!break_iterator) return isolate->ThrowIllegalOperation(); in RUNTIME_FUNCTION()
14499 return *isolate->factory()->NewNumberFromInt(break_iterator->next()); in RUNTIME_FUNCTION()
14504 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14511 BreakIterator::UnpackBreakIterator(isolate, break_iterator_holder); in RUNTIME_FUNCTION()
14512 if (!break_iterator) return isolate->ThrowIllegalOperation(); in RUNTIME_FUNCTION()
14514 return *isolate->factory()->NewNumberFromInt(break_iterator->current()); in RUNTIME_FUNCTION()
14519 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14526 BreakIterator::UnpackBreakIterator(isolate, break_iterator_holder); in RUNTIME_FUNCTION()
14527 if (!break_iterator) return isolate->ThrowIllegalOperation(); in RUNTIME_FUNCTION()
14535 return *isolate->factory()->NewStringFromStaticChars("none"); in RUNTIME_FUNCTION()
14537 return *isolate->factory()->number_string(); in RUNTIME_FUNCTION()
14539 return *isolate->factory()->NewStringFromStaticChars("letter"); in RUNTIME_FUNCTION()
14541 return *isolate->factory()->NewStringFromStaticChars("kana"); in RUNTIME_FUNCTION()
14543 return *isolate->factory()->NewStringFromStaticChars("ideo"); in RUNTIME_FUNCTION()
14545 return *isolate->factory()->NewStringFromStaticChars("unknown"); in RUNTIME_FUNCTION()
14589 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14606 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14611 if (!isolate->bootstrapper()->IsActive()) { in RUNTIME_FUNCTION()
14613 isolate->CaptureAndSetDetailedStackTrace(error_object); in RUNTIME_FUNCTION()
14615 isolate->CaptureAndSetSimpleStackTrace(error_object, caller); in RUNTIME_FUNCTION()
14617 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
14623 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14628 return *isolate->factory()->NewStringFromAsciiChecked(version_string); in RUNTIME_FUNCTION()
14634 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14644 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14654 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14664 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14673 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14678 Handle<Code> code(generator->function()->code(), isolate); in RUNTIME_FUNCTION()
14687 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
14692 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
14698 isolate->PrintStack(stderr); in RUNTIME_FUNCTION()
14706 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14710 isolate->PrintStack(stderr); in RUNTIME_FUNCTION()
14718 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14726 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14728 isolate->heap()->NotifyContextDisposed(); in RUNTIME_FUNCTION()
14729 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
14734 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14748 Handle<Object> raw_value(object->RawFastPropertyAt(field_index), isolate); in RUNTIME_FUNCTION()
14750 return *Object::WrapForRead(isolate, raw_value, Representation::Double()); in RUNTIME_FUNCTION()
14755 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14771 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
14809 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14812 Handle<Object> key_handle(key, isolate); in RUNTIME_FUNCTION()
14818 Handle<JSObject> receiver(isolate->global_proxy()); in RUNTIME_FUNCTION()
14822 isolate, value, in RUNTIME_FUNCTION()
14823 Execution::Call(isolate, factory, receiver, arraysize(argv), argv)); in RUNTIME_FUNCTION()
14868 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
14876 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
14887 HandleScope scope(isolate); in RUNTIME_FUNCTION()
14895 Factory* factory = isolate->factory(); in RUNTIME_FUNCTION()
14901 HandleScope inner(isolate); \ in RUNTIME_FUNCTION()
14937 return isolate->heap()->ToBoolean(obj->Has##Name()); \
14957 return isolate->heap()->ToBoolean(obj->HasExternal##Type##Elements()); \ in ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION()
14968 return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements()); \
14977 SealHandleScope shs(isolate);
14981 return isolate->heap()->ToBoolean(obj1->map() == obj2->map());
14986 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
14989 return isolate->heap()->ToBoolean(obj->IsJSGlobalProxy()); in RUNTIME_FUNCTION()
14994 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
14997 if (!args[0]->IsJSReceiver()) return isolate->heap()->false_value(); in RUNTIME_FUNCTION()
15000 return isolate->heap()->ToBoolean(obj->map()->is_observed()); in RUNTIME_FUNCTION()
15005 HandleScope scope(isolate); in RUNTIME_FUNCTION()
15009 if (obj->IsJSProxy()) return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
15014 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
15019 HandleScope scope(isolate); in RUNTIME_FUNCTION()
15022 isolate->EnqueueMicrotask(microtask); in RUNTIME_FUNCTION()
15023 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
15028 HandleScope scope(isolate); in RUNTIME_FUNCTION()
15030 isolate->RunMicrotasks(); in RUNTIME_FUNCTION()
15031 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
15036 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15038 return isolate->heap()->observation_state(); in RUNTIME_FUNCTION()
15043 HandleScope scope(isolate); in RUNTIME_FUNCTION()
15049 isolate->factory()->NewMap(JS_WEAK_MAP_TYPE, JSWeakMap::kSize); in RUNTIME_FUNCTION()
15051 Handle<JSWeakMap>::cast(isolate->factory()->NewJSObjectFromMap(map)); in RUNTIME_FUNCTION()
15052 return *WeakCollectionInitialize(isolate, weakmap); in RUNTIME_FUNCTION()
15063 HandleScope scope(isolate); in RUNTIME_FUNCTION()
15073 return isolate->heap()->ToBoolean( in RUNTIME_FUNCTION()
15080 HandleScope scope(isolate); in RUNTIME_FUNCTION()
15084 Handle<Context> creation_context(object->GetCreationContext(), isolate); in RUNTIME_FUNCTION()
15085 return isolate->heap()->ToBoolean( in RUNTIME_FUNCTION()
15086 ContextsHaveSameOrigin(creation_context, isolate->native_context())); in RUNTIME_FUNCTION()
15091 HandleScope scope(isolate); in RUNTIME_FUNCTION()
15095 Handle<Context> context(object->GetCreationContext(), isolate); in RUNTIME_FUNCTION()
15101 HandleScope scope(isolate); in RUNTIME_FUNCTION()
15105 Handle<Context> context(object->GetCreationContext(), isolate); in RUNTIME_FUNCTION()
15111 HandleScope scope(isolate); in RUNTIME_FUNCTION()
15115 Handle<Context> context(object_info->GetCreationContext(), isolate); in RUNTIME_FUNCTION()
15120 static Object* ArrayConstructorCommon(Isolate* isolate, in ArrayConstructorCommon() argument
15124 Factory* factory = isolate->factory(); in ArrayConstructorCommon()
15156 Handle<Map> initial_map(constructor->initial_map(), isolate); in ArrayConstructorCommon()
15185 isolate, ArrayConstructInitializeElements(array, caller_args)); in ArrayConstructorCommon()
15199 HandleScope scope(isolate); in RUNTIME_FUNCTION()
15223 *type_info != isolate->heap()->undefined_value()) { in RUNTIME_FUNCTION()
15228 return ArrayConstructorCommon(isolate, in RUNTIME_FUNCTION()
15236 HandleScope scope(isolate); in RUNTIME_FUNCTION()
15251 return ArrayConstructorCommon(isolate, in RUNTIME_FUNCTION()
15259 HandleScope scope(isolate); in RUNTIME_FUNCTION()
15270 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15280 SealHandleScope scope(isolate); in RUNTIME_FUNCTION_RETURN_PAIR()
15285 Object* error = isolate->ThrowIllegalOperation(); in RUNTIME_FUNCTION_RETURN_PAIR()
15286 return MakePair(error, isolate->heap()->undefined_value()); in RUNTIME_FUNCTION_RETURN_PAIR()
15297 return MakePair(isolate->heap()->empty_fixed_array(), Smi::FromInt(1)); in RUNTIME_FUNCTION_RETURN_PAIR()
15311 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15333 SealHandleScope scope(isolate); in RUNTIME_FUNCTION_RETURN_PAIR()
15340 Object* error = isolate->ThrowIllegalOperation(); in RUNTIME_FUNCTION_RETURN_PAIR()
15341 return MakePair(error, isolate->heap()->undefined_value()); in RUNTIME_FUNCTION_RETURN_PAIR()
15358 isolate->heap()->ToBoolean(slow_check_needed)); in RUNTIME_FUNCTION_RETURN_PAIR()
15382 SealHandleScope shs(isolate); in U()
15385 return isolate->heap()->ToBoolean(obj->IsSmi()); in U()
15390 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15393 return isolate->heap()->ToBoolean(obj->IsSmi() && in RUNTIME_FUNCTION()
15399 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15402 return isolate->heap()->ToBoolean(obj->IsJSArray()); in RUNTIME_FUNCTION()
15407 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15410 return isolate->heap()->ToBoolean(obj->IsJSRegExp()); in RUNTIME_FUNCTION()
15415 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15417 JavaScriptFrameIterator it(isolate); in RUNTIME_FUNCTION()
15419 return isolate->heap()->ToBoolean(frame->IsConstructor()); in RUNTIME_FUNCTION()
15424 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15425 return __RT_impl_Runtime_Call(args, isolate); in RUNTIME_FUNCTION()
15430 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15432 JavaScriptFrameIterator it(isolate); in RUNTIME_FUNCTION()
15439 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15440 return __RT_impl_Runtime_GetArgumentsProperty(args, isolate); in RUNTIME_FUNCTION()
15445 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15454 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15465 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15470 HandleScope scope(isolate); in RUNTIME_FUNCTION()
15472 isolate, in RUNTIME_FUNCTION()
15482 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15483 return __RT_impl_Runtime_CharFromCode(args, isolate); in RUNTIME_FUNCTION()
15488 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15492 if (std::isinf(args.number_at(1))) return isolate->heap()->empty_string(); in RUNTIME_FUNCTION()
15493 Object* code = __RT_impl_Runtime_StringCharCodeAtRT(args, isolate); in RUNTIME_FUNCTION()
15494 if (code->IsNaN()) return isolate->heap()->empty_string(); in RUNTIME_FUNCTION()
15495 return __RT_impl_Runtime_CharFromCode(Arguments(1, &code), isolate); in RUNTIME_FUNCTION()
15500 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15511 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15522 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15526 return isolate->heap()->ToBoolean(obj1 == obj2); in RUNTIME_FUNCTION()
15531 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15534 if (!obj->IsHeapObject()) return isolate->heap()->false_value(); in RUNTIME_FUNCTION()
15535 if (obj->IsNull()) return isolate->heap()->true_value(); in RUNTIME_FUNCTION()
15536 if (obj->IsUndetectableObject()) return isolate->heap()->false_value(); in RUNTIME_FUNCTION()
15541 return isolate->heap()->ToBoolean(is_non_callable_spec_object); in RUNTIME_FUNCTION()
15546 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15549 return isolate->heap()->ToBoolean(obj->IsJSFunction()); in RUNTIME_FUNCTION()
15554 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15557 return isolate->heap()->ToBoolean(obj->IsUndetectableObject()); in RUNTIME_FUNCTION()
15562 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15565 return isolate->heap()->ToBoolean(obj->IsSpecObject()); in RUNTIME_FUNCTION()
15570 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15571 return __RT_impl_Runtime_MathPowSlow(args, isolate); in RUNTIME_FUNCTION()
15576 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15579 if (!obj->IsHeapNumber()) return isolate->heap()->false_value(); in RUNTIME_FUNCTION()
15581 return isolate->heap()->ToBoolean(IsMinusZero(number->value())); in RUNTIME_FUNCTION()
15586 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15588 return isolate->heap()->false_value(); in RUNTIME_FUNCTION()
15593 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15595 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
15600 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15602 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
15619 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15622 if (!obj->IsJSReceiver()) return isolate->heap()->null_value(); in RUNTIME_FUNCTION()
15628 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15630 if (!args[0]->IsString()) return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
15631 if (!args[1]->IsNumber()) return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION()
15632 if (std::isinf(args.number_at(1))) return isolate->heap()->nan_value(); in RUNTIME_FUNCTION()
15633 return __RT_impl_Runtime_StringCharCodeAtRT(args, isolate); in RUNTIME_FUNCTION()
15638 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15639 return __RT_impl_Runtime_StringAdd(args, isolate); in RUNTIME_FUNCTION()
15644 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15645 return __RT_impl_Runtime_SubString(args, isolate); in RUNTIME_FUNCTION()
15650 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15651 return __RT_impl_Runtime_StringCompare(args, isolate); in RUNTIME_FUNCTION()
15656 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15657 return __RT_impl_Runtime_RegExpExecRT(args, isolate); in RUNTIME_FUNCTION()
15662 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15663 return __RT_impl_Runtime_RegExpConstructResult(args, isolate); in RUNTIME_FUNCTION()
15668 HandleScope scope(isolate); in RUNTIME_FUNCTION()
15671 args[0] = isolate->native_context()->jsfunction_result_caches()->get(id); in RUNTIME_FUNCTION()
15672 return __RT_impl_Runtime_GetFromCache(args, isolate); in RUNTIME_FUNCTION()
15677 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15678 return __RT_impl_Runtime_NumberToStringRT(args, isolate); in RUNTIME_FUNCTION()
15683 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
15684 return Smi::FromInt(isolate->debug()->is_active()); in RUNTIME_FUNCTION()
15727 void Runtime::InitializeIntrinsicFunctionNames(Isolate* isolate, in InitializeIntrinsicFunctionNames() argument
15730 HandleScope scope(isolate); in InitializeIntrinsicFunctionNames()
15736 isolate->factory()->InternalizeUtf8String(name), in InitializeIntrinsicFunctionNames()
15737 Handle<Smi>(Smi::FromInt(i), isolate), in InitializeIntrinsicFunctionNames()