Reviewers: Lasse Reichstein,

Description:
X64: Enable specialized stubs for length property.

Please review this at http://codereview.chromium.org/160582

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
   M     src/x64/ic-x64.cc
   M     test/cctest/cctest.status


Index: test/cctest/cctest.status
===================================================================
--- test/cctest/cctest.status   (revision 2614)
+++ test/cctest/cctest.status   (working copy)
@@ -113,9 +113,6 @@
  test-debug/DebuggerHostDispatch: CRASH || FAIL
  test-debug/DebugBreakInMessageHandler: CRASH || FAIL
  test-debug/NoDebugBreakInAfterCompileMessageHandler: CRASH || FAIL
-test-api/HugeConsStringOutOfMemory: CRASH || FAIL
-test-api/OutOfMemory: CRASH || FAIL
-test-api/OutOfMemoryNested: CRASH || FAIL
  test-api/Threading: CRASH || FAIL
  test-api/Threading2: PASS || TIMEOUT
  test-api/TryCatchSourceInfo: CRASH || FAIL
Index: src/x64/ic-x64.cc
===================================================================
--- src/x64/ic-x64.cc   (revision 2614)
+++ src/x64/ic-x64.cc   (working copy)
@@ -606,9 +606,22 @@


  void LoadIC::GenerateArrayLength(MacroAssembler* masm) {
-  Generate(masm, ExternalReference(IC_Utility(kLoadIC_Miss)));
+  // ----------- S t a t e -------------
+  //  -- rcx    : name
+  //  -- rsp[0] : return address
+  //  -- rsp[8] : receiver
+  // -----------------------------------
+
+  Label miss;
+
+  __ movq(rax, Operand(rsp, kPointerSize));
+
+  StubCompiler::GenerateLoadArrayLength(masm, rax, rdx, &miss);
+  __ bind(&miss);
+  StubCompiler::GenerateLoadMiss(masm, Code::LOAD_IC);
  }

+
  void LoadIC::GenerateFunctionPrototype(MacroAssembler* masm) {
    Generate(masm, ExternalReference(IC_Utility(kLoadIC_Miss)));
  }
@@ -650,10 +663,23 @@


  void LoadIC::GenerateStringLength(MacroAssembler* masm) {
-  Generate(masm, ExternalReference(IC_Utility(kLoadIC_Miss)));
+  // ----------- S t a t e -------------
+  //  -- rcx    : name
+  //  -- rsp[0] : return address
+  //  -- rsp[8] : receiver
+  // -----------------------------------
+
+  Label miss;
+
+  __ movq(rax, Operand(rsp, kPointerSize));
+
+  StubCompiler::GenerateLoadStringLength(masm, rax, rdx, &miss);
+  __ bind(&miss);
+  StubCompiler::GenerateLoadMiss(masm, Code::LOAD_IC);
  }


+
  bool LoadIC::PatchInlinedLoad(Address address, Object* map, int offset) {
    // The address of the instruction following the call.
    Address test_instruction_address =



--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to