Commit f8fb4a5c authored by jgruber's avatar jgruber Committed by Commit Bot

[builtins] Verify process-independence in release mode

These checks are critical even in release mode. They won't impact
runtime performance since this happens at snapshot-time.

TBR=yangguo@chromium.org

Bug: v8:6666
Change-Id: I342d9f80c6b882363da00630385686ac6a02cf5d
Reviewed-on: https://chromium-review.googlesource.com/964524
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51966}
parent d6e2398a
...@@ -293,7 +293,6 @@ v8::StartupData Snapshot::CreateSnapshotBlob( ...@@ -293,7 +293,6 @@ v8::StartupData Snapshot::CreateSnapshotBlob(
} }
#ifdef V8_EMBEDDED_BUILTINS #ifdef V8_EMBEDDED_BUILTINS
#ifdef DEBUG
namespace { namespace {
bool BuiltinAliasesOffHeapTrampolineRegister(Isolate* isolate, Code* code) { bool BuiltinAliasesOffHeapTrampolineRegister(Isolate* isolate, Code* code) {
DCHECK(Builtins::IsOffHeapSafe(code->builtin_index())); DCHECK(Builtins::IsOffHeapSafe(code->builtin_index()));
...@@ -326,7 +325,6 @@ bool BuiltinAliasesOffHeapTrampolineRegister(Isolate* isolate, Code* code) { ...@@ -326,7 +325,6 @@ bool BuiltinAliasesOffHeapTrampolineRegister(Isolate* isolate, Code* code) {
return false; return false;
} }
} // namespace } // namespace
#endif // DEBUG
// static // static
EmbeddedData EmbeddedData::FromIsolate(Isolate* isolate) { EmbeddedData EmbeddedData::FromIsolate(Isolate* isolate) {
...@@ -345,7 +343,6 @@ EmbeddedData EmbeddedData::FromIsolate(Isolate* isolate) { ...@@ -345,7 +343,6 @@ EmbeddedData EmbeddedData::FromIsolate(Isolate* isolate) {
Code* code = builtins->builtin(i); Code* code = builtins->builtin(i);
if (Builtins::IsOffHeapSafe(i)) { if (Builtins::IsOffHeapSafe(i)) {
#ifdef DEBUG
// Sanity-check that the given builtin is process-independent and does not // Sanity-check that the given builtin is process-independent and does not
// use the trampoline register in its calling convention. // use the trampoline register in its calling convention.
if (!code->IsProcessIndependent()) { if (!code->IsProcessIndependent()) {
...@@ -357,7 +354,6 @@ EmbeddedData EmbeddedData::FromIsolate(Isolate* isolate) { ...@@ -357,7 +354,6 @@ EmbeddedData EmbeddedData::FromIsolate(Isolate* isolate) {
fprintf(stderr, "%s aliases the off-heap trampoline register.\n", fprintf(stderr, "%s aliases the off-heap trampoline register.\n",
Builtins::name(i)); Builtins::name(i));
} }
#endif
uint32_t length = static_cast<uint32_t>(code->instruction_size()); uint32_t length = static_cast<uint32_t>(code->instruction_size());
......
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