Commit c5695714 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[stubs] Reduce overhead of deferred CSA-assert blocks.

This further reduces the footprint of the deferred blocks used as part
of our CSA-asserts by marking the {DebugAbort} calls as unreachable.
This allows us to elide (un)spilling because re-entry into the normal
instruction stream is removed.

R=jgruber@chromium.org
BUG=v8:6688

Change-Id: Ib00362fbe34427b3c8f8c8f5fcea0b83028f81b2
Reviewed-on: https://chromium-review.googlesource.com/632056Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47571}
parent 06c3f2b7
......@@ -91,20 +91,17 @@ void CodeStubAssembler::Check(const NodeGenerator& condition_body,
Node* condition = condition_body();
DCHECK_NOT_NULL(condition);
Branch(condition, &ok, &not_ok);
BIND(&not_ok);
Node* message_node;
if (message != nullptr) {
char chars[1024];
Vector<char> buffer(chars);
if (file != nullptr) {
SNPrintF(buffer, "CSA_ASSERT failed: %s [%s:%d]\n", message, file, line);
} else {
SNPrintF(buffer, "CSA_ASSERT failed: %s\n", message);
}
message_node = StringConstant(&(buffer[0]));
DCHECK_NOT_NULL(message);
char chars[1024];
Vector<char> buffer(chars);
if (file != nullptr) {
SNPrintF(buffer, "CSA_ASSERT failed: %s [%s:%d]\n", message, file, line);
} else {
message_node = EmptyStringConstant();
SNPrintF(buffer, "CSA_ASSERT failed: %s\n", message);
}
Node* message_node = StringConstant(&(buffer[0]));
#ifdef DEBUG
// Only print the extra nodes in debug builds.
......@@ -116,7 +113,8 @@ void CodeStubAssembler::Check(const NodeGenerator& condition_body,
#endif
DebugAbort(message_node);
Goto(&ok);
Unreachable();
BIND(&ok);
Comment("] Assert");
}
......
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