| Index: src/objects.h
|
| ===================================================================
|
| --- src/objects.h (revision 7880)
|
| +++ src/objects.h (working copy)
|
| @@ -4340,6 +4340,13 @@
|
| inline bool strict_mode();
|
| inline void set_strict_mode(bool value);
|
|
|
| + // Indicates whether the function is a native ES5 function.
|
| + // These needs special threatment in .call and .apply since
|
| + // null passed as the receiver should not be translated to the
|
| + // global object.
|
| + inline bool es5_native();
|
| + inline void set_es5_native(bool value);
|
| +
|
| // Indicates whether or not the code in the shared function support
|
| // deoptimization.
|
| inline bool has_deoptimization_support();
|
| @@ -4520,6 +4527,7 @@
|
| static const int kCodeAgeMask = 0x7;
|
| static const int kOptimizationDisabled = 6;
|
| static const int kStrictModeFunction = 7;
|
| + static const int kES5Native = 8;
|
|
|
| private:
|
| #if V8_HOST_ARCH_32_BIT
|
| @@ -4533,18 +4541,27 @@
|
| #endif
|
|
|
| public:
|
| - // Constants for optimizing codegen for strict mode function tests.
|
| + // Constants for optimizing codegen for strict mode function and
|
| + // es5 native tests.
|
| // Allows to use byte-widgh instructions.
|
| static const int kStrictModeBitWithinByte =
|
| (kStrictModeFunction + kCompilerHintsSmiTagSize) % kBitsPerByte;
|
|
|
| + static const int kES5NativeBitWithinByte =
|
| + (kES5Native + kCompilerHintsSmiTagSize) % kBitsPerByte;
|
| +
|
| #if __BYTE_ORDER == __LITTLE_ENDIAN
|
| static const int kStrictModeByteOffset = kCompilerHintsOffset +
|
| - (kStrictModeFunction + kCompilerHintsSmiTagSize) / kBitsPerByte;
|
| + (kStrictModeFunction + kCompilerHintsSmiTagSize) / kBitsPerByte;
|
| + static const int kES5NativeByteOffset = kCompilerHintsOffset +
|
| + (kES5Native + kCompilerHintsSmiTagSize) / kBitsPerByte;
|
| #elif __BYTE_ORDER == __BIG_ENDIAN
|
| static const int kStrictModeByteOffset = kCompilerHintsOffset +
|
| - (kCompilerHintsSize - 1) -
|
| - ((kStrictModeFunction + kCompilerHintsSmiTagSize) / kBitsPerByte);
|
| + (kCompilerHintsSize - 1) -
|
| + ((kStrictModeFunction + kCompilerHintsSmiTagSize) / kBitsPerByte);
|
| + static const int kES5NativeByteOffset = kCompilerHintsOffset +
|
| + (kCompilerHintsSize - 1) -
|
| + ((kES5Native + kCompilerHintsSmiTagSize) / kBitsPerByte);
|
| #else
|
| #error Unknown byte ordering
|
| #endif
|
|
|