Revision: 2708
Author: [email protected]
Date: Tue Aug 18 05:43:36 2009
Log: Fix errors in test-heap.cc and test-decls.cc.  Adjust cctest.status.
Review URL: http://codereview.chromium.org/172089
http://code.google.com/p/v8/source/detail?r=2708

Modified:
  /branches/bleeding_edge/test/cctest/cctest.status
  /branches/bleeding_edge/test/cctest/test-decls.cc
  /branches/bleeding_edge/test/cctest/test-heap.cc

=======================================
--- /branches/bleeding_edge/test/cctest/cctest.status   Fri Aug 14 04:24:32  
2009
+++ /branches/bleeding_edge/test/cctest/cctest.status   Tue Aug 18 05:43:36  
2009
@@ -63,15 +63,8 @@


  [ $arch == x64 ]
-test-decls/Present: CRASH || FAIL
-test-decls/Unknown: CRASH || FAIL
-test-decls/Appearing: CRASH || FAIL
-test-decls/Absent: CRASH || FAIL
  test-debug/DebugStub: CRASH || FAIL
-test-decls/AbsentInPrototype: CRASH || FAIL
-test-decls/Reappearing: CRASH || FAIL
  test-debug/DebugInfo: CRASH || FAIL
-test-decls/ExistsInPrototype: CRASH || FAIL
  test-debug/BreakPointICStore: CRASH || FAIL
  test-debug/BreakPointICLoad: CRASH || FAIL
  test-debug/BreakPointICCall: CRASH || FAIL
=======================================
--- /branches/bleeding_edge/test/cctest/test-decls.cc   Wed Jul  1 23:28:37  
2009
+++ /branches/bleeding_edge/test/cctest/test-decls.cc   Tue Aug 18 05:43:36  
2009
@@ -111,7 +111,7 @@
    if (is_initialized_) return;
    HandleScope scope;
    Local<FunctionTemplate> function = FunctionTemplate::New();
-  Local<Value> data = Integer::New(reinterpret_cast<intptr_t>(this));
+  Local<Value> data = External::New(this);
    GetHolder(function)->SetNamedPropertyHandler(&HandleGet,
                                                 &HandleSet,
                                                 &HandleHas,
@@ -179,8 +179,7 @@


  DeclarationContext* DeclarationContext::GetInstance(const AccessorInfo&  
info) {
-  Local<Value> data = info.Data();
-  return  
reinterpret_cast<DeclarationContext*>(Int32::Cast(*data)->Value());
+  return static_cast<DeclarationContext*>(External::Unwrap(info.Data()));
  }


=======================================
--- /branches/bleeding_edge/test/cctest/test-heap.cc    Tue Jul 28 01:43:51  
2009
+++ /branches/bleeding_edge/test/cctest/test-heap.cc    Tue Aug 18 05:43:36  
2009
@@ -44,35 +44,26 @@

  static void CheckOddball(Object* obj, const char* string) {
    CHECK(obj->IsOddball());
-#ifndef V8_HOST_ARCH_64_BIT
-// TODO(X64): Reenable when native builtins work.
    bool exc;
    Object* print_string = *Execution::ToString(Handle<Object>(obj), &exc);
    CHECK(String::cast(print_string)->IsEqualTo(CStrVector(string)));
-#endif  // V8_HOST_ARCH_64_BIT
  }


  static void CheckSmi(int value, const char* string) {
-#ifndef V8_HOST_ARCH_64_BIT
-// TODO(X64): Reenable when native builtins work.
    bool exc;
    Object* print_string =
        *Execution::ToString(Handle<Object>(Smi::FromInt(value)), &exc);
    CHECK(String::cast(print_string)->IsEqualTo(CStrVector(string)));
-#endif  // V8_HOST_ARCH_64_BIT
  }


  static void CheckNumber(double value, const char* string) {
    Object* obj = Heap::NumberFromDouble(value);
    CHECK(obj->IsNumber());
-#ifndef V8_HOST_ARCH_64_BIT
-// TODO(X64): Reenable when native builtins work.
    bool exc;
    Object* print_string = *Execution::ToString(Handle<Object>(obj), &exc);
    CHECK(String::cast(print_string)->IsEqualTo(CStrVector(string)));
-#endif  // V8_HOST_ARCH_64_BIT
  }


@@ -492,8 +483,11 @@
  static void CheckSymbols(const char** strings) {
    for (const char* string = *strings; *strings != 0; string = *strings++) {
      Object* a = Heap::LookupAsciiSymbol(string);
+    // LookupAsciiSymbol may return a failure if a GC is needed.
+    if (a->IsFailure()) continue;
      CHECK(a->IsSymbol());
      Object* b = Heap::LookupAsciiSymbol(string);
+    if (b->IsFailure()) continue;
      CHECK_EQ(b, a);
      CHECK(String::cast(b)->IsEqualTo(CStrVector(string)));
    }

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

Reply via email to