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

Side by Side Diff: include/v8.h

Issue 146213004: A64: Synchronize with r16849. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « build/standalone.gypi ('k') | include/v8-debug.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 // 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 2346 matching lines...) Expand 10 before | Expand all | Expand 10 after
2357 V8_INLINE int Length() const; 2357 V8_INLINE int Length() const;
2358 V8_INLINE Local<Value> operator[](int i) const; 2358 V8_INLINE Local<Value> operator[](int i) const;
2359 V8_INLINE Local<Function> Callee() const; 2359 V8_INLINE Local<Function> Callee() const;
2360 V8_INLINE Local<Object> This() const; 2360 V8_INLINE Local<Object> This() const;
2361 V8_INLINE Local<Object> Holder() const; 2361 V8_INLINE Local<Object> Holder() const;
2362 V8_INLINE bool IsConstructCall() const; 2362 V8_INLINE bool IsConstructCall() const;
2363 V8_INLINE Local<Value> Data() const; 2363 V8_INLINE Local<Value> Data() const;
2364 V8_INLINE Isolate* GetIsolate() const; 2364 V8_INLINE Isolate* GetIsolate() const;
2365 V8_INLINE ReturnValue<T> GetReturnValue() const; 2365 V8_INLINE ReturnValue<T> GetReturnValue() const;
2366 // This shouldn't be public, but the arm compiler needs it. 2366 // This shouldn't be public, but the arm compiler needs it.
2367 static const int kArgsLength = 6; 2367 static const int kArgsLength = 7;
2368 2368
2369 protected: 2369 protected:
2370 friend class internal::FunctionCallbackArguments; 2370 friend class internal::FunctionCallbackArguments;
2371 friend class internal::CustomArguments<FunctionCallbackInfo>; 2371 friend class internal::CustomArguments<FunctionCallbackInfo>;
2372 static const int kReturnValueIndex = 0; 2372 static const int kReturnValueIndex = 0;
2373 static const int kReturnValueDefaultValueIndex = -1; 2373 static const int kReturnValueDefaultValueIndex = -1;
2374 static const int kIsolateIndex = -2; 2374 static const int kIsolateIndex = -2;
2375 static const int kDataIndex = -3; 2375 static const int kDataIndex = -3;
2376 static const int kCalleeIndex = -4; 2376 static const int kCalleeIndex = -4;
2377 static const int kHolderIndex = -5; 2377 static const int kHolderIndex = -5;
2378 static const int kContextSaveIndex = -6;
2378 2379
2379 V8_INLINE FunctionCallbackInfo(internal::Object** implicit_args, 2380 V8_INLINE FunctionCallbackInfo(internal::Object** implicit_args,
2380 internal::Object** values, 2381 internal::Object** values,
2381 int length, 2382 int length,
2382 bool is_construct_call); 2383 bool is_construct_call);
2383 internal::Object** implicit_args_; 2384 internal::Object** implicit_args_;
2384 internal::Object** values_; 2385 internal::Object** values_;
2385 int length_; 2386 int length_;
2386 bool is_construct_call_; 2387 bool is_construct_call_;
2387 }; 2388 };
(...skipping 1475 matching lines...) Expand 10 before | Expand all | Expand 10 after
3863 3864
3864 enum GCCallbackFlags { 3865 enum GCCallbackFlags {
3865 kNoGCCallbackFlags = 0, 3866 kNoGCCallbackFlags = 0,
3866 kGCCallbackFlagCompacted = 1 << 0, 3867 kGCCallbackFlagCompacted = 1 << 0,
3867 kGCCallbackFlagConstructRetainedObjectInfos = 1 << 1 3868 kGCCallbackFlagConstructRetainedObjectInfos = 1 << 1
3868 }; 3869 };
3869 3870
3870 typedef void (*GCPrologueCallback)(GCType type, GCCallbackFlags flags); 3871 typedef void (*GCPrologueCallback)(GCType type, GCCallbackFlags flags);
3871 typedef void (*GCEpilogueCallback)(GCType type, GCCallbackFlags flags); 3872 typedef void (*GCEpilogueCallback)(GCType type, GCCallbackFlags flags);
3872 3873
3873 typedef void (*GCCallback)();
3874
3875 3874
3876 /** 3875 /**
3877 * Collection of V8 heap information. 3876 * Collection of V8 heap information.
3878 * 3877 *
3879 * Instances of this class can be passed to v8::V8::HeapStatistics to 3878 * Instances of this class can be passed to v8::V8::HeapStatistics to
3880 * get heap statistics from V8. 3879 * get heap statistics from V8.
3881 */ 3880 */
3882 class V8_EXPORT HeapStatistics { 3881 class V8_EXPORT HeapStatistics {
3883 public: 3882 public:
3884 HeapStatistics(); 3883 HeapStatistics();
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
4048 4047
4049 /** 4048 /**
4050 * Allows the host application to declare implicit references from an object 4049 * Allows the host application to declare implicit references from an object
4051 * to another object. If the parent object is alive, the child object is alive 4050 * to another object. If the parent object is alive, the child object is alive
4052 * too. After each garbage collection, all implicit references are removed. It 4051 * too. After each garbage collection, all implicit references are removed. It
4053 * is intended to be used in the before-garbage-collection callback function. 4052 * is intended to be used in the before-garbage-collection callback function.
4054 */ 4053 */
4055 void SetReference(const Persistent<Object>& parent, 4054 void SetReference(const Persistent<Object>& parent,
4056 const Persistent<Value>& child); 4055 const Persistent<Value>& child);
4057 4056
4057 typedef void (*GCPrologueCallback)(Isolate* isolate,
4058 GCType type,
4059 GCCallbackFlags flags);
4060 typedef void (*GCEpilogueCallback)(Isolate* isolate,
4061 GCType type,
4062 GCCallbackFlags flags);
4063
4064 /**
4065 * Enables the host application to receive a notification before a
4066 * garbage collection. Allocations are not allowed in the
4067 * callback function, you therefore cannot manipulate objects (set
4068 * or delete properties for example) since it is possible such
4069 * operations will result in the allocation of objects. It is possible
4070 * to specify the GCType filter for your callback. But it is not possible to
4071 * register the same callback function two times with different
4072 * GCType filters.
4073 */
4074 void AddGCPrologueCallback(
4075 GCPrologueCallback callback, GCType gc_type_filter = kGCTypeAll);
4076
4077 /**
4078 * This function removes callback which was installed by
4079 * AddGCPrologueCallback function.
4080 */
4081 void RemoveGCPrologueCallback(GCPrologueCallback callback);
4082
4083 /**
4084 * Enables the host application to receive a notification after a
4085 * garbage collection. Allocations are not allowed in the
4086 * callback function, you therefore cannot manipulate objects (set
4087 * or delete properties for example) since it is possible such
4088 * operations will result in the allocation of objects. It is possible
4089 * to specify the GCType filter for your callback. But it is not possible to
4090 * register the same callback function two times with different
4091 * GCType filters.
4092 */
4093 void AddGCEpilogueCallback(
4094 GCEpilogueCallback callback, GCType gc_type_filter = kGCTypeAll);
4095
4096 /**
4097 * This function removes callback which was installed by
4098 * AddGCEpilogueCallback function.
4099 */
4100 void RemoveGCEpilogueCallback(GCEpilogueCallback callback);
4101
4058 private: 4102 private:
4059 Isolate(); 4103 Isolate();
4060 Isolate(const Isolate&); 4104 Isolate(const Isolate&);
4061 ~Isolate(); 4105 ~Isolate();
4062 Isolate& operator=(const Isolate&); 4106 Isolate& operator=(const Isolate&);
4063 void* operator new(size_t size); 4107 void* operator new(size_t size);
4064 void operator delete(void*, size_t); 4108 void operator delete(void*, size_t);
4065 }; 4109 };
4066 4110
4067 4111
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
4405 static void AddGCPrologueCallback( 4449 static void AddGCPrologueCallback(
4406 GCPrologueCallback callback, GCType gc_type_filter = kGCTypeAll); 4450 GCPrologueCallback callback, GCType gc_type_filter = kGCTypeAll);
4407 4451
4408 /** 4452 /**
4409 * This function removes callback which was installed by 4453 * This function removes callback which was installed by
4410 * AddGCPrologueCallback function. 4454 * AddGCPrologueCallback function.
4411 */ 4455 */
4412 static void RemoveGCPrologueCallback(GCPrologueCallback callback); 4456 static void RemoveGCPrologueCallback(GCPrologueCallback callback);
4413 4457
4414 /** 4458 /**
4415 * The function is deprecated. Please use AddGCPrologueCallback instead.
4416 * Enables the host application to receive a notification before a
4417 * garbage collection. Allocations are not allowed in the
4418 * callback function, you therefore cannot manipulate objects (set
4419 * or delete properties for example) since it is possible such
4420 * operations will result in the allocation of objects.
4421 */
4422 V8_DEPRECATED(static void SetGlobalGCPrologueCallback(GCCallback));
4423
4424 /**
4425 * Enables the host application to receive a notification after a 4459 * Enables the host application to receive a notification after a
4426 * garbage collection. Allocations are not allowed in the 4460 * garbage collection. Allocations are not allowed in the
4427 * callback function, you therefore cannot manipulate objects (set 4461 * callback function, you therefore cannot manipulate objects (set
4428 * or delete properties for example) since it is possible such 4462 * or delete properties for example) since it is possible such
4429 * operations will result in the allocation of objects. It is possible 4463 * operations will result in the allocation of objects. It is possible
4430 * to specify the GCType filter for your callback. But it is not possible to 4464 * to specify the GCType filter for your callback. But it is not possible to
4431 * register the same callback function two times with different 4465 * register the same callback function two times with different
4432 * GCType filters. 4466 * GCType filters.
4433 */ 4467 */
4434 static void AddGCEpilogueCallback( 4468 static void AddGCEpilogueCallback(
4435 GCEpilogueCallback callback, GCType gc_type_filter = kGCTypeAll); 4469 GCEpilogueCallback callback, GCType gc_type_filter = kGCTypeAll);
4436 4470
4437 /** 4471 /**
4438 * This function removes callback which was installed by 4472 * This function removes callback which was installed by
4439 * AddGCEpilogueCallback function. 4473 * AddGCEpilogueCallback function.
4440 */ 4474 */
4441 static void RemoveGCEpilogueCallback(GCEpilogueCallback callback); 4475 static void RemoveGCEpilogueCallback(GCEpilogueCallback callback);
4442 4476
4443 /** 4477 /**
4444 * The function is deprecated. Please use AddGCEpilogueCallback instead.
4445 * Enables the host application to receive a notification after a
4446 * major garbage collection. Allocations are not allowed in the
4447 * callback function, you therefore cannot manipulate objects (set
4448 * or delete properties for example) since it is possible such
4449 * operations will result in the allocation of objects.
4450 */
4451 V8_DEPRECATED(static void SetGlobalGCEpilogueCallback(GCCallback));
4452
4453 /**
4454 * Enables the host application to provide a mechanism to be notified 4478 * Enables the host application to provide a mechanism to be notified
4455 * and perform custom logging when V8 Allocates Executable Memory. 4479 * and perform custom logging when V8 Allocates Executable Memory.
4456 */ 4480 */
4457 static void AddMemoryAllocationCallback(MemoryAllocationCallback callback, 4481 static void AddMemoryAllocationCallback(MemoryAllocationCallback callback,
4458 ObjectSpace space, 4482 ObjectSpace space,
4459 AllocationAction action); 4483 AllocationAction action);
4460 4484
4461 /** 4485 /**
4462 * Removes callback that was installed by AddMemoryAllocationCallback. 4486 * Removes callback that was installed by AddMemoryAllocationCallback.
4463 */ 4487 */
(...skipping 1967 matching lines...) Expand 10 before | Expand all | Expand 10 after
6431 */ 6455 */
6432 6456
6433 6457
6434 } // namespace v8 6458 } // namespace v8
6435 6459
6436 6460
6437 #undef TYPE_CHECK 6461 #undef TYPE_CHECK
6438 6462
6439 6463
6440 #endif // V8_H_ 6464 #endif // V8_H_
OLDNEW
« no previous file with comments | « build/standalone.gypi ('k') | include/v8-debug.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698