Fixed race condition in HBranch::observed_input_representation.
Non-numeric static local variables are not thread-safe, and the case at hand was a premature optimization anyway: The generated code for the check in question is exactly the same when unfolded. BUG=chromium:420483 Review URL: https://codereview.chromium.org/756903003 Cr-Commit-Position: refs/heads/master@{#25502}
This commit is contained in:
parent
d15d453fa5
commit
11a950fcf7
@ -1155,12 +1155,10 @@ std::ostream& HReturn::PrintDataTo(std::ostream& os) const { // NOLINT
|
||||
|
||||
|
||||
Representation HBranch::observed_input_representation(int index) {
|
||||
static const ToBooleanStub::Types tagged_types(
|
||||
ToBooleanStub::NULL_TYPE |
|
||||
ToBooleanStub::SPEC_OBJECT |
|
||||
ToBooleanStub::STRING |
|
||||
ToBooleanStub::SYMBOL);
|
||||
if (expected_input_types_.ContainsAnyOf(tagged_types)) {
|
||||
if (expected_input_types_.Contains(ToBooleanStub::NULL_TYPE) ||
|
||||
expected_input_types_.Contains(ToBooleanStub::SPEC_OBJECT) ||
|
||||
expected_input_types_.Contains(ToBooleanStub::STRING) ||
|
||||
expected_input_types_.Contains(ToBooleanStub::SYMBOL)) {
|
||||
return Representation::Tagged();
|
||||
}
|
||||
if (expected_input_types_.Contains(ToBooleanStub::UNDEFINED)) {
|
||||
|
Loading…
Reference in New Issue
Block a user