Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(387)

Side by Side Diff: src/objects.h

Issue 879553002: [V8] Added Script::is_debugger_script flag for embedders (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/debug.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 6578 matching lines...) Expand 10 before | Expand all | Expand 10 after
6589 // [compilation_type]: how the the script was compiled. Encoded in the 6589 // [compilation_type]: how the the script was compiled. Encoded in the
6590 // 'flags' field. 6590 // 'flags' field.
6591 inline CompilationType compilation_type(); 6591 inline CompilationType compilation_type();
6592 inline void set_compilation_type(CompilationType type); 6592 inline void set_compilation_type(CompilationType type);
6593 6593
6594 // [compilation_state]: determines whether the script has already been 6594 // [compilation_state]: determines whether the script has already been
6595 // compiled. Encoded in the 'flags' field. 6595 // compiled. Encoded in the 'flags' field.
6596 inline CompilationState compilation_state(); 6596 inline CompilationState compilation_state();
6597 inline void set_compilation_state(CompilationState state); 6597 inline void set_compilation_state(CompilationState state);
6598 6598
6599 // [is_embedder_debug_script]: An opaque boolean set by the embedder via
6600 // ScriptOrigin, and used by the embedder to make decisions about the
6601 // script's origin. V8 just passes this through. Encoded in
6602 // the 'flags' field.
6603 DECL_BOOLEAN_ACCESSORS(is_embedder_debug_script)
6604
6599 // [is_shared_cross_origin]: An opaque boolean set by the embedder via 6605 // [is_shared_cross_origin]: An opaque boolean set by the embedder via
6600 // ScriptOrigin, and used by the embedder to make decisions about the 6606 // ScriptOrigin, and used by the embedder to make decisions about the
6601 // script's level of privilege. V8 just passes this through. Encoded in 6607 // script's level of privilege. V8 just passes this through. Encoded in
6602 // the 'flags' field. 6608 // the 'flags' field.
6603 DECL_BOOLEAN_ACCESSORS(is_shared_cross_origin) 6609 DECL_BOOLEAN_ACCESSORS(is_shared_cross_origin)
6604 6610
6605 DECLARE_CAST(Script) 6611 DECLARE_CAST(Script)
6606 6612
6607 // If script source is an external string, check that the underlying 6613 // If script source is an external string, check that the underlying
6608 // resource is accessible. Otherwise, always return true. 6614 // resource is accessible. Otherwise, always return true.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
6645 static const int kSourceUrlOffset = kFlagsOffset + kPointerSize; 6651 static const int kSourceUrlOffset = kFlagsOffset + kPointerSize;
6646 static const int kSourceMappingUrlOffset = kSourceUrlOffset + kPointerSize; 6652 static const int kSourceMappingUrlOffset = kSourceUrlOffset + kPointerSize;
6647 static const int kSize = kSourceMappingUrlOffset + kPointerSize; 6653 static const int kSize = kSourceMappingUrlOffset + kPointerSize;
6648 6654
6649 private: 6655 private:
6650 int GetLineNumberWithArray(int code_pos); 6656 int GetLineNumberWithArray(int code_pos);
6651 6657
6652 // Bit positions in the flags field. 6658 // Bit positions in the flags field.
6653 static const int kCompilationTypeBit = 0; 6659 static const int kCompilationTypeBit = 0;
6654 static const int kCompilationStateBit = 1; 6660 static const int kCompilationStateBit = 1;
6655 static const int kIsSharedCrossOriginBit = 2; 6661 static const int kIsEmbedderDebugScriptBit = 2;
6662 static const int kIsSharedCrossOriginBit = 3;
6656 6663
6657 DISALLOW_IMPLICIT_CONSTRUCTORS(Script); 6664 DISALLOW_IMPLICIT_CONSTRUCTORS(Script);
6658 }; 6665 };
6659 6666
6660 6667
6661 // List of builtin functions we want to identify to improve code 6668 // List of builtin functions we want to identify to improve code
6662 // generation. 6669 // generation.
6663 // 6670 //
6664 // Each entry has a name of a global object property holding an object 6671 // Each entry has a name of a global object property holding an object
6665 // optionally followed by ".prototype", a name of a builtin function 6672 // optionally followed by ".prototype", a name of a builtin function
(...skipping 4278 matching lines...) Expand 10 before | Expand all | Expand 10 after
10944 } else { 10951 } else {
10945 value &= ~(1 << bit_position); 10952 value &= ~(1 << bit_position);
10946 } 10953 }
10947 return value; 10954 return value;
10948 } 10955 }
10949 }; 10956 };
10950 10957
10951 } } // namespace v8::internal 10958 } } // namespace v8::internal
10952 10959
10953 #endif // V8_OBJECTS_H_ 10960 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/debug.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698