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

Side by Side Diff: src/objects.cc

Issue 251043008: TODO in Dictionary resolved. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #include "v8.h" 5 #include "v8.h"
6 6
7 #include "accessors.h" 7 #include "accessors.h"
8 #include "allocation-site-scopes.h" 8 #include "allocation-site-scopes.h"
9 #include "api.h" 9 #include "api.h"
10 #include "arguments.h" 10 #include "arguments.h"
(...skipping 15758 matching lines...) Expand 10 before | Expand all | Expand 10 after
15769 int entry = dictionary->FindEntry(key); 15769 int entry = dictionary->FindEntry(key);
15770 15770
15771 // If the entry is present set the value; 15771 // If the entry is present set the value;
15772 if (entry != Dictionary::kNotFound) { 15772 if (entry != Dictionary::kNotFound) {
15773 dictionary->ValueAtPut(entry, *value); 15773 dictionary->ValueAtPut(entry, *value);
15774 return dictionary; 15774 return dictionary;
15775 } 15775 }
15776 15776
15777 // Check whether the dictionary should be extended. 15777 // Check whether the dictionary should be extended.
15778 dictionary = EnsureCapacity(dictionary, 1, key); 15778 dictionary = EnsureCapacity(dictionary, 1, key);
15779 15779 #ifdef DEBUG
15780 Handle<Object> k = Shape::AsHandle(dictionary->GetIsolate(), key); 15780 USE(Shape::AsHandle(dictionary->GetIsolate(), key));
15781 // TODO(ishell): Figure out if it is necessary to call AsHandle() here. 15781 #endif
15782 USE(k);
15783 PropertyDetails details = PropertyDetails(NONE, NORMAL, 0); 15782 PropertyDetails details = PropertyDetails(NONE, NORMAL, 0);
15784 15783
15785 AddEntry(dictionary, key, value, details, dictionary->Hash(key)); 15784 AddEntry(dictionary, key, value, details, dictionary->Hash(key));
15786 return dictionary; 15785 return dictionary;
15787 } 15786 }
15788 15787
15789 15788
15790 template<typename Derived, typename Shape, typename Key> 15789 template<typename Derived, typename Shape, typename Key>
15791 Handle<Derived> Dictionary<Derived, Shape, Key>::Add( 15790 Handle<Derived> Dictionary<Derived, Shape, Key>::Add(
15792 Handle<Derived> dictionary, 15791 Handle<Derived> dictionary,
(...skipping 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after
17233 #define ERROR_MESSAGES_TEXTS(C, T) T, 17232 #define ERROR_MESSAGES_TEXTS(C, T) T,
17234 static const char* error_messages_[] = { 17233 static const char* error_messages_[] = {
17235 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 17234 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
17236 }; 17235 };
17237 #undef ERROR_MESSAGES_TEXTS 17236 #undef ERROR_MESSAGES_TEXTS
17238 return error_messages_[reason]; 17237 return error_messages_[reason];
17239 } 17238 }
17240 17239
17241 17240
17242 } } // namespace v8::internal 17241 } } // namespace v8::internal
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