OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 13 matching lines...) Expand all Loading... |
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 #include "v8.h" | 28 #include "v8.h" |
29 | 29 |
30 namespace v8 { | 30 namespace v8 { |
31 namespace internal { | 31 namespace internal { |
32 | 32 |
33 | 33 |
34 void DescriptorWriter::Write(Descriptor* desc) { | |
35 ASSERT(desc->key_->IsSymbol()); | |
36 descriptors_->Set(pos_, desc); | |
37 advance(); | |
38 } | |
39 | |
40 | |
41 void DescriptorWriter::WriteFrom(DescriptorReader* reader) { | |
42 Descriptor desc; | |
43 reader->Get(&desc); | |
44 Write(&desc); | |
45 } | |
46 | |
47 | |
48 #ifdef DEBUG | 34 #ifdef DEBUG |
49 void LookupResult::Print() { | 35 void LookupResult::Print() { |
50 if (!IsValid()) { | 36 if (!IsValid()) { |
51 PrintF("Not Found\n"); | 37 PrintF("Not Found\n"); |
52 return; | 38 return; |
53 } | 39 } |
54 | 40 |
55 PrintF("LookupResult:\n"); | 41 PrintF("LookupResult:\n"); |
56 PrintF(" -cacheable = %s\n", IsCacheable() ? "true" : "false"); | 42 PrintF(" -cacheable = %s\n", IsCacheable() ? "true" : "false"); |
57 PrintF(" -attributes = %x\n", GetAttributes()); | 43 PrintF(" -attributes = %x\n", GetAttributes()); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 PrintF(" @ "); | 87 PrintF(" @ "); |
102 GetValue()->ShortPrint(); | 88 GetValue()->ShortPrint(); |
103 PrintF(" %d\n", GetDetails().index()); | 89 PrintF(" %d\n", GetDetails().index()); |
104 } | 90 } |
105 | 91 |
106 | 92 |
107 #endif | 93 #endif |
108 | 94 |
109 | 95 |
110 } } // namespace v8::internal | 96 } } // namespace v8::internal |
OLD | NEW |