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

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

Issue 12459026: ES6 symbols: implement name property (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 9 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-debug.cc ('k') | src/objects-printer.cc » ('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 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 2487 matching lines...) Expand 10 before | Expand all | Expand 10 after
2498 } 2498 }
2499 2499
2500 2500
2501 bool Name::Equals(Name* other) { 2501 bool Name::Equals(Name* other) {
2502 if (other == this) return true; 2502 if (other == this) return true;
2503 if (this->IsUniqueName() && other->IsUniqueName()) return false; 2503 if (this->IsUniqueName() && other->IsUniqueName()) return false;
2504 return String::cast(this)->SlowEquals(String::cast(other)); 2504 return String::cast(this)->SlowEquals(String::cast(other));
2505 } 2505 }
2506 2506
2507 2507
2508 ACCESSORS(Symbol, name, Object, kNameOffset)
2509
2510
2508 bool String::Equals(String* other) { 2511 bool String::Equals(String* other) {
2509 if (other == this) return true; 2512 if (other == this) return true;
2510 if (this->IsInternalizedString() && other->IsInternalizedString()) { 2513 if (this->IsInternalizedString() && other->IsInternalizedString()) {
2511 return false; 2514 return false;
2512 } 2515 }
2513 return SlowEquals(other); 2516 return SlowEquals(other);
2514 } 2517 }
2515 2518
2516 2519
2517 MaybeObject* String::TryFlatten(PretenureFlag pretenure) { 2520 MaybeObject* String::TryFlatten(PretenureFlag pretenure) {
(...skipping 3494 matching lines...) Expand 10 before | Expand all | Expand 10 after
6012 #undef WRITE_UINT32_FIELD 6015 #undef WRITE_UINT32_FIELD
6013 #undef READ_SHORT_FIELD 6016 #undef READ_SHORT_FIELD
6014 #undef WRITE_SHORT_FIELD 6017 #undef WRITE_SHORT_FIELD
6015 #undef READ_BYTE_FIELD 6018 #undef READ_BYTE_FIELD
6016 #undef WRITE_BYTE_FIELD 6019 #undef WRITE_BYTE_FIELD
6017 6020
6018 6021
6019 } } // namespace v8::internal 6022 } } // namespace v8::internal
6020 6023
6021 #endif // V8_OBJECTS_INL_H_ 6024 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects-debug.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698