From b54c825fd14f872aa210291b52cc2d8c13ff4999 Mon Sep 17 00:00:00 2001 From: adamk Date: Thu, 5 Jan 2017 15:46:50 -0800 Subject: [PATCH] [cleanup] Remove unused runtime error functions/messages R=gsathya@chromium.org Review-Url: https://codereview.chromium.org/2612373002 Cr-Commit-Position: refs/heads/master@{#42103} --- src/messages.h | 2 -- src/runtime/runtime-classes.cc | 14 -------------- src/runtime/runtime.h | 2 -- .../interpreter/bytecode_expectations/ForOf.golden | 8 ++++---- .../bytecode_expectations/Generators.golden | 2 +- 5 files changed, 5 insertions(+), 23 deletions(-) diff --git a/src/messages.h b/src/messages.h index fb830075e9..6bd0eedac8 100644 --- a/src/messages.h +++ b/src/messages.h @@ -268,7 +268,6 @@ class ErrorUtils : public AllStatic { "ArrayBuffer subclass returned this from species constructor") \ T(ArrayFunctionsOnFrozen, "Cannot modify frozen array elements") \ T(ArrayFunctionsOnSealed, "Cannot add/remove sealed array elements") \ - T(ArrayNotSubclassable, "Subclassing Arrays is not currently supported.") \ T(CalledNonCallable, "% is not a function") \ T(CalledOnNonObject, "% called on non-object") \ T(CalledOnNullOrUndefined, "% called on null or undefined") \ @@ -486,7 +485,6 @@ class ErrorUtils : public AllStatic { T(VarRedeclaration, "Identifier '%' has already been declared") \ T(WrongArgs, "%: Arguments list has wrong type") \ /* ReferenceError */ \ - T(NonMethod, "'super' is referenced from non-method") \ T(NotDefined, "% is not defined") \ T(UnsupportedSuper, "Unsupported reference to 'super'") \ /* RangeError */ \ diff --git a/src/runtime/runtime-classes.cc b/src/runtime/runtime-classes.cc index 4e9bece95b..1c53f0f626 100644 --- a/src/runtime/runtime-classes.cc +++ b/src/runtime/runtime-classes.cc @@ -20,13 +20,6 @@ namespace v8 { namespace internal { -RUNTIME_FUNCTION(Runtime_ThrowNonMethodError) { - HandleScope scope(isolate); - DCHECK_EQ(0, args.length()); - THROW_NEW_ERROR_RETURN_FAILURE( - isolate, NewReferenceError(MessageTemplate::kNonMethod)); -} - RUNTIME_FUNCTION(Runtime_ThrowUnsupportedSuperError) { HandleScope scope(isolate); DCHECK_EQ(0, args.length()); @@ -45,13 +38,6 @@ RUNTIME_FUNCTION(Runtime_ThrowConstructorNonCallableError) { } -RUNTIME_FUNCTION(Runtime_ThrowArrayNotSubclassableError) { - HandleScope scope(isolate); - DCHECK_EQ(0, args.length()); - THROW_NEW_ERROR_RETURN_FAILURE( - isolate, NewTypeError(MessageTemplate::kArrayNotSubclassable)); -} - RUNTIME_FUNCTION(Runtime_ThrowStaticPrototypeError) { HandleScope scope(isolate); DCHECK_EQ(0, args.length()); diff --git a/src/runtime/runtime.h b/src/runtime/runtime.h index 6e0ee57deb..edbeb09a19 100644 --- a/src/runtime/runtime.h +++ b/src/runtime/runtime.h @@ -75,10 +75,8 @@ namespace internal { F(AtomicsNumWaitersForTesting, 2, 1) #define FOR_EACH_INTRINSIC_CLASSES(F) \ - F(ThrowNonMethodError, 0, 1) \ F(ThrowUnsupportedSuperError, 0, 1) \ F(ThrowConstructorNonCallableError, 1, 1) \ - F(ThrowArrayNotSubclassableError, 0, 1) \ F(ThrowStaticPrototypeError, 0, 1) \ F(ThrowNotSuperConstructor, 2, 1) \ F(HomeObjectSymbol, 0, 1) \ diff --git a/test/cctest/interpreter/bytecode_expectations/ForOf.golden b/test/cctest/interpreter/bytecode_expectations/ForOf.golden index 7f1f8bda7b..610b8b1a06 100644 --- a/test/cctest/interpreter/bytecode_expectations/ForOf.golden +++ b/test/cctest/interpreter/bytecode_expectations/ForOf.golden @@ -88,7 +88,7 @@ bytecodes: [ B(TestEqualStrict), R(12), U8(20), B(JumpIfFalse), U8(4), B(Jump), U8(18), - B(Wide), B(LdaSmi), U16(130), + B(Wide), B(LdaSmi), U16(129), B(Star), R(12), B(LdaConstant), U8(9), B(Star), R(13), @@ -233,7 +233,7 @@ bytecodes: [ B(TestEqualStrict), R(13), U8(20), B(JumpIfFalse), U8(4), B(Jump), U8(18), - B(Wide), B(LdaSmi), U16(130), + B(Wide), B(LdaSmi), U16(129), B(Star), R(13), B(LdaConstant), U8(9), B(Star), R(14), @@ -391,7 +391,7 @@ bytecodes: [ B(TestEqualStrict), R(12), U8(22), B(JumpIfFalse), U8(4), B(Jump), U8(18), - B(Wide), B(LdaSmi), U16(130), + B(Wide), B(LdaSmi), U16(129), B(Star), R(12), B(LdaConstant), U8(9), B(Star), R(13), @@ -539,7 +539,7 @@ bytecodes: [ B(TestEqualStrict), R(11), U8(24), B(JumpIfFalse), U8(4), B(Jump), U8(18), - B(Wide), B(LdaSmi), U16(130), + B(Wide), B(LdaSmi), U16(129), B(Star), R(11), B(LdaConstant), U8(11), B(Star), R(12), diff --git a/test/cctest/interpreter/bytecode_expectations/Generators.golden b/test/cctest/interpreter/bytecode_expectations/Generators.golden index 94c9ab2c65..19cfc86122 100644 --- a/test/cctest/interpreter/bytecode_expectations/Generators.golden +++ b/test/cctest/interpreter/bytecode_expectations/Generators.golden @@ -491,7 +491,7 @@ bytecodes: [ B(TestEqualStrict), R(10), U8(20), B(JumpIfFalse), U8(4), B(Jump), U8(18), - B(Wide), B(LdaSmi), U16(130), + B(Wide), B(LdaSmi), U16(129), B(Star), R(10), B(LdaConstant), U8(14), B(Star), R(11),