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

Unified Diff: src/mips/stub-cache-mips.cc

Issue 132623005: A64: Synchronize with r18642. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/stub-cache-mips.cc
diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc
index 361e67f4ca7b03b663db17b5b695594b955f568c..b7948b14d63f0b666f9d8c032bd8043a0d87c350 100644
--- a/src/mips/stub-cache-mips.cc
+++ b/src/mips/stub-cache-mips.cc
@@ -2337,23 +2337,11 @@ void StubCompiler::GenerateBooleanCheck(Register object, Label* miss) {
}
-void CallStubCompiler::PatchGlobalProxy(Handle<Object> object,
- Handle<JSFunction> function) {
+void CallStubCompiler::PatchImplicitReceiver(Handle<Object> object) {
if (object->IsGlobalObject()) {
const int argc = arguments().immediate();
const int receiver_offset = argc * kPointerSize;
- __ li(a3, handle(function->context()->global_proxy()));
- __ sw(a3, MemOperand(sp, receiver_offset));
- }
-}
-
-
-void CallStubCompiler::PatchGlobalProxy(Handle<Object> object,
- Register function) {
- if (object->IsGlobalObject()) {
- FetchGlobalProxy(masm(), a3, function);
- const int argc = arguments().immediate();
- const int receiver_offset = argc * kPointerSize;
+ __ LoadRoot(a3, Heap::kUndefinedValueRootIndex);
__ sw(a3, MemOperand(sp, receiver_offset));
}
}
@@ -2452,10 +2440,10 @@ void CallStubCompiler::GenerateJumpFunction(Handle<Object> object,
ASSERT(function.is(a1));
// Check that the function really is a function.
GenerateFunctionCheck(function, a3, miss);
- PatchGlobalProxy(object, function);
+ PatchImplicitReceiver(object);
+
// Invoke the function.
- __ InvokeFunction(a1, arguments(), JUMP_FUNCTION,
- NullCallWrapper(), call_kind());
+ __ InvokeFunction(a1, arguments(), JUMP_FUNCTION, NullCallWrapper());
}
@@ -2570,15 +2558,6 @@ Handle<Code> StoreStubCompiler::CompileStoreCallback(
#define __ ACCESS_MASM(masm)
-void CallStubCompiler::FetchGlobalProxy(MacroAssembler* masm,
- Register target,
- Register function) {
- __ lw(target, FieldMemOperand(function, JSFunction::kContextOffset));
- __ lw(target, ContextOperand(target, Context::GLOBAL_OBJECT_INDEX));
- __ lw(target, FieldMemOperand(target, GlobalObject::kGlobalReceiverOffset));
-}
-
-
void StoreStubCompiler::GenerateStoreViaSetter(
MacroAssembler* masm,
Handle<JSFunction> setter) {
@@ -2601,7 +2580,7 @@ void StoreStubCompiler::GenerateStoreViaSetter(
ParameterCount actual(1);
ParameterCount expected(setter);
__ InvokeFunction(setter, expected, actual,
- CALL_FUNCTION, NullCallWrapper(), CALL_AS_METHOD);
+ CALL_FUNCTION, NullCallWrapper());
} else {
// If we generate a global code snippet for deoptimization only, remember
// the place to continue after deoptimization.
@@ -2733,7 +2712,7 @@ void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm,
ParameterCount actual(0);
ParameterCount expected(getter);
__ InvokeFunction(getter, expected, actual,
- CALL_FUNCTION, NullCallWrapper(), CALL_AS_METHOD);
+ CALL_FUNCTION, NullCallWrapper());
} else {
// If we generate a global code snippet for deoptimization only, remember
// the place to continue after deoptimization.
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698