| 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 6489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6500 V(Math, log, MathLog) \ | 6500 V(Math, log, MathLog) \ |
| 6501 V(Math, sin, MathSin) \ | 6501 V(Math, sin, MathSin) \ |
| 6502 V(Math, cos, MathCos) \ | 6502 V(Math, cos, MathCos) \ |
| 6503 V(Math, tan, MathTan) \ | 6503 V(Math, tan, MathTan) \ |
| 6504 V(Math, asin, MathASin) \ | 6504 V(Math, asin, MathASin) \ |
| 6505 V(Math, acos, MathACos) \ | 6505 V(Math, acos, MathACos) \ |
| 6506 V(Math, atan, MathATan) \ | 6506 V(Math, atan, MathATan) \ |
| 6507 V(Math, exp, MathExp) \ | 6507 V(Math, exp, MathExp) \ |
| 6508 V(Math, sqrt, MathSqrt) \ | 6508 V(Math, sqrt, MathSqrt) \ |
| 6509 V(Math, pow, MathPow) \ | 6509 V(Math, pow, MathPow) \ |
| 6510 V(Math, random, MathRandom) \ | |
| 6511 V(Math, max, MathMax) \ | 6510 V(Math, max, MathMax) \ |
| 6512 V(Math, min, MathMin) \ | 6511 V(Math, min, MathMin) \ |
| 6513 V(Math, imul, MathImul) | 6512 V(Math, imul, MathImul) |
| 6514 | 6513 |
| 6515 enum BuiltinFunctionId { | 6514 enum BuiltinFunctionId { |
| 6516 kArrayCode, | 6515 kArrayCode, |
| 6517 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \ | 6516 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \ |
| 6518 k##name, | 6517 k##name, |
| 6519 FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID) | 6518 FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID) |
| 6520 #undef DECLARE_FUNCTION_ID | 6519 #undef DECLARE_FUNCTION_ID |
| (...skipping 3102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9623 | 9622 |
| 9624 // [byte_length]: length in bytes | 9623 // [byte_length]: length in bytes |
| 9625 DECL_ACCESSORS(byte_length, Object) | 9624 DECL_ACCESSORS(byte_length, Object) |
| 9626 | 9625 |
| 9627 // [flags] | 9626 // [flags] |
| 9628 DECL_ACCESSORS(flag, Smi) | 9627 DECL_ACCESSORS(flag, Smi) |
| 9629 | 9628 |
| 9630 inline bool is_external(); | 9629 inline bool is_external(); |
| 9631 inline void set_is_external(bool value); | 9630 inline void set_is_external(bool value); |
| 9632 | 9631 |
| 9632 inline bool should_be_freed(); |
| 9633 inline void set_should_be_freed(bool value); |
| 9634 |
| 9633 // [weak_next]: linked list of array buffers. | 9635 // [weak_next]: linked list of array buffers. |
| 9634 DECL_ACCESSORS(weak_next, Object) | 9636 DECL_ACCESSORS(weak_next, Object) |
| 9635 | 9637 |
| 9636 // [weak_first_array]: weak linked list of views. | 9638 // [weak_first_array]: weak linked list of views. |
| 9637 DECL_ACCESSORS(weak_first_view, Object) | 9639 DECL_ACCESSORS(weak_first_view, Object) |
| 9638 | 9640 |
| 9639 // Casting. | 9641 // Casting. |
| 9640 static inline JSArrayBuffer* cast(Object* obj); | 9642 static inline JSArrayBuffer* cast(Object* obj); |
| 9641 | 9643 |
| 9642 // Neutering. Only neuters the buffer, not associated typed arrays. | 9644 // Neutering. Only neuters the buffer, not associated typed arrays. |
| 9643 void Neuter(); | 9645 void Neuter(); |
| 9644 | 9646 |
| 9645 // Dispatched behavior. | 9647 // Dispatched behavior. |
| 9646 DECLARE_PRINTER(JSArrayBuffer) | 9648 DECLARE_PRINTER(JSArrayBuffer) |
| 9647 DECLARE_VERIFIER(JSArrayBuffer) | 9649 DECLARE_VERIFIER(JSArrayBuffer) |
| 9648 | 9650 |
| 9649 static const int kBackingStoreOffset = JSObject::kHeaderSize; | 9651 static const int kBackingStoreOffset = JSObject::kHeaderSize; |
| 9650 static const int kByteLengthOffset = kBackingStoreOffset + kPointerSize; | 9652 static const int kByteLengthOffset = kBackingStoreOffset + kPointerSize; |
| 9651 static const int kFlagOffset = kByteLengthOffset + kPointerSize; | 9653 static const int kFlagOffset = kByteLengthOffset + kPointerSize; |
| 9652 static const int kWeakNextOffset = kFlagOffset + kPointerSize; | 9654 static const int kWeakNextOffset = kFlagOffset + kPointerSize; |
| 9653 static const int kWeakFirstViewOffset = kWeakNextOffset + kPointerSize; | 9655 static const int kWeakFirstViewOffset = kWeakNextOffset + kPointerSize; |
| 9654 static const int kSize = kWeakFirstViewOffset + kPointerSize; | 9656 static const int kSize = kWeakFirstViewOffset + kPointerSize; |
| 9655 | 9657 |
| 9656 static const int kSizeWithInternalFields = | 9658 static const int kSizeWithInternalFields = |
| 9657 kSize + v8::ArrayBuffer::kInternalFieldCount * kPointerSize; | 9659 kSize + v8::ArrayBuffer::kInternalFieldCount * kPointerSize; |
| 9658 | 9660 |
| 9659 private: | 9661 private: |
| 9660 // Bit position in a flag | 9662 // Bit position in a flag |
| 9661 static const int kIsExternalBit = 0; | 9663 static const int kIsExternalBit = 0; |
| 9664 static const int kShouldBeFreed = 1; |
| 9662 | 9665 |
| 9663 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayBuffer); | 9666 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayBuffer); |
| 9664 }; | 9667 }; |
| 9665 | 9668 |
| 9666 | 9669 |
| 9667 class JSArrayBufferView: public JSObject { | 9670 class JSArrayBufferView: public JSObject { |
| 9668 public: | 9671 public: |
| 9669 // [buffer]: ArrayBuffer that this typed array views. | 9672 // [buffer]: ArrayBuffer that this typed array views. |
| 9670 DECL_ACCESSORS(buffer, Object) | 9673 DECL_ACCESSORS(buffer, Object) |
| 9671 | 9674 |
| (...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10576 } else { | 10579 } else { |
| 10577 value &= ~(1 << bit_position); | 10580 value &= ~(1 << bit_position); |
| 10578 } | 10581 } |
| 10579 return value; | 10582 return value; |
| 10580 } | 10583 } |
| 10581 }; | 10584 }; |
| 10582 | 10585 |
| 10583 } } // namespace v8::internal | 10586 } } // namespace v8::internal |
| 10584 | 10587 |
| 10585 #endif // V8_OBJECTS_H_ | 10588 #endif // V8_OBJECTS_H_ |
| OLD | NEW |