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

Unified Diff: src/arm/code-stubs-arm.cc

Issue 8344045: Fast elements conversions in crankshaft using generated code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 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
« no previous file with comments | « no previous file | src/arm/ic-arm.cc » ('j') | src/code-stubs.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/code-stubs-arm.cc
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc
index fa7cd119a6ccd1eb8f6799fa274e37574697088f..827cd3f3bd942f4da2d19b4895a9bc0c98bb1684 100644
--- a/src/arm/code-stubs-arm.cc
+++ b/src/arm/code-stubs-arm.cc
@@ -7203,7 +7203,7 @@ void FastElementsConversionStub::GenerateSmiOnlyToObject(MacroAssembler* masm) {
void FastElementsConversionStub::GenerateSmiOnlyToDouble(
- MacroAssembler* masm, StrictModeFlag strict_mode) {
+ MacroAssembler* masm, Type type, StrictModeFlag strict_mode) {
// ----------- S t a t e -------------
// -- r0 : value
// -- r1 : key
@@ -7270,7 +7270,13 @@ void FastElementsConversionStub::GenerateSmiOnlyToDouble(
// Call into runtime if GC is required.
__ bind(&gc_required);
- KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode);
+ if (type == TRANSITION_ONLY) {
+ __ push(r2);
+ __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1);
+ } else {
+ ASSERT(type == TRANSITION_AND_STORE);
+ KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode);
+ }
// Convert and copy elements.
__ bind(&loop);
@@ -7308,11 +7314,16 @@ void FastElementsConversionStub::GenerateSmiOnlyToDouble(
__ b(lt, &loop);
if (vfp3_supported) __ Pop(r1, r0);
+
+ if (type == TRANSITION_ONLY) {
+ __ mov(r0, r2);
+ __ Ret();
+ }
}
void FastElementsConversionStub::GenerateDoubleToObject(
- MacroAssembler* masm, StrictModeFlag strict_mode) {
+ MacroAssembler* masm, Type type, StrictModeFlag strict_mode) {
// ----------- S t a t e -------------
// -- r0 : value
// -- r1 : key
@@ -7361,7 +7372,13 @@ void FastElementsConversionStub::GenerateDoubleToObject(
__ bind(&gc_required);
__ Pop(r3, r2, r1, r0);
__ pop(lr);
- KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode);
+ if (type == TRANSITION_ONLY) {
+ __ push(r2);
+ __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1);
+ } else {
+ ASSERT(type == TRANSITION_AND_STORE);
+ KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode);
+ }
__ bind(&loop);
__ ldr(r1, MemOperand(r4, 8, PostIndex));
@@ -7416,6 +7433,11 @@ void FastElementsConversionStub::GenerateDoubleToObject(
EMIT_REMEMBERED_SET,
OMIT_SMI_CHECK);
__ pop(lr);
+
+ if (type == TRANSITION_ONLY) {
+ __ mov(r0, r2);
+ __ Ret();
+ }
}
« no previous file with comments | « no previous file | src/arm/ic-arm.cc » ('j') | src/code-stubs.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698