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

Side by Side Diff: src/objects.h

Issue 898983002: Add strong mode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Code review + fixes 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/ic/ic.h ('k') | src/objects.cc » ('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 4307 matching lines...) Expand 10 before | Expand all | Expand 10 after
4318 enum FunctionVariableInfo { 4318 enum FunctionVariableInfo {
4319 NONE, // No function name present. 4319 NONE, // No function name present.
4320 STACK, // Function 4320 STACK, // Function
4321 CONTEXT, 4321 CONTEXT,
4322 UNUSED 4322 UNUSED
4323 }; 4323 };
4324 4324
4325 // Properties of scopes. 4325 // Properties of scopes.
4326 class ScopeTypeField : public BitField<ScopeType, 0, 4> {}; 4326 class ScopeTypeField : public BitField<ScopeType, 0, 4> {};
4327 class CallsEvalField : public BitField<bool, 4, 1> {}; 4327 class CallsEvalField : public BitField<bool, 4, 1> {};
4328 STATIC_ASSERT(LANGUAGE_END == 2); 4328 STATIC_ASSERT(LANGUAGE_END == 3);
4329 class LanguageModeField : public BitField<LanguageMode, 5, 1> {}; 4329 class LanguageModeField : public BitField<LanguageMode, 5, 2> {};
4330 class FunctionVariableField : public BitField<FunctionVariableInfo, 6, 2> {}; 4330 class FunctionVariableField : public BitField<FunctionVariableInfo, 7, 2> {};
4331 class FunctionVariableMode : public BitField<VariableMode, 8, 3> {}; 4331 class FunctionVariableMode : public BitField<VariableMode, 9, 3> {};
4332 class AsmModuleField : public BitField<bool, 11, 1> {}; 4332 class AsmModuleField : public BitField<bool, 12, 1> {};
4333 class AsmFunctionField : public BitField<bool, 12, 1> {}; 4333 class AsmFunctionField : public BitField<bool, 13, 1> {};
4334 4334
4335 // BitFields representing the encoded information for context locals in the 4335 // BitFields representing the encoded information for context locals in the
4336 // ContextLocalInfoEntries part. 4336 // ContextLocalInfoEntries part.
4337 class ContextLocalMode: public BitField<VariableMode, 0, 3> {}; 4337 class ContextLocalMode: public BitField<VariableMode, 0, 3> {};
4338 class ContextLocalInitFlag: public BitField<InitializationFlag, 3, 1> {}; 4338 class ContextLocalInitFlag: public BitField<InitializationFlag, 3, 1> {};
4339 class ContextLocalMaybeAssignedFlag 4339 class ContextLocalMaybeAssignedFlag
4340 : public BitField<MaybeAssignedFlag, 4, 1> {}; 4340 : public BitField<MaybeAssignedFlag, 4, 1> {};
4341 }; 4341 };
4342 4342
4343 4343
(...skipping 2830 matching lines...) Expand 10 before | Expand all | Expand 10 after
7174 static const int kIsTopLevelBit = 1; 7174 static const int kIsTopLevelBit = 1;
7175 static const int kStartPositionShift = 2; 7175 static const int kStartPositionShift = 2;
7176 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); 7176 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1);
7177 7177
7178 // Bit positions in compiler_hints. 7178 // Bit positions in compiler_hints.
7179 enum CompilerHints { 7179 enum CompilerHints {
7180 kAllowLazyCompilation, 7180 kAllowLazyCompilation,
7181 kAllowLazyCompilationWithoutContext, 7181 kAllowLazyCompilationWithoutContext,
7182 kOptimizationDisabled, 7182 kOptimizationDisabled,
7183 kStrictModeFunction, 7183 kStrictModeFunction,
7184 kStrongModeFunction,
7184 kUsesArguments, 7185 kUsesArguments,
7185 kUsesSuperProperty, 7186 kUsesSuperProperty,
7186 kUsesSuperConstructorCall, 7187 kUsesSuperConstructorCall,
7187 kHasDuplicateParameters, 7188 kHasDuplicateParameters,
7188 kNative, 7189 kNative,
7189 kInlineBuiltin, 7190 kInlineBuiltin,
7190 kBoundFunction, 7191 kBoundFunction,
7191 kIsAnonymous, 7192 kIsAnonymous,
7192 kNameShouldPrintAsAnonymous, 7193 kNameShouldPrintAsAnonymous,
7193 kIsFunction, 7194 kIsFunction,
7194 kDontCache, 7195 kDontCache,
7195 kDontFlush, 7196 kDontFlush,
7196 kIsArrow, 7197 kIsArrow,
7197 kIsGenerator, 7198 kIsGenerator,
7198 kIsConciseMethod, 7199 kIsConciseMethod,
7199 kIsDefaultConstructor, 7200 kIsDefaultConstructor,
7200 kIsSubclassConstructor, 7201 kIsSubclassConstructor,
7201 kIsAsmFunction, 7202 kIsAsmFunction,
7202 kDeserialized, 7203 kDeserialized,
7203 kCompilerHintsCount // Pseudo entry 7204 kCompilerHintsCount // Pseudo entry
7204 }; 7205 };
7205 // Add hints for other modes when they're added. 7206 // Add hints for other modes when they're added.
7206 STATIC_ASSERT(LANGUAGE_END == 2); 7207 STATIC_ASSERT(LANGUAGE_END == 3);
7207 7208
7208 class FunctionKindBits : public BitField<FunctionKind, kIsArrow, 5> {}; 7209 class FunctionKindBits : public BitField<FunctionKind, kIsArrow, 5> {};
7209 7210
7210 class DeoptCountBits : public BitField<int, 0, 4> {}; 7211 class DeoptCountBits : public BitField<int, 0, 4> {};
7211 class OptReenableTriesBits : public BitField<int, 4, 18> {}; 7212 class OptReenableTriesBits : public BitField<int, 4, 18> {};
7212 class ICAgeBits : public BitField<int, 22, 8> {}; 7213 class ICAgeBits : public BitField<int, 22, 8> {};
7213 7214
7214 class OptCountBits : public BitField<int, 0, 22> {}; 7215 class OptCountBits : public BitField<int, 0, 22> {};
7215 class DisabledOptimizationReasonBits : public BitField<int, 22, 8> {}; 7216 class DisabledOptimizationReasonBits : public BitField<int, 22, 8> {};
7216 7217
(...skipping 3740 matching lines...) Expand 10 before | Expand all | Expand 10 after
10957 } else { 10958 } else {
10958 value &= ~(1 << bit_position); 10959 value &= ~(1 << bit_position);
10959 } 10960 }
10960 return value; 10961 return value;
10961 } 10962 }
10962 }; 10963 };
10963 10964
10964 } } // namespace v8::internal 10965 } } // namespace v8::internal
10965 10966
10966 #endif // V8_OBJECTS_H_ 10967 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ic/ic.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698