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

Side by Side Diff: src/objects.h

Issue 1135343005: Revert of [V8] Added Script::is_opaque flag for embedders (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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 6720 matching lines...) Expand 10 before | Expand all | Expand 10 after
6731 // [compilation_type]: how the the script was compiled. Encoded in the 6731 // [compilation_type]: how the the script was compiled. Encoded in the
6732 // 'flags' field. 6732 // 'flags' field.
6733 inline CompilationType compilation_type(); 6733 inline CompilationType compilation_type();
6734 inline void set_compilation_type(CompilationType type); 6734 inline void set_compilation_type(CompilationType type);
6735 6735
6736 // [compilation_state]: determines whether the script has already been 6736 // [compilation_state]: determines whether the script has already been
6737 // compiled. Encoded in the 'flags' field. 6737 // compiled. Encoded in the 'flags' field.
6738 inline CompilationState compilation_state(); 6738 inline CompilationState compilation_state();
6739 inline void set_compilation_state(CompilationState state); 6739 inline void set_compilation_state(CompilationState state);
6740 6740
6741 // [origin_options]: optional attributes set by the embedder via ScriptOrigin, 6741 // [is_embedder_debug_script]: An opaque boolean set by the embedder via
6742 // and used by the embedder to make decisions about the script. V8 just passes 6742 // ScriptOrigin, and used by the embedder to make decisions about the
6743 // this through. Encoded in the 'flags' field. 6743 // script's origin. V8 just passes this through. Encoded in
6744 inline v8::ScriptOriginOptions origin_options(); 6744 // the 'flags' field.
6745 inline void set_origin_options(ScriptOriginOptions origin_options); 6745 DECL_BOOLEAN_ACCESSORS(is_embedder_debug_script)
6746
6747 // [is_shared_cross_origin]: An opaque boolean set by the embedder via
6748 // ScriptOrigin, and used by the embedder to make decisions about the
6749 // script's level of privilege. V8 just passes this through. Encoded in
6750 // the 'flags' field.
6751 DECL_BOOLEAN_ACCESSORS(is_shared_cross_origin)
6746 6752
6747 DECLARE_CAST(Script) 6753 DECLARE_CAST(Script)
6748 6754
6749 // If script source is an external string, check that the underlying 6755 // If script source is an external string, check that the underlying
6750 // resource is accessible. Otherwise, always return true. 6756 // resource is accessible. Otherwise, always return true.
6751 inline bool HasValidSource(); 6757 inline bool HasValidSource();
6752 6758
6753 // Convert code position into column number. 6759 // Convert code position into column number.
6754 static int GetColumnNumber(Handle<Script> script, int code_pos); 6760 static int GetColumnNumber(Handle<Script> script, int code_pos);
6755 6761
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
6787 static const int kSourceUrlOffset = kFlagsOffset + kPointerSize; 6793 static const int kSourceUrlOffset = kFlagsOffset + kPointerSize;
6788 static const int kSourceMappingUrlOffset = kSourceUrlOffset + kPointerSize; 6794 static const int kSourceMappingUrlOffset = kSourceUrlOffset + kPointerSize;
6789 static const int kSize = kSourceMappingUrlOffset + kPointerSize; 6795 static const int kSize = kSourceMappingUrlOffset + kPointerSize;
6790 6796
6791 private: 6797 private:
6792 int GetLineNumberWithArray(int code_pos); 6798 int GetLineNumberWithArray(int code_pos);
6793 6799
6794 // Bit positions in the flags field. 6800 // Bit positions in the flags field.
6795 static const int kCompilationTypeBit = 0; 6801 static const int kCompilationTypeBit = 0;
6796 static const int kCompilationStateBit = 1; 6802 static const int kCompilationStateBit = 1;
6797 static const int kOriginOptionsShift = 2; 6803 static const int kIsEmbedderDebugScriptBit = 2;
6798 static const int kOriginOptionsSize = 3; 6804 static const int kIsSharedCrossOriginBit = 3;
6799 static const int kOriginOptionsMask = ((1 << kOriginOptionsSize) - 1)
6800 << kOriginOptionsShift;
6801 6805
6802 DISALLOW_IMPLICIT_CONSTRUCTORS(Script); 6806 DISALLOW_IMPLICIT_CONSTRUCTORS(Script);
6803 }; 6807 };
6804 6808
6805 6809
6806 // List of builtin functions we want to identify to improve code 6810 // List of builtin functions we want to identify to improve code
6807 // generation. 6811 // generation.
6808 // 6812 //
6809 // Each entry has a name of a global object property holding an object 6813 // Each entry has a name of a global object property holding an object
6810 // optionally followed by ".prototype", a name of a builtin function 6814 // optionally followed by ".prototype", a name of a builtin function
(...skipping 4296 matching lines...) Expand 10 before | Expand all | Expand 10 after
11107 } else { 11111 } else {
11108 value &= ~(1 << bit_position); 11112 value &= ~(1 << bit_position);
11109 } 11113 }
11110 return value; 11114 return value;
11111 } 11115 }
11112 }; 11116 };
11113 11117
11114 } } // namespace v8::internal 11118 } } // namespace v8::internal
11115 11119
11116 #endif // V8_OBJECTS_H_ 11120 #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