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

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

Issue 7756014: Detect conflicting variable bindings in harmony mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 3 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/ast.h ('k') | src/parser.h » ('j') | src/parser.h » ('J')
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 2140 matching lines...) Expand 10 before | Expand all | Expand 10 after
2151 // Push copy of the first argument or undefined if it doesn't exist. 2151 // Push copy of the first argument or undefined if it doesn't exist.
2152 if (arg_count > 0) { 2152 if (arg_count > 0) {
2153 __ push(Operand(esp, arg_count * kPointerSize)); 2153 __ push(Operand(esp, arg_count * kPointerSize));
2154 } else { 2154 } else {
2155 __ push(Immediate(isolate()->factory()->undefined_value())); 2155 __ push(Immediate(isolate()->factory()->undefined_value()));
2156 } 2156 }
2157 2157
2158 // Push the receiver of the enclosing function. 2158 // Push the receiver of the enclosing function.
2159 __ push(Operand(ebp, (2 + info_->scope()->num_parameters()) * kPointerSize)); 2159 __ push(Operand(ebp, (2 + info_->scope()->num_parameters()) * kPointerSize));
2160 2160
2161 // Push the strict mode flag. 2161 // Push the strict mode flag. In harmony mode every eval call
2162 __ push(Immediate(Smi::FromInt(strict_mode_flag()))); 2162 // is a strict mode eval call.
Lasse Reichstein 2011/09/01 07:34:04 How come this invariant isn't shown in the strict_
Steven 2011/09/01 15:01:33 In fact, harmony mode should be an extension of th
2163 StrictModeFlag strict_mode = strict_mode_flag();
2164 if (FLAG_harmony_block_scoping) {
2165 strict_mode = kStrictMode;
2166 }
2167 __ push(Immediate(Smi::FromInt(strict_mode)));
2163 2168
2164 __ CallRuntime(flag == SKIP_CONTEXT_LOOKUP 2169 __ CallRuntime(flag == SKIP_CONTEXT_LOOKUP
2165 ? Runtime::kResolvePossiblyDirectEvalNoLookup 2170 ? Runtime::kResolvePossiblyDirectEvalNoLookup
2166 : Runtime::kResolvePossiblyDirectEval, 4); 2171 : Runtime::kResolvePossiblyDirectEval, 4);
2167 } 2172 }
2168 2173
2169 2174
2170 void FullCodeGenerator::VisitCall(Call* expr) { 2175 void FullCodeGenerator::VisitCall(Call* expr) {
2171 #ifdef DEBUG 2176 #ifdef DEBUG
2172 // We want to verify that RecordJSReturnSite gets called on all paths 2177 // We want to verify that RecordJSReturnSite gets called on all paths
(...skipping 2151 matching lines...) Expand 10 before | Expand all | Expand 10 after
4324 __ add(Operand(edx), Immediate(masm_->CodeObject())); 4329 __ add(Operand(edx), Immediate(masm_->CodeObject()));
4325 __ jmp(Operand(edx)); 4330 __ jmp(Operand(edx));
4326 } 4331 }
4327 4332
4328 4333
4329 #undef __ 4334 #undef __
4330 4335
4331 } } // namespace v8::internal 4336 } } // namespace v8::internal
4332 4337
4333 #endif // V8_TARGET_ARCH_IA32 4338 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/parser.h » ('j') | src/parser.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698