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 6815006: [Arguments] Mark functions with duplicated parameters. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/arguments
Patch Set: Moved bit from scope to function literal. Created 9 years, 8 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 | « src/compiler.cc ('k') | src/objects-inl.h » ('j') | src/scopes.h » ('J')
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 4291 matching lines...) Expand 10 before | Expand all | Expand 10 after
4302 // we cannot optimize the function we disable optimization to avoid 4302 // we cannot optimize the function we disable optimization to avoid
4303 // spending time attempting to optimize it again. 4303 // spending time attempting to optimize it again.
4304 DECL_BOOLEAN_ACCESSORS(optimization_disabled) 4304 DECL_BOOLEAN_ACCESSORS(optimization_disabled)
4305 4305
4306 // Indicates whether the function is a strict mode function. 4306 // Indicates whether the function is a strict mode function.
4307 DECL_BOOLEAN_ACCESSORS(strict_mode) 4307 DECL_BOOLEAN_ACCESSORS(strict_mode)
4308 4308
4309 // False if the function definitely does not allocate an arguments object. 4309 // False if the function definitely does not allocate an arguments object.
4310 DECL_BOOLEAN_ACCESSORS(uses_arguments) 4310 DECL_BOOLEAN_ACCESSORS(uses_arguments)
4311 4311
4312 // True if the function has any duplicated parameter names.
4313 DECL_BOOLEAN_ACCESSORS(has_duplicate_parameters)
4314
4312 // Indicates whether or not the code in the shared function support 4315 // Indicates whether or not the code in the shared function support
4313 // deoptimization. 4316 // deoptimization.
4314 inline bool has_deoptimization_support(); 4317 inline bool has_deoptimization_support();
4315 4318
4316 // Enable deoptimization support through recompiled code. 4319 // Enable deoptimization support through recompiled code.
4317 void EnableDeoptimizationSupport(Code* recompiled); 4320 void EnableDeoptimizationSupport(Code* recompiled);
4318 4321
4319 // Lookup the bailout ID and ASSERT that it exists in the non-optimized 4322 // Lookup the bailout ID and ASSERT that it exists in the non-optimized
4320 // code, returns whether it asserted (i.e., always true if assertions are 4323 // code, returns whether it asserted (i.e., always true if assertions are
4321 // disabled). 4324 // disabled).
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
4475 4478
4476 // Bit positions in start_position_and_type. 4479 // Bit positions in start_position_and_type.
4477 // The source code start position is in the 30 most significant bits of 4480 // The source code start position is in the 30 most significant bits of
4478 // the start_position_and_type field. 4481 // the start_position_and_type field.
4479 static const int kIsExpressionBit = 0; 4482 static const int kIsExpressionBit = 0;
4480 static const int kIsTopLevelBit = 1; 4483 static const int kIsTopLevelBit = 1;
4481 static const int kStartPositionShift = 2; 4484 static const int kStartPositionShift = 2;
4482 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); 4485 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1);
4483 4486
4484 // Bit positions in compiler_hints. 4487 // Bit positions in compiler_hints.
4485 static const int kHasOnlySimpleThisPropertyAssignments = 0; 4488 static const int kCodeAgeSize = 3;
4486 static const int kAllowLazyCompilation = 1; 4489 static const int kCodeAgeMask = (1 << kCodeAgeSize) - 1;
4487 static const int kLiveObjectsMayExist = 2; 4490
4488 static const int kCodeAgeShift = 3; 4491 enum CompilerHints {
4489 static const int kCodeAgeMask = 0x7; 4492 kHasOnlySimpleThisPropertyAssignments,
4490 static const int kOptimizationDisabled = 6; 4493 kAllowLazyCompilation,
4491 static const int kStrictModeFunction = 7; 4494 kLiveObjectsMayExist,
4492 static const int kUsesArguments = 8; 4495 kCodeAgeShift,
4496 kOptimizationDisabled = kCodeAgeShift + kCodeAgeSize,
4497 kStrictModeFunction,
4498 kUsesArguments,
4499 kHasDuplicateParameters
4500 };
4493 4501
4494 private: 4502 private:
4495 #if V8_HOST_ARCH_32_BIT 4503 #if V8_HOST_ARCH_32_BIT
4496 // On 32 bit platforms, compiler hints is a smi. 4504 // On 32 bit platforms, compiler hints is a smi.
4497 static const int kCompilerHintsSmiTagSize = kSmiTagSize; 4505 static const int kCompilerHintsSmiTagSize = kSmiTagSize;
4498 static const int kCompilerHintsSize = kPointerSize; 4506 static const int kCompilerHintsSize = kPointerSize;
4499 #else 4507 #else
4500 // On 64 bit platforms, compiler hints is not a smi, see comment above. 4508 // On 64 bit platforms, compiler hints is not a smi, see comment above.
4501 static const int kCompilerHintsSmiTagSize = 0; 4509 static const int kCompilerHintsSmiTagSize = 0;
4502 static const int kCompilerHintsSize = kIntSize; 4510 static const int kCompilerHintsSize = kIntSize;
(...skipping 2176 matching lines...) Expand 10 before | Expand all | Expand 10 after
6679 } else { 6687 } else {
6680 value &= ~(1 << bit_position); 6688 value &= ~(1 << bit_position);
6681 } 6689 }
6682 return value; 6690 return value;
6683 } 6691 }
6684 }; 6692 };
6685 6693
6686 } } // namespace v8::internal 6694 } } // namespace v8::internal
6687 6695
6688 #endif // V8_OBJECTS_H_ 6696 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/objects-inl.h » ('j') | src/scopes.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698