Commit ba668923 authored by gsathya's avatar gsathya Committed by Commit bot

[promises] Remove unused runtime calls

R=adamk@chromium.org, littledan@chromium.org

BUG=v8:5343

Review-Url: https://codereview.chromium.org/2609853004
Cr-Commit-Position: refs/heads/master@{#42069}
parent e426fdd5
...@@ -280,44 +280,6 @@ RUNTIME_FUNCTION(Runtime_PromiseResult) { ...@@ -280,44 +280,6 @@ RUNTIME_FUNCTION(Runtime_PromiseResult) {
return promise->result(); return promise->result();
} }
RUNTIME_FUNCTION(Runtime_PromiseDeferred) {
HandleScope scope(isolate);
DCHECK(args.length() == 1);
CONVERT_ARG_HANDLE_CHECKED(JSPromise, promise, 0);
Handle<Object> deferred(promise->deferred_promise(), isolate);
if (deferred->IsUndefined(isolate)) {
return isolate->heap()->undefined_value();
}
if (deferred->IsJSObject()) {
return *deferred;
}
DCHECK(deferred->IsFixedArray());
return *isolate->factory()->NewJSArrayWithElements(
Handle<FixedArray>::cast(deferred));
}
RUNTIME_FUNCTION(Runtime_PromiseRejectReactions) {
HandleScope scope(isolate);
DCHECK(args.length() == 1);
CONVERT_ARG_HANDLE_CHECKED(JSPromise, promise, 0);
Handle<Object> reject_reactions(promise->reject_reactions(), isolate);
if (reject_reactions->IsUndefined(isolate)) {
return isolate->heap()->undefined_value();
}
if (reject_reactions->IsJSObject()) {
return *reject_reactions;
}
DCHECK(reject_reactions->IsFixedArray());
return *isolate->factory()->NewJSArrayWithElements(
Handle<FixedArray>::cast(reject_reactions));
}
RUNTIME_FUNCTION(Runtime_PromiseMarkAsHandled) { RUNTIME_FUNCTION(Runtime_PromiseMarkAsHandled) {
SealHandleScope shs(isolate); SealHandleScope shs(isolate);
DCHECK(args.length() == 1); DCHECK(args.length() == 1);
......
...@@ -305,7 +305,6 @@ namespace internal { ...@@ -305,7 +305,6 @@ namespace internal {
F(NewSyntaxError, 2, 1) \ F(NewSyntaxError, 2, 1) \
F(NewTypeError, 2, 1) \ F(NewTypeError, 2, 1) \
F(OrdinaryHasInstance, 2, 1) \ F(OrdinaryHasInstance, 2, 1) \
F(PromiseDeferred, 1, 1) \
F(PromiseReject, 3, 1) \ F(PromiseReject, 3, 1) \
F(PromiseFulfill, 3, 1) \ F(PromiseFulfill, 3, 1) \
F(PromiseHookInit, 2, 1) \ F(PromiseHookInit, 2, 1) \
...@@ -315,7 +314,6 @@ namespace internal { ...@@ -315,7 +314,6 @@ namespace internal {
F(PromiseMarkAsHandled, 1, 1) \ F(PromiseMarkAsHandled, 1, 1) \
F(PromiseMarkHandledHint, 1, 1) \ F(PromiseMarkHandledHint, 1, 1) \
F(PromiseRejectEventFromStack, 2, 1) \ F(PromiseRejectEventFromStack, 2, 1) \
F(PromiseRejectReactions, 1, 1) \
F(PromiseRevokeReject, 1, 1) \ F(PromiseRevokeReject, 1, 1) \
F(PromiseResult, 1, 1) \ F(PromiseResult, 1, 1) \
F(PromiseStatus, 1, 1) \ F(PromiseStatus, 1, 1) \
......
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