Commit 4ad4a8d7 authored by Jakob Gruber's avatar Jakob Gruber Committed by Commit Bot

Eager-deserialize in test-debug/BuiltinsExceptionPrediction

This test iterates all builtin objects; explicitly deserialize builtins
when necessary to avoid verifying DeserializeLazy by accident.

Bug: v8:6624
Change-Id: Iab3f708380809b7486ef11a2816e9593ee7e65cd
Reviewed-on: https://chromium-review.googlesource.com/654902
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49451}
parent f9079126
......@@ -37,6 +37,7 @@
#include "src/deoptimizer.h"
#include "src/frames.h"
#include "src/objects-inl.h"
#include "src/snapshot/snapshot.h"
#include "src/utils.h"
#include "test/cctest/cctest.h"
......@@ -6619,15 +6620,20 @@ TEST(DebugCoverageWithScriptDataOutOfScope) {
TEST(BuiltinsExceptionPrediction) {
v8::Isolate* isolate = CcTest::isolate();
i::Isolate* iisolate = CcTest::i_isolate();
v8::HandleScope handle_scope(isolate);
v8::Context::New(isolate);
i::Builtins* builtins = CcTest::i_isolate()->builtins();
i::Builtins* builtins = iisolate->builtins();
bool fail = false;
for (int i = 0; i < i::Builtins::builtin_count; i++) {
Code* builtin = builtins->builtin(i);
if (builtin->kind() != Code::BUILTIN) continue;
if (builtin->builtin_index() == i::Builtins::kDeserializeLazy &&
i::Builtins::IsLazy(i)) {
builtin = i::Snapshot::DeserializeBuiltin(iisolate, i);
}
auto prediction = builtin->GetBuiltinCatchPrediction();
USE(prediction);
......
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