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 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 if (lit->IsTrue()) { | 492 if (lit->IsTrue()) { |
493 return ALWAYS_TRUE; | 493 return ALWAYS_TRUE; |
494 } else if (lit->IsFalse()) { | 494 } else if (lit->IsFalse()) { |
495 return ALWAYS_FALSE; | 495 return ALWAYS_FALSE; |
496 } | 496 } |
497 | 497 |
498 return DONT_KNOW; | 498 return DONT_KNOW; |
499 } | 499 } |
500 | 500 |
501 | 501 |
502 static inline void RecordPositions(CodeGenerator* cgen, int pos) { | 502 void CodeGenerator::RecordPositions(MacroAssembler* masm, int pos) { |
503 if (pos != RelocInfo::kNoPosition) { | 503 if (pos != RelocInfo::kNoPosition) { |
504 cgen->masm()->RecordStatementPosition(pos); | 504 masm->RecordStatementPosition(pos); |
505 cgen->masm()->RecordPosition(pos); | 505 masm->RecordPosition(pos); |
506 } | 506 } |
507 } | 507 } |
508 | 508 |
509 | 509 |
510 void CodeGenerator::CodeForFunctionPosition(FunctionLiteral* fun) { | 510 void CodeGenerator::CodeForFunctionPosition(FunctionLiteral* fun) { |
511 if (FLAG_debug_info) RecordPositions(this, fun->start_position()); | 511 if (FLAG_debug_info) RecordPositions(masm(), fun->start_position()); |
512 } | 512 } |
513 | 513 |
514 | 514 |
515 void CodeGenerator::CodeForReturnPosition(FunctionLiteral* fun) { | 515 void CodeGenerator::CodeForReturnPosition(FunctionLiteral* fun) { |
516 if (FLAG_debug_info) RecordPositions(this, fun->end_position()); | 516 if (FLAG_debug_info) RecordPositions(masm(), fun->end_position()); |
517 } | 517 } |
518 | 518 |
519 | 519 |
520 void CodeGenerator::CodeForStatementPosition(Statement* stmt) { | 520 void CodeGenerator::CodeForStatementPosition(Statement* stmt) { |
521 if (FLAG_debug_info) RecordPositions(this, stmt->statement_pos()); | 521 if (FLAG_debug_info) RecordPositions(masm(), stmt->statement_pos()); |
522 } | 522 } |
523 | 523 |
524 | 524 |
525 void CodeGenerator::CodeForSourcePosition(int pos) { | 525 void CodeGenerator::CodeForSourcePosition(int pos) { |
526 if (FLAG_debug_info && pos != RelocInfo::kNoPosition) { | 526 if (FLAG_debug_info && pos != RelocInfo::kNoPosition) { |
527 masm()->RecordPosition(pos); | 527 masm()->RecordPosition(pos); |
528 } | 528 } |
529 } | 529 } |
530 | 530 |
531 | 531 |
(...skipping 13 matching lines...) Expand all Loading... |
545 void ArgumentsAccessStub::Generate(MacroAssembler* masm) { | 545 void ArgumentsAccessStub::Generate(MacroAssembler* masm) { |
546 switch (type_) { | 546 switch (type_) { |
547 case READ_LENGTH: GenerateReadLength(masm); break; | 547 case READ_LENGTH: GenerateReadLength(masm); break; |
548 case READ_ELEMENT: GenerateReadElement(masm); break; | 548 case READ_ELEMENT: GenerateReadElement(masm); break; |
549 case NEW_OBJECT: GenerateNewObject(masm); break; | 549 case NEW_OBJECT: GenerateNewObject(masm); break; |
550 } | 550 } |
551 } | 551 } |
552 | 552 |
553 | 553 |
554 } } // namespace v8::internal | 554 } } // namespace v8::internal |
OLD | NEW |