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

Unified Diff: src/objects-inl.h

Issue 1337993005: [runtime] Replace the EQUALS builtin with proper Object::Equals. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Michi's nit. Created 5 years, 3 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/objects.cc ('k') | src/runtime.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index f37671bedd48e9304a9832e526fa5a74f8af3e77..979020869a4dc27e4fb31db2973e089b96c200bd 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -1082,11 +1082,11 @@ bool Object::IsArgumentsMarker() const {
}
-double Object::Number() {
+double Object::Number() const {
DCHECK(IsNumber());
return IsSmi()
- ? static_cast<double>(reinterpret_cast<Smi*>(this)->value())
- : reinterpret_cast<HeapNumber*>(this)->value();
+ ? static_cast<double>(reinterpret_cast<const Smi*>(this)->value())
+ : reinterpret_cast<const HeapNumber*>(this)->value();
}
@@ -1567,6 +1567,12 @@ bool Simd128Value::Equals(Simd128Value* that) {
}
+// static
+bool Simd128Value::Equals(Handle<Simd128Value> one, Handle<Simd128Value> two) {
+ return one->Equals(*two);
+}
+
+
#define SIMD128_VALUE_EQUALS(TYPE, Type, type, lane_count, lane_type) \
bool Type::Equals(Type* that) { \
for (int lane = 0; lane < lane_count; ++lane) { \
@@ -2053,6 +2059,12 @@ void Oddball::set_kind(byte value) {
}
+// static
+Handle<Object> Oddball::ToNumber(Handle<Oddball> input) {
+ return handle(input->to_number(), input->GetIsolate());
+}
+
+
ACCESSORS(Cell, value, Object, kValueOffset)
ACCESSORS(PropertyCell, dependent_code, DependentCode, kDependentCodeOffset)
ACCESSORS(PropertyCell, property_details_raw, Object, kDetailsOffset)
« no previous file with comments | « src/objects.cc ('k') | src/runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698