| OLD | NEW |
| 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 "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/assert-scope.h" | 9 #include "src/assert-scope.h" |
| 10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
| (...skipping 7637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7648 // prevent leaking information to user code called during error | 7648 // prevent leaking information to user code called during error |
| 7649 // formatting. | 7649 // formatting. |
| 7650 class JSMessageObject: public JSObject { | 7650 class JSMessageObject: public JSObject { |
| 7651 public: | 7651 public: |
| 7652 // [type]: the type of error message. | 7652 // [type]: the type of error message. |
| 7653 DECL_ACCESSORS(type, String) | 7653 DECL_ACCESSORS(type, String) |
| 7654 | 7654 |
| 7655 // [arguments]: the arguments for formatting the error message. | 7655 // [arguments]: the arguments for formatting the error message. |
| 7656 DECL_ACCESSORS(arguments, JSArray) | 7656 DECL_ACCESSORS(arguments, JSArray) |
| 7657 | 7657 |
| 7658 // [promise]: the promise (if any) associated to the error message. |
| 7659 DECL_ACCESSORS(promise, Object) |
| 7660 |
| 7658 // [script]: the script from which the error message originated. | 7661 // [script]: the script from which the error message originated. |
| 7659 DECL_ACCESSORS(script, Object) | 7662 DECL_ACCESSORS(script, Object) |
| 7660 | 7663 |
| 7661 // [stack_frames]: an array of stack frames for this error object. | 7664 // [stack_frames]: an array of stack frames for this error object. |
| 7662 DECL_ACCESSORS(stack_frames, Object) | 7665 DECL_ACCESSORS(stack_frames, Object) |
| 7663 | 7666 |
| 7664 // [start_position]: the start position in the script for the error message. | 7667 // [start_position]: the start position in the script for the error message. |
| 7665 inline int start_position() const; | 7668 inline int start_position() const; |
| 7666 inline void set_start_position(int value); | 7669 inline void set_start_position(int value); |
| 7667 | 7670 |
| 7668 // [end_position]: the end position in the script for the error message. | 7671 // [end_position]: the end position in the script for the error message. |
| 7669 inline int end_position() const; | 7672 inline int end_position() const; |
| 7670 inline void set_end_position(int value); | 7673 inline void set_end_position(int value); |
| 7671 | 7674 |
| 7672 DECLARE_CAST(JSMessageObject) | 7675 DECLARE_CAST(JSMessageObject) |
| 7673 | 7676 |
| 7674 // Dispatched behavior. | 7677 // Dispatched behavior. |
| 7675 DECLARE_PRINTER(JSMessageObject) | 7678 DECLARE_PRINTER(JSMessageObject) |
| 7676 DECLARE_VERIFIER(JSMessageObject) | 7679 DECLARE_VERIFIER(JSMessageObject) |
| 7677 | 7680 |
| 7678 // Layout description. | 7681 // Layout description. |
| 7679 static const int kTypeOffset = JSObject::kHeaderSize; | 7682 static const int kTypeOffset = JSObject::kHeaderSize; |
| 7680 static const int kArgumentsOffset = kTypeOffset + kPointerSize; | 7683 static const int kArgumentsOffset = kTypeOffset + kPointerSize; |
| 7681 static const int kScriptOffset = kArgumentsOffset + kPointerSize; | 7684 static const int kPromiseOffset = kArgumentsOffset + kPointerSize; |
| 7685 static const int kScriptOffset = kPromiseOffset + kPointerSize; |
| 7682 static const int kStackFramesOffset = kScriptOffset + kPointerSize; | 7686 static const int kStackFramesOffset = kScriptOffset + kPointerSize; |
| 7683 static const int kStartPositionOffset = kStackFramesOffset + kPointerSize; | 7687 static const int kStartPositionOffset = kStackFramesOffset + kPointerSize; |
| 7684 static const int kEndPositionOffset = kStartPositionOffset + kPointerSize; | 7688 static const int kEndPositionOffset = kStartPositionOffset + kPointerSize; |
| 7685 static const int kSize = kEndPositionOffset + kPointerSize; | 7689 static const int kSize = kEndPositionOffset + kPointerSize; |
| 7686 | 7690 |
| 7687 typedef FixedBodyDescriptor<HeapObject::kMapOffset, | 7691 typedef FixedBodyDescriptor<HeapObject::kMapOffset, |
| 7688 kStackFramesOffset + kPointerSize, | 7692 kStackFramesOffset + kPointerSize, |
| 7689 kSize> BodyDescriptor; | 7693 kSize> BodyDescriptor; |
| 7690 }; | 7694 }; |
| 7691 | 7695 |
| (...skipping 3111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10803 } else { | 10807 } else { |
| 10804 value &= ~(1 << bit_position); | 10808 value &= ~(1 << bit_position); |
| 10805 } | 10809 } |
| 10806 return value; | 10810 return value; |
| 10807 } | 10811 } |
| 10808 }; | 10812 }; |
| 10809 | 10813 |
| 10810 } } // namespace v8::internal | 10814 } } // namespace v8::internal |
| 10811 | 10815 |
| 10812 #endif // V8_OBJECTS_H_ | 10816 #endif // V8_OBJECTS_H_ |
| OLD | NEW |