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

Unified Diff: src/stub-cache.cc

Issue 18881004: Turn ElementsTransitionAndStore stub into a HydrogenCodeStub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 5 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/stub-cache.cc
diff --git a/src/stub-cache.cc b/src/stub-cache.cc
index a687d81a3e57351eab2d2d2b6b9839f3fc3ebfcf..74f6c34d4d3b539e4eb1ea301fd52c9756f83285 100644
--- a/src/stub-cache.cc
+++ b/src/stub-cache.cc
@@ -1993,12 +1993,23 @@ Handle<Code> KeyedStoreStubCompiler::CompileStoreElementPolymorphic(
bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE;
ElementsKind elements_kind = receiver_map->elements_kind();
if (!transitioned_map.is_null()) {
- cached_stub = ElementsTransitionAndStoreStub(
- elements_kind,
- transitioned_map->elements_kind(),
- is_js_array,
- strict_mode(),
- store_mode_).GetCode(isolate());
+ switch (strict_mode()) {
+ case kNonStrictMode:
+ cached_stub = ElementsTransitionAndStoreNonStrictStub(
+ elements_kind,
+ transitioned_map->elements_kind(),
+ is_js_array,
+ store_mode_).GetCode(isolate());
+ break;
+
+ case kStrictMode:
+ cached_stub = ElementsTransitionAndStoreStrictStub(
+ elements_kind,
+ transitioned_map->elements_kind(),
+ is_js_array,
+ store_mode_).GetCode(isolate());
+ break;
+ }
} else {
if (FLAG_compiled_keyed_stores &&
(receiver_map->has_fast_elements() ||
« src/code-stubs.h ('K') | « src/runtime.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698