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

Side by Side Diff: src/objects.h

Issue 1292283004: Do not use js builtins object to determine whether a function is a builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove redundant check Created 5 years, 4 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/isolate.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 5880 matching lines...) Expand 10 before | Expand all | Expand 10 after
5891 // [compilation_type]: how the the script was compiled. Encoded in the 5891 // [compilation_type]: how the the script was compiled. Encoded in the
5892 // 'flags' field. 5892 // 'flags' field.
5893 inline CompilationType compilation_type(); 5893 inline CompilationType compilation_type();
5894 inline void set_compilation_type(CompilationType type); 5894 inline void set_compilation_type(CompilationType type);
5895 5895
5896 // [compilation_state]: determines whether the script has already been 5896 // [compilation_state]: determines whether the script has already been
5897 // compiled. Encoded in the 'flags' field. 5897 // compiled. Encoded in the 'flags' field.
5898 inline CompilationState compilation_state(); 5898 inline CompilationState compilation_state();
5899 inline void set_compilation_state(CompilationState state); 5899 inline void set_compilation_state(CompilationState state);
5900 5900
5901 // [hide_source]: determines whether the script source can be exposed as
5902 // function source. Encoded in the 'flags' field.
5903 inline bool hide_source();
5904 inline void set_hide_source(bool value);
5905
5901 // [origin_options]: optional attributes set by the embedder via ScriptOrigin, 5906 // [origin_options]: optional attributes set by the embedder via ScriptOrigin,
5902 // and used by the embedder to make decisions about the script. V8 just passes 5907 // and used by the embedder to make decisions about the script. V8 just passes
5903 // this through. Encoded in the 'flags' field. 5908 // this through. Encoded in the 'flags' field.
5904 inline v8::ScriptOriginOptions origin_options(); 5909 inline v8::ScriptOriginOptions origin_options();
5905 inline void set_origin_options(ScriptOriginOptions origin_options); 5910 inline void set_origin_options(ScriptOriginOptions origin_options);
5906 5911
5907 DECLARE_CAST(Script) 5912 DECLARE_CAST(Script)
5908 5913
5909 // If script source is an external string, check that the underlying 5914 // If script source is an external string, check that the underlying
5910 // resource is accessible. Otherwise, always return true. 5915 // resource is accessible. Otherwise, always return true.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
5952 static const int kSourceUrlOffset = kFlagsOffset + kPointerSize; 5957 static const int kSourceUrlOffset = kFlagsOffset + kPointerSize;
5953 static const int kSourceMappingUrlOffset = kSourceUrlOffset + kPointerSize; 5958 static const int kSourceMappingUrlOffset = kSourceUrlOffset + kPointerSize;
5954 static const int kSize = kSourceMappingUrlOffset + kPointerSize; 5959 static const int kSize = kSourceMappingUrlOffset + kPointerSize;
5955 5960
5956 private: 5961 private:
5957 int GetLineNumberWithArray(int code_pos); 5962 int GetLineNumberWithArray(int code_pos);
5958 5963
5959 // Bit positions in the flags field. 5964 // Bit positions in the flags field.
5960 static const int kCompilationTypeBit = 0; 5965 static const int kCompilationTypeBit = 0;
5961 static const int kCompilationStateBit = 1; 5966 static const int kCompilationStateBit = 1;
5962 static const int kOriginOptionsShift = 2; 5967 static const int kHideSourceBit = 2;
5968 static const int kOriginOptionsShift = 3;
5963 static const int kOriginOptionsSize = 3; 5969 static const int kOriginOptionsSize = 3;
5964 static const int kOriginOptionsMask = ((1 << kOriginOptionsSize) - 1) 5970 static const int kOriginOptionsMask = ((1 << kOriginOptionsSize) - 1)
5965 << kOriginOptionsShift; 5971 << kOriginOptionsShift;
5966 5972
5967 DISALLOW_IMPLICIT_CONSTRUCTORS(Script); 5973 DISALLOW_IMPLICIT_CONSTRUCTORS(Script);
5968 }; 5974 };
5969 5975
5970 5976
5971 // List of builtin functions we want to identify to improve code 5977 // List of builtin functions we want to identify to improve code
5972 // generation. 5978 // generation.
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
6362 6368
6363 // Stores opt_count and bailout_reason as bit-fields. 6369 // Stores opt_count and bailout_reason as bit-fields.
6364 inline void set_opt_count_and_bailout_reason(int value); 6370 inline void set_opt_count_and_bailout_reason(int value);
6365 inline int opt_count_and_bailout_reason() const; 6371 inline int opt_count_and_bailout_reason() const;
6366 6372
6367 inline void set_disable_optimization_reason(BailoutReason reason); 6373 inline void set_disable_optimization_reason(BailoutReason reason);
6368 6374
6369 // Tells whether this function should be subject to debugging. 6375 // Tells whether this function should be subject to debugging.
6370 inline bool IsSubjectToDebugging(); 6376 inline bool IsSubjectToDebugging();
6371 6377
6378 // Whether this function is defined in native code or extensions.
6379 inline bool IsBuiltin();
6380
6372 // Check whether or not this function is inlineable. 6381 // Check whether or not this function is inlineable.
6373 bool IsInlineable(); 6382 bool IsInlineable();
6374 6383
6375 // Source size of this function. 6384 // Source size of this function.
6376 int SourceSize(); 6385 int SourceSize();
6377 6386
6378 // Calculate the instance size. 6387 // Calculate the instance size.
6379 int CalculateInstanceSize(); 6388 int CalculateInstanceSize();
6380 6389
6381 // Calculate the number of in-object properties. 6390 // Calculate the number of in-object properties.
(...skipping 3821 matching lines...) Expand 10 before | Expand all | Expand 10 after
10203 } else { 10212 } else {
10204 value &= ~(1 << bit_position); 10213 value &= ~(1 << bit_position);
10205 } 10214 }
10206 return value; 10215 return value;
10207 } 10216 }
10208 }; 10217 };
10209 10218
10210 } } // namespace v8::internal 10219 } } // namespace v8::internal
10211 10220
10212 #endif // V8_OBJECTS_H_ 10221 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698