| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 } | 577 } |
| 578 } | 578 } |
| 579 } | 579 } |
| 580 // Invoke the platform-dependent code generator to do the actual | 580 // Invoke the platform-dependent code generator to do the actual |
| 581 // declaration the global variables and functions. | 581 // declaration the global variables and functions. |
| 582 DeclareGlobals(array); | 582 DeclareGlobals(array); |
| 583 } | 583 } |
| 584 } | 584 } |
| 585 | 585 |
| 586 | 586 |
| 587 int FullCodeGenerator::DeclareGlobalsFlags() { |
| 588 int flags = 0; |
| 589 if (is_eval()) flags |= kDeclareGlobalsEvalFlag; |
| 590 if (is_strict_mode()) flags |= kDeclareGlobalsStrictModeFlag; |
| 591 if (is_native()) flags |= kDeclareGlobalsNativeFlag; |
| 592 return flags; |
| 593 } |
| 594 |
| 595 |
| 587 void FullCodeGenerator::SetFunctionPosition(FunctionLiteral* fun) { | 596 void FullCodeGenerator::SetFunctionPosition(FunctionLiteral* fun) { |
| 588 CodeGenerator::RecordPositions(masm_, fun->start_position()); | 597 CodeGenerator::RecordPositions(masm_, fun->start_position()); |
| 589 } | 598 } |
| 590 | 599 |
| 591 | 600 |
| 592 void FullCodeGenerator::SetReturnPosition(FunctionLiteral* fun) { | 601 void FullCodeGenerator::SetReturnPosition(FunctionLiteral* fun) { |
| 593 CodeGenerator::RecordPositions(masm_, fun->end_position() - 1); | 602 CodeGenerator::RecordPositions(masm_, fun->end_position() - 1); |
| 594 } | 603 } |
| 595 | 604 |
| 596 | 605 |
| (...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1383 } | 1392 } |
| 1384 | 1393 |
| 1385 return false; | 1394 return false; |
| 1386 } | 1395 } |
| 1387 | 1396 |
| 1388 | 1397 |
| 1389 #undef __ | 1398 #undef __ |
| 1390 | 1399 |
| 1391 | 1400 |
| 1392 } } // namespace v8::internal | 1401 } } // namespace v8::internal |
| OLD | NEW |