Revision: 2706
Author: [email protected]
Date: Tue Aug 18 03:52:14 2009
Log: Remove one of the GCs performed by the --gc-greedy flag.  The GC  
performed by CEntryStub before the first call to C, when --gc-greedy is  
set, caused a bug in calling API callbacks.
Review URL: http://codereview.chromium.org/171104
http://code.google.com/p/v8/source/detail?r=2706

Modified:
  /branches/bleeding_edge/src/arm/builtins-arm.cc
  /branches/bleeding_edge/src/arm/codegen-arm.cc
  /branches/bleeding_edge/src/builtins.cc
  /branches/bleeding_edge/src/ia32/builtins-ia32.cc
  /branches/bleeding_edge/src/ia32/codegen-ia32.cc
  /branches/bleeding_edge/src/x64/builtins-x64.cc
  /branches/bleeding_edge/src/x64/codegen-x64.cc

=======================================
--- /branches/bleeding_edge/src/arm/builtins-arm.cc     Mon Aug 17 17:12:26 2009
+++ /branches/bleeding_edge/src/arm/builtins-arm.cc     Tue Aug 18 03:52:14 2009
@@ -39,7 +39,7 @@


  void Builtins::Generate_Adaptor(MacroAssembler* masm, CFunctionId id) {
-  // TODO(1238487): Don't pass the function in a static variable.
+  // TODO(428): Don't pass the function in a static variable.
    __ mov(ip, Operand(ExternalReference::builtin_passed_function()));
    __ str(r1, MemOperand(ip, 0));

=======================================
--- /branches/bleeding_edge/src/arm/codegen-arm.cc      Mon Aug 17 17:12:26 2009
+++ /branches/bleeding_edge/src/arm/codegen-arm.cc      Tue Aug 18 03:52:14 2009
@@ -5890,16 +5890,11 @@
    Label throw_out_of_memory_exception;
    Label throw_normal_exception;

-  // Call into the runtime system. Collect garbage before the call if
-  // running with --gc-greedy set.
-  if (FLAG_gc_greedy) {
-    Failure* failure = Failure::RetryAfterGC(0);
-    __ mov(r0, Operand(reinterpret_cast<intptr_t>(failure)));
-  }
+  // Call into the runtime system.
    GenerateCore(masm, &throw_normal_exception,
                 &throw_out_of_memory_exception,
                 frame_type,
-               FLAG_gc_greedy,
+               false,
                 false);

    // Do space-specific GC and retry runtime call.
=======================================
--- /branches/bleeding_edge/src/builtins.cc     Wed Jul 29 05:50:20 2009
+++ /branches/bleeding_edge/src/builtins.cc     Tue Aug 18 03:52:14 2009
@@ -61,7 +61,7 @@
  //  
----------------------------------------------------------------------------


-// TODO(1238487): We should consider passing whether or not the
+// TODO(428): We should consider passing whether or not the
  // builtin was invoked as a constructor as part of the
  // arguments. Maybe we also want to pass the called function?
  #define BUILTIN(name)                                                   \
@@ -336,9 +336,7 @@
    HandleScope scope;
    bool is_construct = CalledAsConstructor();

-  // TODO(1238487): This is not nice. We need to get rid of this
-  // kludgy behavior and start handling API calls in a more direct
-  // way - maybe compile specialized stubs lazily?.
+  // TODO(428): Remove use of static variable, handle API callbacks  
directly.
    Handle<JSFunction> function =
         
Handle<JSFunction>(JSFunction::cast(Builtins::builtin_passed_function));

=======================================
--- /branches/bleeding_edge/src/ia32/builtins-ia32.cc   Fri Aug  7 05:52:32  
2009
+++ /branches/bleeding_edge/src/ia32/builtins-ia32.cc   Tue Aug 18 03:52:14  
2009
@@ -37,7 +37,7 @@


  void Builtins::Generate_Adaptor(MacroAssembler* masm, CFunctionId id) {
-  // TODO(1238487): Don't pass the function in a static variable.
+  // TODO(428): Don't pass the function in a static variable.
    ExternalReference passed = ExternalReference::builtin_passed_function();
    __ mov(Operand::StaticVariable(passed), edi);

=======================================
--- /branches/bleeding_edge/src/ia32/codegen-ia32.cc    Tue Aug 18 02:47:45  
2009
+++ /branches/bleeding_edge/src/ia32/codegen-ia32.cc    Tue Aug 18 03:52:14  
2009
@@ -7670,16 +7670,11 @@
    Label throw_out_of_memory_exception;
    Label throw_normal_exception;

-  // Call into the runtime system. Collect garbage before the call if
-  // running with --gc-greedy set.
-  if (FLAG_gc_greedy) {
-    Failure* failure = Failure::RetryAfterGC(0);
-    __ mov(eax, Immediate(reinterpret_cast<int32_t>(failure)));
-  }
+  // Call into the runtime system.
    GenerateCore(masm, &throw_normal_exception,
                 &throw_out_of_memory_exception,
                 frame_type,
-               FLAG_gc_greedy,
+               false,
                 false);

    // Do space-specific GC and retry runtime call.
=======================================
--- /branches/bleeding_edge/src/x64/builtins-x64.cc     Fri Aug  7 05:52:32 2009
+++ /branches/bleeding_edge/src/x64/builtins-x64.cc     Tue Aug 18 03:52:14 2009
@@ -35,7 +35,7 @@
  #define __ ACCESS_MASM(masm)

  void Builtins::Generate_Adaptor(MacroAssembler* masm, CFunctionId id) {
-  // TODO(1238487): Don't pass the function in a static variable.
+  // TODO(428): Don't pass the function in a static variable.
    ExternalReference passed = ExternalReference::builtin_passed_function();
    __ movq(kScratchRegister, passed.address(),  
RelocInfo::EXTERNAL_REFERENCE);
    __ movq(Operand(kScratchRegister, 0), rdi);
=======================================
--- /branches/bleeding_edge/src/x64/codegen-x64.cc      Tue Aug 18 02:47:45 2009
+++ /branches/bleeding_edge/src/x64/codegen-x64.cc      Tue Aug 18 03:52:14 2009
@@ -6950,17 +6950,12 @@
    Label throw_out_of_memory_exception;
    Label throw_normal_exception;

-  // Call into the runtime system. Collect garbage before the call if
-  // running with --gc-greedy set.
-  if (FLAG_gc_greedy) {
-    Failure* failure = Failure::RetryAfterGC(0);
-    __ movq(rax, failure, RelocInfo::NONE);
-  }
+  // Call into the runtime system.
    GenerateCore(masm,
                 &throw_normal_exception,
                 &throw_out_of_memory_exception,
                 frame_type,
-               FLAG_gc_greedy,
+               false,
                 false);

    // Do space-specific GC and retry runtime call.

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

Reply via email to