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

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

Issue 3295022: Handle global variables potentially shadowed by eval-introduced... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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/full-codegen.h ('k') | src/ia32/full-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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 cgen.Generate(info); 291 cgen.Generate(info);
292 if (cgen.HasStackOverflow()) { 292 if (cgen.HasStackOverflow()) {
293 ASSERT(!Top::has_pending_exception()); 293 ASSERT(!Top::has_pending_exception());
294 return Handle<Code>::null(); 294 return Handle<Code>::null();
295 } 295 }
296 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION, NOT_IN_LOOP); 296 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION, NOT_IN_LOOP);
297 return CodeGenerator::MakeCodeEpilogue(&masm, flags, info); 297 return CodeGenerator::MakeCodeEpilogue(&masm, flags, info);
298 } 298 }
299 299
300 300
301 MemOperand FullCodeGenerator::ContextOperand(Register context, int index) {
302 return CodeGenerator::ContextOperand(context, index);
303 }
304
305
301 int FullCodeGenerator::SlotOffset(Slot* slot) { 306 int FullCodeGenerator::SlotOffset(Slot* slot) {
302 ASSERT(slot != NULL); 307 ASSERT(slot != NULL);
303 // Offset is negative because higher indexes are at lower addresses. 308 // Offset is negative because higher indexes are at lower addresses.
304 int offset = -slot->index() * kPointerSize; 309 int offset = -slot->index() * kPointerSize;
305 // Adjust by a (parameter or local) base offset. 310 // Adjust by a (parameter or local) base offset.
306 switch (slot->type()) { 311 switch (slot->type()) {
307 case Slot::PARAMETER: 312 case Slot::PARAMETER:
308 offset += (scope()->num_parameters() + 1) * kPointerSize; 313 offset += (scope()->num_parameters() + 1) * kPointerSize;
309 break; 314 break;
310 case Slot::LOCAL: 315 case Slot::LOCAL:
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 ASSERT(args->length() == 1); 1138 ASSERT(args->length() == 1);
1134 VisitForValue(args->at(0), kStack); 1139 VisitForValue(args->at(0), kStack);
1135 __ CallRuntime(Runtime::kRegExpCloneResult, 1); 1140 __ CallRuntime(Runtime::kRegExpCloneResult, 1);
1136 Apply(context_, result_register()); 1141 Apply(context_, result_register());
1137 } 1142 }
1138 1143
1139 #undef __ 1144 #undef __
1140 1145
1141 1146
1142 } } // namespace v8::internal 1147 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/full-codegen.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698