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

Side by Side Diff: src/mips/ic-mips.cc

Issue 138383002: MIPS: Make the strict-mode calling convention for contextual calls the default one. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 6 years, 11 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
OLDNEW
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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 if (id == IC::kCallIC_Miss) { 486 if (id == IC::kCallIC_Miss) {
487 Label invoke, global; 487 Label invoke, global;
488 __ lw(a2, MemOperand(sp, argc * kPointerSize)); 488 __ lw(a2, MemOperand(sp, argc * kPointerSize));
489 __ JumpIfSmi(a2, &invoke); 489 __ JumpIfSmi(a2, &invoke);
490 __ GetObjectType(a2, a3, a3); 490 __ GetObjectType(a2, a3, a3);
491 __ Branch(&global, eq, a3, Operand(JS_GLOBAL_OBJECT_TYPE)); 491 __ Branch(&global, eq, a3, Operand(JS_GLOBAL_OBJECT_TYPE));
492 __ Branch(&invoke, ne, a3, Operand(JS_BUILTINS_OBJECT_TYPE)); 492 __ Branch(&invoke, ne, a3, Operand(JS_BUILTINS_OBJECT_TYPE));
493 493
494 // Patch the receiver on the stack. 494 // Patch the receiver on the stack.
495 __ bind(&global); 495 __ bind(&global);
496 CallStubCompiler::FetchGlobalProxy(masm, a2, a1); 496 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex);
497 __ sw(a2, MemOperand(sp, argc * kPointerSize)); 497 __ sw(a2, MemOperand(sp, argc * kPointerSize));
498 __ bind(&invoke); 498 __ bind(&invoke);
499 } 499 }
500 // Invoke the function. 500 // Invoke the function.
501 CallKind call_kind = CallICBase::Contextual::decode(extra_state) 501 CallKind call_kind = CallICBase::Contextual::decode(extra_state)
502 ? CALL_AS_FUNCTION 502 ? CALL_AS_FUNCTION
503 : CALL_AS_METHOD; 503 : CALL_AS_METHOD;
504 ParameterCount actual(argc); 504 ParameterCount actual(argc);
505 __ InvokeFunction(a1, 505 __ InvokeFunction(a1,
506 actual, 506 actual,
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1686 } else { 1686 } else {
1687 ASSERT(Assembler::IsBne(branch_instr)); 1687 ASSERT(Assembler::IsBne(branch_instr));
1688 patcher.ChangeBranchCondition(eq); 1688 patcher.ChangeBranchCondition(eq);
1689 } 1689 }
1690 } 1690 }
1691 1691
1692 1692
1693 } } // namespace v8::internal 1693 } } // namespace v8::internal
1694 1694
1695 #endif // V8_TARGET_ARCH_MIPS 1695 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698