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

Side by Side Diff: src/objects.h

Issue 697603002: Optimized nodeType dom binding by removing HandleScope and the preparation of ordinary c function c… (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@master
Patch Set: Created 6 years, 1 month 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/ic/x64/handler-compiler-x64.cc ('k') | src/objects-inl.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 10205 matching lines...) Expand 10 before | Expand all | Expand 10 after
10216 10216
10217 inline bool all_can_read(); 10217 inline bool all_can_read();
10218 inline void set_all_can_read(bool value); 10218 inline void set_all_can_read(bool value);
10219 10219
10220 inline bool all_can_write(); 10220 inline bool all_can_write();
10221 inline void set_all_can_write(bool value); 10221 inline void set_all_can_write(bool value);
10222 10222
10223 inline PropertyAttributes property_attributes(); 10223 inline PropertyAttributes property_attributes();
10224 inline void set_property_attributes(PropertyAttributes attributes); 10224 inline void set_property_attributes(PropertyAttributes attributes);
10225 10225
10226 inline bool can_fast_call();
10227 inline void set_can_fast_call(bool value);
10228
10226 // Checks whether the given receiver is compatible with this accessor. 10229 // Checks whether the given receiver is compatible with this accessor.
10227 static bool IsCompatibleReceiverType(Isolate* isolate, 10230 static bool IsCompatibleReceiverType(Isolate* isolate,
10228 Handle<AccessorInfo> info, 10231 Handle<AccessorInfo> info,
10229 Handle<HeapType> type); 10232 Handle<HeapType> type);
10230 inline bool IsCompatibleReceiver(Object* receiver); 10233 inline bool IsCompatibleReceiver(Object* receiver);
10231 10234
10232 DECLARE_CAST(AccessorInfo) 10235 DECLARE_CAST(AccessorInfo)
10233 10236
10234 // Dispatched behavior. 10237 // Dispatched behavior.
10235 DECLARE_VERIFIER(AccessorInfo) 10238 DECLARE_VERIFIER(AccessorInfo)
10236 10239
10237 // Append all descriptors to the array that are not already there. 10240 // Append all descriptors to the array that are not already there.
10238 // Return number added. 10241 // Return number added.
10239 static int AppendUnique(Handle<Object> descriptors, 10242 static int AppendUnique(Handle<Object> descriptors,
10240 Handle<FixedArray> array, 10243 Handle<FixedArray> array,
10241 int valid_descriptors); 10244 int valid_descriptors);
10242 10245
10243 static const int kNameOffset = HeapObject::kHeaderSize; 10246 static const int kNameOffset = HeapObject::kHeaderSize;
10244 static const int kFlagOffset = kNameOffset + kPointerSize; 10247 static const int kFlagOffset = kNameOffset + kPointerSize;
10245 static const int kExpectedReceiverTypeOffset = kFlagOffset + kPointerSize; 10248 static const int kExpectedReceiverTypeOffset = kFlagOffset + kPointerSize;
10246 static const int kSize = kExpectedReceiverTypeOffset + kPointerSize; 10249 static const int kSize = kExpectedReceiverTypeOffset + kPointerSize;
10247 10250
10248 private: 10251 private:
10249 inline bool HasExpectedReceiverType() { 10252 inline bool HasExpectedReceiverType() {
10250 return expected_receiver_type()->IsFunctionTemplateInfo(); 10253 return expected_receiver_type()->IsFunctionTemplateInfo();
10251 } 10254 }
10252 // Bit positions in flag. 10255 // Bit positions in flag.
10253 static const int kAllCanReadBit = 0; 10256 static const int kAllCanReadBit = 0;
10254 static const int kAllCanWriteBit = 1; 10257 static const int kAllCanWriteBit = 1;
10258 static const int kCanFastCall = 0;
10255 class AttributesField: public BitField<PropertyAttributes, 2, 3> {}; 10259 class AttributesField: public BitField<PropertyAttributes, 2, 3> {};
10260 class AccessorOptimizeLevel: public BitField<int, 5, 2> {};
10256 10261
10257 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorInfo); 10262 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorInfo);
10258 }; 10263 };
10259 10264
10260 10265
10261 enum AccessorDescriptorType { 10266 enum AccessorDescriptorType {
10262 kDescriptorBitmaskCompare, 10267 kDescriptorBitmaskCompare,
10263 kDescriptorPointerCompare, 10268 kDescriptorPointerCompare,
10264 kDescriptorPrimitiveValue, 10269 kDescriptorPrimitiveValue,
10265 kDescriptorObjectDereference, 10270 kDescriptorObjectDereference,
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
10913 } else { 10918 } else {
10914 value &= ~(1 << bit_position); 10919 value &= ~(1 << bit_position);
10915 } 10920 }
10916 return value; 10921 return value;
10917 } 10922 }
10918 }; 10923 };
10919 10924
10920 } } // namespace v8::internal 10925 } } // namespace v8::internal
10921 10926
10922 #endif // V8_OBJECTS_H_ 10927 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ic/x64/handler-compiler-x64.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698