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

Unified Diff: src/objects.cc

Issue 249993002: *NumberDictionary::AddNumberEntry() handlified. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 0ba7859b3883baa1063843db751abca196ec8875..7e768d90c19b07cbf25e1cb543f3257e65c50840 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -16014,6 +16014,7 @@ MaybeObject* Dictionary<Derived, Shape, Key>::AddEntry(
void SeededNumberDictionary::UpdateMaxNumberKey(uint32_t key) {
+ DisallowHeapAllocation no_allocation;
// If the dictionary requires slow elements an element has already
// been added at a high index.
if (requires_slow_elements()) return;
@@ -16031,38 +16032,28 @@ void SeededNumberDictionary::UpdateMaxNumberKey(uint32_t key) {
}
}
+
Handle<SeededNumberDictionary> SeededNumberDictionary::AddNumberEntry(
Handle<SeededNumberDictionary> dictionary,
uint32_t key,
Handle<Object> value,
PropertyDetails details) {
+ dictionary->UpdateMaxNumberKey(key);
+ SLOW_ASSERT(dictionary->FindEntry(key) == kNotFound);
CALL_HEAP_FUNCTION(dictionary->GetIsolate(),
- dictionary->AddNumberEntry(key, *value, details),
+ dictionary->Add(key, *value, details),
SeededNumberDictionary);
}
-MaybeObject* SeededNumberDictionary::AddNumberEntry(uint32_t key,
- Object* value,
- PropertyDetails details) {
- UpdateMaxNumberKey(key);
- SLOW_ASSERT(this->FindEntry(key) == kNotFound);
- return Add(key, value, details);
-}
-
-
-MaybeObject* UnseededNumberDictionary::AddNumberEntry(uint32_t key,
- Object* value) {
- SLOW_ASSERT(this->FindEntry(key) == kNotFound);
- return Add(key, value, PropertyDetails(NONE, NORMAL, 0));
-}
-
Handle<UnseededNumberDictionary> UnseededNumberDictionary::AddNumberEntry(
Handle<UnseededNumberDictionary> dictionary,
uint32_t key,
Handle<Object> value) {
+ SLOW_ASSERT(dictionary->FindEntry(key) == kNotFound);
CALL_HEAP_FUNCTION(dictionary->GetIsolate(),
- dictionary->AddNumberEntry(key, *value),
+ dictionary->Add(
+ key, *value, PropertyDetails(NONE, NORMAL, 0)),
UnseededNumberDictionary);
}
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698