[runtime] Remove unused Runtime::kDeclareGlobals.

... and rename Runtime::kDeclareGlobalsForInterpreter -> Runtime::kDeclareGlobals.

Bug: v8:7310
Change-Id: I58f9615b6948b66727f2de7e9ba1b0be4f87d9aa
Reviewed-on: https://chromium-review.googlesource.com/966291
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52038}
This commit is contained in:
Igor Sheludko 2018-03-19 15:20:46 +01:00 committed by Commit Bot
parent a21d055209
commit 0fa0b28a84
5 changed files with 6 additions and 20 deletions

View File

@ -1306,7 +1306,7 @@ void BytecodeGenerator::VisitDeclarations(Declaration::List* declarations) {
.LoadLiteral(Smi::FromInt(encoded_flags))
.StoreAccumulatorInRegister(args[1])
.MoveRegister(Register::function_closure(), args[2])
.CallRuntime(Runtime::kDeclareGlobalsForInterpreter, args);
.CallRuntime(Runtime::kDeclareGlobals, args);
// Push and reset globals builder.
global_declarations_.push_back(globals_builder());

View File

@ -194,19 +194,6 @@ RUNTIME_FUNCTION(Runtime_DeclareGlobals) {
HandleScope scope(isolate);
DCHECK_EQ(3, args.length());
CONVERT_ARG_HANDLE_CHECKED(FixedArray, declarations, 0);
CONVERT_SMI_ARG_CHECKED(flags, 1);
CONVERT_ARG_HANDLE_CHECKED(FeedbackVector, feedback_vector, 2);
return DeclareGlobals(isolate, declarations, flags, feedback_vector);
}
// TODO(ishell): merge this with Runtime::kDeclareGlobals once interpreter
// is able to pass feedback vector.
RUNTIME_FUNCTION(Runtime_DeclareGlobalsForInterpreter) {
HandleScope scope(isolate);
DCHECK_EQ(3, args.length());
CONVERT_ARG_HANDLE_CHECKED(FixedArray, declarations, 0);
CONVERT_SMI_ARG_CHECKED(flags, 1);
CONVERT_ARG_HANDLE_CHECKED(JSFunction, closure, 2);

View File

@ -462,7 +462,6 @@ namespace internal {
F(DeclareEvalFunction, 2, 1) \
F(DeclareEvalVar, 1, 1) \
F(DeclareGlobals, 3, 1) \
F(DeclareGlobalsForInterpreter, 3, 1) \
F(DeleteLookupSlot, 1, 1) \
F(LoadLookupSlot, 1, 1) \
F(LoadLookupSlotInsideTypeof, 1, 1) \

View File

@ -19,7 +19,7 @@ bytecodes: [
B(LdaZero),
B(Star), R(2),
B(Mov), R(closure), R(3),
B(CallRuntime), U16(Runtime::kDeclareGlobalsForInterpreter), R(1), U8(3),
B(CallRuntime), U16(Runtime::kDeclareGlobals), R(1), U8(3),
/* 0 E> */ B(StackCheck),
/* 8 S> */ B(LdaSmi), I8(1),
/* 8 E> */ B(StaGlobal), U8(1), U8(2),
@ -46,7 +46,7 @@ bytecodes: [
B(LdaZero),
B(Star), R(1),
B(Mov), R(closure), R(2),
B(CallRuntime), U16(Runtime::kDeclareGlobalsForInterpreter), R(0), U8(3),
B(CallRuntime), U16(Runtime::kDeclareGlobals), R(0), U8(3),
/* 0 E> */ B(StackCheck),
B(LdaUndefined),
/* 15 S> */ B(Return),
@ -71,7 +71,7 @@ bytecodes: [
B(LdaZero),
B(Star), R(2),
B(Mov), R(closure), R(3),
B(CallRuntime), U16(Runtime::kDeclareGlobalsForInterpreter), R(1), U8(3),
B(CallRuntime), U16(Runtime::kDeclareGlobals), R(1), U8(3),
/* 0 E> */ B(StackCheck),
/* 8 S> */ B(LdaSmi), I8(1),
/* 8 E> */ B(StaGlobal), U8(1), U8(2),
@ -101,7 +101,7 @@ bytecodes: [
B(LdaZero),
B(Star), R(2),
B(Mov), R(closure), R(3),
B(CallRuntime), U16(Runtime::kDeclareGlobalsForInterpreter), R(1), U8(3),
B(CallRuntime), U16(Runtime::kDeclareGlobals), R(1), U8(3),
/* 0 E> */ B(StackCheck),
/* 16 S> */ B(LdaGlobal), U8(1), U8(0),
B(Star), R(1),

View File

@ -19,7 +19,7 @@ bytecodes: [
B(LdaZero),
B(Star), R(2),
B(Mov), R(closure), R(3),
B(CallRuntime), U16(Runtime::kDeclareGlobalsForInterpreter), R(1), U8(3),
B(CallRuntime), U16(Runtime::kDeclareGlobals), R(1), U8(3),
/* 0 E> */ B(StackCheck),
/* 8 S> */ B(CreateObjectLiteral), U8(1), U8(2), U8(41), R(1),
/* 16 E> */ B(CreateClosure), U8(2), U8(3), U8(0),