Commit b371b0b7 authored by franzih's avatar franzih Committed by Commit bot

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