Commit b3050338 authored by Franziska Hinkelmann's avatar Franziska Hinkelmann Committed by Commit Bot

[type feedback] Allow position 0.

In eval scripts, the source code position can be 0 rather
than greater than 0.

Add regression test.

Drive-by fix: unrelated typo.

Bug: 707223
Change-Id: If52c0736daac3ad42ac6d324eb8ec5f1798f6f5a
Reviewed-on: https://chromium-review.googlesource.com/476630Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Franziska Hinkelmann <franzih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44637}
parent 57040734
......@@ -911,7 +911,7 @@ InlineCacheState CollectTypeProfileNexus::StateFromFeedback() const {
}
void CollectTypeProfileNexus::Collect(Handle<String> type, int position) {
DCHECK_GT(position, 0);
DCHECK_GE(position, 0);
Isolate* isolate = GetIsolate();
Object* const feedback = GetFeedback();
......
......@@ -262,7 +262,7 @@ int SortedListBSearch(const List<T>& list, P cmp) {
low = mid + 1;
continue;
}
// Found the elememt.
// Found the element.
return mid;
}
return -1;
......
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --type-profile
let e;
eval("e");
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