| 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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 } | 495 } |
| 496 } | 496 } |
| 497 } | 497 } |
| 498 | 498 |
| 499 | 499 |
| 500 void FastCodeGenerator::VisitProperty(Property* expr) { | 500 void FastCodeGenerator::VisitProperty(Property* expr) { |
| 501 Comment cmnt(masm_, "[ Property"); | 501 Comment cmnt(masm_, "[ Property"); |
| 502 Expression* key = expr->key(); | 502 Expression* key = expr->key(); |
| 503 uint32_t dummy; | 503 uint32_t dummy; |
| 504 | 504 |
| 505 // Record the source position for the property load. |
| 506 SetSourcePosition(expr->position()); |
| 507 |
| 505 // Evaluate receiver. | 508 // Evaluate receiver. |
| 506 Visit(expr->obj()); | 509 Visit(expr->obj()); |
| 507 | 510 |
| 508 if (key->AsLiteral() != NULL && key->AsLiteral()->handle()->IsSymbol() && | 511 if (key->AsLiteral() != NULL && key->AsLiteral()->handle()->IsSymbol() && |
| 509 !String::cast(*(key->AsLiteral()->handle()))->AsArrayIndex(&dummy)) { | 512 !String::cast(*(key->AsLiteral()->handle()))->AsArrayIndex(&dummy)) { |
| 510 // Do a NAMED property load. | 513 // Do a NAMED property load. |
| 511 // The IC expects the property name in ecx and the receiver on the stack. | 514 // The IC expects the property name in ecx and the receiver on the stack. |
| 512 __ mov(r2, Operand(key->AsLiteral()->handle())); | 515 __ mov(r2, Operand(key->AsLiteral()->handle())); |
| 513 Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize)); | 516 Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize)); |
| 514 __ Call(ic, RelocInfo::CODE_TARGET); | 517 __ Call(ic, RelocInfo::CODE_TARGET); |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 Move(destination, right->AsLiteral()); | 681 Move(destination, right->AsLiteral()); |
| 679 } else { | 682 } else { |
| 680 Visit(right); | 683 Visit(right); |
| 681 Move(destination, right->location()); | 684 Move(destination, right->location()); |
| 682 } | 685 } |
| 683 | 686 |
| 684 __ bind(&done); | 687 __ bind(&done); |
| 685 } | 688 } |
| 686 | 689 |
| 687 } } // namespace v8::internal | 690 } } // namespace v8::internal |
| OLD | NEW |