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

Side by Side Diff: src/objects-inl.h

Issue 7307030: Implement ICs for FastDoubleArray loads and stores (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix asserts Created 9 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after
1603 1603
1604 void FixedArray::set(int index, Object* value) { 1604 void FixedArray::set(int index, Object* value) {
1605 ASSERT(map() != HEAP->fixed_cow_array_map()); 1605 ASSERT(map() != HEAP->fixed_cow_array_map());
1606 ASSERT(index >= 0 && index < this->length()); 1606 ASSERT(index >= 0 && index < this->length());
1607 int offset = kHeaderSize + index * kPointerSize; 1607 int offset = kHeaderSize + index * kPointerSize;
1608 WRITE_FIELD(this, offset, value); 1608 WRITE_FIELD(this, offset, value);
1609 WRITE_BARRIER(this, offset); 1609 WRITE_BARRIER(this, offset);
1610 } 1610 }
1611 1611
1612 1612
1613 inline bool FixedDoubleArray::is_the_hole_nan(double value) {
1614 return BitCast<uint64_t, double>(value) == kHoleNanInt64;
1615 }
1616
1617
1618 inline double FixedDoubleArray::hole_nan_as_double() {
1619 return BitCast<double, uint64_t>(kHoleNanInt64);
1620 }
1621
1622
1623 inline double FixedDoubleArray::canonical_not_the_hole_nan_as_double() {
1624 return BitCast<double, uint64_t>(kCanonicalNonHoleNanInt64);
1625 }
1626
1627
1613 double FixedDoubleArray::get(int index) { 1628 double FixedDoubleArray::get(int index) {
1614 ASSERT(map() != HEAP->fixed_cow_array_map() && 1629 ASSERT(map() != HEAP->fixed_cow_array_map() &&
1615 map() != HEAP->fixed_array_map()); 1630 map() != HEAP->fixed_array_map());
1616 ASSERT(index >= 0 && index < this->length()); 1631 ASSERT(index >= 0 && index < this->length());
1617 double result = READ_DOUBLE_FIELD(this, kHeaderSize + index * kDoubleSize); 1632 double result = READ_DOUBLE_FIELD(this, kHeaderSize + index * kDoubleSize);
1618 ASSERT(!is_the_hole_nan(result)); 1633 ASSERT(!is_the_hole_nan(result));
1619 return result; 1634 return result;
1620 } 1635 }
1621 1636
1622 1637
(...skipping 2823 matching lines...) Expand 10 before | Expand all | Expand 10 after
4446 #undef WRITE_INT_FIELD 4461 #undef WRITE_INT_FIELD
4447 #undef READ_SHORT_FIELD 4462 #undef READ_SHORT_FIELD
4448 #undef WRITE_SHORT_FIELD 4463 #undef WRITE_SHORT_FIELD
4449 #undef READ_BYTE_FIELD 4464 #undef READ_BYTE_FIELD
4450 #undef WRITE_BYTE_FIELD 4465 #undef WRITE_BYTE_FIELD
4451 4466
4452 4467
4453 } } // namespace v8::internal 4468 } } // namespace v8::internal
4454 4469
4455 #endif // V8_OBJECTS_INL_H_ 4470 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698