Commit 9b36c6e3 authored by bbudge's avatar bbudge Committed by Commit bot

Make helper functions compatible with larger ToBooleanStub types.

I missed some functions that need to change.

LOG=N
BUG=v8:4124

Review URL: https://codereview.chromium.org/1199413009

Cr-Commit-Position: refs/heads/master@{#29276}
parent defa7459
......@@ -379,7 +379,7 @@ class Expression : public AstNode {
// TODO(rossberg): this should move to its own AST node eventually.
virtual void RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle);
byte to_boolean_types() const {
uint16_t to_boolean_types() const {
return ToBooleanTypesField::decode(bit_field_);
}
......@@ -395,7 +395,7 @@ class Expression : public AstNode {
bounds_(Bounds::Unbounded(zone)),
bit_field_(0) {}
static int parent_num_ids() { return 0; }
void set_to_boolean_types(byte types) {
void set_to_boolean_types(uint16_t types) {
bit_field_ = ToBooleanTypesField::update(bit_field_, types);
}
......@@ -409,7 +409,7 @@ class Expression : public AstNode {
int base_id_;
Bounds bounds_;
class ToBooleanTypesField : public BitField16<byte, 0, 8> {};
class ToBooleanTypesField : public BitField16<uint16_t, 0, 9> {};
uint16_t bit_field_;
// Ends with 16-bit field; deriving classes in turn begin with
// 16-bit fields for optimum packing efficiency.
......
......@@ -4683,9 +4683,7 @@ bool Code::back_edges_patched_for_osr() {
}
byte Code::to_boolean_state() {
return extra_ic_state();
}
uint16_t Code::to_boolean_state() { return extra_ic_state(); }
bool Code::has_function_cache() {
......
......@@ -5081,7 +5081,7 @@ class Code: public HeapObject {
inline bool back_edges_patched_for_osr();
// [to_boolean_foo]: For kind TO_BOOLEAN_IC tells what state the stub is in.
inline byte to_boolean_state();
inline uint16_t to_boolean_state();
// [has_function_cache]: For kind STUB tells whether there is a function
// cache is passed to the stub.
......
......@@ -430,7 +430,7 @@ void TypeFeedbackOracle::CollectReceiverTypes(T* obj, SmallMapList* types) {
}
byte TypeFeedbackOracle::ToBooleanTypes(TypeFeedbackId id) {
uint16_t TypeFeedbackOracle::ToBooleanTypes(TypeFeedbackId id) {
Handle<Object> object = GetInfo(id);
return object->IsCode() ? Handle<Code>::cast(object)->to_boolean_state() : 0;
}
......
......@@ -78,7 +78,7 @@ class TypeFeedbackOracle: public ZoneObject {
// TODO(1571) We can't use ToBooleanStub::Types as the return value because
// of various cycles in our headers. Death to tons of implementations in
// headers!! :-P
byte ToBooleanTypes(TypeFeedbackId id);
uint16_t ToBooleanTypes(TypeFeedbackId id);
// Get type information for arithmetic operations and compares.
void BinaryType(TypeFeedbackId id,
......
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