[runtime] Use DCHECK_EQ instead of DCHECK for number of args.
BUG= Review-Url: https://codereview.chromium.org/2613723002 Cr-Commit-Position: refs/heads/master@{#42083}
This commit is contained in:
parent
81736c7161
commit
b371b0b7e7
@ -19,7 +19,7 @@ namespace internal {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_FinishArrayPrototypeSetup) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSArray, prototype, 0);
|
||||
Object* length = prototype->length();
|
||||
CHECK(length->IsSmi());
|
||||
@ -60,7 +60,7 @@ static void InstallBuiltin(
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_SpecialArrayFunctions) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
Handle<JSObject> holder =
|
||||
isolate->factory()->NewJSObject(isolate->object_function());
|
||||
|
||||
@ -85,7 +85,7 @@ RUNTIME_FUNCTION(Runtime_SpecialArrayFunctions) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_FixedArrayGet) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_CHECKED(FixedArray, object, 0);
|
||||
CONVERT_SMI_ARG_CHECKED(index, 1);
|
||||
return object->get(index);
|
||||
@ -94,7 +94,7 @@ RUNTIME_FUNCTION(Runtime_FixedArrayGet) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_FixedArraySet) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_CHECKED(FixedArray, object, 0);
|
||||
CONVERT_SMI_ARG_CHECKED(index, 1);
|
||||
CONVERT_ARG_CHECKED(Object, value, 2);
|
||||
@ -122,7 +122,7 @@ RUNTIME_FUNCTION(Runtime_TransitionElementsKind) {
|
||||
// Returns -1 if hole removal is not supported by this method.
|
||||
RUNTIME_FUNCTION(Runtime_RemoveArrayHoles) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSReceiver, object, 0);
|
||||
CONVERT_NUMBER_CHECKED(uint32_t, limit, Uint32, args[1]);
|
||||
if (object->IsJSProxy()) return Smi::FromInt(-1);
|
||||
@ -134,7 +134,7 @@ RUNTIME_FUNCTION(Runtime_RemoveArrayHoles) {
|
||||
// Move contents of argument 0 (an array) to argument 1 (an array)
|
||||
RUNTIME_FUNCTION(Runtime_MoveArrayContents) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSArray, from, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSArray, to, 1);
|
||||
JSObject::ValidateElements(from);
|
||||
@ -157,7 +157,7 @@ RUNTIME_FUNCTION(Runtime_MoveArrayContents) {
|
||||
// How many elements does this object/array have?
|
||||
RUNTIME_FUNCTION(Runtime_EstimateNumberOfElements) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSArray, array, 0);
|
||||
Handle<FixedArrayBase> elements(array->elements(), isolate);
|
||||
SealHandleScope shs(isolate);
|
||||
@ -200,7 +200,7 @@ RUNTIME_FUNCTION(Runtime_EstimateNumberOfElements) {
|
||||
// Intervals can span over some keys that are not in the object.
|
||||
RUNTIME_FUNCTION(Runtime_GetArrayKeys) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, array, 0);
|
||||
CONVERT_NUMBER_CHECKED(uint32_t, length, Uint32, args[1]);
|
||||
ElementsKind kind = array->GetElementsKind();
|
||||
@ -357,7 +357,7 @@ RUNTIME_FUNCTION(Runtime_NewArray) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_NormalizeElements) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, array, 0);
|
||||
CHECK(!array->HasFixedTypedArrayElements());
|
||||
CHECK(!array->IsJSGlobalProxy());
|
||||
@ -369,7 +369,7 @@ RUNTIME_FUNCTION(Runtime_NormalizeElements) {
|
||||
// GrowArrayElements returns a sentinel Smi if the object was normalized.
|
||||
RUNTIME_FUNCTION(Runtime_GrowArrayElements) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
|
||||
CONVERT_NUMBER_CHECKED(int, key, Int32, args[1]);
|
||||
|
||||
@ -393,7 +393,7 @@ RUNTIME_FUNCTION(Runtime_GrowArrayElements) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_HasComplexElements) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, array, 0);
|
||||
for (PrototypeIterator iter(isolate, array, kStartAtReceiver);
|
||||
!iter.IsAtEnd(); iter.Advance()) {
|
||||
@ -415,7 +415,7 @@ RUNTIME_FUNCTION(Runtime_HasComplexElements) {
|
||||
// ES6 22.1.2.2 Array.isArray
|
||||
RUNTIME_FUNCTION(Runtime_ArrayIsArray) {
|
||||
HandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
|
||||
Maybe<bool> result = Object::IsArray(object);
|
||||
MAYBE_RETURN(result, isolate->heap()->exception());
|
||||
@ -424,14 +424,14 @@ RUNTIME_FUNCTION(Runtime_ArrayIsArray) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_IsArray) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_CHECKED(Object, obj, 0);
|
||||
return isolate->heap()->ToBoolean(obj->IsJSArray());
|
||||
}
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ArraySpeciesConstructor) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, original_array, 0);
|
||||
RETURN_RESULT_OR_FAILURE(
|
||||
isolate, Object::ArraySpeciesConstructor(isolate, original_array));
|
||||
@ -440,7 +440,7 @@ RUNTIME_FUNCTION(Runtime_ArraySpeciesConstructor) {
|
||||
// ES7 22.1.3.11 Array.prototype.includes
|
||||
RUNTIME_FUNCTION(Runtime_ArrayIncludes_Slow) {
|
||||
HandleScope shs(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, search_element, 1);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, from_index, 2);
|
||||
|
||||
@ -532,7 +532,7 @@ RUNTIME_FUNCTION(Runtime_ArrayIncludes_Slow) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ArrayIndexOf) {
|
||||
HandleScope shs(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, search_element, 1);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, from_index, 2);
|
||||
|
||||
|
@ -349,7 +349,7 @@ RUNTIME_FUNCTION(Runtime_ThrowInvalidAtomicAccessIndexError) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_AtomicsCompareExchange) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 4);
|
||||
DCHECK_EQ(4, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, sta, 0);
|
||||
CONVERT_SIZE_ARG_CHECKED(index, 1);
|
||||
CONVERT_NUMBER_ARG_HANDLE_CHECKED(oldobj, 2);
|
||||
@ -383,7 +383,7 @@ RUNTIME_FUNCTION(Runtime_AtomicsCompareExchange) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_AtomicsAdd) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, sta, 0);
|
||||
CONVERT_SIZE_ARG_CHECKED(index, 1);
|
||||
CONVERT_NUMBER_ARG_HANDLE_CHECKED(value, 2);
|
||||
@ -415,7 +415,7 @@ RUNTIME_FUNCTION(Runtime_AtomicsAdd) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_AtomicsSub) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, sta, 0);
|
||||
CONVERT_SIZE_ARG_CHECKED(index, 1);
|
||||
CONVERT_NUMBER_ARG_HANDLE_CHECKED(value, 2);
|
||||
@ -447,7 +447,7 @@ RUNTIME_FUNCTION(Runtime_AtomicsSub) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_AtomicsAnd) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, sta, 0);
|
||||
CONVERT_SIZE_ARG_CHECKED(index, 1);
|
||||
CONVERT_NUMBER_ARG_HANDLE_CHECKED(value, 2);
|
||||
@ -479,7 +479,7 @@ RUNTIME_FUNCTION(Runtime_AtomicsAnd) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_AtomicsOr) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, sta, 0);
|
||||
CONVERT_SIZE_ARG_CHECKED(index, 1);
|
||||
CONVERT_NUMBER_ARG_HANDLE_CHECKED(value, 2);
|
||||
@ -511,7 +511,7 @@ RUNTIME_FUNCTION(Runtime_AtomicsOr) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_AtomicsXor) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, sta, 0);
|
||||
CONVERT_SIZE_ARG_CHECKED(index, 1);
|
||||
CONVERT_NUMBER_ARG_HANDLE_CHECKED(value, 2);
|
||||
@ -543,7 +543,7 @@ RUNTIME_FUNCTION(Runtime_AtomicsXor) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_AtomicsExchange) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, sta, 0);
|
||||
CONVERT_SIZE_ARG_CHECKED(index, 1);
|
||||
CONVERT_NUMBER_ARG_HANDLE_CHECKED(value, 2);
|
||||
@ -575,7 +575,7 @@ RUNTIME_FUNCTION(Runtime_AtomicsExchange) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_AtomicsIsLockFree) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_NUMBER_ARG_HANDLE_CHECKED(size, 0);
|
||||
uint32_t usize = NumberToUint32(*size);
|
||||
return isolate->heap()->ToBoolean(AtomicIsLockFree(usize));
|
||||
|
@ -22,14 +22,14 @@ namespace internal {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ThrowNonMethodError) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
THROW_NEW_ERROR_RETURN_FAILURE(
|
||||
isolate, NewReferenceError(MessageTemplate::kNonMethod));
|
||||
}
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ThrowUnsupportedSuperError) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
THROW_NEW_ERROR_RETURN_FAILURE(
|
||||
isolate, NewReferenceError(MessageTemplate::kUnsupportedSuper));
|
||||
}
|
||||
@ -37,7 +37,7 @@ RUNTIME_FUNCTION(Runtime_ThrowUnsupportedSuperError) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ThrowConstructorNonCallableError) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, constructor, 0);
|
||||
Handle<Object> name(constructor->shared()->name(), isolate);
|
||||
THROW_NEW_ERROR_RETURN_FAILURE(
|
||||
@ -47,14 +47,14 @@ RUNTIME_FUNCTION(Runtime_ThrowConstructorNonCallableError) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ThrowArrayNotSubclassableError) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
THROW_NEW_ERROR_RETURN_FAILURE(
|
||||
isolate, NewTypeError(MessageTemplate::kArrayNotSubclassable));
|
||||
}
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ThrowStaticPrototypeError) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
THROW_NEW_ERROR_RETURN_FAILURE(
|
||||
isolate, NewTypeError(MessageTemplate::kStaticPrototype));
|
||||
}
|
||||
@ -94,14 +94,14 @@ Object* ThrowNotSuperConstructor(Isolate* isolate, Handle<Object> constructor,
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ThrowNotSuperConstructor) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, constructor, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 1);
|
||||
return ThrowNotSuperConstructor(isolate, constructor, function);
|
||||
}
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_HomeObjectSymbol) {
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
return isolate->heap()->home_object_symbol();
|
||||
}
|
||||
|
||||
@ -195,7 +195,7 @@ static MaybeHandle<Object> DefineClass(Isolate* isolate,
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_DefineClass) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 4);
|
||||
DCHECK_EQ(4, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, super_class, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, constructor, 1);
|
||||
CONVERT_SMI_ARG_CHECKED(start_position, 2);
|
||||
@ -220,7 +220,7 @@ void InstallClassNameAccessor(Isolate* isolate, Handle<JSObject> object) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_InstallClassNameAccessor) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
|
||||
InstallClassNameAccessor(isolate, object);
|
||||
return *object;
|
||||
@ -228,7 +228,7 @@ RUNTIME_FUNCTION(Runtime_InstallClassNameAccessor) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_InstallClassNameAccessorWithCheck) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
|
||||
|
||||
// If a property named "name" is already defined, exit.
|
||||
@ -380,7 +380,7 @@ MaybeHandle<Object> StoreElementToSuper(Isolate* isolate,
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_StoreToSuper_Strict) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 4);
|
||||
DCHECK_EQ(4, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Name, name, 2);
|
||||
@ -393,7 +393,7 @@ RUNTIME_FUNCTION(Runtime_StoreToSuper_Strict) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_StoreToSuper_Sloppy) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 4);
|
||||
DCHECK_EQ(4, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Name, name, 2);
|
||||
@ -427,7 +427,7 @@ static MaybeHandle<Object> StoreKeyedToSuper(
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_StoreKeyedToSuper_Strict) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 4);
|
||||
DCHECK_EQ(4, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, key, 2);
|
||||
@ -441,7 +441,7 @@ RUNTIME_FUNCTION(Runtime_StoreKeyedToSuper_Strict) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_StoreKeyedToSuper_Sloppy) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 4);
|
||||
DCHECK_EQ(4, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, key, 2);
|
||||
|
@ -14,7 +14,7 @@ namespace internal {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_StringGetRawHashField) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, string, 0);
|
||||
return *isolate->factory()->NewNumberFromUint(string->hash_field());
|
||||
}
|
||||
@ -22,14 +22,14 @@ RUNTIME_FUNCTION(Runtime_StringGetRawHashField) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_TheHole) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
return isolate->heap()->the_hole_value();
|
||||
}
|
||||
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_JSCollectionGetTable) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_CHECKED(JSObject, object, 0);
|
||||
CHECK(object->IsJSSet() || object->IsJSMap());
|
||||
return static_cast<JSCollection*>(object)->table();
|
||||
@ -38,7 +38,7 @@ RUNTIME_FUNCTION(Runtime_JSCollectionGetTable) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GenericHash) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
|
||||
Smi* hash = Object::GetOrCreateHash(isolate, object);
|
||||
return hash;
|
||||
@ -47,7 +47,7 @@ RUNTIME_FUNCTION(Runtime_GenericHash) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_SetInitialize) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSSet, holder, 0);
|
||||
JSSet::Initialize(holder, isolate);
|
||||
return *holder;
|
||||
@ -56,7 +56,7 @@ RUNTIME_FUNCTION(Runtime_SetInitialize) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_SetGrow) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSSet, holder, 0);
|
||||
Handle<OrderedHashSet> table(OrderedHashSet::cast(holder->table()));
|
||||
table = OrderedHashSet::EnsureGrowable(table);
|
||||
@ -67,7 +67,7 @@ RUNTIME_FUNCTION(Runtime_SetGrow) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_SetShrink) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSSet, holder, 0);
|
||||
Handle<OrderedHashSet> table(OrderedHashSet::cast(holder->table()));
|
||||
table = OrderedHashSet::Shrink(table);
|
||||
@ -78,7 +78,7 @@ RUNTIME_FUNCTION(Runtime_SetShrink) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_SetClear) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSSet, holder, 0);
|
||||
JSSet::Clear(holder);
|
||||
return isolate->heap()->undefined_value();
|
||||
@ -87,7 +87,7 @@ RUNTIME_FUNCTION(Runtime_SetClear) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_SetIteratorInitialize) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSSetIterator, holder, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSSet, set, 1);
|
||||
CONVERT_SMI_ARG_CHECKED(kind, 2)
|
||||
@ -103,7 +103,7 @@ RUNTIME_FUNCTION(Runtime_SetIteratorInitialize) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_SetIteratorClone) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSSetIterator, holder, 0);
|
||||
|
||||
Handle<JSSetIterator> result = isolate->factory()->NewJSSetIterator();
|
||||
@ -117,7 +117,7 @@ RUNTIME_FUNCTION(Runtime_SetIteratorClone) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_SetIteratorNext) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_CHECKED(JSSetIterator, holder, 0);
|
||||
CONVERT_ARG_CHECKED(JSArray, value_array, 1);
|
||||
return holder->Next(value_array);
|
||||
@ -130,7 +130,7 @@ RUNTIME_FUNCTION(Runtime_SetIteratorNext) {
|
||||
// 2: Iteration kind
|
||||
RUNTIME_FUNCTION(Runtime_SetIteratorDetails) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSSetIterator, holder, 0);
|
||||
Handle<FixedArray> details = isolate->factory()->NewFixedArray(4);
|
||||
details->set(0, isolate->heap()->ToBoolean(holder->HasMore()));
|
||||
@ -142,7 +142,7 @@ RUNTIME_FUNCTION(Runtime_SetIteratorDetails) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_MapInitialize) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSMap, holder, 0);
|
||||
JSMap::Initialize(holder, isolate);
|
||||
return *holder;
|
||||
@ -151,7 +151,7 @@ RUNTIME_FUNCTION(Runtime_MapInitialize) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_MapShrink) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSMap, holder, 0);
|
||||
Handle<OrderedHashMap> table(OrderedHashMap::cast(holder->table()));
|
||||
table = OrderedHashMap::Shrink(table);
|
||||
@ -162,7 +162,7 @@ RUNTIME_FUNCTION(Runtime_MapShrink) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_MapClear) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSMap, holder, 0);
|
||||
JSMap::Clear(holder);
|
||||
return isolate->heap()->undefined_value();
|
||||
@ -171,7 +171,7 @@ RUNTIME_FUNCTION(Runtime_MapClear) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_MapGrow) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSMap, holder, 0);
|
||||
Handle<OrderedHashMap> table(OrderedHashMap::cast(holder->table()));
|
||||
table = OrderedHashMap::EnsureGrowable(table);
|
||||
@ -182,7 +182,7 @@ RUNTIME_FUNCTION(Runtime_MapGrow) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_MapIteratorInitialize) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSMapIterator, holder, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSMap, map, 1);
|
||||
CONVERT_SMI_ARG_CHECKED(kind, 2)
|
||||
@ -199,7 +199,7 @@ RUNTIME_FUNCTION(Runtime_MapIteratorInitialize) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_MapIteratorClone) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSMapIterator, holder, 0);
|
||||
|
||||
Handle<JSMapIterator> result = isolate->factory()->NewJSMapIterator();
|
||||
@ -217,7 +217,7 @@ RUNTIME_FUNCTION(Runtime_MapIteratorClone) {
|
||||
// 2: Iteration kind
|
||||
RUNTIME_FUNCTION(Runtime_MapIteratorDetails) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSMapIterator, holder, 0);
|
||||
Handle<FixedArray> details = isolate->factory()->NewFixedArray(4);
|
||||
details->set(0, isolate->heap()->ToBoolean(holder->HasMore()));
|
||||
@ -229,7 +229,7 @@ RUNTIME_FUNCTION(Runtime_MapIteratorDetails) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GetWeakMapEntries) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, holder, 0);
|
||||
CONVERT_NUMBER_CHECKED(int, max_entries, Int32, args[1]);
|
||||
CHECK(max_entries >= 0);
|
||||
@ -264,7 +264,7 @@ RUNTIME_FUNCTION(Runtime_GetWeakMapEntries) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_MapIteratorNext) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_CHECKED(JSMapIterator, holder, 0);
|
||||
CONVERT_ARG_CHECKED(JSArray, value_array, 1);
|
||||
return holder->Next(value_array);
|
||||
@ -273,7 +273,7 @@ RUNTIME_FUNCTION(Runtime_MapIteratorNext) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_WeakCollectionInitialize) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, weak_collection, 0);
|
||||
JSWeakCollection::Initialize(weak_collection, isolate);
|
||||
return *weak_collection;
|
||||
@ -282,7 +282,7 @@ RUNTIME_FUNCTION(Runtime_WeakCollectionInitialize) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_WeakCollectionGet) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, weak_collection, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, key, 1);
|
||||
CONVERT_SMI_ARG_CHECKED(hash, 2)
|
||||
@ -298,7 +298,7 @@ RUNTIME_FUNCTION(Runtime_WeakCollectionGet) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_WeakCollectionHas) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, weak_collection, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, key, 1);
|
||||
CONVERT_SMI_ARG_CHECKED(hash, 2)
|
||||
@ -313,7 +313,7 @@ RUNTIME_FUNCTION(Runtime_WeakCollectionHas) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_WeakCollectionDelete) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, weak_collection, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, key, 1);
|
||||
CONVERT_SMI_ARG_CHECKED(hash, 2)
|
||||
@ -328,7 +328,7 @@ RUNTIME_FUNCTION(Runtime_WeakCollectionDelete) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_WeakCollectionSet) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 4);
|
||||
DCHECK_EQ(4, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, weak_collection, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, key, 1);
|
||||
CHECK(key->IsJSReceiver() || key->IsSymbol());
|
||||
@ -344,7 +344,7 @@ RUNTIME_FUNCTION(Runtime_WeakCollectionSet) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GetWeakSetValues) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, holder, 0);
|
||||
CONVERT_NUMBER_CHECKED(int, max_values, Int32, args[1]);
|
||||
CHECK(max_values >= 0);
|
||||
|
@ -127,7 +127,7 @@ RUNTIME_FUNCTION(Runtime_InstantiateAsmJs) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_NotifyStubFailure) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
Deoptimizer* deoptimizer = Deoptimizer::Grab(isolate);
|
||||
DCHECK(AllowHeapAllocation::IsAllowed());
|
||||
delete deoptimizer;
|
||||
@ -158,7 +158,7 @@ class ActivationsFinder : public ThreadVisitor {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_NotifyDeoptimized) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_SMI_ARG_CHECKED(type_arg, 0);
|
||||
Deoptimizer::BailoutType type =
|
||||
static_cast<Deoptimizer::BailoutType>(type_arg);
|
||||
@ -300,7 +300,7 @@ BailoutId DetermineEntryAndDisarmOSRForInterpreter(JavaScriptFrame* frame) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_CompileForOnStackReplacement) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
|
||||
|
||||
// We're not prepared to handle a function with arguments object.
|
||||
@ -385,7 +385,7 @@ RUNTIME_FUNCTION(Runtime_CompileForOnStackReplacement) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_TryInstallOptimizedCode) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
|
||||
|
||||
// First check if this is a real stack overflow.
|
||||
@ -452,7 +452,7 @@ static Object* CompileGlobalEval(Isolate* isolate, Handle<String> source,
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ResolvePossiblyDirectEval) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 6);
|
||||
DCHECK_EQ(6, args.length());
|
||||
|
||||
Handle<Object> callee = args.at(0);
|
||||
|
||||
|
@ -24,7 +24,7 @@ namespace internal {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_DebugBreak) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, value, 0);
|
||||
isolate->debug()->set_return_value(value);
|
||||
|
||||
@ -38,7 +38,7 @@ RUNTIME_FUNCTION(Runtime_DebugBreak) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_DebugBreakOnBytecode) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, value, 0);
|
||||
isolate->debug()->set_return_value(value);
|
||||
|
||||
@ -65,7 +65,7 @@ RUNTIME_FUNCTION(Runtime_DebugBreakOnBytecode) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_HandleDebuggerStatement) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
if (isolate->debug()->break_points_active()) {
|
||||
isolate->debug()->HandleDebugBreak();
|
||||
}
|
||||
@ -79,7 +79,7 @@ RUNTIME_FUNCTION(Runtime_HandleDebuggerStatement) {
|
||||
// args[1]: object supplied during callback
|
||||
RUNTIME_FUNCTION(Runtime_SetDebugEventListener) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CHECK(args[0]->IsJSFunction() || args[0]->IsUndefined(isolate) ||
|
||||
args[0]->IsNull(isolate));
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, callback, 0);
|
||||
@ -92,7 +92,7 @@ RUNTIME_FUNCTION(Runtime_SetDebugEventListener) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ScheduleBreak) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
isolate->stack_guard()->RequestDebugBreak();
|
||||
return isolate->heap()->undefined_value();
|
||||
}
|
||||
@ -290,7 +290,7 @@ MaybeHandle<JSArray> Runtime::GetInternalProperties(Isolate* isolate,
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_DebugGetInternalProperties) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, obj, 0);
|
||||
RETURN_RESULT_OR_FAILURE(isolate,
|
||||
Runtime::GetInternalProperties(isolate, obj));
|
||||
@ -382,7 +382,7 @@ RUNTIME_FUNCTION(Runtime_DebugGetPropertyDetails) {
|
||||
RUNTIME_FUNCTION(Runtime_DebugGetProperty) {
|
||||
HandleScope scope(isolate);
|
||||
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, obj, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Name, name, 1);
|
||||
@ -396,7 +396,7 @@ RUNTIME_FUNCTION(Runtime_DebugGetProperty) {
|
||||
// args[0]: smi with property details.
|
||||
RUNTIME_FUNCTION(Runtime_DebugPropertyTypeFromDetails) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_PROPERTY_DETAILS_CHECKED(details, 0);
|
||||
return Smi::FromInt(static_cast<int>(details.type()));
|
||||
}
|
||||
@ -406,7 +406,7 @@ RUNTIME_FUNCTION(Runtime_DebugPropertyTypeFromDetails) {
|
||||
// args[0]: smi with property details.
|
||||
RUNTIME_FUNCTION(Runtime_DebugPropertyAttributesFromDetails) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_PROPERTY_DETAILS_CHECKED(details, 0);
|
||||
return Smi::FromInt(static_cast<int>(details.attributes()));
|
||||
}
|
||||
@ -414,7 +414,7 @@ RUNTIME_FUNCTION(Runtime_DebugPropertyAttributesFromDetails) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_CheckExecutionState) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
|
||||
CHECK(isolate->debug()->CheckExecutionState(break_id));
|
||||
return isolate->heap()->true_value();
|
||||
@ -423,7 +423,7 @@ RUNTIME_FUNCTION(Runtime_CheckExecutionState) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GetFrameCount) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
|
||||
CHECK(isolate->debug()->CheckExecutionState(break_id));
|
||||
|
||||
@ -483,7 +483,7 @@ static const int kFrameDetailsFirstDynamicIndex = 10;
|
||||
// Return value if any
|
||||
RUNTIME_FUNCTION(Runtime_GetFrameDetails) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
|
||||
CHECK(isolate->debug()->CheckExecutionState(break_id));
|
||||
|
||||
@ -764,7 +764,7 @@ RUNTIME_FUNCTION(Runtime_GetFrameDetails) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GetScopeCount) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
|
||||
CHECK(isolate->debug()->CheckExecutionState(break_id));
|
||||
|
||||
@ -797,7 +797,7 @@ RUNTIME_FUNCTION(Runtime_GetScopeCount) {
|
||||
// 1: Scope object
|
||||
RUNTIME_FUNCTION(Runtime_GetScopeDetails) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 4);
|
||||
DCHECK_EQ(4, args.length());
|
||||
CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
|
||||
CHECK(isolate->debug()->CheckExecutionState(break_id));
|
||||
|
||||
@ -893,7 +893,7 @@ RUNTIME_FUNCTION(Runtime_GetFunctionScopeCount) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GetFunctionScopeDetails) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
|
||||
// Check arguments.
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
|
||||
@ -932,7 +932,7 @@ RUNTIME_FUNCTION(Runtime_GetGeneratorScopeCount) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GetGeneratorScopeDetails) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
|
||||
if (!args[0]->IsJSGeneratorObject()) {
|
||||
return isolate->heap()->undefined_value();
|
||||
@ -979,7 +979,7 @@ static bool SetScopeVariableValue(ScopeIterator* it, int index,
|
||||
// Return true if success and false otherwise
|
||||
RUNTIME_FUNCTION(Runtime_SetScopeVariableValue) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 6);
|
||||
DCHECK_EQ(6, args.length());
|
||||
|
||||
// Check arguments.
|
||||
CONVERT_NUMBER_CHECKED(int, index, Int32, args[3]);
|
||||
@ -1018,7 +1018,7 @@ RUNTIME_FUNCTION(Runtime_SetScopeVariableValue) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_DebugPrintScopes) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
|
||||
#ifdef DEBUG
|
||||
// Print the scopes for the top frame.
|
||||
@ -1038,7 +1038,7 @@ RUNTIME_FUNCTION(Runtime_DebugPrintScopes) {
|
||||
// args[0]: disable break state
|
||||
RUNTIME_FUNCTION(Runtime_SetBreakPointsActive) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_BOOLEAN_ARG_CHECKED(active, 0);
|
||||
isolate->debug()->set_break_points_active(active);
|
||||
return isolate->heap()->undefined_value();
|
||||
@ -1052,7 +1052,7 @@ static bool IsPositionAlignmentCodeCorrect(int alignment) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GetBreakLocations) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CHECK(isolate->debug()->is_active());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
|
||||
CONVERT_NUMBER_CHECKED(int32_t, statement_aligned_code, Int32, args[1]);
|
||||
@ -1082,7 +1082,7 @@ RUNTIME_FUNCTION(Runtime_GetBreakLocations) {
|
||||
// args[2]: number: break point object
|
||||
RUNTIME_FUNCTION(Runtime_SetFunctionBreakPoint) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CHECK(isolate->debug()->is_active());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
|
||||
CONVERT_NUMBER_CHECKED(int32_t, source_position, Int32, args[1]);
|
||||
@ -1107,7 +1107,7 @@ RUNTIME_FUNCTION(Runtime_SetFunctionBreakPoint) {
|
||||
// args[3]: number: break point object
|
||||
RUNTIME_FUNCTION(Runtime_SetScriptBreakPoint) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 4);
|
||||
DCHECK_EQ(4, args.length());
|
||||
CHECK(isolate->debug()->is_active());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSValue, wrapper, 0);
|
||||
CONVERT_NUMBER_CHECKED(int32_t, source_position, Int32, args[1]);
|
||||
@ -1139,7 +1139,7 @@ RUNTIME_FUNCTION(Runtime_SetScriptBreakPoint) {
|
||||
// args[0]: number: break point object
|
||||
RUNTIME_FUNCTION(Runtime_ClearBreakPoint) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CHECK(isolate->debug()->is_active());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, break_point_object_arg, 0);
|
||||
|
||||
@ -1155,7 +1155,7 @@ RUNTIME_FUNCTION(Runtime_ClearBreakPoint) {
|
||||
// args[1]: Boolean indicating on/off.
|
||||
RUNTIME_FUNCTION(Runtime_ChangeBreakOnException) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_NUMBER_CHECKED(uint32_t, type_arg, Uint32, args[0]);
|
||||
CONVERT_BOOLEAN_ARG_CHECKED(enable, 1);
|
||||
|
||||
@ -1172,7 +1172,7 @@ RUNTIME_FUNCTION(Runtime_ChangeBreakOnException) {
|
||||
// args[0]: boolean indicating uncaught exceptions
|
||||
RUNTIME_FUNCTION(Runtime_IsBreakOnException) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_NUMBER_CHECKED(uint32_t, type_arg, Uint32, args[0]);
|
||||
|
||||
ExceptionBreakType type = static_cast<ExceptionBreakType>(type_arg);
|
||||
@ -1188,7 +1188,7 @@ RUNTIME_FUNCTION(Runtime_IsBreakOnException) {
|
||||
// of frames to step down.
|
||||
RUNTIME_FUNCTION(Runtime_PrepareStep) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
|
||||
CHECK(isolate->debug()->CheckExecutionState(break_id));
|
||||
|
||||
@ -1227,7 +1227,7 @@ RUNTIME_FUNCTION(Runtime_PrepareStepFrame) {
|
||||
// Clear all stepping set by PrepareStep.
|
||||
RUNTIME_FUNCTION(Runtime_ClearStepping) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
CHECK(isolate->debug()->is_active());
|
||||
isolate->debug()->ClearStepping();
|
||||
return isolate->heap()->undefined_value();
|
||||
@ -1239,7 +1239,7 @@ RUNTIME_FUNCTION(Runtime_DebugEvaluate) {
|
||||
|
||||
// Check the execution state and decode arguments frame and source to be
|
||||
// evaluated.
|
||||
DCHECK(args.length() == 4);
|
||||
DCHECK_EQ(4, args.length());
|
||||
CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
|
||||
CHECK(isolate->debug()->CheckExecutionState(break_id));
|
||||
|
||||
@ -1260,7 +1260,7 @@ RUNTIME_FUNCTION(Runtime_DebugEvaluateGlobal) {
|
||||
|
||||
// Check the execution state and decode arguments frame and source to be
|
||||
// evaluated.
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
|
||||
CHECK(isolate->debug()->CheckExecutionState(break_id));
|
||||
|
||||
@ -1272,7 +1272,7 @@ RUNTIME_FUNCTION(Runtime_DebugEvaluateGlobal) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_DebugGetLoadedScripts) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
|
||||
// This runtime function is used by the debugger to determine whether the
|
||||
// debugger is active or not. Hence we fail gracefully here and don't crash.
|
||||
@ -1323,7 +1323,7 @@ static bool HasInPrototypeChainIgnoringProxies(Isolate* isolate,
|
||||
// args[2]: the the maximum number of objects to return
|
||||
RUNTIME_FUNCTION(Runtime_DebugReferencedBy) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, target, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, filter, 1);
|
||||
CHECK(filter->IsUndefined(isolate) || filter->IsJSObject());
|
||||
@ -1380,7 +1380,7 @@ RUNTIME_FUNCTION(Runtime_DebugReferencedBy) {
|
||||
// args[1]: the the maximum number of objects to return
|
||||
RUNTIME_FUNCTION(Runtime_DebugConstructedBy) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, constructor, 0);
|
||||
CONVERT_NUMBER_CHECKED(int32_t, max_references, Int32, args[1]);
|
||||
CHECK(max_references >= 0);
|
||||
@ -1413,7 +1413,7 @@ RUNTIME_FUNCTION(Runtime_DebugConstructedBy) {
|
||||
// args[0]: the object to find the prototype for.
|
||||
RUNTIME_FUNCTION(Runtime_DebugGetPrototype) {
|
||||
HandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
|
||||
// TODO(1543): Come up with a solution for clients to handle potential errors
|
||||
// thrown by an intermediate proxy.
|
||||
@ -1425,7 +1425,7 @@ RUNTIME_FUNCTION(Runtime_DebugGetPrototype) {
|
||||
// TODO(5530): Remove once uses in debug.js are gone.
|
||||
RUNTIME_FUNCTION(Runtime_DebugSetScriptSource) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSValue, script_wrapper, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, source, 1);
|
||||
@ -1478,7 +1478,7 @@ RUNTIME_FUNCTION(Runtime_FunctionGetDebugName) {
|
||||
// to have a stack with C++ frame in the middle.
|
||||
RUNTIME_FUNCTION(Runtime_ExecuteInDebugContext) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
|
||||
|
||||
DebugScope debug_scope(isolate->debug());
|
||||
@ -1495,7 +1495,7 @@ RUNTIME_FUNCTION(Runtime_ExecuteInDebugContext) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GetDebugContext) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
Handle<Context> context;
|
||||
{
|
||||
DebugScope debug_scope(isolate->debug());
|
||||
@ -1515,7 +1515,7 @@ RUNTIME_FUNCTION(Runtime_GetDebugContext) {
|
||||
// Presently, it only does a full GC.
|
||||
RUNTIME_FUNCTION(Runtime_CollectGarbage) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
|
||||
GarbageCollectionReason::kRuntime);
|
||||
return isolate->heap()->undefined_value();
|
||||
@ -1525,7 +1525,7 @@ RUNTIME_FUNCTION(Runtime_CollectGarbage) {
|
||||
// Gets the current heap usage.
|
||||
RUNTIME_FUNCTION(Runtime_GetHeapUsage) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
int usage = static_cast<int>(isolate->heap()->SizeOfObjects());
|
||||
if (!Smi::IsValid(usage)) {
|
||||
return *isolate->factory()->NewNumberFromInt(usage);
|
||||
@ -1542,7 +1542,7 @@ RUNTIME_FUNCTION(Runtime_GetHeapUsage) {
|
||||
// some kind of user interaction the performance is not crucial.
|
||||
RUNTIME_FUNCTION(Runtime_GetScript) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, script_name, 0);
|
||||
|
||||
Handle<Script> found;
|
||||
@ -1566,7 +1566,7 @@ RUNTIME_FUNCTION(Runtime_GetScript) {
|
||||
// TODO(5530): Remove once uses in debug.js are gone.
|
||||
RUNTIME_FUNCTION(Runtime_ScriptLineCount) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_CHECKED(JSValue, script, 0);
|
||||
|
||||
CHECK(script->value()->IsScript());
|
||||
@ -1610,7 +1610,7 @@ int ScriptLinePosition(Handle<Script> script, int line) {
|
||||
// TODO(5530): Remove once uses in debug.js are gone.
|
||||
RUNTIME_FUNCTION(Runtime_ScriptLineStartPosition) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_CHECKED(JSValue, script, 0);
|
||||
CONVERT_NUMBER_CHECKED(int32_t, line, Int32, args[1]);
|
||||
|
||||
@ -1623,7 +1623,7 @@ RUNTIME_FUNCTION(Runtime_ScriptLineStartPosition) {
|
||||
// TODO(5530): Remove once uses in debug.js are gone.
|
||||
RUNTIME_FUNCTION(Runtime_ScriptLineEndPosition) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_CHECKED(JSValue, script, 0);
|
||||
CONVERT_NUMBER_CHECKED(int32_t, line, Int32, args[1]);
|
||||
|
||||
@ -1748,7 +1748,7 @@ bool GetScriptById(Isolate* isolate, int needle, Handle<Script>* result) {
|
||||
// TODO(5530): Remove once uses in debug.js are gone.
|
||||
RUNTIME_FUNCTION(Runtime_ScriptLocationFromLine) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 4);
|
||||
DCHECK_EQ(4, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSValue, script, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, opt_line, 1);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, opt_column, 2);
|
||||
@ -1764,7 +1764,7 @@ RUNTIME_FUNCTION(Runtime_ScriptLocationFromLine) {
|
||||
// TODO(5530): Rename once conflicting function has been deleted.
|
||||
RUNTIME_FUNCTION(Runtime_ScriptLocationFromLine2) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 4);
|
||||
DCHECK_EQ(4, args.length());
|
||||
CONVERT_NUMBER_CHECKED(int32_t, scriptid, Int32, args[0]);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, opt_line, 1);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, opt_column, 2);
|
||||
@ -1779,7 +1779,7 @@ RUNTIME_FUNCTION(Runtime_ScriptLocationFromLine2) {
|
||||
// TODO(5530): Remove once uses in debug.js are gone.
|
||||
RUNTIME_FUNCTION(Runtime_ScriptPositionInfo) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_CHECKED(JSValue, script, 0);
|
||||
CONVERT_NUMBER_CHECKED(int32_t, position, Int32, args[1]);
|
||||
CONVERT_BOOLEAN_ARG_CHECKED(with_offset, 2);
|
||||
@ -1795,7 +1795,7 @@ RUNTIME_FUNCTION(Runtime_ScriptPositionInfo) {
|
||||
// TODO(5530): Rename once conflicting function has been deleted.
|
||||
RUNTIME_FUNCTION(Runtime_ScriptPositionInfo2) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_NUMBER_CHECKED(int32_t, scriptid, Int32, args[0]);
|
||||
CONVERT_NUMBER_CHECKED(int32_t, position, Int32, args[1]);
|
||||
CONVERT_BOOLEAN_ARG_CHECKED(with_offset, 2);
|
||||
@ -1813,7 +1813,7 @@ RUNTIME_FUNCTION(Runtime_ScriptPositionInfo2) {
|
||||
// TODO(5530): Remove once uses in debug.js are gone.
|
||||
RUNTIME_FUNCTION(Runtime_ScriptSourceLine) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_CHECKED(JSValue, script, 0);
|
||||
CONVERT_NUMBER_CHECKED(int32_t, line, Int32, args[1]);
|
||||
|
||||
@ -1875,7 +1875,7 @@ RUNTIME_FUNCTION(Runtime_DebugRecordGenerator) {
|
||||
}
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_DebugPushPromise) {
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
HandleScope scope(isolate);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0);
|
||||
isolate->PushPromise(promise);
|
||||
@ -1884,7 +1884,7 @@ RUNTIME_FUNCTION(Runtime_DebugPushPromise) {
|
||||
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_DebugPopPromise) {
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
SealHandleScope shs(isolate);
|
||||
isolate->PopPromise();
|
||||
return isolate->heap()->undefined_value();
|
||||
@ -1892,12 +1892,12 @@ RUNTIME_FUNCTION(Runtime_DebugPopPromise) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_DebugNextMicrotaskId) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
return Smi::FromInt(isolate->GetNextDebugMicrotaskId());
|
||||
}
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_DebugAsyncTaskEvent) {
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
HandleScope scope(isolate);
|
||||
CONVERT_SMI_ARG_CHECKED(type, 0);
|
||||
CONVERT_SMI_ARG_CHECKED(id, 1);
|
||||
|
@ -15,7 +15,7 @@ namespace internal {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ErrorToString) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, recv, 0);
|
||||
RETURN_RESULT_OR_FAILURE(isolate, ErrorUtils::ToString(isolate, recv));
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ namespace internal {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_FunctionGetName) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0);
|
||||
if (function->IsJSBoundFunction()) {
|
||||
@ -32,7 +32,7 @@ RUNTIME_FUNCTION(Runtime_FunctionGetName) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_FunctionSetName) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, f, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, name, 1);
|
||||
@ -45,7 +45,7 @@ RUNTIME_FUNCTION(Runtime_FunctionSetName) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_FunctionRemovePrototype) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
|
||||
CONVERT_ARG_CHECKED(JSFunction, f, 0);
|
||||
CHECK(f->RemovePrototype());
|
||||
@ -99,7 +99,7 @@ RUNTIME_FUNCTION(Runtime_FunctionGetSourceCode) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_FunctionGetScriptSourcePosition) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
|
||||
CONVERT_ARG_CHECKED(JSFunction, fun, 0);
|
||||
int pos = fun->shared()->start_position();
|
||||
@ -108,7 +108,7 @@ RUNTIME_FUNCTION(Runtime_FunctionGetScriptSourcePosition) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_FunctionGetContextData) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
|
||||
CONVERT_ARG_CHECKED(JSFunction, fun, 0);
|
||||
FixedArray* array = fun->native_context()->embedder_data();
|
||||
@ -117,7 +117,7 @@ RUNTIME_FUNCTION(Runtime_FunctionGetContextData) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_FunctionSetInstanceClassName) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
|
||||
CONVERT_ARG_CHECKED(JSFunction, fun, 0);
|
||||
CONVERT_ARG_CHECKED(String, name, 1);
|
||||
@ -128,7 +128,7 @@ RUNTIME_FUNCTION(Runtime_FunctionSetInstanceClassName) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_FunctionSetLength) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
|
||||
CONVERT_ARG_CHECKED(JSFunction, fun, 0);
|
||||
CONVERT_SMI_ARG_CHECKED(length, 1);
|
||||
@ -140,7 +140,7 @@ RUNTIME_FUNCTION(Runtime_FunctionSetLength) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_FunctionSetPrototype) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, value, 1);
|
||||
@ -153,7 +153,7 @@ RUNTIME_FUNCTION(Runtime_FunctionSetPrototype) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_FunctionIsAPIFunction) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
|
||||
CONVERT_ARG_CHECKED(JSFunction, f, 0);
|
||||
return isolate->heap()->ToBoolean(f->shared()->IsApiFunction());
|
||||
@ -162,7 +162,7 @@ RUNTIME_FUNCTION(Runtime_FunctionIsAPIFunction) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_SetCode) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, target, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, source, 1);
|
||||
@ -288,7 +288,7 @@ RUNTIME_FUNCTION(Runtime_Call) {
|
||||
// ES6 section 9.2.1.2, OrdinaryCallBindThis for sloppy callee.
|
||||
RUNTIME_FUNCTION(Runtime_ConvertReceiver) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0);
|
||||
return *Object::ConvertReceiver(isolate, receiver).ToHandleChecked();
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ namespace internal {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_AtomicsWait) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 4);
|
||||
DCHECK_EQ(4, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, sta, 0);
|
||||
CONVERT_SIZE_ARG_CHECKED(index, 1);
|
||||
CONVERT_INT32_ARG_CHECKED(value, 2);
|
||||
@ -37,7 +37,7 @@ RUNTIME_FUNCTION(Runtime_AtomicsWait) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_AtomicsWake) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, sta, 0);
|
||||
CONVERT_SIZE_ARG_CHECKED(index, 1);
|
||||
CONVERT_INT32_ARG_CHECKED(count, 2);
|
||||
@ -53,7 +53,7 @@ RUNTIME_FUNCTION(Runtime_AtomicsWake) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_AtomicsNumWaitersForTesting) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, sta, 0);
|
||||
CONVERT_SIZE_ARG_CHECKED(index, 1);
|
||||
CHECK(sta->GetBuffer()->is_shared());
|
||||
|
@ -14,7 +14,7 @@ namespace internal {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_CreateJSGeneratorObject) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 1);
|
||||
CHECK(IsResumableFunction(function->shared()->kind()));
|
||||
@ -37,7 +37,7 @@ RUNTIME_FUNCTION(Runtime_CreateJSGeneratorObject) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GeneratorClose) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0);
|
||||
|
||||
generator->set_continuation(JSGeneratorObject::kGeneratorClosed);
|
||||
@ -47,7 +47,7 @@ RUNTIME_FUNCTION(Runtime_GeneratorClose) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GeneratorGetFunction) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0);
|
||||
|
||||
return generator->function();
|
||||
@ -55,7 +55,7 @@ RUNTIME_FUNCTION(Runtime_GeneratorGetFunction) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GeneratorGetReceiver) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0);
|
||||
|
||||
return generator->receiver();
|
||||
@ -63,7 +63,7 @@ RUNTIME_FUNCTION(Runtime_GeneratorGetReceiver) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GeneratorGetInputOrDebugPos) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0);
|
||||
|
||||
return generator->input_or_debug_pos();
|
||||
@ -71,7 +71,7 @@ RUNTIME_FUNCTION(Runtime_GeneratorGetInputOrDebugPos) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GeneratorGetResumeMode) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0);
|
||||
|
||||
return Smi::FromInt(generator->resume_mode());
|
||||
@ -79,7 +79,7 @@ RUNTIME_FUNCTION(Runtime_GeneratorGetResumeMode) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GeneratorGetContinuation) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0);
|
||||
|
||||
return Smi::FromInt(generator->continuation());
|
||||
@ -87,7 +87,7 @@ RUNTIME_FUNCTION(Runtime_GeneratorGetContinuation) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GeneratorGetSourcePosition) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0);
|
||||
|
||||
if (!generator->is_suspended()) return isolate->heap()->undefined_value();
|
||||
|
@ -72,7 +72,7 @@ RUNTIME_FUNCTION(Runtime_CanonicalizeLanguageTag) {
|
||||
HandleScope scope(isolate);
|
||||
Factory* factory = isolate->factory();
|
||||
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, locale_id_str, 0);
|
||||
|
||||
v8::String::Utf8Value locale_id(v8::Utils::ToLocal(locale_id_str));
|
||||
@ -109,7 +109,7 @@ RUNTIME_FUNCTION(Runtime_AvailableLocalesOf) {
|
||||
HandleScope scope(isolate);
|
||||
Factory* factory = isolate->factory();
|
||||
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, service, 0);
|
||||
|
||||
const icu::Locale* available_locales = NULL;
|
||||
@ -154,7 +154,7 @@ RUNTIME_FUNCTION(Runtime_GetDefaultICULocale) {
|
||||
HandleScope scope(isolate);
|
||||
Factory* factory = isolate->factory();
|
||||
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
|
||||
icu::Locale default_locale;
|
||||
|
||||
@ -175,7 +175,7 @@ RUNTIME_FUNCTION(Runtime_GetLanguageTagVariants) {
|
||||
HandleScope scope(isolate);
|
||||
Factory* factory = isolate->factory();
|
||||
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSArray, input, 0);
|
||||
|
||||
@ -259,7 +259,7 @@ RUNTIME_FUNCTION(Runtime_GetLanguageTagVariants) {
|
||||
RUNTIME_FUNCTION(Runtime_IsInitializedIntlObject) {
|
||||
HandleScope scope(isolate);
|
||||
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, input, 0);
|
||||
|
||||
@ -275,7 +275,7 @@ RUNTIME_FUNCTION(Runtime_IsInitializedIntlObject) {
|
||||
RUNTIME_FUNCTION(Runtime_IsInitializedIntlObjectOfType) {
|
||||
HandleScope scope(isolate);
|
||||
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, input, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, expected_type, 1);
|
||||
@ -293,7 +293,7 @@ RUNTIME_FUNCTION(Runtime_IsInitializedIntlObjectOfType) {
|
||||
RUNTIME_FUNCTION(Runtime_MarkAsInitializedIntlObjectOfType) {
|
||||
HandleScope scope(isolate);
|
||||
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, input, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, type, 1);
|
||||
@ -312,7 +312,7 @@ RUNTIME_FUNCTION(Runtime_MarkAsInitializedIntlObjectOfType) {
|
||||
RUNTIME_FUNCTION(Runtime_GetImplFromInitializedIntlObject) {
|
||||
HandleScope scope(isolate);
|
||||
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, input, 0);
|
||||
|
||||
@ -337,7 +337,7 @@ RUNTIME_FUNCTION(Runtime_GetImplFromInitializedIntlObject) {
|
||||
RUNTIME_FUNCTION(Runtime_CreateDateTimeFormat) {
|
||||
HandleScope scope(isolate);
|
||||
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, locale, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, options, 1);
|
||||
@ -376,7 +376,7 @@ RUNTIME_FUNCTION(Runtime_CreateDateTimeFormat) {
|
||||
RUNTIME_FUNCTION(Runtime_InternalDateFormat) {
|
||||
HandleScope scope(isolate);
|
||||
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, date_format_holder, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSDate, date, 1);
|
||||
@ -477,7 +477,7 @@ RUNTIME_FUNCTION(Runtime_InternalDateFormatToParts) {
|
||||
HandleScope scope(isolate);
|
||||
Factory* factory = isolate->factory();
|
||||
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, date_format_holder, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSDate, date, 1);
|
||||
@ -533,7 +533,7 @@ RUNTIME_FUNCTION(Runtime_InternalDateFormatToParts) {
|
||||
RUNTIME_FUNCTION(Runtime_CreateNumberFormat) {
|
||||
HandleScope scope(isolate);
|
||||
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, locale, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, options, 1);
|
||||
@ -572,7 +572,7 @@ RUNTIME_FUNCTION(Runtime_CreateNumberFormat) {
|
||||
RUNTIME_FUNCTION(Runtime_InternalNumberFormat) {
|
||||
HandleScope scope(isolate);
|
||||
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, number_format_holder, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, number, 1);
|
||||
@ -597,7 +597,7 @@ RUNTIME_FUNCTION(Runtime_InternalNumberFormat) {
|
||||
RUNTIME_FUNCTION(Runtime_CreateCollator) {
|
||||
HandleScope scope(isolate);
|
||||
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, locale, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, options, 1);
|
||||
@ -634,7 +634,7 @@ RUNTIME_FUNCTION(Runtime_CreateCollator) {
|
||||
RUNTIME_FUNCTION(Runtime_InternalCompare) {
|
||||
HandleScope scope(isolate);
|
||||
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, collator_holder, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, string1, 1);
|
||||
@ -679,7 +679,7 @@ RUNTIME_FUNCTION(Runtime_StringNormalize) {
|
||||
{"nfkc", UNORM2_DECOMPOSE},
|
||||
};
|
||||
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, s, 0);
|
||||
CONVERT_NUMBER_CHECKED(int, form_id, Int32, args[1]);
|
||||
@ -728,7 +728,7 @@ RUNTIME_FUNCTION(Runtime_StringNormalize) {
|
||||
RUNTIME_FUNCTION(Runtime_CreateBreakIterator) {
|
||||
HandleScope scope(isolate);
|
||||
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, locale, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, options, 1);
|
||||
@ -771,7 +771,7 @@ RUNTIME_FUNCTION(Runtime_CreateBreakIterator) {
|
||||
RUNTIME_FUNCTION(Runtime_BreakIteratorAdoptText) {
|
||||
HandleScope scope(isolate);
|
||||
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, break_iterator_holder, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, text, 1);
|
||||
@ -802,7 +802,7 @@ RUNTIME_FUNCTION(Runtime_BreakIteratorAdoptText) {
|
||||
RUNTIME_FUNCTION(Runtime_BreakIteratorFirst) {
|
||||
HandleScope scope(isolate);
|
||||
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, break_iterator_holder, 0);
|
||||
|
||||
@ -817,7 +817,7 @@ RUNTIME_FUNCTION(Runtime_BreakIteratorFirst) {
|
||||
RUNTIME_FUNCTION(Runtime_BreakIteratorNext) {
|
||||
HandleScope scope(isolate);
|
||||
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, break_iterator_holder, 0);
|
||||
|
||||
@ -832,7 +832,7 @@ RUNTIME_FUNCTION(Runtime_BreakIteratorNext) {
|
||||
RUNTIME_FUNCTION(Runtime_BreakIteratorCurrent) {
|
||||
HandleScope scope(isolate);
|
||||
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, break_iterator_holder, 0);
|
||||
|
||||
@ -847,7 +847,7 @@ RUNTIME_FUNCTION(Runtime_BreakIteratorCurrent) {
|
||||
RUNTIME_FUNCTION(Runtime_BreakIteratorBreakType) {
|
||||
HandleScope scope(isolate);
|
||||
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, break_iterator_holder, 0);
|
||||
|
||||
|
@ -23,7 +23,7 @@ namespace internal {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_CheckIsBootstrapping) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
CHECK(isolate->bootstrapper()->IsActive());
|
||||
return isolate->heap()->undefined_value();
|
||||
}
|
||||
@ -31,7 +31,7 @@ RUNTIME_FUNCTION(Runtime_CheckIsBootstrapping) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ExportFromRuntime) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, container, 0);
|
||||
CHECK(isolate->bootstrapper()->IsActive());
|
||||
JSObject::NormalizeProperties(container, KEEP_INOBJECT_PROPERTIES, 10,
|
||||
@ -44,7 +44,7 @@ RUNTIME_FUNCTION(Runtime_ExportFromRuntime) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ExportExperimentalFromRuntime) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, container, 0);
|
||||
CHECK(isolate->bootstrapper()->IsActive());
|
||||
JSObject::NormalizeProperties(container, KEEP_INOBJECT_PROPERTIES, 10,
|
||||
@ -57,7 +57,7 @@ RUNTIME_FUNCTION(Runtime_ExportExperimentalFromRuntime) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_InstallToContext) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSArray, array, 0);
|
||||
CHECK(array->HasFastElements());
|
||||
CHECK(isolate->bootstrapper()->IsActive());
|
||||
@ -82,14 +82,14 @@ RUNTIME_FUNCTION(Runtime_InstallToContext) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_Throw) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
return isolate->Throw(args[0]);
|
||||
}
|
||||
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ReThrow) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
return isolate->ReThrow(args[0]);
|
||||
}
|
||||
|
||||
@ -119,21 +119,21 @@ RUNTIME_FUNCTION(Runtime_ThrowTypeError) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_UnwindAndFindExceptionHandler) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
return isolate->UnwindAndFindHandler();
|
||||
}
|
||||
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_PromoteScheduledException) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
return isolate->PromoteScheduledException();
|
||||
}
|
||||
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ThrowReferenceError) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, name, 0);
|
||||
THROW_NEW_ERROR_RETURN_FAILURE(
|
||||
isolate, NewReferenceError(MessageTemplate::kNotDefined, name));
|
||||
@ -142,7 +142,7 @@ RUNTIME_FUNCTION(Runtime_ThrowReferenceError) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_NewTypeError) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_INT32_ARG_CHECKED(template_index, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, arg0, 1);
|
||||
auto message_template =
|
||||
@ -153,7 +153,7 @@ RUNTIME_FUNCTION(Runtime_NewTypeError) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_NewReferenceError) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_INT32_ARG_CHECKED(template_index, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, arg0, 1);
|
||||
auto message_template =
|
||||
@ -164,7 +164,7 @@ RUNTIME_FUNCTION(Runtime_NewReferenceError) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_NewSyntaxError) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_INT32_ARG_CHECKED(template_index, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, arg0, 1);
|
||||
auto message_template =
|
||||
@ -180,7 +180,7 @@ RUNTIME_FUNCTION(Runtime_ThrowCannotConvertToPrimitive) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ThrowIllegalInvocation) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
THROW_NEW_ERROR_RETURN_FAILURE(
|
||||
isolate, NewTypeError(MessageTemplate::kIllegalInvocation));
|
||||
}
|
||||
@ -210,7 +210,7 @@ RUNTIME_FUNCTION(Runtime_ThrowInvalidStringLength) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ThrowIteratorResultNotAnObject) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, value, 0);
|
||||
THROW_NEW_ERROR_RETURN_FAILURE(
|
||||
isolate,
|
||||
@ -219,7 +219,7 @@ RUNTIME_FUNCTION(Runtime_ThrowIteratorResultNotAnObject) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ThrowSymbolIteratorInvalid) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
THROW_NEW_ERROR_RETURN_FAILURE(
|
||||
isolate, NewTypeError(MessageTemplate::kSymbolIteratorInvalid));
|
||||
}
|
||||
@ -251,7 +251,7 @@ RUNTIME_FUNCTION(Runtime_ThrowApplyNonFunction) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_StackGuard) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
|
||||
// First check if this is a real stack overflow.
|
||||
StackLimitCheck check(isolate);
|
||||
@ -265,14 +265,14 @@ RUNTIME_FUNCTION(Runtime_StackGuard) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_Interrupt) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
return isolate->stack_guard()->HandleInterrupts();
|
||||
}
|
||||
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_AllocateInNewSpace) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_SMI_ARG_CHECKED(size, 0);
|
||||
CHECK(IsAligned(size, kPointerSize));
|
||||
CHECK(size > 0);
|
||||
@ -283,7 +283,7 @@ RUNTIME_FUNCTION(Runtime_AllocateInNewSpace) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_AllocateInTargetSpace) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_SMI_ARG_CHECKED(size, 0);
|
||||
CONVERT_SMI_ARG_CHECKED(flags, 1);
|
||||
CHECK(IsAligned(size, kPointerSize));
|
||||
|
@ -21,7 +21,7 @@ namespace internal {
|
||||
RUNTIME_FUNCTION(Runtime_LiveEditFindSharedFunctionInfosForScript) {
|
||||
HandleScope scope(isolate);
|
||||
CHECK(isolate->debug()->live_edit_enabled());
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_CHECKED(JSValue, script_value, 0);
|
||||
|
||||
CHECK(script_value->value()->IsScript());
|
||||
@ -63,7 +63,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditFindSharedFunctionInfosForScript) {
|
||||
RUNTIME_FUNCTION(Runtime_LiveEditGatherCompileInfo) {
|
||||
HandleScope scope(isolate);
|
||||
CHECK(isolate->debug()->live_edit_enabled());
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_CHECKED(JSValue, script, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, source, 1);
|
||||
|
||||
@ -81,7 +81,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditGatherCompileInfo) {
|
||||
RUNTIME_FUNCTION(Runtime_LiveEditReplaceScript) {
|
||||
HandleScope scope(isolate);
|
||||
CHECK(isolate->debug()->live_edit_enabled());
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_CHECKED(JSValue, original_script_value, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, new_source, 1);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, old_script_name, 2);
|
||||
@ -133,7 +133,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditFunctionSourceUpdated) {
|
||||
RUNTIME_FUNCTION(Runtime_LiveEditReplaceFunctionCode) {
|
||||
HandleScope scope(isolate);
|
||||
CHECK(isolate->debug()->live_edit_enabled());
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSArray, new_compile_info, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSArray, shared_info, 1);
|
||||
CHECK(SharedInfoWrapper::IsInstance(shared_info));
|
||||
@ -147,7 +147,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditReplaceFunctionCode) {
|
||||
RUNTIME_FUNCTION(Runtime_LiveEditFunctionSetScript) {
|
||||
HandleScope scope(isolate);
|
||||
CHECK(isolate->debug()->live_edit_enabled());
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, function_object, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, script_object, 1);
|
||||
|
||||
@ -174,7 +174,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditFunctionSetScript) {
|
||||
RUNTIME_FUNCTION(Runtime_LiveEditReplaceRefToNestedFunction) {
|
||||
HandleScope scope(isolate);
|
||||
CHECK(isolate->debug()->live_edit_enabled());
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSValue, parent_wrapper, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSValue, orig_wrapper, 1);
|
||||
@ -197,7 +197,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditReplaceRefToNestedFunction) {
|
||||
RUNTIME_FUNCTION(Runtime_LiveEditPatchFunctionPositions) {
|
||||
HandleScope scope(isolate);
|
||||
CHECK(isolate->debug()->live_edit_enabled());
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSArray, shared_array, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSArray, position_change_array, 1);
|
||||
CHECK(SharedInfoWrapper::IsInstance(shared_array));
|
||||
@ -214,7 +214,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditPatchFunctionPositions) {
|
||||
RUNTIME_FUNCTION(Runtime_LiveEditCheckAndDropActivations) {
|
||||
HandleScope scope(isolate);
|
||||
CHECK(isolate->debug()->live_edit_enabled());
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSArray, old_shared_array, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSArray, new_shared_array, 1);
|
||||
CONVERT_BOOLEAN_ARG_CHECKED(do_drop, 2);
|
||||
@ -252,7 +252,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditCheckAndDropActivations) {
|
||||
RUNTIME_FUNCTION(Runtime_LiveEditCompareStrings) {
|
||||
HandleScope scope(isolate);
|
||||
CHECK(isolate->debug()->live_edit_enabled());
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, s1, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, s2, 1);
|
||||
|
||||
@ -272,7 +272,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditCompareStrings) {
|
||||
RUNTIME_FUNCTION(Runtime_LiveEditRestartFrame) {
|
||||
HandleScope scope(isolate);
|
||||
CHECK(isolate->debug()->live_edit_enabled());
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
|
||||
CHECK(isolate->debug()->CheckExecutionState(break_id));
|
||||
|
||||
|
@ -15,7 +15,7 @@ namespace internal {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GenerateRandomNumbers) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
|
||||
Handle<Context> native_context = isolate->native_context();
|
||||
DCHECK_EQ(0, native_context->math_random_index()->value());
|
||||
|
@ -11,7 +11,7 @@ namespace internal {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GetModuleNamespace) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_SMI_ARG_CHECKED(module_request, 0);
|
||||
Handle<Module> module(isolate->context()->module());
|
||||
return *Module::GetModuleNamespace(module, module_request);
|
||||
@ -19,7 +19,7 @@ RUNTIME_FUNCTION(Runtime_GetModuleNamespace) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_LoadModuleVariable) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_SMI_ARG_CHECKED(index, 0);
|
||||
Handle<Module> module(isolate->context()->module());
|
||||
return *Module::LoadVariable(module, index);
|
||||
@ -27,7 +27,7 @@ RUNTIME_FUNCTION(Runtime_LoadModuleVariable) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_StoreModuleVariable) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_SMI_ARG_CHECKED(index, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, value, 1);
|
||||
Handle<Module> module(isolate->context()->module());
|
||||
|
@ -15,7 +15,7 @@ namespace internal {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_IsValidSmi) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
|
||||
CONVERT_NUMBER_CHECKED(int32_t, number, Int32, args[0]);
|
||||
return isolate->heap()->ToBoolean(Smi::IsValid(number));
|
||||
@ -73,7 +73,7 @@ RUNTIME_FUNCTION(Runtime_StringParseInt) {
|
||||
// ES6 18.2.4 parseFloat(string)
|
||||
RUNTIME_FUNCTION(Runtime_StringParseFloat) {
|
||||
HandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, subject, 0);
|
||||
|
||||
double value =
|
||||
@ -86,7 +86,7 @@ RUNTIME_FUNCTION(Runtime_StringParseFloat) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_NumberToString) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_NUMBER_ARG_HANDLE_CHECKED(number, 0);
|
||||
|
||||
return *isolate->factory()->NumberToString(number);
|
||||
@ -95,7 +95,7 @@ RUNTIME_FUNCTION(Runtime_NumberToString) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_NumberToStringSkipCache) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_NUMBER_ARG_HANDLE_CHECKED(number, 0);
|
||||
|
||||
return *isolate->factory()->NumberToString(number, false);
|
||||
@ -106,7 +106,7 @@ RUNTIME_FUNCTION(Runtime_NumberToStringSkipCache) {
|
||||
// a small integer.
|
||||
RUNTIME_FUNCTION(Runtime_NumberToSmi) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_CHECKED(Object, obj, 0);
|
||||
if (obj->IsSmi()) {
|
||||
return obj;
|
||||
@ -126,7 +126,7 @@ RUNTIME_FUNCTION(Runtime_NumberToSmi) {
|
||||
// compared lexicographically.
|
||||
RUNTIME_FUNCTION(Runtime_SmiLexicographicCompare) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_SMI_ARG_CHECKED(x_value, 0);
|
||||
CONVERT_SMI_ARG_CHECKED(y_value, 1);
|
||||
|
||||
@ -200,14 +200,14 @@ RUNTIME_FUNCTION(Runtime_SmiLexicographicCompare) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_MaxSmi) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
return Smi::FromInt(Smi::kMaxValue);
|
||||
}
|
||||
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_IsSmi) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_CHECKED(Object, obj, 0);
|
||||
return isolate->heap()->ToBoolean(obj->IsSmi());
|
||||
}
|
||||
@ -215,21 +215,21 @@ RUNTIME_FUNCTION(Runtime_IsSmi) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GetRootNaN) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
return isolate->heap()->nan_value();
|
||||
}
|
||||
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GetHoleNaNUpper) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
return *isolate->factory()->NewNumberFromUint(kHoleNanUpper32);
|
||||
}
|
||||
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GetHoleNaNLower) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
return *isolate->factory()->NewNumberFromUint(kHoleNanLower32);
|
||||
}
|
||||
|
||||
|
@ -297,7 +297,7 @@ MaybeHandle<Object> Runtime::SetObjectProperty(Isolate* isolate,
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GetPrototype) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSReceiver, obj, 0);
|
||||
RETURN_RESULT_OR_FAILURE(isolate, JSReceiver::GetPrototype(isolate, obj));
|
||||
}
|
||||
@ -305,7 +305,7 @@ RUNTIME_FUNCTION(Runtime_GetPrototype) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_InternalSetPrototype) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSReceiver, obj, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, prototype, 1);
|
||||
MAYBE_RETURN(
|
||||
@ -316,7 +316,7 @@ RUNTIME_FUNCTION(Runtime_InternalSetPrototype) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_OptimizeObjectForAddingMultipleProperties) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
|
||||
CONVERT_SMI_ARG_CHECKED(properties, 1);
|
||||
// Conservative upper limit to prevent fuzz tests from going OOM.
|
||||
@ -331,7 +331,7 @@ RUNTIME_FUNCTION(Runtime_OptimizeObjectForAddingMultipleProperties) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GetProperty) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, key, 1);
|
||||
@ -343,7 +343,7 @@ RUNTIME_FUNCTION(Runtime_GetProperty) {
|
||||
// KeyedGetProperty is called from KeyedLoadIC::GenerateGeneric.
|
||||
RUNTIME_FUNCTION(Runtime_KeyedGetProperty) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, receiver_obj, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, key_obj, 1);
|
||||
@ -503,7 +503,7 @@ RUNTIME_FUNCTION(Runtime_HasProperty) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GetOwnPropertyKeys) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSReceiver, object, 0);
|
||||
CONVERT_SMI_ARG_CHECKED(filter_value, 1);
|
||||
PropertyFilter filter = static_cast<PropertyFilter>(filter_value);
|
||||
@ -522,7 +522,7 @@ RUNTIME_FUNCTION(Runtime_GetOwnPropertyKeys) {
|
||||
// args[0]: object
|
||||
RUNTIME_FUNCTION(Runtime_GetInterceptorInfo) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
if (!args[0]->IsJSObject()) {
|
||||
return Smi::kZero;
|
||||
}
|
||||
@ -538,7 +538,7 @@ RUNTIME_FUNCTION(Runtime_GetInterceptorInfo) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ToFastProperties) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
|
||||
if (object->IsJSObject() && !object->IsJSGlobalObject()) {
|
||||
JSObject::MigrateSlowToFast(Handle<JSObject>::cast(object), 0,
|
||||
@ -550,7 +550,7 @@ RUNTIME_FUNCTION(Runtime_ToFastProperties) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_AllocateHeapNumber) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
return *isolate->factory()->NewHeapNumber(0);
|
||||
}
|
||||
|
||||
@ -566,7 +566,7 @@ RUNTIME_FUNCTION(Runtime_NewObject) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_FinalizeInstanceSize) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(Map, initial_map, 0);
|
||||
initial_map->CompleteInobjectSlackTracking();
|
||||
@ -577,7 +577,7 @@ RUNTIME_FUNCTION(Runtime_FinalizeInstanceSize) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_LoadMutableDouble) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Smi, index, 1);
|
||||
CHECK((index->value() & 1) == 1);
|
||||
@ -596,7 +596,7 @@ RUNTIME_FUNCTION(Runtime_LoadMutableDouble) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_TryMigrateInstance) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
|
||||
if (!object->IsJSObject()) return Smi::kZero;
|
||||
Handle<JSObject> js_object = Handle<JSObject>::cast(object);
|
||||
@ -612,7 +612,7 @@ RUNTIME_FUNCTION(Runtime_TryMigrateInstance) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_IsJSGlobalProxy) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_CHECKED(Object, obj, 0);
|
||||
return isolate->heap()->ToBoolean(obj->IsJSGlobalProxy());
|
||||
}
|
||||
@ -630,7 +630,7 @@ static bool IsValidAccessor(Isolate* isolate, Handle<Object> obj) {
|
||||
// descriptor.
|
||||
RUNTIME_FUNCTION(Runtime_DefineAccessorPropertyUnchecked) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 5);
|
||||
DCHECK_EQ(5, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
|
||||
CHECK(!obj->IsNull(isolate));
|
||||
CONVERT_ARG_HANDLE_CHECKED(Name, name, 1);
|
||||
@ -696,7 +696,7 @@ RUNTIME_FUNCTION(Runtime_DefineDataPropertyInLiteral) {
|
||||
// Return property without being observable by accessors or interceptors.
|
||||
RUNTIME_FUNCTION(Runtime_GetDataProperty) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSReceiver, object, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Name, name, 1);
|
||||
return *JSReceiver::GetDataProperty(object, name);
|
||||
@ -704,7 +704,7 @@ RUNTIME_FUNCTION(Runtime_GetDataProperty) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GetConstructorName) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
|
||||
|
||||
CHECK(!object->IsUndefined(isolate) && !object->IsNull(isolate));
|
||||
@ -714,7 +714,7 @@ RUNTIME_FUNCTION(Runtime_GetConstructorName) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_HasFastPackedElements) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_CHECKED(HeapObject, obj, 0);
|
||||
return isolate->heap()->ToBoolean(
|
||||
IsFastPackedElementsKind(obj->map()->elements_kind()));
|
||||
@ -723,7 +723,7 @@ RUNTIME_FUNCTION(Runtime_HasFastPackedElements) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ValueOf) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_CHECKED(Object, obj, 0);
|
||||
if (!obj->IsJSValue()) return obj;
|
||||
return JSValue::cast(obj)->value();
|
||||
@ -732,7 +732,7 @@ RUNTIME_FUNCTION(Runtime_ValueOf) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_IsJSReceiver) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_CHECKED(Object, obj, 0);
|
||||
return isolate->heap()->ToBoolean(obj->IsJSReceiver());
|
||||
}
|
||||
@ -740,7 +740,7 @@ RUNTIME_FUNCTION(Runtime_IsJSReceiver) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ClassOf) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_CHECKED(Object, obj, 0);
|
||||
if (!obj->IsJSReceiver()) return isolate->heap()->null_value();
|
||||
return JSReceiver::cast(obj)->class_name();
|
||||
@ -749,7 +749,7 @@ RUNTIME_FUNCTION(Runtime_ClassOf) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_DefineGetterPropertyUnchecked) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 4);
|
||||
DCHECK_EQ(4, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Name, name, 1);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, getter, 2);
|
||||
@ -769,7 +769,7 @@ RUNTIME_FUNCTION(Runtime_DefineGetterPropertyUnchecked) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_DefineSetterPropertyUnchecked) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 4);
|
||||
DCHECK_EQ(4, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Name, name, 1);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, setter, 2);
|
||||
@ -937,7 +937,7 @@ RUNTIME_FUNCTION(Runtime_IsAccessCheckNeeded) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_CreateDataProperty) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSReceiver, o, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, key, 1);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, value, 2);
|
||||
|
@ -32,7 +32,7 @@ void PromiseRejectEvent(Isolate* isolate, Handle<JSPromise> promise,
|
||||
} // namespace
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_PromiseRejectEventFromStack) {
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
HandleScope scope(isolate);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSPromise, promise, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, value, 1);
|
||||
@ -49,7 +49,7 @@ RUNTIME_FUNCTION(Runtime_PromiseRejectEventFromStack) {
|
||||
}
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_PromiseRevokeReject) {
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
HandleScope scope(isolate);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSPromise, promise, 0);
|
||||
// At this point, no revocation has been issued before
|
||||
@ -172,7 +172,7 @@ void PromiseFulfill(Isolate* isolate, Handle<JSPromise> promise, int status,
|
||||
} // namespace
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_PromiseReject) {
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
HandleScope scope(isolate);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSPromise, promise, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, reason, 1);
|
||||
@ -186,7 +186,7 @@ RUNTIME_FUNCTION(Runtime_PromiseReject) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_EnqueuePromiseReactionJob) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(PromiseReactionJobInfo, info, 0);
|
||||
CONVERT_SMI_ARG_CHECKED(status, 1);
|
||||
EnqueuePromiseReactionJob(isolate, info, status);
|
||||
@ -195,7 +195,7 @@ RUNTIME_FUNCTION(Runtime_EnqueuePromiseReactionJob) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_EnqueuePromiseResolveThenableJob) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSReceiver, resolution, 1);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSReceiver, then, 2);
|
||||
@ -226,7 +226,7 @@ RUNTIME_FUNCTION(Runtime_EnqueuePromiseResolveThenableJob) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_EnqueueMicrotask) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, microtask, 0);
|
||||
isolate->EnqueueMicrotask(microtask);
|
||||
return isolate->heap()->undefined_value();
|
||||
@ -234,7 +234,7 @@ RUNTIME_FUNCTION(Runtime_EnqueueMicrotask) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_RunMicrotasks) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
isolate->RunMicrotasks();
|
||||
return isolate->heap()->undefined_value();
|
||||
}
|
||||
@ -242,7 +242,7 @@ RUNTIME_FUNCTION(Runtime_RunMicrotasks) {
|
||||
RUNTIME_FUNCTION(Runtime_CreateResolvingFunctions) {
|
||||
HandleScope scope(isolate);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
Handle<JSFunction> resolve, reject;
|
||||
|
||||
PromiseUtils::CreateResolvingFunctions(
|
||||
@ -257,7 +257,7 @@ RUNTIME_FUNCTION(Runtime_CreateResolvingFunctions) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_PromiseStatus) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSPromise, promise, 0);
|
||||
|
||||
return Smi::FromInt(promise->status());
|
||||
@ -265,14 +265,14 @@ RUNTIME_FUNCTION(Runtime_PromiseStatus) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_PromiseResult) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSPromise, promise, 0);
|
||||
return promise->result();
|
||||
}
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_PromiseMarkAsHandled) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_CHECKED(JSPromise, promise, 0);
|
||||
|
||||
promise->set_has_handler(true);
|
||||
@ -281,7 +281,7 @@ RUNTIME_FUNCTION(Runtime_PromiseMarkAsHandled) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_PromiseMarkHandledHint) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_CHECKED(JSPromise, promise, 0);
|
||||
|
||||
promise->set_handled_hint(true);
|
||||
|
@ -135,7 +135,7 @@ RUNTIME_FUNCTION(Runtime_JSProxyConstruct) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_IsJSProxy) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_CHECKED(Object, obj, 0);
|
||||
return isolate->heap()->ToBoolean(obj->IsJSProxy());
|
||||
}
|
||||
@ -143,7 +143,7 @@ RUNTIME_FUNCTION(Runtime_IsJSProxy) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_JSProxyGetHandler) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_CHECKED(JSProxy, proxy, 0);
|
||||
return proxy->handler();
|
||||
}
|
||||
@ -151,7 +151,7 @@ RUNTIME_FUNCTION(Runtime_JSProxyGetHandler) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_JSProxyGetTarget) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_CHECKED(JSProxy, proxy, 0);
|
||||
return proxy->target();
|
||||
}
|
||||
@ -159,7 +159,7 @@ RUNTIME_FUNCTION(Runtime_JSProxyGetTarget) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_JSProxyRevoke) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSProxy, proxy, 0);
|
||||
JSProxy::Revoke(proxy);
|
||||
return isolate->heap()->undefined_value();
|
||||
|
@ -685,7 +685,7 @@ Object* StringReplaceGlobalRegExpWithStringHelper(
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_StringReplaceGlobalRegExpWithString) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 4);
|
||||
DCHECK_EQ(4, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, subject, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, replacement, 2);
|
||||
@ -698,7 +698,7 @@ RUNTIME_FUNCTION(Runtime_StringReplaceGlobalRegExpWithString) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_StringSplit) {
|
||||
HandleScope handle_scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, subject, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, pattern, 1);
|
||||
CONVERT_NUMBER_CHECKED(uint32_t, limit, Uint32, args[2]);
|
||||
@ -781,7 +781,7 @@ RUNTIME_FUNCTION(Runtime_StringSplit) {
|
||||
// RegExpCreate ( P, F )
|
||||
RUNTIME_FUNCTION(Runtime_RegExpCreate) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, source_object, 0);
|
||||
|
||||
Handle<String> source;
|
||||
@ -806,7 +806,7 @@ RUNTIME_FUNCTION(Runtime_RegExpCreate) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_RegExpExec) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 4);
|
||||
DCHECK_EQ(4, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSRegExp, regexp, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, subject, 1);
|
||||
CONVERT_INT32_ARG_CHECKED(index, 2);
|
||||
@ -822,7 +822,7 @@ RUNTIME_FUNCTION(Runtime_RegExpExec) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_RegExpInternalReplace) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSRegExp, regexp, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, subject, 1);
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, replacement, 2);
|
||||
@ -1237,7 +1237,7 @@ MUST_USE_RESULT MaybeHandle<String> RegExpReplace(Isolate* isolate,
|
||||
// This is only called for StringReplaceGlobalRegExpWithFunction.
|
||||
RUNTIME_FUNCTION(Runtime_RegExpExecMultiple) {
|
||||
HandleScope handles(isolate);
|
||||
DCHECK(args.length() == 4);
|
||||
DCHECK_EQ(4, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSRegExp, regexp, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, subject, 1);
|
||||
@ -1259,7 +1259,7 @@ RUNTIME_FUNCTION(Runtime_RegExpExecMultiple) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_StringReplaceNonGlobalRegExpWithFunction) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, subject, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSRegExp, regexp, 1);
|
||||
@ -1336,7 +1336,7 @@ Handle<JSArray> NewJSArrayWithElements(Isolate* isolate,
|
||||
// RegExp.prototype [ @@split ] ( string, limit )
|
||||
RUNTIME_FUNCTION(Runtime_RegExpSplit) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
|
||||
DCHECK(args[1]->IsString());
|
||||
|
||||
@ -1490,7 +1490,7 @@ RUNTIME_FUNCTION(Runtime_RegExpSplit) {
|
||||
// RegExp.prototype [ @@replace ] ( string, replaceValue )
|
||||
RUNTIME_FUNCTION(Runtime_RegExpReplace) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSReceiver, recv, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, string, 1);
|
||||
@ -1657,7 +1657,7 @@ RUNTIME_FUNCTION(Runtime_RegExpReplace) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_RegExpExecReThrow) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 4);
|
||||
DCHECK_EQ(4, args.length());
|
||||
Object* exception = isolate->pending_exception();
|
||||
isolate->clear_pending_exception();
|
||||
return isolate->ReThrow(exception);
|
||||
@ -1665,7 +1665,7 @@ RUNTIME_FUNCTION(Runtime_RegExpExecReThrow) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_RegExpInitializeAndCompile) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSRegExp, regexp, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, source, 1);
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, flags, 2);
|
||||
@ -1678,7 +1678,7 @@ RUNTIME_FUNCTION(Runtime_RegExpInitializeAndCompile) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_IsRegExp) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_CHECKED(Object, obj, 0);
|
||||
return isolate->heap()->ToBoolean(obj->IsJSRegExp());
|
||||
}
|
||||
|
@ -520,7 +520,7 @@ class ParameterArguments BASE_EMBEDDED {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_NewSloppyArguments_Generic) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, callee, 0);
|
||||
// This generic runtime function can also be used when the caller has been
|
||||
// inlined, we use the slow but accurate {GetCallerArguments}.
|
||||
@ -585,7 +585,7 @@ RUNTIME_FUNCTION(Runtime_NewRestParameter) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_NewSloppyArguments) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, callee, 0);
|
||||
Object** parameters = reinterpret_cast<Object**>(args[1]);
|
||||
CONVERT_SMI_ARG_CHECKED(argument_count, 2);
|
||||
@ -672,7 +672,7 @@ static Object* FindNameClash(Handle<ScopeInfo> scope_info,
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_NewScriptContext) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(ScopeInfo, scope_info, 1);
|
||||
@ -705,7 +705,7 @@ RUNTIME_FUNCTION(Runtime_NewScriptContext) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_NewFunctionContext) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
|
||||
CONVERT_SMI_ARG_CHECKED(scope_type, 1);
|
||||
|
@ -160,7 +160,7 @@ inline float MaxNumber(float a, float b) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_IsSimdValue) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
return isolate->heap()->ToBoolean(args[0]->IsSimd128Value());
|
||||
}
|
||||
|
||||
@ -194,7 +194,7 @@ RUNTIME_FUNCTION(Runtime_IsSimdValue) {
|
||||
|
||||
#define SIMD_UNARY_OP(type, lane_type, lane_count, op, result) \
|
||||
static const int kLaneCount = lane_count; \
|
||||
DCHECK(args.length() == 1); \
|
||||
DCHECK_EQ(1, args.length()); \
|
||||
CONVERT_SIMD_ARG_HANDLE_THROW(type, a, 0); \
|
||||
lane_type lanes[kLaneCount]; \
|
||||
for (int i = 0; i < kLaneCount; i++) { \
|
||||
@ -204,7 +204,7 @@ RUNTIME_FUNCTION(Runtime_IsSimdValue) {
|
||||
|
||||
#define SIMD_BINARY_OP(type, lane_type, lane_count, op, result) \
|
||||
static const int kLaneCount = lane_count; \
|
||||
DCHECK(args.length() == 2); \
|
||||
DCHECK_EQ(2, args.length()); \
|
||||
CONVERT_SIMD_ARG_HANDLE_THROW(type, a, 0); \
|
||||
CONVERT_SIMD_ARG_HANDLE_THROW(type, b, 1); \
|
||||
lane_type lanes[kLaneCount]; \
|
||||
@ -215,7 +215,7 @@ RUNTIME_FUNCTION(Runtime_IsSimdValue) {
|
||||
|
||||
#define SIMD_RELATIONAL_OP(type, bool_type, lane_count, a, b, op, result) \
|
||||
static const int kLaneCount = lane_count; \
|
||||
DCHECK(args.length() == 2); \
|
||||
DCHECK_EQ(2, args.length()); \
|
||||
CONVERT_SIMD_ARG_HANDLE_THROW(type, a, 0); \
|
||||
CONVERT_SIMD_ARG_HANDLE_THROW(type, b, 1); \
|
||||
bool lanes[kLaneCount]; \
|
||||
@ -264,7 +264,7 @@ RUNTIME_FUNCTION(Runtime_IsSimdValue) {
|
||||
#define SIMD_EXTRACT_FUNCTION(type, lane_type, lane_count, extract, replace) \
|
||||
RUNTIME_FUNCTION(Runtime_##type##ExtractLane) { \
|
||||
HandleScope scope(isolate); \
|
||||
DCHECK(args.length() == 2); \
|
||||
DCHECK_EQ(2, args.length()); \
|
||||
CONVERT_SIMD_ARG_HANDLE_THROW(type, a, 0); \
|
||||
CONVERT_SIMD_LANE_ARG_CHECKED(lane, 1, lane_count); \
|
||||
return *isolate->factory()->extract(a->get_lane(lane)); \
|
||||
@ -274,7 +274,7 @@ RUNTIME_FUNCTION(Runtime_IsSimdValue) {
|
||||
RUNTIME_FUNCTION(Runtime_##type##ReplaceLane) { \
|
||||
static const int kLaneCount = lane_count; \
|
||||
HandleScope scope(isolate); \
|
||||
DCHECK(args.length() == 3); \
|
||||
DCHECK_EQ(3, args.length()); \
|
||||
CONVERT_SIMD_ARG_HANDLE_THROW(type, simd, 0); \
|
||||
CONVERT_SIMD_LANE_ARG_CHECKED(lane, 1, kLaneCount); \
|
||||
lane_type lanes[kLaneCount]; \
|
||||
@ -422,7 +422,7 @@ SIMD_MAXNUM_FUNCTION(Float32x4, float, 4)
|
||||
RUNTIME_FUNCTION(Runtime_##type##ShiftLeftByScalar) { \
|
||||
static const int kLaneCount = lane_count; \
|
||||
HandleScope scope(isolate); \
|
||||
DCHECK(args.length() == 2); \
|
||||
DCHECK_EQ(2, args.length()); \
|
||||
CONVERT_SIMD_ARG_HANDLE_THROW(type, a, 0); \
|
||||
CONVERT_SHIFT_ARG_CHECKED(shift, 1); \
|
||||
lane_type lanes[kLaneCount] = {0}; \
|
||||
@ -438,7 +438,7 @@ SIMD_MAXNUM_FUNCTION(Float32x4, float, 4)
|
||||
RUNTIME_FUNCTION(Runtime_##type##ShiftRightByScalar) { \
|
||||
static const int kLaneCount = lane_count; \
|
||||
HandleScope scope(isolate); \
|
||||
DCHECK(args.length() == 2); \
|
||||
DCHECK_EQ(2, args.length()); \
|
||||
CONVERT_SIMD_ARG_HANDLE_THROW(type, a, 0); \
|
||||
CONVERT_SHIFT_ARG_CHECKED(shift, 1); \
|
||||
lane_type lanes[kLaneCount] = {0}; \
|
||||
@ -455,7 +455,7 @@ SIMD_MAXNUM_FUNCTION(Float32x4, float, 4)
|
||||
RUNTIME_FUNCTION(Runtime_##type##ShiftRightByScalar) { \
|
||||
static const int kLaneCount = lane_count; \
|
||||
HandleScope scope(isolate); \
|
||||
DCHECK(args.length() == 2); \
|
||||
DCHECK_EQ(2, args.length()); \
|
||||
CONVERT_SIMD_ARG_HANDLE_THROW(type, a, 0); \
|
||||
CONVERT_SHIFT_ARG_CHECKED(shift, 1); \
|
||||
shift &= lane_bits - 1; \
|
||||
@ -485,7 +485,7 @@ SIMD_UINT_TYPES(SIMD_LSR_FUNCTION)
|
||||
#define SIMD_ANY_FUNCTION(type, lane_count) \
|
||||
RUNTIME_FUNCTION(Runtime_##type##AnyTrue) { \
|
||||
HandleScope scope(isolate); \
|
||||
DCHECK(args.length() == 1); \
|
||||
DCHECK_EQ(1, args.length()); \
|
||||
CONVERT_SIMD_ARG_HANDLE_THROW(type, a, 0); \
|
||||
bool result = false; \
|
||||
for (int i = 0; i < lane_count; i++) { \
|
||||
@ -500,7 +500,7 @@ SIMD_UINT_TYPES(SIMD_LSR_FUNCTION)
|
||||
#define SIMD_ALL_FUNCTION(type, lane_count) \
|
||||
RUNTIME_FUNCTION(Runtime_##type##AllTrue) { \
|
||||
HandleScope scope(isolate); \
|
||||
DCHECK(args.length() == 1); \
|
||||
DCHECK_EQ(1, args.length()); \
|
||||
CONVERT_SIMD_ARG_HANDLE_THROW(type, a, 0); \
|
||||
bool result = true; \
|
||||
for (int i = 0; i < lane_count; i++) { \
|
||||
@ -742,7 +742,7 @@ SIMD_LOGICAL_TYPES(SIMD_NOT_FUNCTION)
|
||||
RUNTIME_FUNCTION(Runtime_##type##Select) { \
|
||||
static const int kLaneCount = lane_count; \
|
||||
HandleScope scope(isolate); \
|
||||
DCHECK(args.length() == 3); \
|
||||
DCHECK_EQ(3, args.length()); \
|
||||
CONVERT_SIMD_ARG_HANDLE_THROW(bool_type, mask, 0); \
|
||||
CONVERT_SIMD_ARG_HANDLE_THROW(type, a, 1); \
|
||||
CONVERT_SIMD_ARG_HANDLE_THROW(type, b, 2); \
|
||||
@ -795,7 +795,7 @@ SIMD_SIGNED_TYPES(SIMD_NEG_FUNCTION)
|
||||
RUNTIME_FUNCTION(Runtime_##type##From##from_type) { \
|
||||
static const int kLaneCount = lane_count; \
|
||||
HandleScope scope(isolate); \
|
||||
DCHECK(args.length() == 1); \
|
||||
DCHECK_EQ(1, args.length()); \
|
||||
CONVERT_SIMD_ARG_HANDLE_THROW(from_type, a, 0); \
|
||||
lane_type lanes[kLaneCount]; \
|
||||
for (int i = 0; i < kLaneCount; i++) { \
|
||||
@ -860,7 +860,7 @@ SIMD_FROM_TYPES(SIMD_FROM_FUNCTION)
|
||||
RUNTIME_FUNCTION(Runtime_##type##From##from_type##Bits) { \
|
||||
static const int kLaneCount = lane_count; \
|
||||
HandleScope scope(isolate); \
|
||||
DCHECK(args.length() == 1); \
|
||||
DCHECK_EQ(1, args.length()); \
|
||||
CONVERT_SIMD_ARG_HANDLE_THROW(from_type, a, 0); \
|
||||
lane_type lanes[kLaneCount]; \
|
||||
a->CopyBits(lanes); \
|
||||
@ -896,7 +896,7 @@ SIMD_FROM_BITS_TYPES(SIMD_FROM_BITS_FUNCTION)
|
||||
|
||||
#define SIMD_LOAD(type, lane_type, lane_count, count, result) \
|
||||
static const int kLaneCount = lane_count; \
|
||||
DCHECK(args.length() == 2); \
|
||||
DCHECK_EQ(2, args.length()); \
|
||||
CONVERT_SIMD_ARG_HANDLE_THROW(JSTypedArray, tarray, 0); \
|
||||
SIMD_COERCE_INDEX(index, 1); \
|
||||
size_t bpe = tarray->element_size(); \
|
||||
@ -916,7 +916,7 @@ SIMD_FROM_BITS_TYPES(SIMD_FROM_BITS_FUNCTION)
|
||||
|
||||
#define SIMD_STORE(type, lane_type, lane_count, count, a) \
|
||||
static const int kLaneCount = lane_count; \
|
||||
DCHECK(args.length() == 3); \
|
||||
DCHECK_EQ(3, args.length()); \
|
||||
CONVERT_SIMD_ARG_HANDLE_THROW(JSTypedArray, tarray, 0); \
|
||||
CONVERT_SIMD_ARG_HANDLE_THROW(type, a, 2); \
|
||||
SIMD_COERCE_INDEX(index, 1); \
|
||||
|
@ -61,7 +61,7 @@ MaybeHandle<String> StringReplaceOneCharWithString(
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_StringReplaceOneCharWithString) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, subject, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, search, 1);
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, replace, 2);
|
||||
@ -91,7 +91,7 @@ RUNTIME_FUNCTION(Runtime_StringReplaceOneCharWithString) {
|
||||
// String.prototype.indexOf(searchString [, position])
|
||||
RUNTIME_FUNCTION(Runtime_StringIndexOf) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
return String::IndexOf(isolate, args.at(0), args.at(1), args.at(2));
|
||||
}
|
||||
|
||||
@ -101,7 +101,7 @@ RUNTIME_FUNCTION(Runtime_StringIndexOf) {
|
||||
// arguments.
|
||||
RUNTIME_FUNCTION(Runtime_StringIndexOfUnchecked) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
Handle<String> receiver_string = args.at<String>(0);
|
||||
Handle<String> search_string = args.at<String>(1);
|
||||
int index = std::min(std::max(args.smi_at(2), 0), receiver_string->length());
|
||||
@ -118,7 +118,7 @@ RUNTIME_FUNCTION(Runtime_StringLastIndexOf) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_SubString) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, string, 0);
|
||||
int start, end;
|
||||
@ -150,7 +150,7 @@ RUNTIME_FUNCTION(Runtime_SubString) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_StringAdd) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, obj1, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, obj2, 1);
|
||||
isolate->counters()->string_add_runtime()->Increment();
|
||||
@ -167,7 +167,7 @@ RUNTIME_FUNCTION(Runtime_StringAdd) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_InternalizeString) {
|
||||
HandleScope handles(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, string, 0);
|
||||
return *isolate->factory()->InternalizeString(string);
|
||||
}
|
||||
@ -175,7 +175,7 @@ RUNTIME_FUNCTION(Runtime_InternalizeString) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_StringCharCodeAtRT) {
|
||||
HandleScope handle_scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, subject, 0);
|
||||
CONVERT_NUMBER_CHECKED(uint32_t, i, Uint32, args[1]);
|
||||
@ -216,7 +216,7 @@ RUNTIME_FUNCTION(Runtime_StringCompare) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_StringBuilderConcat) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSArray, array, 0);
|
||||
int32_t array_length;
|
||||
if (!args[1]->ToInt32(&array_length)) {
|
||||
@ -286,7 +286,7 @@ RUNTIME_FUNCTION(Runtime_StringBuilderConcat) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_StringBuilderJoin) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSArray, array, 0);
|
||||
int32_t array_length;
|
||||
if (!args[1]->ToInt32(&array_length)) {
|
||||
@ -427,7 +427,7 @@ static void JoinSparseArrayWithSeparator(FixedArray* elements,
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_SparseJoinWithSeparator) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSArray, elements_array, 0);
|
||||
CONVERT_NUMBER_CHECKED(uint32_t, array_length, Uint32, args[1]);
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, separator, 2);
|
||||
@ -545,7 +545,7 @@ static int CopyCachedOneByteCharsToArray(Heap* heap, const uint8_t* chars,
|
||||
// For example, "foo" => ["f", "o", "o"].
|
||||
RUNTIME_FUNCTION(Runtime_StringToArray) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, s, 0);
|
||||
CONVERT_NUMBER_CHECKED(uint32_t, limit, Uint32, args[1]);
|
||||
|
||||
@ -855,7 +855,7 @@ RUNTIME_FUNCTION(Runtime_StringNotEqual) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_FlattenString) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, str, 0);
|
||||
return *String::Flatten(str);
|
||||
}
|
||||
@ -882,7 +882,7 @@ RUNTIME_FUNCTION(Runtime_ExternalStringGetChar) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_StringCharCodeAt) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
if (!args[0]->IsString()) return isolate->heap()->undefined_value();
|
||||
if (!args[1]->IsNumber()) return isolate->heap()->undefined_value();
|
||||
if (std::isinf(args.number_at(1))) return isolate->heap()->nan_value();
|
||||
|
@ -14,7 +14,7 @@ namespace internal {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_CreateSymbol) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, name, 0);
|
||||
CHECK(name->IsString() || name->IsUndefined(isolate));
|
||||
Handle<Symbol> symbol = isolate->factory()->NewSymbol();
|
||||
@ -25,7 +25,7 @@ RUNTIME_FUNCTION(Runtime_CreateSymbol) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_CreatePrivateSymbol) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, name, 0);
|
||||
CHECK(name->IsString() || name->IsUndefined(isolate));
|
||||
Handle<Symbol> symbol = isolate->factory()->NewPrivateSymbol();
|
||||
@ -36,7 +36,7 @@ RUNTIME_FUNCTION(Runtime_CreatePrivateSymbol) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_SymbolDescription) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_CHECKED(Symbol, symbol, 0);
|
||||
return symbol->name();
|
||||
}
|
||||
@ -58,7 +58,7 @@ RUNTIME_FUNCTION(Runtime_SymbolDescriptiveString) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_SymbolIsPrivate) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_CHECKED(Symbol, symbol, 0);
|
||||
return isolate->heap()->ToBoolean(symbol->is_private());
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ namespace internal {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ConstructDouble) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_NUMBER_CHECKED(uint32_t, hi, Uint32, args[0]);
|
||||
CONVERT_NUMBER_CHECKED(uint32_t, lo, Uint32, args[1]);
|
||||
uint64_t result = (static_cast<uint64_t>(hi) << 32) | lo;
|
||||
@ -33,7 +33,7 @@ RUNTIME_FUNCTION(Runtime_ConstructDouble) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_DeoptimizeFunction) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
|
||||
// This function is used by fuzzers to get coverage in compiler.
|
||||
// Ignore calls on non-function objects to avoid runtime errors.
|
||||
@ -60,7 +60,7 @@ RUNTIME_FUNCTION(Runtime_DeoptimizeFunction) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_DeoptimizeNow) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
|
||||
Handle<JSFunction> function;
|
||||
|
||||
@ -86,7 +86,7 @@ RUNTIME_FUNCTION(Runtime_DeoptimizeNow) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_RunningInSimulator) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
#if defined(USE_SIMULATOR)
|
||||
return isolate->heap()->true_value();
|
||||
#else
|
||||
@ -97,7 +97,7 @@ RUNTIME_FUNCTION(Runtime_RunningInSimulator) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_IsConcurrentRecompilationSupported) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
return isolate->heap()->ToBoolean(
|
||||
isolate->concurrent_recompilation_enabled());
|
||||
}
|
||||
@ -152,7 +152,7 @@ RUNTIME_FUNCTION(Runtime_OptimizeFunctionOnNextCall) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_InterpretFunctionOnNextCall) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, function_object, 0);
|
||||
if (!function_object->IsJSFunction()) {
|
||||
return isolate->heap()->undefined_value();
|
||||
@ -170,7 +170,7 @@ RUNTIME_FUNCTION(Runtime_InterpretFunctionOnNextCall) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_BaselineFunctionOnNextCall) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, function_object, 0);
|
||||
if (!function_object->IsJSFunction()) {
|
||||
return isolate->heap()->undefined_value();
|
||||
@ -228,7 +228,7 @@ RUNTIME_FUNCTION(Runtime_OptimizeOsr) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_NeverOptimizeFunction) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_CHECKED(JSFunction, function, 0);
|
||||
function->shared()->set_disable_optimization_reason(
|
||||
kOptimizationDisabledForTest);
|
||||
@ -289,7 +289,7 @@ RUNTIME_FUNCTION(Runtime_GetOptimizationStatus) {
|
||||
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_UnblockConcurrentRecompilation) {
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
if (FLAG_block_concurrent_recompilation &&
|
||||
isolate->concurrent_recompilation_enabled()) {
|
||||
isolate->optimizing_compile_dispatcher()->Unblock();
|
||||
@ -300,7 +300,7 @@ RUNTIME_FUNCTION(Runtime_UnblockConcurrentRecompilation) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GetOptimizationCount) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
|
||||
return Smi::FromInt(function->shared()->opt_count());
|
||||
}
|
||||
@ -311,7 +311,7 @@ static void ReturnThis(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GetUndetectable) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
v8::Isolate* v8_isolate = reinterpret_cast<v8::Isolate*>(isolate);
|
||||
|
||||
Local<v8::ObjectTemplate> desc = v8::ObjectTemplate::New(v8_isolate);
|
||||
@ -339,7 +339,7 @@ static void call_as_function(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||
// parameters when it is called.
|
||||
RUNTIME_FUNCTION(Runtime_GetCallable) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
v8::Isolate* v8_isolate = reinterpret_cast<v8::Isolate*>(isolate);
|
||||
Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(v8_isolate);
|
||||
Local<ObjectTemplate> instance_template = t->InstanceTemplate();
|
||||
@ -355,7 +355,7 @@ RUNTIME_FUNCTION(Runtime_GetCallable) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ClearFunctionTypeFeedback) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
|
||||
function->ClearTypeFeedbackInfo();
|
||||
Code* unoptimized = function->shared()->code();
|
||||
@ -430,7 +430,7 @@ RUNTIME_FUNCTION(Runtime_CheckWasmWrapperElision) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_NotifyContextDisposed) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
isolate->heap()->NotifyContextDisposed(true);
|
||||
return isolate->heap()->undefined_value();
|
||||
}
|
||||
@ -460,7 +460,7 @@ RUNTIME_FUNCTION(Runtime_SetAllocationTimeout) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_DebugPrint) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
|
||||
OFStream os(stdout);
|
||||
#ifdef DEBUG
|
||||
@ -491,7 +491,7 @@ RUNTIME_FUNCTION(Runtime_DebugPrint) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_DebugTrace) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
isolate->PrintStack(stdout);
|
||||
return isolate->heap()->undefined_value();
|
||||
}
|
||||
@ -501,7 +501,7 @@ RUNTIME_FUNCTION(Runtime_DebugTrace) {
|
||||
// very slowly for very deeply nested ConsStrings. For debugging use only.
|
||||
RUNTIME_FUNCTION(Runtime_GlobalPrint) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
|
||||
CONVERT_ARG_CHECKED(String, string, 0);
|
||||
StringCharacterStream stream(string);
|
||||
@ -517,7 +517,7 @@ RUNTIME_FUNCTION(Runtime_SystemBreak) {
|
||||
// The code below doesn't create handles, but when breaking here in GDB
|
||||
// having a handle scope might be useful.
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
base::OS::DebugBreak();
|
||||
return isolate->heap()->undefined_value();
|
||||
}
|
||||
@ -526,7 +526,7 @@ RUNTIME_FUNCTION(Runtime_SystemBreak) {
|
||||
// Sets a v8 flag.
|
||||
RUNTIME_FUNCTION(Runtime_SetFlags) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_CHECKED(String, arg, 0);
|
||||
std::unique_ptr<char[]> flags =
|
||||
arg->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
|
||||
@ -537,7 +537,7 @@ RUNTIME_FUNCTION(Runtime_SetFlags) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_Abort) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_SMI_ARG_CHECKED(message_id, 0);
|
||||
const char* message =
|
||||
GetBailoutReason(static_cast<BailoutReason>(message_id));
|
||||
@ -551,7 +551,7 @@ RUNTIME_FUNCTION(Runtime_Abort) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_AbortJS) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, message, 0);
|
||||
base::OS::PrintError("abort: %s\n", message->ToCString().get());
|
||||
isolate->PrintStack(stderr);
|
||||
@ -562,14 +562,14 @@ RUNTIME_FUNCTION(Runtime_AbortJS) {
|
||||
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_NativeScriptsCount) {
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
return Smi::FromInt(Natives::GetBuiltinsCount());
|
||||
}
|
||||
|
||||
// TODO(5510): remove this.
|
||||
RUNTIME_FUNCTION(Runtime_GetV8Version) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
|
||||
const char* version_string = v8::V8::GetVersion();
|
||||
|
||||
@ -580,7 +580,7 @@ RUNTIME_FUNCTION(Runtime_GetV8Version) {
|
||||
RUNTIME_FUNCTION(Runtime_DisassembleFunction) {
|
||||
HandleScope scope(isolate);
|
||||
#ifdef DEBUG
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
// Get the function and make sure it is compiled.
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, func, 0);
|
||||
if (!Compiler::Compile(func, Compiler::KEEP_EXCEPTION)) {
|
||||
@ -644,7 +644,7 @@ RUNTIME_FUNCTION(Runtime_TraceTailCall) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GetExceptionDetails) {
|
||||
HandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, exception_obj, 0);
|
||||
|
||||
Factory* factory = isolate->factory();
|
||||
@ -669,7 +669,7 @@ RUNTIME_FUNCTION(Runtime_GetExceptionDetails) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_HaveSameMap) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_CHECKED(JSObject, obj1, 0);
|
||||
CONVERT_ARG_CHECKED(JSObject, obj2, 1);
|
||||
return isolate->heap()->ToBoolean(obj1->map() == obj2->map());
|
||||
@ -678,7 +678,7 @@ RUNTIME_FUNCTION(Runtime_HaveSameMap) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_InNewSpace) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_CHECKED(Object, obj, 0);
|
||||
return isolate->heap()->ToBoolean(isolate->heap()->InNewSpace(obj));
|
||||
}
|
||||
@ -745,7 +745,7 @@ RUNTIME_FUNCTION(Runtime_SpeciesProtector) {
|
||||
// buffer, which is then returned.
|
||||
RUNTIME_FUNCTION(Runtime_SerializeWasmModule) {
|
||||
HandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED_2(WasmModuleObject, module_obj, 0);
|
||||
|
||||
Handle<WasmCompiledModule> orig(module_obj->compiled_module());
|
||||
@ -762,7 +762,7 @@ RUNTIME_FUNCTION(Runtime_SerializeWasmModule) {
|
||||
// Return undefined if unsuccessful.
|
||||
RUNTIME_FUNCTION(Runtime_DeserializeWasmModule) {
|
||||
HandleScope shs(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSArrayBuffer, buffer, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSArrayBuffer, wire_bytes, 1);
|
||||
|
||||
@ -797,7 +797,7 @@ RUNTIME_FUNCTION(Runtime_DeserializeWasmModule) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ValidateWasmInstancesChain) {
|
||||
HandleScope shs(isolate);
|
||||
DCHECK(args.length() == 2);
|
||||
DCHECK_EQ(2, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED_2(WasmModuleObject, module_obj, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Smi, instance_count, 1);
|
||||
wasm::testing::ValidateInstancesChain(isolate, module_obj,
|
||||
@ -807,7 +807,7 @@ RUNTIME_FUNCTION(Runtime_ValidateWasmInstancesChain) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ValidateWasmModuleState) {
|
||||
HandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED_2(WasmModuleObject, module_obj, 0);
|
||||
wasm::testing::ValidateModuleState(isolate, module_obj);
|
||||
return isolate->heap()->ToBoolean(true);
|
||||
@ -815,7 +815,7 @@ RUNTIME_FUNCTION(Runtime_ValidateWasmModuleState) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ValidateWasmOrphanedInstance) {
|
||||
HandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED_2(WasmInstanceObject, instance, 0);
|
||||
wasm::testing::ValidateOrphanedInstance(isolate, instance);
|
||||
return isolate->heap()->ToBoolean(true);
|
||||
|
@ -15,7 +15,7 @@ namespace internal {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ArrayBufferGetByteLength) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_CHECKED(JSArrayBuffer, holder, 0);
|
||||
return holder->byte_length();
|
||||
}
|
||||
@ -23,7 +23,7 @@ RUNTIME_FUNCTION(Runtime_ArrayBufferGetByteLength) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ArrayBufferSliceImpl) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 4);
|
||||
DCHECK_EQ(4, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSArrayBuffer, source, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSArrayBuffer, target, 1);
|
||||
CONVERT_NUMBER_ARG_HANDLE_CHECKED(first, 2);
|
||||
@ -56,7 +56,7 @@ RUNTIME_FUNCTION(Runtime_ArrayBufferSliceImpl) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ArrayBufferNeuter) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSArrayBuffer, array_buffer, 0);
|
||||
if (array_buffer->backing_store() == NULL) {
|
||||
CHECK(Smi::kZero == array_buffer->byte_length());
|
||||
@ -97,7 +97,7 @@ void Runtime::ArrayIdToTypeAndSize(int arrayId, ExternalArrayType* array_type,
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_TypedArrayInitialize) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 6);
|
||||
DCHECK_EQ(6, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, holder, 0);
|
||||
CONVERT_SMI_ARG_CHECKED(arrayId, 1);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, maybe_buffer, 2);
|
||||
@ -179,7 +179,7 @@ RUNTIME_FUNCTION(Runtime_TypedArrayInitialize) {
|
||||
// Returns true if backing store was initialized or false otherwise.
|
||||
RUNTIME_FUNCTION(Runtime_TypedArrayInitializeFromArrayLike) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 4);
|
||||
DCHECK_EQ(4, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, holder, 0);
|
||||
CONVERT_SMI_ARG_CHECKED(arrayId, 1);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Object, source, 2);
|
||||
@ -310,7 +310,7 @@ enum TypedArraySetResultCodes {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_TypedArraySetFastCases) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 3);
|
||||
DCHECK_EQ(3, args.length());
|
||||
if (!args[0]->IsJSTypedArray()) {
|
||||
THROW_NEW_ERROR_RETURN_FAILURE(
|
||||
isolate, NewTypeError(MessageTemplate::kNotTypedArray));
|
||||
@ -369,7 +369,7 @@ RUNTIME_FUNCTION(Runtime_TypedArraySetFastCases) {
|
||||
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_TypedArrayMaxSizeInHeap) {
|
||||
DCHECK(args.length() == 0);
|
||||
DCHECK_EQ(0, args.length());
|
||||
DCHECK_OBJECT_SIZE(FLAG_typed_array_max_size_in_heap +
|
||||
FixedTypedArrayBase::kDataOffset);
|
||||
return Smi::FromInt(FLAG_typed_array_max_size_in_heap);
|
||||
@ -378,14 +378,14 @@ RUNTIME_FUNCTION(Runtime_TypedArrayMaxSizeInHeap) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_IsTypedArray) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
return isolate->heap()->ToBoolean(args[0]->IsJSTypedArray());
|
||||
}
|
||||
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_IsSharedTypedArray) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
return isolate->heap()->ToBoolean(
|
||||
args[0]->IsJSTypedArray() &&
|
||||
JSTypedArray::cast(args[0])->GetBuffer()->is_shared());
|
||||
@ -394,7 +394,7 @@ RUNTIME_FUNCTION(Runtime_IsSharedTypedArray) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_IsSharedIntegerTypedArray) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
if (!args[0]->IsJSTypedArray()) {
|
||||
return isolate->heap()->false_value();
|
||||
}
|
||||
@ -409,7 +409,7 @@ RUNTIME_FUNCTION(Runtime_IsSharedIntegerTypedArray) {
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_IsSharedInteger32TypedArray) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK(args.length() == 1);
|
||||
DCHECK_EQ(1, args.length());
|
||||
if (!args[0]->IsJSTypedArray()) {
|
||||
return isolate->heap()->false_value();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user