From 9b36c6e37aac7367794e6e975839f7917ae55f75 Mon Sep 17 00:00:00 2001 From: bbudge Date: Wed, 24 Jun 2015 21:32:07 -0700 Subject: [PATCH] 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} --- src/ast.h | 6 +++--- src/objects-inl.h | 4 +--- src/objects.h | 2 +- src/type-info.cc | 2 +- src/type-info.h | 2 +- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/ast.h b/src/ast.h index 61a6ea936..4c65c7f3b 100644 --- a/src/ast.h +++ b/src/ast.h @@ -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 {}; + class ToBooleanTypesField : public BitField16 {}; uint16_t bit_field_; // Ends with 16-bit field; deriving classes in turn begin with // 16-bit fields for optimum packing efficiency. diff --git a/src/objects-inl.h b/src/objects-inl.h index 819cc46e3..7c871816b 100644 --- a/src/objects-inl.h +++ b/src/objects-inl.h @@ -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() { diff --git a/src/objects.h b/src/objects.h index 6695f3f0f..a5277c11f 100644 --- a/src/objects.h +++ b/src/objects.h @@ -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. diff --git a/src/type-info.cc b/src/type-info.cc index f8bfea8f1..ba983d63a 100644 --- a/src/type-info.cc +++ b/src/type-info.cc @@ -430,7 +430,7 @@ void TypeFeedbackOracle::CollectReceiverTypes(T* obj, SmallMapList* types) { } -byte TypeFeedbackOracle::ToBooleanTypes(TypeFeedbackId id) { +uint16_t TypeFeedbackOracle::ToBooleanTypes(TypeFeedbackId id) { Handle object = GetInfo(id); return object->IsCode() ? Handle::cast(object)->to_boolean_state() : 0; } diff --git a/src/type-info.h b/src/type-info.h index 58a40cf34..965fca301 100644 --- a/src/type-info.h +++ b/src/type-info.h @@ -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, -- 2.34.1