~ubuntu-branches/ubuntu/saucy/nodejs/saucy-proposed

« back to all changes in this revision

Viewing changes to deps/v8/src/property.cc

  • Committer: Package Import Robot
  • Author(s): Jérémy Lal
  • Date: 2013-08-14 00:16:46 UTC
  • mfrom: (7.1.40 sid)
  • Revision ID: package-import@ubuntu.com-20130814001646-bzlysfh8sd6mukbo
Tags: 0.10.15~dfsg1-4
* Update 2005 patch, adding a handful of tests that can fail on
  slow platforms.
* Add 1004 patch to fix test failures when writing NaN to buffer
  on mipsel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// Copyright 2011 the V8 project authors. All rights reserved.
 
1
// Copyright 2012 the V8 project authors. All rights reserved.
2
2
// Redistribution and use in source and binary forms, with or without
3
3
// modification, are permitted provided that the following conditions are
4
4
// met:
31
31
namespace internal {
32
32
 
33
33
 
 
34
void LookupResult::Iterate(ObjectVisitor* visitor) {
 
35
  LookupResult* current = this;  // Could be NULL.
 
36
  while (current != NULL) {
 
37
    visitor->VisitPointer(BitCast<Object**>(&current->holder_));
 
38
    current = current->next_;
 
39
  }
 
40
}
 
41
 
 
42
 
34
43
#ifdef OBJECT_PRINT
35
44
void LookupResult::Print(FILE* out) {
36
45
  if (!IsFound()) {
46
55
      PrintF(out, " -type = normal\n");
47
56
      PrintF(out, " -entry = %d", GetDictionaryEntry());
48
57
      break;
49
 
    case MAP_TRANSITION:
50
 
      PrintF(out, " -type = map transition\n");
51
 
      PrintF(out, " -map:\n");
52
 
      GetTransitionMap()->Print(out);
53
 
      PrintF(out, "\n");
54
 
      break;
55
 
    case ELEMENTS_TRANSITION:
56
 
      PrintF(out, " -type = elements transition\n");
57
 
      PrintF(out, " -map:\n");
58
 
      GetTransitionMap()->Print(out);
59
 
      PrintF(out, "\n");
60
 
      break;
61
58
    case CONSTANT_FUNCTION:
62
59
      PrintF(out, " -type = constant function\n");
63
60
      PrintF(out, " -function:\n");
80
77
    case INTERCEPTOR:
81
78
      PrintF(out, " -type = lookup interceptor\n");
82
79
      break;
83
 
    case CONSTANT_TRANSITION:
84
 
      PrintF(out, " -type = constant property transition\n");
85
 
      break;
86
 
    case NULL_DESCRIPTOR:
87
 
      PrintF(out, " =type = null descriptor\n");
 
80
    case TRANSITION:
 
81
      switch (GetTransitionDetails().type()) {
 
82
        case FIELD:
 
83
          PrintF(out, " -type = map transition\n");
 
84
          PrintF(out, " -map:\n");
 
85
          GetTransitionMap()->Print(out);
 
86
          PrintF(out, "\n");
 
87
          return;
 
88
        case CONSTANT_FUNCTION:
 
89
          PrintF(out, " -type = constant property transition\n");
 
90
          PrintF(out, " -map:\n");
 
91
          GetTransitionMap()->Print(out);
 
92
          PrintF(out, "\n");
 
93
          return;
 
94
        case CALLBACKS:
 
95
          PrintF(out, " -type = callbacks transition\n");
 
96
          PrintF(out, " -callback object:\n");
 
97
          GetCallbackObject()->Print(out);
 
98
          return;
 
99
        default:
 
100
          UNREACHABLE();
 
101
          return;
 
102
      }
 
103
    case NONEXISTENT:
 
104
      UNREACHABLE();
88
105
      break;
89
106
  }
90
107
}
95
112
  GetKey()->ShortPrint(out);
96
113
  PrintF(out, " @ ");
97
114
  GetValue()->ShortPrint(out);
98
 
  PrintF(out, " %d\n", GetDetails().index());
 
115
  PrintF(out, " %d\n", GetDetails().descriptor_index());
99
116
}
100
117
 
101
118