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

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

Issue 13811021: Put common case first (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2490 matching lines...) Expand 10 before | Expand all | Expand 10 after
2501 void Name::set_hash_field(uint32_t value) { 2501 void Name::set_hash_field(uint32_t value) {
2502 WRITE_UINT32_FIELD(this, kHashFieldOffset, value); 2502 WRITE_UINT32_FIELD(this, kHashFieldOffset, value);
2503 #if V8_HOST_ARCH_64_BIT 2503 #if V8_HOST_ARCH_64_BIT
2504 WRITE_UINT32_FIELD(this, kHashFieldOffset + kIntSize, 0); 2504 WRITE_UINT32_FIELD(this, kHashFieldOffset + kIntSize, 0);
2505 #endif 2505 #endif
2506 } 2506 }
2507 2507
2508 2508
2509 bool Name::Equals(Name* other) { 2509 bool Name::Equals(Name* other) {
2510 if (other == this) return true; 2510 if (other == this) return true;
2511 if (this->IsSymbol() || other->IsSymbol() || 2511 if ((this->IsInternalizedString() && other->IsInternalizedString()) ||
2512 (this->IsInternalizedString() && other->IsInternalizedString())) { 2512 this->IsSymbol() || other->IsSymbol()) {
2513 return false; 2513 return false;
2514 } 2514 }
2515 return String::cast(this)->SlowEquals(String::cast(other)); 2515 return String::cast(this)->SlowEquals(String::cast(other));
2516 } 2516 }
2517 2517
2518 2518
2519 ACCESSORS(Symbol, name, Object, kNameOffset) 2519 ACCESSORS(Symbol, name, Object, kNameOffset)
2520 2520
2521 2521
2522 bool String::Equals(String* other) { 2522 bool String::Equals(String* other) {
(...skipping 3522 matching lines...) Expand 10 before | Expand all | Expand 10 after
6045 #undef WRITE_UINT32_FIELD 6045 #undef WRITE_UINT32_FIELD
6046 #undef READ_SHORT_FIELD 6046 #undef READ_SHORT_FIELD
6047 #undef WRITE_SHORT_FIELD 6047 #undef WRITE_SHORT_FIELD
6048 #undef READ_BYTE_FIELD 6048 #undef READ_BYTE_FIELD
6049 #undef WRITE_BYTE_FIELD 6049 #undef WRITE_BYTE_FIELD
6050 6050
6051 6051
6052 } } // namespace v8::internal 6052 } } // namespace v8::internal
6053 6053
6054 #endif // V8_OBJECTS_INL_H_ 6054 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698