| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |