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

Side by Side Diff: src/objects.h

Issue 7584005: Revert "Fix a bug in scope analysis." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4712 matching lines...) Expand 10 before | Expand all | Expand 10 after
4723 // True if the function has any duplicated parameter names. 4723 // True if the function has any duplicated parameter names.
4724 DECL_BOOLEAN_ACCESSORS(has_duplicate_parameters) 4724 DECL_BOOLEAN_ACCESSORS(has_duplicate_parameters)
4725 4725
4726 // Indicates whether the function is a native function. 4726 // Indicates whether the function is a native function.
4727 // These needs special threatment in .call and .apply since 4727 // These needs special threatment in .call and .apply since
4728 // null passed as the receiver should not be translated to the 4728 // null passed as the receiver should not be translated to the
4729 // global object. 4729 // global object.
4730 inline bool native(); 4730 inline bool native();
4731 inline void set_native(bool value); 4731 inline void set_native(bool value);
4732 4732
4733 // Indicates that the function was created by the Function function.
4734 // Though it's anonymous, toString should treat it as if it had the name
4735 // "anonymous". We don't set the name itself so that the system does not
4736 // see a binding for it.
4737 inline bool name_should_print_as_anonymous();
4738 inline void set_name_should_print_as_anonymous(bool flag);
4739
4740 // Indicates whether the function is a bound function created using 4733 // Indicates whether the function is a bound function created using
4741 // the bind function. 4734 // the bind function.
4742 inline bool bound(); 4735 inline bool bound();
4743 inline void set_bound(bool value); 4736 inline void set_bound(bool value);
4744 4737
4745 // Indicates whether or not the code in the shared function support 4738 // Indicates whether or not the code in the shared function support
4746 // deoptimization. 4739 // deoptimization.
4747 inline bool has_deoptimization_support(); 4740 inline bool has_deoptimization_support();
4748 4741
4749 // Enable deoptimization support through recompiled code. 4742 // Enable deoptimization support through recompiled code.
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
4915 // The source code start position is in the 30 most significant bits of 4908 // The source code start position is in the 30 most significant bits of
4916 // the start_position_and_type field. 4909 // the start_position_and_type field.
4917 static const int kIsExpressionBit = 0; 4910 static const int kIsExpressionBit = 0;
4918 static const int kIsTopLevelBit = 1; 4911 static const int kIsTopLevelBit = 1;
4919 static const int kStartPositionShift = 2; 4912 static const int kStartPositionShift = 2;
4920 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); 4913 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1);
4921 4914
4922 // Bit positions in compiler_hints. 4915 // Bit positions in compiler_hints.
4923 static const int kCodeAgeSize = 3; 4916 static const int kCodeAgeSize = 3;
4924 static const int kCodeAgeMask = (1 << kCodeAgeSize) - 1; 4917 static const int kCodeAgeMask = (1 << kCodeAgeSize) - 1;
4918 static const int kBoundFunction = 9;
4925 4919
4926 enum CompilerHints { 4920 enum CompilerHints {
4927 kHasOnlySimpleThisPropertyAssignments, 4921 kHasOnlySimpleThisPropertyAssignments,
4928 kAllowLazyCompilation, 4922 kAllowLazyCompilation,
4929 kLiveObjectsMayExist, 4923 kLiveObjectsMayExist,
4930 kCodeAgeShift, 4924 kCodeAgeShift,
4931 kOptimizationDisabled = kCodeAgeShift + kCodeAgeSize, 4925 kOptimizationDisabled = kCodeAgeShift + kCodeAgeSize,
4932 kStrictModeFunction, 4926 kStrictModeFunction,
4933 kUsesArguments, 4927 kUsesArguments,
4934 kHasDuplicateParameters, 4928 kHasDuplicateParameters,
4935 kNative, 4929 kNative
4936 kBoundFunction,
4937 kNameShouldPrintAsAnonymous,
4938 kCompilerHintsCount // Pseudo entry
4939 }; 4930 };
4940 4931
4941 private: 4932 private:
4942 #if V8_HOST_ARCH_32_BIT 4933 #if V8_HOST_ARCH_32_BIT
4943 // On 32 bit platforms, compiler hints is a smi. 4934 // On 32 bit platforms, compiler hints is a smi.
4944 static const int kCompilerHintsSmiTagSize = kSmiTagSize; 4935 static const int kCompilerHintsSmiTagSize = kSmiTagSize;
4945 static const int kCompilerHintsSize = kPointerSize; 4936 static const int kCompilerHintsSize = kPointerSize;
4946 #else 4937 #else
4947 // On 64 bit platforms, compiler hints is not a smi, see comment above. 4938 // On 64 bit platforms, compiler hints is not a smi, see comment above.
4948 static const int kCompilerHintsSmiTagSize = 0; 4939 static const int kCompilerHintsSmiTagSize = 0;
4949 static const int kCompilerHintsSize = kIntSize; 4940 static const int kCompilerHintsSize = kIntSize;
4950 #endif 4941 #endif
4951 4942
4952 STATIC_ASSERT(SharedFunctionInfo::kCompilerHintsCount <=
4953 SharedFunctionInfo::kCompilerHintsSize * kBitsPerByte);
4954
4955 public: 4943 public:
4956 // Constants for optimizing codegen for strict mode function and 4944 // Constants for optimizing codegen for strict mode function and
4957 // native tests. 4945 // native tests.
4958 // Allows to use byte-widgh instructions. 4946 // Allows to use byte-widgh instructions.
4959 static const int kStrictModeBitWithinByte = 4947 static const int kStrictModeBitWithinByte =
4960 (kStrictModeFunction + kCompilerHintsSmiTagSize) % kBitsPerByte; 4948 (kStrictModeFunction + kCompilerHintsSmiTagSize) % kBitsPerByte;
4961 4949
4962 static const int kNativeBitWithinByte = 4950 static const int kNativeBitWithinByte =
4963 (kNative + kCompilerHintsSmiTagSize) % kBitsPerByte; 4951 (kNative + kCompilerHintsSmiTagSize) % kBitsPerByte;
4964 4952
(...skipping 2359 matching lines...) Expand 10 before | Expand all | Expand 10 after
7324 } else { 7312 } else {
7325 value &= ~(1 << bit_position); 7313 value &= ~(1 << bit_position);
7326 } 7314 }
7327 return value; 7315 return value;
7328 } 7316 }
7329 }; 7317 };
7330 7318
7331 } } // namespace v8::internal 7319 } } // namespace v8::internal
7332 7320
7333 #endif // V8_OBJECTS_H_ 7321 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698