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

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

Issue 341002: Fix missing recording of source position for property access in fast compiler... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 1 month 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/arm/fast-codegen-arm.cc ('k') | src/x64/fast-codegen-x64.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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 } 491 }
492 } 492 }
493 } 493 }
494 494
495 495
496 void FastCodeGenerator::VisitProperty(Property* expr) { 496 void FastCodeGenerator::VisitProperty(Property* expr) {
497 Comment cmnt(masm_, "[ Property"); 497 Comment cmnt(masm_, "[ Property");
498 Expression* key = expr->key(); 498 Expression* key = expr->key();
499 uint32_t dummy; 499 uint32_t dummy;
500 500
501 // Record the source position for the property load.
502 SetSourcePosition(expr->position());
503
501 // Evaluate receiver. 504 // Evaluate receiver.
502 Visit(expr->obj()); 505 Visit(expr->obj());
503 506
504 if (key->AsLiteral() != NULL && key->AsLiteral()->handle()->IsSymbol() && 507 if (key->AsLiteral() != NULL && key->AsLiteral()->handle()->IsSymbol() &&
505 !String::cast(*(key->AsLiteral()->handle()))->AsArrayIndex(&dummy)) { 508 !String::cast(*(key->AsLiteral()->handle()))->AsArrayIndex(&dummy)) {
506 // Do a NAMED property load. 509 // Do a NAMED property load.
507 // The IC expects the property name in ecx and the receiver on the stack. 510 // The IC expects the property name in ecx and the receiver on the stack.
508 __ mov(ecx, Immediate(key->AsLiteral()->handle())); 511 __ mov(ecx, Immediate(key->AsLiteral()->handle()));
509 Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize)); 512 Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize));
510 __ call(ic, RelocInfo::CODE_TARGET); 513 __ call(ic, RelocInfo::CODE_TARGET);
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 } else { 707 } else {
705 Visit(right); 708 Visit(right);
706 Move(destination, right->location()); 709 Move(destination, right->location());
707 } 710 }
708 711
709 __ bind(&done); 712 __ bind(&done);
710 } 713 }
711 714
712 715
713 } } // namespace v8::internal 716 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/fast-codegen-arm.cc ('k') | src/x64/fast-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698