[x86] Sane default for Label::Distance on JumpIfRoot/JumpIfNotRoot.
R=jarin@chromium.org BUG=chromium:563929 LOG=n Review URL: https://codereview.chromium.org/1483343002 Cr-Commit-Position: refs/heads/master@{#32456}
This commit is contained in:
parent
3d9a27517c
commit
c83db2d071
@ -81,13 +81,13 @@ class MacroAssembler: public Assembler {
|
|||||||
|
|
||||||
// Compare the object in a register to a value and jump if they are equal.
|
// Compare the object in a register to a value and jump if they are equal.
|
||||||
void JumpIfRoot(Register with, Heap::RootListIndex index, Label* if_equal,
|
void JumpIfRoot(Register with, Heap::RootListIndex index, Label* if_equal,
|
||||||
Label::Distance if_equal_distance = Label::kNear) {
|
Label::Distance if_equal_distance = Label::kFar) {
|
||||||
CompareRoot(with, index);
|
CompareRoot(with, index);
|
||||||
j(equal, if_equal, if_equal_distance);
|
j(equal, if_equal, if_equal_distance);
|
||||||
}
|
}
|
||||||
void JumpIfRoot(const Operand& with, Heap::RootListIndex index,
|
void JumpIfRoot(const Operand& with, Heap::RootListIndex index,
|
||||||
Label* if_equal,
|
Label* if_equal,
|
||||||
Label::Distance if_equal_distance = Label::kNear) {
|
Label::Distance if_equal_distance = Label::kFar) {
|
||||||
CompareRoot(with, index);
|
CompareRoot(with, index);
|
||||||
j(equal, if_equal, if_equal_distance);
|
j(equal, if_equal, if_equal_distance);
|
||||||
}
|
}
|
||||||
@ -95,13 +95,13 @@ class MacroAssembler: public Assembler {
|
|||||||
// Compare the object in a register to a value and jump if they are not equal.
|
// Compare the object in a register to a value and jump if they are not equal.
|
||||||
void JumpIfNotRoot(Register with, Heap::RootListIndex index,
|
void JumpIfNotRoot(Register with, Heap::RootListIndex index,
|
||||||
Label* if_not_equal,
|
Label* if_not_equal,
|
||||||
Label::Distance if_not_equal_distance = Label::kNear) {
|
Label::Distance if_not_equal_distance = Label::kFar) {
|
||||||
CompareRoot(with, index);
|
CompareRoot(with, index);
|
||||||
j(not_equal, if_not_equal, if_not_equal_distance);
|
j(not_equal, if_not_equal, if_not_equal_distance);
|
||||||
}
|
}
|
||||||
void JumpIfNotRoot(const Operand& with, Heap::RootListIndex index,
|
void JumpIfNotRoot(const Operand& with, Heap::RootListIndex index,
|
||||||
Label* if_not_equal,
|
Label* if_not_equal,
|
||||||
Label::Distance if_not_equal_distance = Label::kNear) {
|
Label::Distance if_not_equal_distance = Label::kFar) {
|
||||||
CompareRoot(with, index);
|
CompareRoot(with, index);
|
||||||
j(not_equal, if_not_equal, if_not_equal_distance);
|
j(not_equal, if_not_equal, if_not_equal_distance);
|
||||||
}
|
}
|
||||||
|
@ -149,13 +149,13 @@ class MacroAssembler: public Assembler {
|
|||||||
|
|
||||||
// Compare the object in a register to a value and jump if they are equal.
|
// Compare the object in a register to a value and jump if they are equal.
|
||||||
void JumpIfRoot(Register with, Heap::RootListIndex index, Label* if_equal,
|
void JumpIfRoot(Register with, Heap::RootListIndex index, Label* if_equal,
|
||||||
Label::Distance if_equal_distance = Label::kNear) {
|
Label::Distance if_equal_distance = Label::kFar) {
|
||||||
CompareRoot(with, index);
|
CompareRoot(with, index);
|
||||||
j(equal, if_equal, if_equal_distance);
|
j(equal, if_equal, if_equal_distance);
|
||||||
}
|
}
|
||||||
void JumpIfRoot(const Operand& with, Heap::RootListIndex index,
|
void JumpIfRoot(const Operand& with, Heap::RootListIndex index,
|
||||||
Label* if_equal,
|
Label* if_equal,
|
||||||
Label::Distance if_equal_distance = Label::kNear) {
|
Label::Distance if_equal_distance = Label::kFar) {
|
||||||
CompareRoot(with, index);
|
CompareRoot(with, index);
|
||||||
j(equal, if_equal, if_equal_distance);
|
j(equal, if_equal, if_equal_distance);
|
||||||
}
|
}
|
||||||
@ -163,13 +163,13 @@ class MacroAssembler: public Assembler {
|
|||||||
// Compare the object in a register to a value and jump if they are not equal.
|
// Compare the object in a register to a value and jump if they are not equal.
|
||||||
void JumpIfNotRoot(Register with, Heap::RootListIndex index,
|
void JumpIfNotRoot(Register with, Heap::RootListIndex index,
|
||||||
Label* if_not_equal,
|
Label* if_not_equal,
|
||||||
Label::Distance if_not_equal_distance = Label::kNear) {
|
Label::Distance if_not_equal_distance = Label::kFar) {
|
||||||
CompareRoot(with, index);
|
CompareRoot(with, index);
|
||||||
j(not_equal, if_not_equal, if_not_equal_distance);
|
j(not_equal, if_not_equal, if_not_equal_distance);
|
||||||
}
|
}
|
||||||
void JumpIfNotRoot(const Operand& with, Heap::RootListIndex index,
|
void JumpIfNotRoot(const Operand& with, Heap::RootListIndex index,
|
||||||
Label* if_not_equal,
|
Label* if_not_equal,
|
||||||
Label::Distance if_not_equal_distance = Label::kNear) {
|
Label::Distance if_not_equal_distance = Label::kFar) {
|
||||||
CompareRoot(with, index);
|
CompareRoot(with, index);
|
||||||
j(not_equal, if_not_equal, if_not_equal_distance);
|
j(not_equal, if_not_equal, if_not_equal_distance);
|
||||||
}
|
}
|
||||||
|
31
test/mjsunit/regress/regress-crbug-563929.js
Normal file
31
test/mjsunit/regress/regress-crbug-563929.js
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
// Copyright 2015 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.
|
||||||
|
|
||||||
|
var x = 0;
|
||||||
|
function a() {
|
||||||
|
eval("");
|
||||||
|
return (function() {
|
||||||
|
eval("");
|
||||||
|
return (function() {
|
||||||
|
eval("");
|
||||||
|
return (function() {
|
||||||
|
eval("");
|
||||||
|
return (function() {
|
||||||
|
eval("");
|
||||||
|
return (function() {
|
||||||
|
eval("");
|
||||||
|
return (function() {
|
||||||
|
eval("");
|
||||||
|
return (function() {
|
||||||
|
eval("");
|
||||||
|
return x;
|
||||||
|
})();
|
||||||
|
}) ();
|
||||||
|
})();
|
||||||
|
})();
|
||||||
|
})();
|
||||||
|
})();
|
||||||
|
})();
|
||||||
|
}
|
||||||
|
assertEquals(a(), 0);
|
Loading…
Reference in New Issue
Block a user