Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Unified Diff: src/code-stubs.h

Issue 142813003: A64: Synchronize with r15358. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/builtins.cc ('k') | src/codegen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index a14cd9c78dcc1ca2e00f0ea99535abd8b4c3ebfc..232bb362099f294d6477ce66cb4e750e6249bafb 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -912,8 +912,7 @@ class BinaryOpStub: public PlatformCodeStub {
left_type_(BinaryOpIC::UNINITIALIZED),
right_type_(BinaryOpIC::UNINITIALIZED),
result_type_(BinaryOpIC::UNINITIALIZED),
- has_fixed_right_arg_(false),
- encoded_right_arg_(encode_arg_value(1)) {
+ encoded_right_arg_(false, encode_arg_value(1)) {
Initialize();
ASSERT(OpBits::is_valid(Token::NUM_TOKENS));
}
@@ -923,16 +922,15 @@ class BinaryOpStub: public PlatformCodeStub {
BinaryOpIC::TypeInfo left_type,
BinaryOpIC::TypeInfo right_type,
BinaryOpIC::TypeInfo result_type,
- bool has_fixed_right_arg,
- int32_t fixed_right_arg_value)
+ Maybe<int32_t> fixed_right_arg)
: op_(OpBits::decode(key)),
mode_(ModeBits::decode(key)),
platform_specific_bit_(PlatformSpecificBits::decode(key)),
left_type_(left_type),
right_type_(right_type),
result_type_(result_type),
- has_fixed_right_arg_(has_fixed_right_arg),
- encoded_right_arg_(encode_arg_value(fixed_right_arg_value)) { }
+ encoded_right_arg_(fixed_right_arg.has_value,
+ encode_arg_value(fixed_right_arg.value)) { }
static void decode_types_from_minor_key(int minor_key,
BinaryOpIC::TypeInfo* left_type,
@@ -950,16 +948,14 @@ class BinaryOpStub: public PlatformCodeStub {
return static_cast<Token::Value>(OpBits::decode(minor_key));
}
- static bool decode_has_fixed_right_arg_from_minor_key(int minor_key) {
- return HasFixedRightArgBits::decode(minor_key);
- }
-
- static int decode_fixed_right_arg_value_from_minor_key(int minor_key) {
- return decode_arg_value(FixedRightArgValueBits::decode(minor_key));
+ static Maybe<int> decode_fixed_right_arg_from_minor_key(int minor_key) {
+ return Maybe<int>(
+ HasFixedRightArgBits::decode(minor_key),
+ decode_arg_value(FixedRightArgValueBits::decode(minor_key)));
}
int fixed_right_arg_value() const {
- return decode_arg_value(encoded_right_arg_);
+ return decode_arg_value(encoded_right_arg_.value);
}
static bool can_encode_arg_value(int32_t value) {
@@ -983,8 +979,7 @@ class BinaryOpStub: public PlatformCodeStub {
BinaryOpIC::TypeInfo right_type_;
BinaryOpIC::TypeInfo result_type_;
- bool has_fixed_right_arg_;
- int encoded_right_arg_;
+ Maybe<int> encoded_right_arg_;
static int encode_arg_value(int32_t value) {
ASSERT(can_encode_arg_value(value));
@@ -1017,8 +1012,8 @@ class BinaryOpStub: public PlatformCodeStub {
| LeftTypeBits::encode(left_type_)
| RightTypeBits::encode(right_type_)
| ResultTypeBits::encode(result_type_)
- | HasFixedRightArgBits::encode(has_fixed_right_arg_)
- | FixedRightArgValueBits::encode(encoded_right_arg_);
+ | HasFixedRightArgBits::encode(encoded_right_arg_.has_value)
+ | FixedRightArgValueBits::encode(encoded_right_arg_.value);
}
@@ -1215,6 +1210,9 @@ class CompareNilICStub : public HydrogenCodeStub {
static byte ExtractTypesFromExtraICState(Code::ExtraICState state) {
return state & ((1 << NUMBER_OF_TYPES) - 1);
}
+ static NilValue ExtractNilValueFromExtraICState(Code::ExtraICState state) {
+ return NilValueField::decode(state);
+ }
void Record(Handle<Object> object);
@@ -1981,7 +1979,7 @@ class ToBooleanStub: public HydrogenCodeStub {
class Types : public EnumSet<Type, byte> {
public:
- Types() {}
+ Types() : EnumSet<Type, byte>(0) {}
explicit Types(byte bits) : EnumSet<Type, byte>(bits) {}
byte ToByte() const { return ToIntegral(); }
@@ -1990,10 +1988,10 @@ class ToBooleanStub: public HydrogenCodeStub {
bool Record(Handle<Object> object);
bool NeedsMap() const;
bool CanBeUndetectable() const;
- };
+ bool IsGeneric() const { return ToIntegral() == Generic().ToIntegral(); }
- static Types no_types() { return Types(); }
- static Types all_types() { return Types((1 << NUMBER_OF_TYPES) - 1); }
+ static Types Generic() { return Types((1 << NUMBER_OF_TYPES) - 1); }
+ };
explicit ToBooleanStub(Types types = Types())
: types_(types) { }
« no previous file with comments | « src/builtins.cc ('k') | src/codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698