Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 3525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3536 internal::Object** global_handle); | 3536 internal::Object** global_handle); |
| 3537 static bool IsGlobalIndependent(internal::Object** global_handle); | 3537 static bool IsGlobalIndependent(internal::Object** global_handle); |
| 3538 static bool IsGlobalIndependent(internal::Isolate* isolate, | 3538 static bool IsGlobalIndependent(internal::Isolate* isolate, |
| 3539 internal::Object** global_handle); | 3539 internal::Object** global_handle); |
| 3540 static bool IsGlobalNearDeath(internal::Object** global_handle); | 3540 static bool IsGlobalNearDeath(internal::Object** global_handle); |
| 3541 static bool IsGlobalWeak(internal::Object** global_handle); | 3541 static bool IsGlobalWeak(internal::Object** global_handle); |
| 3542 static bool IsGlobalWeak(internal::Isolate* isolate, | 3542 static bool IsGlobalWeak(internal::Isolate* isolate, |
| 3543 internal::Object** global_handle); | 3543 internal::Object** global_handle); |
| 3544 static void SetWrapperClassId(internal::Object** global_handle, | 3544 static void SetWrapperClassId(internal::Object** global_handle, |
| 3545 uint16_t class_id); | 3545 uint16_t class_id); |
| 3546 static uint16_t GetWrapperClassId(internal::Object** global_handle); | 3546 static uint16_t GetWrapperClassId(internal::Object** global_handle); |
|
Michael Starzinger
2013/01/16 15:39:12
These two declarations are neither used nor implem
haraken
2013/01/16 15:41:54
Right. Thanks!
| |
| 3547 | 3547 |
| 3548 template <class T> friend class Handle; | 3548 template <class T> friend class Handle; |
| 3549 template <class T> friend class Local; | 3549 template <class T> friend class Local; |
| 3550 template <class T> friend class Persistent; | 3550 template <class T> friend class Persistent; |
| 3551 friend class Context; | 3551 friend class Context; |
| 3552 }; | 3552 }; |
| 3553 | 3553 |
| 3554 | 3554 |
| 3555 /** | 3555 /** |
| 3556 * An external exception handler. | 3556 * An external exception handler. |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4145 static const int kContextHeaderSize = 2 * kApiPointerSize; | 4145 static const int kContextHeaderSize = 2 * kApiPointerSize; |
| 4146 static const int kContextEmbedderDataIndex = 54; | 4146 static const int kContextEmbedderDataIndex = 54; |
| 4147 static const int kFullStringRepresentationMask = 0x07; | 4147 static const int kFullStringRepresentationMask = 0x07; |
| 4148 static const int kStringEncodingMask = 0x4; | 4148 static const int kStringEncodingMask = 0x4; |
| 4149 static const int kExternalTwoByteRepresentationTag = 0x02; | 4149 static const int kExternalTwoByteRepresentationTag = 0x02; |
| 4150 static const int kExternalAsciiRepresentationTag = 0x06; | 4150 static const int kExternalAsciiRepresentationTag = 0x06; |
| 4151 | 4151 |
| 4152 static const int kIsolateStateOffset = 0; | 4152 static const int kIsolateStateOffset = 0; |
| 4153 static const int kIsolateEmbedderDataOffset = 1 * kApiPointerSize; | 4153 static const int kIsolateEmbedderDataOffset = 1 * kApiPointerSize; |
| 4154 static const int kIsolateRootsOffset = 3 * kApiPointerSize; | 4154 static const int kIsolateRootsOffset = 3 * kApiPointerSize; |
| 4155 static const int kNodeClassIdOffset = 1 * kApiPointerSize; | |
| 4155 static const int kNodeFlagsOffset = 1 * kApiPointerSize + 3; | 4156 static const int kNodeFlagsOffset = 1 * kApiPointerSize + 3; |
| 4156 static const int kUndefinedValueRootIndex = 5; | 4157 static const int kUndefinedValueRootIndex = 5; |
| 4157 static const int kNullValueRootIndex = 7; | 4158 static const int kNullValueRootIndex = 7; |
| 4158 static const int kTrueValueRootIndex = 8; | 4159 static const int kTrueValueRootIndex = 8; |
| 4159 static const int kFalseValueRootIndex = 9; | 4160 static const int kFalseValueRootIndex = 9; |
| 4160 static const int kEmptySymbolRootIndex = 119; | 4161 static const int kEmptySymbolRootIndex = 119; |
| 4161 | 4162 |
| 4162 static const int kNodeIsIndependentShift = 4; | 4163 static const int kNodeIsIndependentShift = 4; |
| 4163 static const int kNodeIsPartiallyDependentShift = 5; | 4164 static const int kNodeIsPartiallyDependentShift = 5; |
| 4164 | 4165 |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4397 void Persistent<T>::MarkPartiallyDependent(Isolate* isolate) { | 4398 void Persistent<T>::MarkPartiallyDependent(Isolate* isolate) { |
| 4398 typedef internal::Internals I; | 4399 typedef internal::Internals I; |
| 4399 if (this->IsEmpty()) return; | 4400 if (this->IsEmpty()) return; |
| 4400 if (!I::IsInitialized(isolate)) return; | 4401 if (!I::IsInitialized(isolate)) return; |
| 4401 I::UpdateNodeFlag(reinterpret_cast<internal::Object**>(**this), | 4402 I::UpdateNodeFlag(reinterpret_cast<internal::Object**>(**this), |
| 4402 true, I::kNodeIsPartiallyDependentShift); | 4403 true, I::kNodeIsPartiallyDependentShift); |
| 4403 } | 4404 } |
| 4404 | 4405 |
| 4405 template <class T> | 4406 template <class T> |
| 4406 void Persistent<T>::SetWrapperClassId(uint16_t class_id) { | 4407 void Persistent<T>::SetWrapperClassId(uint16_t class_id) { |
| 4407 V8::SetWrapperClassId(reinterpret_cast<internal::Object**>(**this), class_id); | 4408 typedef internal::Internals I; |
| 4409 internal::Object** obj = reinterpret_cast<internal::Object**>(**this); | |
| 4410 uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + I::kNodeClassIdOffset; | |
| 4411 *reinterpret_cast<uint16_t*>(addr) = class_id; | |
| 4408 } | 4412 } |
| 4409 | 4413 |
| 4410 template <class T> | 4414 template <class T> |
| 4411 uint16_t Persistent<T>::WrapperClassId() const { | 4415 uint16_t Persistent<T>::WrapperClassId() const { |
| 4412 return V8::GetWrapperClassId(reinterpret_cast<internal::Object**>(**this)); | 4416 typedef internal::Internals I; |
| 4417 internal::Object** obj = reinterpret_cast<internal::Object**>(**this); | |
| 4418 uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + I::kNodeClassIdOffset; | |
| 4419 return *reinterpret_cast<uint16_t*>(addr); | |
| 4413 } | 4420 } |
| 4414 | 4421 |
| 4415 Arguments::Arguments(internal::Object** implicit_args, | 4422 Arguments::Arguments(internal::Object** implicit_args, |
| 4416 internal::Object** values, int length, | 4423 internal::Object** values, int length, |
| 4417 bool is_construct_call) | 4424 bool is_construct_call) |
| 4418 : implicit_args_(implicit_args), | 4425 : implicit_args_(implicit_args), |
| 4419 values_(values), | 4426 values_(values), |
| 4420 length_(length), | 4427 length_(length), |
| 4421 is_construct_call_(is_construct_call) { } | 4428 is_construct_call_(is_construct_call) { } |
| 4422 | 4429 |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4829 | 4836 |
| 4830 | 4837 |
| 4831 } // namespace v8 | 4838 } // namespace v8 |
| 4832 | 4839 |
| 4833 | 4840 |
| 4834 #undef V8EXPORT | 4841 #undef V8EXPORT |
| 4835 #undef TYPE_CHECK | 4842 #undef TYPE_CHECK |
| 4836 | 4843 |
| 4837 | 4844 |
| 4838 #endif // V8_H_ | 4845 #endif // V8_H_ |
| OLD | NEW |