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

Side by Side Diff: src/x64/full-codegen-x64.cc

Issue 111613003: Load the global proxy from the context of the target function. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: hydrogen Created 7 years 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 | Annotate | Revision Log
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 2719 matching lines...) Expand 10 before | Expand all | Expand 10 after
2730 property->key()->AsLiteral()->value(), 2730 property->key()->AsLiteral()->value(),
2731 RelocInfo::CODE_TARGET); 2731 RelocInfo::CODE_TARGET);
2732 } else { 2732 } else {
2733 EmitKeyedCallWithIC(expr, property->key()); 2733 EmitKeyedCallWithIC(expr, property->key());
2734 } 2734 }
2735 } else { 2735 } else {
2736 // Call to an arbitrary expression not handled specially above. 2736 // Call to an arbitrary expression not handled specially above.
2737 { PreservePositionScope scope(masm()->positions_recorder()); 2737 { PreservePositionScope scope(masm()->positions_recorder());
2738 VisitForStackValue(callee); 2738 VisitForStackValue(callee);
2739 } 2739 }
2740 // Load global receiver object. 2740 // Push the hole as receiver.
2741 __ movq(rbx, GlobalObjectOperand()); 2741 // It will be correctly replaced in the call stub.
2742 __ push(FieldOperand(rbx, GlobalObject::kGlobalReceiverOffset)); 2742 __ PushRoot(Heap::kTheHoleValueRootIndex);
2743 // Emit function call. 2743 // Emit function call.
2744 EmitCallWithStub(expr, NO_CALL_FUNCTION_FLAGS); 2744 EmitCallWithStub(expr, RECEIVER_IS_IMPLICIT);
2745 } 2745 }
2746 2746
2747 #ifdef DEBUG 2747 #ifdef DEBUG
2748 // RecordJSReturnSite should have been called. 2748 // RecordJSReturnSite should have been called.
2749 ASSERT(expr->return_is_recorded_); 2749 ASSERT(expr->return_is_recorded_);
2750 #endif 2750 #endif
2751 } 2751 }
2752 2752
2753 2753
2754 void FullCodeGenerator::VisitCallNew(CallNew* expr) { 2754 void FullCodeGenerator::VisitCallNew(CallNew* expr) {
(...skipping 2139 matching lines...) Expand 10 before | Expand all | Expand 10 after
4894 4894
4895 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4895 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4896 Assembler::target_address_at(call_target_address)); 4896 Assembler::target_address_at(call_target_address));
4897 return OSR_AFTER_STACK_CHECK; 4897 return OSR_AFTER_STACK_CHECK;
4898 } 4898 }
4899 4899
4900 4900
4901 } } // namespace v8::internal 4901 } } // namespace v8::internal
4902 4902
4903 #endif // V8_TARGET_ARCH_X64 4903 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/x64/builtins-x64.cc ('K') | « src/x64/code-stubs-x64.cc ('k') | src/x64/ic-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698