Revision: 21816
Author: [email protected]
Date: Thu Jun 12 16:38:37 2014 UTC
Log: Add non-miss slow path to LoadIC_Normal.
This avoids endless IC patching cycles between "normal" and "nonexistent"
handlers when objects having and not having the property are seen
alternatingly
[email protected]
Review URL: https://codereview.chromium.org/328353002
http://code.google.com/p/v8/source/detail?r=21816
Modified:
/branches/bleeding_edge/src/arm/ic-arm.cc
/branches/bleeding_edge/src/arm64/ic-arm64.cc
/branches/bleeding_edge/src/ia32/ic-ia32.cc
/branches/bleeding_edge/src/mips/ic-mips.cc
/branches/bleeding_edge/src/x64/ic-x64.cc
/branches/bleeding_edge/src/x87/ic-x87.cc
=======================================
--- /branches/bleeding_edge/src/arm/ic-arm.cc Tue Jun 3 08:12:43 2014 UTC
+++ /branches/bleeding_edge/src/arm/ic-arm.cc Thu Jun 12 16:38:37 2014 UTC
@@ -333,14 +333,18 @@
// -- lr : return address
// -- r0 : receiver
// -----------------------------------
- Label miss;
+ Label miss, slow;
GenerateNameDictionaryReceiverCheck(masm, r0, r1, r3, r4, &miss);
// r1: elements
- GenerateDictionaryLoad(masm, &miss, r1, r2, r0, r3, r4);
+ GenerateDictionaryLoad(masm, &slow, r1, r2, r0, r3, r4);
__ Ret();
+ // Dictionary load failed, go slow (but don't miss).
+ __ bind(&slow);
+ GenerateRuntimeGetProperty(masm);
+
// Cache miss: Jump to runtime.
__ bind(&miss);
GenerateMiss(masm);
=======================================
--- /branches/bleeding_edge/src/arm64/ic-arm64.cc Tue Jun 3 08:12:43 2014
UTC
+++ /branches/bleeding_edge/src/arm64/ic-arm64.cc Thu Jun 12 16:38:37 2014
UTC
@@ -429,14 +429,18 @@
// -- lr : return address
// -- x0 : receiver
// -----------------------------------
- Label miss;
+ Label miss, slow;
GenerateNameDictionaryReceiverCheck(masm, x0, x1, x3, x4, &miss);
// x1 now holds the property dictionary.
- GenerateDictionaryLoad(masm, &miss, x1, x2, x0, x3, x4);
+ GenerateDictionaryLoad(masm, &slow, x1, x2, x0, x3, x4);
__ Ret();
+ // Dictionary load failed, go slow (but don't miss).
+ __ Bind(&slow);
+ GenerateRuntimeGetProperty(masm);
+
// Cache miss: Jump to runtime.
__ Bind(&miss);
GenerateMiss(masm);
=======================================
--- /branches/bleeding_edge/src/ia32/ic-ia32.cc Tue Jun 3 08:12:43 2014 UTC
+++ /branches/bleeding_edge/src/ia32/ic-ia32.cc Thu Jun 12 16:38:37 2014 UTC
@@ -947,15 +947,19 @@
// -- edx : receiver
// -- esp[0] : return address
// -----------------------------------
- Label miss;
+ Label miss, slow;
GenerateNameDictionaryReceiverCheck(masm, edx, eax, ebx, &miss);
// eax: elements
// Search the dictionary placing the result in eax.
- GenerateDictionaryLoad(masm, &miss, eax, ecx, edi, ebx, eax);
+ GenerateDictionaryLoad(masm, &slow, eax, ecx, edi, ebx, eax);
__ ret(0);
+ // Dictionary load failed, go slow (but don't miss).
+ __ bind(&slow);
+ GenerateRuntimeGetProperty(masm);
+
// Cache miss: Jump to runtime.
__ bind(&miss);
GenerateMiss(masm);
=======================================
--- /branches/bleeding_edge/src/mips/ic-mips.cc Tue Jun 3 08:12:43 2014 UTC
+++ /branches/bleeding_edge/src/mips/ic-mips.cc Thu Jun 12 16:38:37 2014 UTC
@@ -339,14 +339,18 @@
// -- lr : return address
// -- a0 : receiver
// -----------------------------------
- Label miss;
+ Label miss, slow;
GenerateNameDictionaryReceiverCheck(masm, a0, a1, a3, t0, &miss);
// a1: elements
- GenerateDictionaryLoad(masm, &miss, a1, a2, v0, a3, t0);
+ GenerateDictionaryLoad(masm, &slow, a1, a2, v0, a3, t0);
__ Ret();
+ // Dictionary load failed, go slow (but don't miss).
+ __ bind(&slow);
+ GenerateRuntimeGetProperty(masm);
+
// Cache miss: Jump to runtime.
__ bind(&miss);
GenerateMiss(masm);
=======================================
--- /branches/bleeding_edge/src/x64/ic-x64.cc Tue Jun 3 08:12:43 2014 UTC
+++ /branches/bleeding_edge/src/x64/ic-x64.cc Thu Jun 12 16:38:37 2014 UTC
@@ -972,15 +972,19 @@
// -- rcx : name
// -- rsp[0] : return address
// -----------------------------------
- Label miss;
+ Label miss, slow;
GenerateNameDictionaryReceiverCheck(masm, rax, rdx, rbx, &miss);
// rdx: elements
// Search the dictionary placing the result in rax.
- GenerateDictionaryLoad(masm, &miss, rdx, rcx, rbx, rdi, rax);
+ GenerateDictionaryLoad(masm, &slow, rdx, rcx, rbx, rdi, rax);
__ ret(0);
+ // Dictionary load failed, go slow (but don't miss).
+ __ bind(&slow);
+ GenerateRuntimeGetProperty(masm);
+
// Cache miss: Jump to runtime.
__ bind(&miss);
GenerateMiss(masm);
=======================================
--- /branches/bleeding_edge/src/x87/ic-x87.cc Tue Jun 3 08:12:43 2014 UTC
+++ /branches/bleeding_edge/src/x87/ic-x87.cc Thu Jun 12 16:38:37 2014 UTC
@@ -947,15 +947,19 @@
// -- edx : receiver
// -- esp[0] : return address
// -----------------------------------
- Label miss;
+ Label miss, slow;
GenerateNameDictionaryReceiverCheck(masm, edx, eax, ebx, &miss);
// eax: elements
// Search the dictionary placing the result in eax.
- GenerateDictionaryLoad(masm, &miss, eax, ecx, edi, ebx, eax);
+ GenerateDictionaryLoad(masm, &slow, eax, ecx, edi, ebx, eax);
__ ret(0);
+ // Dictionary load failed, go slow (but don't miss).
+ __ bind(&slow);
+ GenerateRuntimeGetProperty(masm);
+
// Cache miss: Jump to runtime.
__ bind(&miss);
GenerateMiss(masm);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.