OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 Label invoke, global; | 484 Label invoke, global; |
485 __ ldr(r2, MemOperand(sp, argc * kPointerSize)); // receiver | 485 __ ldr(r2, MemOperand(sp, argc * kPointerSize)); // receiver |
486 __ JumpIfSmi(r2, &invoke); | 486 __ JumpIfSmi(r2, &invoke); |
487 __ CompareObjectType(r2, r3, r3, JS_GLOBAL_OBJECT_TYPE); | 487 __ CompareObjectType(r2, r3, r3, JS_GLOBAL_OBJECT_TYPE); |
488 __ b(eq, &global); | 488 __ b(eq, &global); |
489 __ cmp(r3, Operand(JS_BUILTINS_OBJECT_TYPE)); | 489 __ cmp(r3, Operand(JS_BUILTINS_OBJECT_TYPE)); |
490 __ b(ne, &invoke); | 490 __ b(ne, &invoke); |
491 | 491 |
492 // Patch the receiver on the stack. | 492 // Patch the receiver on the stack. |
493 __ bind(&global); | 493 __ bind(&global); |
494 CallStubCompiler::FetchGlobalProxy(masm, r2, r1); | 494 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); |
495 __ str(r2, MemOperand(sp, argc * kPointerSize)); | 495 __ str(r2, MemOperand(sp, argc * kPointerSize)); |
496 __ bind(&invoke); | 496 __ bind(&invoke); |
497 } | 497 } |
498 | 498 |
499 // Invoke the function. | 499 // Invoke the function. |
500 CallKind call_kind = CallICBase::Contextual::decode(extra_state) | 500 CallKind call_kind = CallICBase::Contextual::decode(extra_state) |
501 ? CALL_AS_FUNCTION | 501 ? CALL_AS_FUNCTION |
502 : CALL_AS_METHOD; | 502 : CALL_AS_METHOD; |
503 ParameterCount actual(argc); | 503 ParameterCount actual(argc); |
504 __ InvokeFunction(r1, | 504 __ InvokeFunction(r1, |
(...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1678 } else { | 1678 } else { |
1679 ASSERT(Assembler::GetCondition(branch_instr) == ne); | 1679 ASSERT(Assembler::GetCondition(branch_instr) == ne); |
1680 patcher.EmitCondition(eq); | 1680 patcher.EmitCondition(eq); |
1681 } | 1681 } |
1682 } | 1682 } |
1683 | 1683 |
1684 | 1684 |
1685 } } // namespace v8::internal | 1685 } } // namespace v8::internal |
1686 | 1686 |
1687 #endif // V8_TARGET_ARCH_ARM | 1687 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |