Author: [email protected]
Date: Mon Jul 20 07:33:59 2009
New Revision: 2512

Modified:
    branches/bleeding_edge/src/ic.cc
    branches/bleeding_edge/src/x64/ic-x64.cc
    branches/bleeding_edge/src/x64/stub-cache-x64.cc

Log:
X64: Enable more of LoadIC, disable individual stub types.
Review URL: http://codereview.chromium.org/155763

Modified: branches/bleeding_edge/src/ic.cc
==============================================================================
--- branches/bleeding_edge/src/ic.cc    (original)
+++ branches/bleeding_edge/src/ic.cc    Mon Jul 20 07:33:59 2009
@@ -609,13 +609,10 @@
      }
    }

-  // TODO(X64): Enable inline cache for load.
-  #ifndef V8_TARGET_ARCH_X64
    // Update inline cache and stub cache.
    if (FLAG_use_ic && lookup.IsLoaded()) {
      UpdateCaches(&lookup, state, object, name);
    }
-  #endif

    PropertyAttributes attr;
    if (lookup.IsValid() && lookup.type() == INTERCEPTOR) {

Modified: branches/bleeding_edge/src/x64/ic-x64.cc
==============================================================================
--- branches/bleeding_edge/src/x64/ic-x64.cc    (original)
+++ branches/bleeding_edge/src/x64/ic-x64.cc    Mon Jul 20 07:33:59 2009
@@ -285,11 +285,34 @@
    Generate(masm, ExternalReference(IC_Utility(kLoadIC_Miss)));
  }

+
  void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
+  // ----------- S t a t e -------------
+  //  -- rcx    : name
+  //  -- rsp[0] : return address
+  //  -- rsp[8] : receiver
+  // -----------------------------------
+
+  __ movq(rax, Operand(rsp, kPointerSize));
+
+  // Probe the stub cache.
+  Code::Flags flags = Code::ComputeFlags(Code::LOAD_IC,
+                                         NOT_IN_LOOP,
+                                         MONOMORPHIC);
+  StubCache::GenerateProbe(masm, flags, rax, rcx, rbx, rdx);
+
+  // Cache miss: Jump to runtime.
    Generate(masm, ExternalReference(IC_Utility(kLoadIC_Miss)));
  }

+
  void LoadIC::GenerateMiss(MacroAssembler* masm) {
+  // ----------- S t a t e -------------
+  //  -- rcx    : name
+  //  -- rsp[0] : return address
+  //  -- rsp[8] : receiver
+  // -----------------------------------
+
    Generate(masm, ExternalReference(IC_Utility(kLoadIC_Miss)));
  }

@@ -302,7 +325,7 @@
  }

  bool LoadIC::PatchInlinedLoad(Address address, Object* map, int index) {
-  UNIMPLEMENTED();
+  // TODO(X64): Implement this function.  Until then, the code is not  
patched.
    return false;
  }


Modified: branches/bleeding_edge/src/x64/stub-cache-x64.cc
==============================================================================
--- branches/bleeding_edge/src/x64/stub-cache-x64.cc    (original)
+++ branches/bleeding_edge/src/x64/stub-cache-x64.cc    Mon Jul 20 07:33:59  
2009
@@ -311,8 +311,8 @@
                                                JSObject* b,
                                                AccessorInfo* c,
                                                String* d) {
-  UNIMPLEMENTED();
-  return NULL;
+  // TODO(X64): Implement a real stub.
+  return Failure::InternalError();
  }


@@ -320,8 +320,8 @@
                                                JSObject* b,
                                                Object* c,
                                                String* d) {
-  UNIMPLEMENTED();
-  return NULL;
+  // TODO(X64): Implement a real stub.
+  return Failure::InternalError();
  }


@@ -329,16 +329,16 @@
                                             JSObject* b,
                                             int c,
                                             String* d) {
-  UNIMPLEMENTED();
-  return NULL;
+  // TODO(X64): Implement a real stub.
+  return Failure::InternalError();
  }


  Object* LoadStubCompiler::CompileLoadInterceptor(JSObject* a,
                                                   JSObject* b,
                                                   String* c) {
-  UNIMPLEMENTED();
-  return NULL;
+  // TODO(X64): Implement a real stub.
+  return Failure::InternalError();
  }


@@ -347,8 +347,8 @@
                                              JSGlobalPropertyCell* cell,
                                              String* name,
                                              bool is_dont_delete) {
-  UNIMPLEMENTED();
-  return NULL;
+  // TODO(X64): Implement a real stub.
+  return Failure::InternalError();
  }


@@ -487,6 +487,22 @@
      __ movq(dst, FieldOperand(dst, offset));
    }
  }
+
+
+void StubCache::GenerateProbe(MacroAssembler* masm,
+                              Code::Flags flags,
+                              Register receiver,
+                              Register name,
+                              Register scratch,
+                              Register extra) {
+  Label miss;
+  // TODO(X64): Probe the primary and secondary StubCache tables.
+
+  // Cache miss: Fall-through and let caller handle the miss by
+  // entering the runtime system.
+  __ bind(&miss);
+}
+

  #undef __


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

Reply via email to