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 | 9 |
10 #include "src/assert-scope.h" | 10 #include "src/assert-scope.h" |
(...skipping 6437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6448 // function source. Encoded in the 'flags' field. | 6448 // function source. Encoded in the 'flags' field. |
6449 inline bool hide_source(); | 6449 inline bool hide_source(); |
6450 inline void set_hide_source(bool value); | 6450 inline void set_hide_source(bool value); |
6451 | 6451 |
6452 // [origin_options]: optional attributes set by the embedder via ScriptOrigin, | 6452 // [origin_options]: optional attributes set by the embedder via ScriptOrigin, |
6453 // and used by the embedder to make decisions about the script. V8 just passes | 6453 // and used by the embedder to make decisions about the script. V8 just passes |
6454 // this through. Encoded in the 'flags' field. | 6454 // this through. Encoded in the 'flags' field. |
6455 inline v8::ScriptOriginOptions origin_options(); | 6455 inline v8::ScriptOriginOptions origin_options(); |
6456 inline void set_origin_options(ScriptOriginOptions origin_options); | 6456 inline void set_origin_options(ScriptOriginOptions origin_options); |
6457 | 6457 |
6458 // [is_module]: determins whether the script is an ES2015 module. Encoded in | |
vogelheim
2016/06/14 15:20:49
nitpick: determins -> determines.
mike3
2016/06/19 16:59:00
Acknowledged.
| |
6459 // the 'flags' field. | |
6460 inline bool is_module(); | |
6461 inline void set_is_module(bool value); | |
6462 | |
6458 DECLARE_CAST(Script) | 6463 DECLARE_CAST(Script) |
6459 | 6464 |
6460 // If script source is an external string, check that the underlying | 6465 // If script source is an external string, check that the underlying |
6461 // resource is accessible. Otherwise, always return true. | 6466 // resource is accessible. Otherwise, always return true. |
6462 inline bool HasValidSource(); | 6467 inline bool HasValidSource(); |
6463 | 6468 |
6464 static Handle<Object> GetNameOrSourceURL(Handle<Script> script); | 6469 static Handle<Object> GetNameOrSourceURL(Handle<Script> script); |
6465 | 6470 |
6466 // Set eval origin for stack trace formatting. | 6471 // Set eval origin for stack trace formatting. |
6467 static void SetEvalOrigin(Handle<Script> script, | 6472 static void SetEvalOrigin(Handle<Script> script, |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6545 int GetLineNumberWithArray(int code_pos); | 6550 int GetLineNumberWithArray(int code_pos); |
6546 | 6551 |
6547 // Bit positions in the flags field. | 6552 // Bit positions in the flags field. |
6548 static const int kCompilationTypeBit = 0; | 6553 static const int kCompilationTypeBit = 0; |
6549 static const int kCompilationStateBit = 1; | 6554 static const int kCompilationStateBit = 1; |
6550 static const int kHideSourceBit = 2; | 6555 static const int kHideSourceBit = 2; |
6551 static const int kOriginOptionsShift = 3; | 6556 static const int kOriginOptionsShift = 3; |
6552 static const int kOriginOptionsSize = 3; | 6557 static const int kOriginOptionsSize = 3; |
6553 static const int kOriginOptionsMask = ((1 << kOriginOptionsSize) - 1) | 6558 static const int kOriginOptionsMask = ((1 << kOriginOptionsSize) - 1) |
6554 << kOriginOptionsShift; | 6559 << kOriginOptionsShift; |
6560 static const int kIsModuleBit = kOriginOptionsShift + kOriginOptionsSize; | |
6555 | 6561 |
6556 DISALLOW_IMPLICIT_CONSTRUCTORS(Script); | 6562 DISALLOW_IMPLICIT_CONSTRUCTORS(Script); |
6557 }; | 6563 }; |
6558 | 6564 |
6559 | 6565 |
6560 // List of builtin functions we want to identify to improve code | 6566 // List of builtin functions we want to identify to improve code |
6561 // generation. | 6567 // generation. |
6562 // | 6568 // |
6563 // Each entry has a name of a global object property holding an object | 6569 // Each entry has a name of a global object property holding an object |
6564 // optionally followed by ".prototype", a name of a builtin function | 6570 // optionally followed by ".prototype", a name of a builtin function |
(...skipping 4232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
10797 } | 10803 } |
10798 return value; | 10804 return value; |
10799 } | 10805 } |
10800 }; | 10806 }; |
10801 | 10807 |
10802 | 10808 |
10803 } // NOLINT, false-positive due to second-order macros. | 10809 } // NOLINT, false-positive due to second-order macros. |
10804 } // NOLINT, false-positive due to second-order macros. | 10810 } // NOLINT, false-positive due to second-order macros. |
10805 | 10811 |
10806 #endif // V8_OBJECTS_H_ | 10812 #endif // V8_OBJECTS_H_ |
OLD | NEW |