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

Unified Diff: src/code-stubs.cc

Issue 150168: Removed virtual behavior from Dictionaries. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 6 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/bootstrapper.cc ('k') | src/factory.h » ('j') | src/objects.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.cc
===================================================================
--- src/code-stubs.cc (revision 2321)
+++ src/code-stubs.cc (working copy)
@@ -37,8 +37,8 @@
Handle<Code> CodeStub::GetCode() {
uint32_t key = GetKey();
- int index = Heap::code_stubs()->FindNumberEntry(key);
- if (index == -1) {
+ int index = Heap::code_stubs()->FindEntry(key);
+ if (index == NumberDictionary::kNotFound) {
HandleScope scope;
// Update the static counter each time a new code stub is generated.
@@ -80,14 +80,15 @@
#endif
// Update the dictionary and the root in Heap.
- Handle<Dictionary> dict =
- Factory::DictionaryAtNumberPut(Handle<Dictionary>(Heap::code_stubs()),
- key,
- code);
+ Handle<NumberDictionary> dict =
+ Factory::DictionaryAtNumberPut(
+ Handle<NumberDictionary>(Heap::code_stubs()),
+ key,
+ code);
Heap::set_code_stubs(*dict);
- index = Heap::code_stubs()->FindNumberEntry(key);
+ index = Heap::code_stubs()->FindEntry(key);
}
- ASSERT(index != -1);
+ ASSERT(index != NumberDictionary::kNotFound);
return Handle<Code>(Code::cast(Heap::code_stubs()->ValueAt(index)));
}
« no previous file with comments | « src/bootstrapper.cc ('k') | src/factory.h » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698