Author: [email protected]
Date: Thu Jul 16 01:38:52 2009
New Revision: 2481

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

Log:
X64: Enable inline caching for calls, with some stubs stubbed out.
Review URL: http://codereview.chromium.org/149674

Modified: branches/bleeding_edge/src/ic.cc
==============================================================================
--- branches/bleeding_edge/src/ic.cc    (original)
+++ branches/bleeding_edge/src/ic.cc    Thu Jul 16 01:38:52 2009
@@ -365,13 +365,10 @@
      return TypeError("undefined_method", object, name);
    }

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

    // Get the property.
    PropertyAttributes attr;
@@ -1248,11 +1245,6 @@


  void CallIC::GenerateInitialize(MacroAssembler* masm, int argc) {
-  Generate(masm, argc, ExternalReference(IC_Utility(kCallIC_Miss)));
-}
-
-
-void CallIC::GeneratePreMonomorphic(MacroAssembler* masm, int argc) {
    Generate(masm, argc, ExternalReference(IC_Utility(kCallIC_Miss)));
  }


Modified: branches/bleeding_edge/src/ic.h
==============================================================================
--- branches/bleeding_edge/src/ic.h     (original)
+++ branches/bleeding_edge/src/ic.h     Thu Jul 16 01:38:52 2009
@@ -174,7 +174,6 @@

    // Code generator routines.
    static void GenerateInitialize(MacroAssembler* masm, int argc);
-  static void GeneratePreMonomorphic(MacroAssembler* masm, int argc);
    static void GenerateMiss(MacroAssembler* masm, int argc);
    static void GenerateMegamorphic(MacroAssembler* masm, int argc);
    static void GenerateNormal(MacroAssembler* masm, int argc);

Modified: branches/bleeding_edge/src/stub-cache.cc
==============================================================================
--- branches/bleeding_edge/src/stub-cache.cc    (original)
+++ branches/bleeding_edge/src/stub-cache.cc    Thu Jul 16 01:38:52 2009
@@ -863,6 +863,8 @@
  Object* StubCompiler::CompileCallPreMonomorphic(Code::Flags flags) {
    HandleScope scope;
    int argc = Code::ExtractArgumentsCountFromFlags(flags);
+  // The code of the PreMonomorphic stub is the same as the code
+  // of the Initialized stub.  They just differ on the code object flags.
    CallIC::GenerateInitialize(masm(), argc);
    Object* result = GetCodeWithFlags(flags, "CompileCallPreMonomorphic");
    if (!result->IsFailure()) {

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    Thu Jul 16 01:38:52  
2009
@@ -44,24 +44,24 @@
                                                JSFunction* c,
                                                String* d,
                                                StubCompiler::CheckType e) {
-  UNIMPLEMENTED();
-  return NULL;
+  // TODO(X64): Implement a real stub.
+  return Failure::InternalError();
  }

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


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


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



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

Reply via email to