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

Side by Side Diff: src/ia32/lithium-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, 7 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/full-codegen-ia32.cc ('k') | src/mips/builtins-mips.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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 bool LCodeGen::GeneratePrologue() { 121 bool LCodeGen::GeneratePrologue() {
122 ASSERT(is_generating()); 122 ASSERT(is_generating());
123 123
124 #ifdef DEBUG 124 #ifdef DEBUG
125 if (strlen(FLAG_stop_at) > 0 && 125 if (strlen(FLAG_stop_at) > 0 &&
126 info_->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) { 126 info_->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) {
127 __ int3(); 127 __ int3();
128 } 128 }
129 #endif 129 #endif
130 130
131 // Strict mode functions and builtins need to replace the receiver 131 // Strict mode functions need to replace the receiver with undefined
132 // with undefined when called as functions (without an explicit 132 // when called as functions (without an explicit receiver
133 // receiver object). ecx is zero for method calls and non-zero for 133 // object). ecx is zero for method calls and non-zero for function
134 // function calls. 134 // calls.
135 if (info_->is_strict_mode() || info_->is_native()) { 135 if (info_->is_strict_mode()) {
136 Label ok; 136 Label ok;
137 __ test(ecx, Operand(ecx)); 137 __ test(ecx, Operand(ecx));
138 __ j(zero, &ok, Label::kNear); 138 __ j(zero, &ok, Label::kNear);
139 // +1 for return address. 139 // +1 for return address.
140 int receiver_offset = (scope()->num_parameters() + 1) * kPointerSize; 140 int receiver_offset = (scope()->num_parameters() + 1) * kPointerSize;
141 __ mov(Operand(esp, receiver_offset), 141 __ mov(Operand(esp, receiver_offset),
142 Immediate(isolate()->factory()->undefined_value())); 142 Immediate(isolate()->factory()->undefined_value()));
143 __ bind(&ok); 143 __ bind(&ok);
144 } 144 }
145 145
(...skipping 4302 matching lines...) Expand 10 before | Expand all | Expand 10 after
4448 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); 4448 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
4449 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); 4449 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator);
4450 } 4450 }
4451 4451
4452 4452
4453 #undef __ 4453 #undef __
4454 4454
4455 } } // namespace v8::internal 4455 } } // namespace v8::internal
4456 4456
4457 #endif // V8_TARGET_ARCH_IA32 4457 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698