| Index: src/arm/full-codegen-arm.cc
|
| diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc
|
| index e1cac3403694bc2c9a5e23a20d946dc24545997b..64aac9cb13a6ef37d2e2c2b6953082b674e99e9f 100644
|
| --- a/src/arm/full-codegen-arm.cc
|
| +++ b/src/arm/full-codegen-arm.cc
|
| @@ -3574,6 +3574,39 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(ZoneList<Expression*>* args) {
|
| }
|
|
|
|
|
| +void FullCodeGenerator::EmitIsNativeOrStrictMode(ZoneList<Expression*>* args) {
|
| + ASSERT(args->length() == 1);
|
| +
|
| + // Load the function into r0.
|
| + VisitForAccumulatorValue(args->at(0));
|
| +
|
| + // Prepare for the test.
|
| + Label materialize_true, materialize_false;
|
| + Label* if_true = NULL;
|
| + Label* if_false = NULL;
|
| + Label* fall_through = NULL;
|
| + context()->PrepareTest(&materialize_true, &materialize_false,
|
| + &if_true, &if_false, &fall_through);
|
| +
|
| + // Test for strict mode function.
|
| + __ ldr(r1, FieldMemOperand(r0, JSFunction::kSharedFunctionInfoOffset));
|
| + __ ldr(r1, FieldMemOperand(r1, SharedFunctionInfo::kCompilerHintsOffset));
|
| + __ tst(r1, Operand(1 << (SharedFunctionInfo::kStrictModeFunction +
|
| + kSmiTagSize)));
|
| + __ b(ne, if_true);
|
| +
|
| + // Test for native function.
|
| + __ tst(r1, Operand(1 << (SharedFunctionInfo::kNative + kSmiTagSize)));
|
| + __ b(ne, if_true);
|
| +
|
| + // Not native or strict-mode function.
|
| + __ b(if_false);
|
| +
|
| + PrepareForBailoutBeforeSplit(TOS_REG, true, if_true, if_false);
|
| + context()->Plug(if_true, if_false);
|
| +}
|
| +
|
| +
|
| void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
|
| Handle<String> name = expr->name();
|
| if (name->length() > 0 && name->Get(0) == '_') {
|
|
|