Commit 9584c387 authored by Toon Verwaest's avatar Toon Verwaest Committed by V8 LUCI CQ

[runtime] Remove some unused functions from the native context

Change-Id: I251497b12a897fcc15a3a56c3f487d7097fa163a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3122146
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76507}
parent 80f10346
......@@ -1548,9 +1548,8 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
SimpleInstallFunction(isolate_, object_function, "seal",
Builtin::kObjectSeal, 1, false);
Handle<JSFunction> object_create = SimpleInstallFunction(
isolate_, object_function, "create", Builtin::kObjectCreate, 2, false);
native_context()->set_object_create(*object_create);
SimpleInstallFunction(isolate_, object_function, "create",
Builtin::kObjectCreate, 2, false);
SimpleInstallFunction(isolate_, object_function, "defineProperties",
Builtin::kObjectDefineProperties, 2, true);
......@@ -2746,9 +2745,8 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
SimpleInstallFunction(isolate_, math, "cos", Builtin::kMathCos, 1, true);
SimpleInstallFunction(isolate_, math, "cosh", Builtin::kMathCosh, 1, true);
SimpleInstallFunction(isolate_, math, "exp", Builtin::kMathExp, 1, true);
Handle<JSFunction> math_floor = SimpleInstallFunction(
isolate_, math, "floor", Builtin::kMathFloor, 1, true);
native_context()->set_math_floor(*math_floor);
SimpleInstallFunction(isolate_, math, "floor", Builtin::kMathFloor, 1,
true);
SimpleInstallFunction(isolate_, math, "fround", Builtin::kMathFround, 1,
true);
SimpleInstallFunction(isolate_, math, "hypot", Builtin::kMathHypot, 2,
......@@ -2762,9 +2760,7 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
true);
SimpleInstallFunction(isolate_, math, "max", Builtin::kMathMax, 2, false);
SimpleInstallFunction(isolate_, math, "min", Builtin::kMathMin, 2, false);
Handle<JSFunction> math_pow = SimpleInstallFunction(
isolate_, math, "pow", Builtin::kMathPow, 2, true);
native_context()->set_math_pow(*math_pow);
SimpleInstallFunction(isolate_, math, "pow", Builtin::kMathPow, 2, true);
SimpleInstallFunction(isolate_, math, "random", Builtin::kMathRandom, 0,
true);
SimpleInstallFunction(isolate_, math, "round", Builtin::kMathRound, 1,
......
......@@ -44,13 +44,8 @@ enum ContextLookupFlags {
V(GENERATOR_NEXT_INTERNAL, JSFunction, generator_next_internal) \
V(ASYNC_MODULE_EVALUATE_INTERNAL, JSFunction, \
async_module_evaluate_internal) \
V(OBJECT_CREATE, JSFunction, object_create) \
V(REFLECT_APPLY_INDEX, JSFunction, reflect_apply) \
V(REFLECT_CONSTRUCT_INDEX, JSFunction, reflect_construct) \
V(MATH_FLOOR_INDEX, JSFunction, math_floor) \
V(MATH_POW_INDEX, JSFunction, math_pow) \
V(PROMISE_INTERNAL_CONSTRUCTOR_INDEX, JSFunction, \
promise_internal_constructor) \
V(PROMISE_THEN_INDEX, JSFunction, promise_then) \
V(FUNCTION_PROTOTYPE_APPLY_INDEX, JSFunction, function_prototype_apply)
......
......@@ -203,7 +203,7 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
.CallUndefinedReceiver(reg, pair, 1)
.CallRuntime(Runtime::kIsArray, reg)
.CallRuntimeForPair(Runtime::kLoadLookupSlotForCall, reg_list, pair)
.CallJSRuntime(Context::OBJECT_CREATE, reg_list)
.CallJSRuntime(Context::PROMISE_THEN_INDEX, reg_list)
.CallWithSpread(reg, reg_list, 1);
// Emit binary operator invocations.
......
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