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

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

Issue 7085034: Reapply change to Pass undefined to JS builtins when called with (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 if (strlen(FLAG_stop_at) > 0 && 137 if (strlen(FLAG_stop_at) > 0 &&
138 info_->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) { 138 info_->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) {
139 __ int3(); 139 __ int3();
140 } 140 }
141 #endif 141 #endif
142 142
143 // Strict mode functions need to replace the receiver with undefined 143 // Strict mode functions need to replace the receiver with undefined
144 // when called as functions (without an explicit receiver 144 // when called as functions (without an explicit receiver
145 // object). rcx is zero for method calls and non-zero for function 145 // object). rcx is zero for method calls and non-zero for function
146 // calls. 146 // calls.
147 if (info_->is_strict_mode()) { 147 if (info_->is_strict_mode() || info_->is_native()) {
148 Label ok; 148 Label ok;
149 __ testq(rcx, rcx); 149 __ testq(rcx, rcx);
150 __ j(zero, &ok, Label::kNear); 150 __ j(zero, &ok, Label::kNear);
151 // +1 for return address. 151 // +1 for return address.
152 int receiver_offset = (scope()->num_parameters() + 1) * kPointerSize; 152 int receiver_offset = (scope()->num_parameters() + 1) * kPointerSize;
153 __ LoadRoot(kScratchRegister, Heap::kUndefinedValueRootIndex); 153 __ LoadRoot(kScratchRegister, Heap::kUndefinedValueRootIndex);
154 __ movq(Operand(rsp, receiver_offset), kScratchRegister); 154 __ movq(Operand(rsp, receiver_offset), kScratchRegister);
155 __ bind(&ok); 155 __ bind(&ok);
156 } 156 }
157 157
(...skipping 4105 matching lines...) Expand 10 before | Expand all | Expand 10 after
4263 RegisterEnvironmentForDeoptimization(environment); 4263 RegisterEnvironmentForDeoptimization(environment);
4264 ASSERT(osr_pc_offset_ == -1); 4264 ASSERT(osr_pc_offset_ == -1);
4265 osr_pc_offset_ = masm()->pc_offset(); 4265 osr_pc_offset_ = masm()->pc_offset();
4266 } 4266 }
4267 4267
4268 #undef __ 4268 #undef __
4269 4269
4270 } } // namespace v8::internal 4270 } } // namespace v8::internal
4271 4271
4272 #endif // V8_TARGET_ARCH_X64 4272 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698