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

Unified Diff: src/ia32/stub-cache-ia32.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
Index: src/ia32/stub-cache-ia32.cc
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc
index 710b232c6fb7ee0dd2bc4609a97e6cf79456e391..421f9eacbb171bf0244a5732b057c60e1795cf73 100644
--- a/src/ia32/stub-cache-ia32.cc
+++ b/src/ia32/stub-cache-ia32.cc
@@ -2769,13 +2769,21 @@ Handle<Code> KeyedStoreStubCompiler::CompileStoreElement(
// -- esp[0] : return address
// -----------------------------------
ElementsKind elements_kind = receiver_map->elements_kind();
- bool is_jsarray = receiver_map->instance_type() == JS_ARRAY_TYPE;
- Handle<Code> stub =
- KeyedStoreElementStub(is_jsarray,
- elements_kind,
- store_mode_).GetCode(isolate());
-
- __ DispatchMap(edx, receiver_map, stub, DO_SMI_CHECK);
+ bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE;
+ if (FLAG_compiled_keyed_stores &&
+ (receiver_map->has_fast_elements() ||
+ receiver_map->has_external_array_elements())) {
+ Handle<Code> stub = KeyedStoreFastElementStub(
+ is_js_array,
+ elements_kind,
+ store_mode_).GetCode(isolate());
+ __ DispatchMap(edx, receiver_map, stub, DO_SMI_CHECK);
+ } else {
+ Handle<Code> stub =
+ KeyedStoreElementStub(is_js_array, elements_kind,
+ store_mode_).GetCode(isolate());
+ __ DispatchMap(edx, receiver_map, stub, DO_SMI_CHECK);
+ }
TailCallBuiltin(masm(), MissBuiltin(kind()));

Powered by Google App Engine
This is Rietveld 408576698