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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 __ push(source); | 315 __ push(source); |
316 ToBooleanStub stub; | 316 ToBooleanStub stub; |
317 __ CallStub(&stub); | 317 __ CallStub(&stub); |
318 __ test(eax, Operand(eax)); // The stub returns nonzero for true. | 318 __ test(eax, Operand(eax)); // The stub returns nonzero for true. |
319 __ j(not_zero, true_label); | 319 __ j(not_zero, true_label); |
320 __ jmp(false_label); | 320 __ jmp(false_label); |
321 } | 321 } |
322 | 322 |
323 | 323 |
324 void FastCodeGenerator::VisitDeclaration(Declaration* decl) { | 324 void FastCodeGenerator::VisitDeclaration(Declaration* decl) { |
| 325 Comment cmnt(masm_, "[ Declaration"); |
325 Variable* var = decl->proxy()->var(); | 326 Variable* var = decl->proxy()->var(); |
326 ASSERT(var != NULL); // Must have been resolved. | 327 ASSERT(var != NULL); // Must have been resolved. |
327 Slot* slot = var->slot(); | 328 Slot* slot = var->slot(); |
328 ASSERT(slot != NULL); // No global declarations here. | 329 ASSERT(slot != NULL); // No global declarations here. |
329 | 330 |
330 // We have 3 cases for slots: LOOKUP, LOCAL, CONTEXT. | 331 // We have 3 cases for slots: LOOKUP, LOCAL, CONTEXT. |
331 switch (slot->type()) { | 332 switch (slot->type()) { |
332 case Slot::LOOKUP: { | 333 case Slot::LOOKUP: { |
333 __ push(esi); | 334 __ push(esi); |
334 __ push(Immediate(var->name())); | 335 __ push(Immediate(var->name())); |
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1539 true_label_ = saved_true; | 1540 true_label_ = saved_true; |
1540 false_label_ = saved_false; | 1541 false_label_ = saved_false; |
1541 // Convert current context to test context: End post-test code. | 1542 // Convert current context to test context: End post-test code. |
1542 } | 1543 } |
1543 | 1544 |
1544 | 1545 |
1545 #undef __ | 1546 #undef __ |
1546 | 1547 |
1547 | 1548 |
1548 } } // namespace v8::internal | 1549 } } // namespace v8::internal |
OLD | NEW |