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 __ ldr(r2, FieldMemOperand(r2, GlobalObject::kGlobalReceiverOffset)); | 494 CallStubCompiler::PatchGlobalProxy(masm, argc, r1); |
495 __ str(r2, MemOperand(sp, argc * kPointerSize)); | |
496 __ bind(&invoke); | 495 __ bind(&invoke); |
497 } | 496 } |
498 | 497 |
499 // Invoke the function. | 498 // Invoke the function. |
500 CallKind call_kind = CallICBase::Contextual::decode(extra_state) | 499 CallKind call_kind = CallICBase::Contextual::decode(extra_state) |
501 ? CALL_AS_FUNCTION | 500 ? CALL_AS_FUNCTION |
502 : CALL_AS_METHOD; | 501 : CALL_AS_METHOD; |
503 ParameterCount actual(argc); | 502 ParameterCount actual(argc); |
504 __ InvokeFunction(r1, | 503 __ InvokeFunction(r1, |
505 actual, | 504 actual, |
(...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1677 } else { | 1676 } else { |
1678 ASSERT(Assembler::GetCondition(branch_instr) == ne); | 1677 ASSERT(Assembler::GetCondition(branch_instr) == ne); |
1679 patcher.EmitCondition(eq); | 1678 patcher.EmitCondition(eq); |
1680 } | 1679 } |
1681 } | 1680 } |
1682 | 1681 |
1683 | 1682 |
1684 } } // namespace v8::internal | 1683 } } // namespace v8::internal |
1685 | 1684 |
1686 #endif // V8_TARGET_ARCH_ARM | 1685 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |