Chromium Code Reviews

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

Issue 1024823002: Fix OOM bug 3976. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add test from bug Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 6485 matching lines...)
6496 DCHECK(this->data()->IsFixedArray()); 6496 DCHECK(this->data()->IsFixedArray());
6497 Object* data = this->data(); 6497 Object* data = this->data();
6498 Smi* smi = Smi::cast(FixedArray::cast(data)->get(kFlagsIndex)); 6498 Smi* smi = Smi::cast(FixedArray::cast(data)->get(kFlagsIndex));
6499 return Flags(smi->value()); 6499 return Flags(smi->value());
6500 } 6500 }
6501 6501
6502 6502
6503 String* JSRegExp::Pattern() { 6503 String* JSRegExp::Pattern() {
6504 DCHECK(this->data()->IsFixedArray()); 6504 DCHECK(this->data()->IsFixedArray());
6505 Object* data = this->data(); 6505 Object* data = this->data();
6506 String* pattern= String::cast(FixedArray::cast(data)->get(kSourceIndex)); 6506 String* pattern = String::cast(FixedArray::cast(data)->get(kSourceIndex));
6507 return pattern; 6507 return pattern;
6508 } 6508 }
6509 6509
6510 6510
6511 Object* JSRegExp::DataAt(int index) { 6511 Object* JSRegExp::DataAt(int index) {
6512 DCHECK(TypeTag() != NOT_COMPILED); 6512 DCHECK(TypeTag() != NOT_COMPILED);
6513 return FixedArray::cast(data())->get(index); 6513 return FixedArray::cast(data())->get(index);
6514 } 6514 }
6515 6515
6516 6516
(...skipping 957 matching lines...)
7474 #undef READ_SHORT_FIELD 7474 #undef READ_SHORT_FIELD
7475 #undef WRITE_SHORT_FIELD 7475 #undef WRITE_SHORT_FIELD
7476 #undef READ_BYTE_FIELD 7476 #undef READ_BYTE_FIELD
7477 #undef WRITE_BYTE_FIELD 7477 #undef WRITE_BYTE_FIELD
7478 #undef NOBARRIER_READ_BYTE_FIELD 7478 #undef NOBARRIER_READ_BYTE_FIELD
7479 #undef NOBARRIER_WRITE_BYTE_FIELD 7479 #undef NOBARRIER_WRITE_BYTE_FIELD
7480 7480
7481 } } // namespace v8::internal 7481 } } // namespace v8::internal
7482 7482
7483 #endif // V8_OBJECTS_INL_H_ 7483 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine