summaryrefslogtreecommitdiffstats
path: root/src/code-stubs.cc
diff options
context:
space:
mode:
authorShimeng (Simon) Wang <swang@google.com>2010-12-06 19:01:33 -0800
committerShimeng (Simon) Wang <swang@google.com>2010-12-06 19:01:33 -0800
commit8a31eba00023874d4a1dcdc5f411cc4336776874 (patch)
tree33cb6a918a63be01fdc3e5ed24d015aa5ce6a925 /src/code-stubs.cc
parent90bac256d9f48d4ee52d0e08bf0e5cad57b3c51c (diff)
downloadandroid_external_v8-8a31eba00023874d4a1dcdc5f411cc4336776874.tar.gz
android_external_v8-8a31eba00023874d4a1dcdc5f411cc4336776874.tar.bz2
android_external_v8-8a31eba00023874d4a1dcdc5f411cc4336776874.zip
Update V8 to r5901 as required by WebKit r73109
Change-Id: Ic48c5b085ce90e0151e2e7e58c4c5afe87fce9d1
Diffstat (limited to 'src/code-stubs.cc')
-rw-r--r--src/code-stubs.cc34
1 files changed, 13 insertions, 21 deletions
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index 787ec2a7..8b9198fb 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -37,7 +37,6 @@ namespace v8 {
namespace internal {
bool CodeStub::FindCodeInCache(Code** code_out) {
- if (has_custom_cache()) return GetCustomCache(code_out);
int index = Heap::code_stubs()->FindEntry(GetKey());
if (index != NumberDictionary::kNotFound) {
*code_out = Code::cast(Heap::code_stubs()->ValueAt(index));
@@ -105,17 +104,14 @@ Handle<Code> CodeStub::GetCode() {
Handle<Code> new_object = Factory::NewCode(desc, flags, masm.CodeObject());
RecordCodeGeneration(*new_object, &masm);
- if (has_custom_cache()) {
- SetCustomCache(*new_object);
- } else {
- // Update the dictionary and the root in Heap.
- Handle<NumberDictionary> dict =
- Factory::DictionaryAtNumberPut(
- Handle<NumberDictionary>(Heap::code_stubs()),
- GetKey(),
- new_object);
- Heap::public_set_code_stubs(*dict);
- }
+ // Update the dictionary and the root in Heap.
+ Handle<NumberDictionary> dict =
+ Factory::DictionaryAtNumberPut(
+ Handle<NumberDictionary>(Heap::code_stubs()),
+ GetKey(),
+ new_object);
+ Heap::public_set_code_stubs(*dict);
+
code = *new_object;
}
@@ -147,15 +143,11 @@ MaybeObject* CodeStub::TryGetCode() {
code = Code::cast(new_object);
RecordCodeGeneration(code, &masm);
- if (has_custom_cache()) {
- SetCustomCache(code);
- } else {
- // Try to update the code cache but do not fail if unable.
- MaybeObject* maybe_new_object =
- Heap::code_stubs()->AtNumberPut(GetKey(), code);
- if (maybe_new_object->ToObject(&new_object)) {
- Heap::public_set_code_stubs(NumberDictionary::cast(new_object));
- }
+ // Try to update the code cache but do not fail if unable.
+ MaybeObject* maybe_new_object =
+ Heap::code_stubs()->AtNumberPut(GetKey(), code);
+ if (maybe_new_object->ToObject(&new_object)) {
+ Heap::public_set_code_stubs(NumberDictionary::cast(new_object));
}
}