Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Side by Side Diff: src/property.cc

Issue 2622413004: [runtime] Remove further usages of PropertyType in favor of PropertyKind/PropertyLocation. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/property.h ('k') | src/property-details.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/property.h" 5 #include "src/property.h"
6 6
7 #include "src/field-type.h" 7 #include "src/field-type.h"
8 #include "src/handles-inl.h" 8 #include "src/handles-inl.h"
9 #include "src/objects-inl.h" 9 #include "src/objects-inl.h"
10 #include "src/ostreams.h" 10 #include "src/ostreams.h"
11 11
12 namespace v8 { 12 namespace v8 {
13 namespace internal { 13 namespace internal {
14 14
15 std::ostream& operator<<(std::ostream& os, 15 std::ostream& operator<<(std::ostream& os,
16 const PropertyAttributes& attributes) { 16 const PropertyAttributes& attributes) {
17 os << "["; 17 os << "[";
18 os << (((attributes & READ_ONLY) == 0) ? "W" : "_"); // writable 18 os << (((attributes & READ_ONLY) == 0) ? "W" : "_"); // writable
19 os << (((attributes & DONT_ENUM) == 0) ? "E" : "_"); // enumerable 19 os << (((attributes & DONT_ENUM) == 0) ? "E" : "_"); // enumerable
20 os << (((attributes & DONT_DELETE) == 0) ? "C" : "_"); // configurable 20 os << (((attributes & DONT_DELETE) == 0) ? "C" : "_"); // configurable
21 os << "]"; 21 os << "]";
22 return os; 22 return os;
23 } 23 }
24 24
25 Descriptor Descriptor::DataField(Handle<Name> key, int field_index, 25 Descriptor Descriptor::DataField(Handle<Name> key, int field_index,
26 PropertyAttributes attributes, 26 PropertyAttributes attributes,
27 Representation representation) { 27 Representation representation) {
28 return Descriptor(key, FieldType::Any(key->GetIsolate()), attributes, DATA, 28 return DataField(key, field_index, FieldType::Any(key->GetIsolate()),
29 representation, field_index); 29 attributes, representation);
30 } 30 }
31 31
32 // Outputs PropertyDetails as a dictionary details. 32 // Outputs PropertyDetails as a dictionary details.
33 void PropertyDetails::PrintAsSlowTo(std::ostream& os) { 33 void PropertyDetails::PrintAsSlowTo(std::ostream& os) {
34 os << "("; 34 os << "(";
35 os << (kind() == kData ? "data" : "accessor"); 35 os << (kind() == kData ? "data" : "accessor");
36 os << ", dictionary_index: " << dictionary_index(); 36 os << ", dictionary_index: " << dictionary_index();
37 os << ", attrs: " << attributes() << ")"; 37 os << ", attrs: " << attributes() << ")";
38 } 38 }
39 39
(...skipping 28 matching lines...) Expand all
68 PrintAsSlowTo(os); 68 PrintAsSlowTo(os);
69 } else { 69 } else {
70 PrintAsFastTo(os, PrintMode::kPrintFull); 70 PrintAsFastTo(os, PrintMode::kPrintFull);
71 } 71 }
72 os << "\n" << std::flush; 72 os << "\n" << std::flush;
73 } 73 }
74 #endif 74 #endif
75 75
76 } // namespace internal 76 } // namespace internal
77 } // namespace v8 77 } // namespace v8
OLDNEW
« no previous file with comments | « src/property.h ('k') | src/property-details.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698