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

Unified Diff: src/stub-cache.cc

Issue 12221064: Implement many KeyedStoreStubs using Crankshaft (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add runtime flag and address review feedback 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 side-by-side diff with in-line comments
Download patch
« src/ic.cc ('K') | « src/runtime.cc ('k') | src/type-info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/stub-cache.cc
diff --git a/src/stub-cache.cc b/src/stub-cache.cc
index 9a2ca0256a2d99cb8a29138911820faa16d8512a..68d0c3a2cbb0730779443d58201ad1becd917743 100644
--- a/src/stub-cache.cc
+++ b/src/stub-cache.cc
@@ -441,7 +441,9 @@ Handle<Code> StubCache::ComputeKeyedStoreElement(
Code::KEYED_STORE_IC, extra_state);
ASSERT(store_mode == STANDARD_STORE ||
- store_mode == STORE_AND_GROW_NO_TRANSITION);
+ store_mode == STORE_AND_GROW_NO_TRANSITION ||
+ store_mode == STORE_NO_TRANSITION_IGNORE_OUT_OF_BOUNDS ||
+ store_mode == STORE_NO_TRANSITION_HANDLE_COW);
Handle<String> name =
isolate()->factory()->KeyedStoreElementMonomorphic_string();
@@ -899,7 +901,9 @@ Handle<Code> StubCache::ComputeStoreElementPolymorphic(
KeyedAccessStoreMode store_mode,
StrictModeFlag strict_mode) {
ASSERT(store_mode == STANDARD_STORE ||
- store_mode == STORE_AND_GROW_NO_TRANSITION);
+ store_mode == STORE_AND_GROW_NO_TRANSITION ||
+ store_mode == STORE_NO_TRANSITION_IGNORE_OUT_OF_BOUNDS ||
+ store_mode == STORE_NO_TRANSITION_HANDLE_COW);
Handle<PolymorphicCodeCache> cache =
isolate_->factory()->polymorphic_code_cache();
Code::ExtraICState extra_state = Code::ComputeExtraICState(store_mode,
@@ -1744,10 +1748,19 @@ Handle<Code> KeyedStoreStubCompiler::CompileStoreElementPolymorphic(
strict_mode(),
store_mode_).GetCode(isolate());
} else {
- cached_stub = KeyedStoreElementStub(
- is_js_array,
- elements_kind,
- store_mode_).GetCode(isolate());
+ if (FLAG_compiled_keyed_stores &&
+ (receiver_map->has_fast_elements() ||
+ receiver_map->has_external_array_elements())) {
+ cached_stub = KeyedStoreFastElementStub(
+ is_js_array,
+ elements_kind,
+ store_mode_).GetCode(isolate());
+ } else {
+ cached_stub = KeyedStoreElementStub(
+ is_js_array,
+ elements_kind,
+ store_mode_).GetCode(isolate());
+ }
}
ASSERT(!cached_stub.is_null());
handlers.Add(cached_stub);
« src/ic.cc ('K') | « src/runtime.cc ('k') | src/type-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698