OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 6669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6680 // on success. | 6680 // on success. |
6681 // The static method should is preferable for handlified callsites because it | 6681 // The static method should is preferable for handlified callsites because it |
6682 // initializes the line ends array, avoiding expensive recomputations. | 6682 // initializes the line ends array, avoiding expensive recomputations. |
6683 // The non-static version is not allocating and safe for unhandlified | 6683 // The non-static version is not allocating and safe for unhandlified |
6684 // callsites. | 6684 // callsites. |
6685 static bool GetPositionInfo(Handle<Script> script, int position, | 6685 static bool GetPositionInfo(Handle<Script> script, int position, |
6686 PositionInfo* info, OffsetFlag offset_flag); | 6686 PositionInfo* info, OffsetFlag offset_flag); |
6687 bool GetPositionInfo(int position, PositionInfo* info, | 6687 bool GetPositionInfo(int position, PositionInfo* info, |
6688 OffsetFlag offset_flag) const; | 6688 OffsetFlag offset_flag) const; |
6689 | 6689 |
| 6690 bool IsUserJavaScript(); |
| 6691 |
6690 // Wrappers for GetPositionInfo | 6692 // Wrappers for GetPositionInfo |
6691 static int GetColumnNumber(Handle<Script> script, int code_offset); | 6693 static int GetColumnNumber(Handle<Script> script, int code_offset); |
6692 int GetColumnNumber(int code_pos) const; | 6694 int GetColumnNumber(int code_pos) const; |
6693 static int GetLineNumber(Handle<Script> script, int code_offset); | 6695 static int GetLineNumber(Handle<Script> script, int code_offset); |
6694 int GetLineNumber(int code_pos) const; | 6696 int GetLineNumber(int code_pos) const; |
6695 | 6697 |
6696 // Get the JS object wrapping the given script; create it if none exists. | 6698 // Get the JS object wrapping the given script; create it if none exists. |
6697 static Handle<JSObject> GetWrapper(Handle<Script> script); | 6699 static Handle<JSObject> GetWrapper(Handle<Script> script); |
6698 | 6700 |
6699 // Look through the list of existing shared function infos to find one | 6701 // Look through the list of existing shared function infos to find one |
(...skipping 4865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11565 } | 11567 } |
11566 }; | 11568 }; |
11567 | 11569 |
11568 | 11570 |
11569 } // NOLINT, false-positive due to second-order macros. | 11571 } // NOLINT, false-positive due to second-order macros. |
11570 } // NOLINT, false-positive due to second-order macros. | 11572 } // NOLINT, false-positive due to second-order macros. |
11571 | 11573 |
11572 #include "src/objects/object-macros-undef.h" | 11574 #include "src/objects/object-macros-undef.h" |
11573 | 11575 |
11574 #endif // V8_OBJECTS_H_ | 11576 #endif // V8_OBJECTS_H_ |
OLD | NEW |