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

Unified Diff: src/arm/stub-cache-arm.cc

Issue 68523009: Also support smi in load-ICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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 | « no previous file | src/ia32/stub-cache-ia32.cc » ('j') | src/ia32/stub-cache-ia32.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/stub-cache-arm.cc
diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc
index 3994aa0fdf946a7e2a8329bf38c862a1ef05f0ee..fefd4622ba808d979d380548f64042523433688b 100644
--- a/src/arm/stub-cache-arm.cc
+++ b/src/arm/stub-cache-arm.cc
@@ -3054,7 +3054,20 @@ Handle<Code> BaseLoadStoreStubCompiler::CompilePolymorphicIC(
GenerateNameCheck(name, this->name(), &miss);
}
- __ JumpIfSmi(receiver(), &miss);
+ Label number_case;
+ Label* smi_handler = &miss;
+ for (int i = 0; i < receiver_maps->length(); ++i) {
+ Handle<Map> map = receiver_maps->at(i);
+ if (map.is_identical_to(isolate()->factory()->heap_number_map())) {
+ // Do not jump to the handler directly to ensure maps / handlers are still
+ // in sync so updating a polymorphic IC can gather maps / handlers in
+ // sequence.
+ smi_handler = &number_case;
+ break;
+ }
+ }
+ __ JumpIfSmi(receiver(), smi_handler);
+
Register map_reg = scratch1();
int receiver_count = receiver_maps->length();
@@ -3066,6 +3079,10 @@ Handle<Code> BaseLoadStoreStubCompiler::CompilePolymorphicIC(
number_of_handled_maps++;
__ mov(ip, Operand(receiver_maps->at(current)));
__ cmp(map_reg, ip);
+ if (map.is_identical_to(isolate()->factory()->heap_number_map())) {
+ ASSERT(!number_case.is_unused());
+ __ bind(&number_case);
+ }
__ Jump(handlers->at(current), RelocInfo::CODE_TARGET, eq);
}
}
« no previous file with comments | « no previous file | src/ia32/stub-cache-ia32.cc » ('j') | src/ia32/stub-cache-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698