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

Side by Side Diff: src/objects.h

Issue 7071009: Revert "Pass undefined to JS builtins when called with implicit receiver." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « src/mips/builtins-mips.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 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 4388 matching lines...) Expand 10 before | Expand all | Expand 10 after
4399 // shared function info. If a function is repeatedly optimized or if 4399 // shared function info. If a function is repeatedly optimized or if
4400 // we cannot optimize the function we disable optimization to avoid 4400 // we cannot optimize the function we disable optimization to avoid
4401 // spending time attempting to optimize it again. 4401 // spending time attempting to optimize it again.
4402 inline bool optimization_disabled(); 4402 inline bool optimization_disabled();
4403 inline void set_optimization_disabled(bool value); 4403 inline void set_optimization_disabled(bool value);
4404 4404
4405 // Indicates whether the function is a strict mode function. 4405 // Indicates whether the function is a strict mode function.
4406 inline bool strict_mode(); 4406 inline bool strict_mode();
4407 inline void set_strict_mode(bool value); 4407 inline void set_strict_mode(bool value);
4408 4408
4409 // Indicates whether the function is a native function. 4409 // Indicates whether the function is a native ES5 function.
4410 // These needs special threatment in .call and .apply since 4410 // These needs special threatment in .call and .apply since
4411 // null passed as the receiver should not be translated to the 4411 // null passed as the receiver should not be translated to the
4412 // global object. 4412 // global object.
4413 inline bool native(); 4413 inline bool es5_native();
4414 inline void set_native(bool value); 4414 inline void set_es5_native(bool value);
4415 4415
4416 // Indicates whether or not the code in the shared function support 4416 // Indicates whether or not the code in the shared function support
4417 // deoptimization. 4417 // deoptimization.
4418 inline bool has_deoptimization_support(); 4418 inline bool has_deoptimization_support();
4419 4419
4420 // Enable deoptimization support through recompiled code. 4420 // Enable deoptimization support through recompiled code.
4421 void EnableDeoptimizationSupport(Code* recompiled); 4421 void EnableDeoptimizationSupport(Code* recompiled);
4422 4422
4423 // Disable (further) attempted optimization of all functions sharing this 4423 // Disable (further) attempted optimization of all functions sharing this
4424 // shared function info. The function is the one we actually tried to 4424 // shared function info. The function is the one we actually tried to
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
4591 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); 4591 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1);
4592 4592
4593 // Bit positions in compiler_hints. 4593 // Bit positions in compiler_hints.
4594 static const int kHasOnlySimpleThisPropertyAssignments = 0; 4594 static const int kHasOnlySimpleThisPropertyAssignments = 0;
4595 static const int kAllowLazyCompilation = 1; 4595 static const int kAllowLazyCompilation = 1;
4596 static const int kLiveObjectsMayExist = 2; 4596 static const int kLiveObjectsMayExist = 2;
4597 static const int kCodeAgeShift = 3; 4597 static const int kCodeAgeShift = 3;
4598 static const int kCodeAgeMask = 0x7; 4598 static const int kCodeAgeMask = 0x7;
4599 static const int kOptimizationDisabled = 6; 4599 static const int kOptimizationDisabled = 6;
4600 static const int kStrictModeFunction = 7; 4600 static const int kStrictModeFunction = 7;
4601 static const int kNative = 8; 4601 static const int kES5Native = 8;
4602 4602
4603 private: 4603 private:
4604 #if V8_HOST_ARCH_32_BIT 4604 #if V8_HOST_ARCH_32_BIT
4605 // On 32 bit platforms, compiler hints is a smi. 4605 // On 32 bit platforms, compiler hints is a smi.
4606 static const int kCompilerHintsSmiTagSize = kSmiTagSize; 4606 static const int kCompilerHintsSmiTagSize = kSmiTagSize;
4607 static const int kCompilerHintsSize = kPointerSize; 4607 static const int kCompilerHintsSize = kPointerSize;
4608 #else 4608 #else
4609 // On 64 bit platforms, compiler hints is not a smi, see comment above. 4609 // On 64 bit platforms, compiler hints is not a smi, see comment above.
4610 static const int kCompilerHintsSmiTagSize = 0; 4610 static const int kCompilerHintsSmiTagSize = 0;
4611 static const int kCompilerHintsSize = kIntSize; 4611 static const int kCompilerHintsSize = kIntSize;
4612 #endif 4612 #endif
4613 4613
4614 public: 4614 public:
4615 // Constants for optimizing codegen for strict mode function and 4615 // Constants for optimizing codegen for strict mode function and
4616 // native tests. 4616 // es5 native tests.
4617 // Allows to use byte-widgh instructions. 4617 // Allows to use byte-widgh instructions.
4618 static const int kStrictModeBitWithinByte = 4618 static const int kStrictModeBitWithinByte =
4619 (kStrictModeFunction + kCompilerHintsSmiTagSize) % kBitsPerByte; 4619 (kStrictModeFunction + kCompilerHintsSmiTagSize) % kBitsPerByte;
4620 4620
4621 static const int kNativeBitWithinByte = 4621 static const int kES5NativeBitWithinByte =
4622 (kNative + kCompilerHintsSmiTagSize) % kBitsPerByte; 4622 (kES5Native + kCompilerHintsSmiTagSize) % kBitsPerByte;
4623 4623
4624 #if __BYTE_ORDER == __LITTLE_ENDIAN 4624 #if __BYTE_ORDER == __LITTLE_ENDIAN
4625 static const int kStrictModeByteOffset = kCompilerHintsOffset + 4625 static const int kStrictModeByteOffset = kCompilerHintsOffset +
4626 (kStrictModeFunction + kCompilerHintsSmiTagSize) / kBitsPerByte; 4626 (kStrictModeFunction + kCompilerHintsSmiTagSize) / kBitsPerByte;
4627 static const int kNativeByteOffset = kCompilerHintsOffset + 4627 static const int kES5NativeByteOffset = kCompilerHintsOffset +
4628 (kNative + kCompilerHintsSmiTagSize) / kBitsPerByte; 4628 (kES5Native + kCompilerHintsSmiTagSize) / kBitsPerByte;
4629 #elif __BYTE_ORDER == __BIG_ENDIAN 4629 #elif __BYTE_ORDER == __BIG_ENDIAN
4630 static const int kStrictModeByteOffset = kCompilerHintsOffset + 4630 static const int kStrictModeByteOffset = kCompilerHintsOffset +
4631 (kCompilerHintsSize - 1) - 4631 (kCompilerHintsSize - 1) -
4632 ((kStrictModeFunction + kCompilerHintsSmiTagSize) / kBitsPerByte); 4632 ((kStrictModeFunction + kCompilerHintsSmiTagSize) / kBitsPerByte);
4633 static const int kNativeByteOffset = kCompilerHintsOffset + 4633 static const int kES5NativeByteOffset = kCompilerHintsOffset +
4634 (kCompilerHintsSize - 1) - 4634 (kCompilerHintsSize - 1) -
4635 ((kNative + kCompilerHintsSmiTagSize) / kBitsPerByte); 4635 ((kES5Native + kCompilerHintsSmiTagSize) / kBitsPerByte);
4636 #else 4636 #else
4637 #error Unknown byte ordering 4637 #error Unknown byte ordering
4638 #endif 4638 #endif
4639 4639
4640 private: 4640 private:
4641 DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo); 4641 DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo);
4642 }; 4642 };
4643 4643
4644 4644
4645 // JSFunction describes JavaScript functions. 4645 // JSFunction describes JavaScript functions.
(...skipping 2187 matching lines...) Expand 10 before | Expand all | Expand 10 after
6833 } else { 6833 } else {
6834 value &= ~(1 << bit_position); 6834 value &= ~(1 << bit_position);
6835 } 6835 }
6836 return value; 6836 return value;
6837 } 6837 }
6838 }; 6838 };
6839 6839
6840 } } // namespace v8::internal 6840 } } // namespace v8::internal
6841 6841
6842 #endif // V8_OBJECTS_H_ 6842 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mips/builtins-mips.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698