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

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

Issue 7071009: Revert "Pass undefined to JS builtins when called with implicit receiver." (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/ia32/builtins-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 SetFunctionPosition(function()); 124 SetFunctionPosition(function());
125 Comment cmnt(masm_, "[ function compiled by full code generator"); 125 Comment cmnt(masm_, "[ function compiled by full code generator");
126 126
127 #ifdef DEBUG 127 #ifdef DEBUG
128 if (strlen(FLAG_stop_at) > 0 && 128 if (strlen(FLAG_stop_at) > 0 &&
129 info->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) { 129 info->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) {
130 __ int3(); 130 __ int3();
131 } 131 }
132 #endif 132 #endif
133 133
134 // Strict mode functions and builtins need to replace the receiver 134 // Strict mode functions need to replace the receiver with undefined
135 // with undefined when called as functions (without an explicit 135 // when called as functions (without an explicit receiver
136 // receiver object). ecx is zero for method calls and non-zero for 136 // object). ecx is zero for method calls and non-zero for function
137 // function calls. 137 // calls.
138 if (info->is_strict_mode() || info->is_native()) { 138 if (info->is_strict_mode()) {
139 Label ok; 139 Label ok;
140 __ test(ecx, Operand(ecx)); 140 __ test(ecx, Operand(ecx));
141 __ j(zero, &ok, Label::kNear); 141 __ j(zero, &ok, Label::kNear);
142 // +1 for return address. 142 // +1 for return address.
143 int receiver_offset = (scope()->num_parameters() + 1) * kPointerSize; 143 int receiver_offset = (scope()->num_parameters() + 1) * kPointerSize;
144 __ mov(Operand(esp, receiver_offset), 144 __ mov(Operand(esp, receiver_offset),
145 Immediate(isolate()->factory()->undefined_value())); 145 Immediate(isolate()->factory()->undefined_value()));
146 __ bind(&ok); 146 __ bind(&ok);
147 } 147 }
148 148
(...skipping 4180 matching lines...) Expand 10 before | Expand all | Expand 10 after
4329 // And return. 4329 // And return.
4330 __ ret(0); 4330 __ ret(0);
4331 } 4331 }
4332 4332
4333 4333
4334 #undef __ 4334 #undef __
4335 4335
4336 } } // namespace v8::internal 4336 } } // namespace v8::internal
4337 4337
4338 #endif // V8_TARGET_ARCH_IA32 4338 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698