| 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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 void VisitForControl(Expression* expr, | 351 void VisitForControl(Expression* expr, |
| 352 Label* if_true, | 352 Label* if_true, |
| 353 Label* if_false, | 353 Label* if_false, |
| 354 Label* fall_through) { | 354 Label* fall_through) { |
| 355 TestContext context(this, expr, if_true, if_false, fall_through); | 355 TestContext context(this, expr, if_true, if_false, fall_through); |
| 356 VisitInCurrentContext(expr); | 356 VisitInCurrentContext(expr); |
| 357 } | 357 } |
| 358 | 358 |
| 359 void VisitDeclarations(ZoneList<Declaration*>* declarations); | 359 void VisitDeclarations(ZoneList<Declaration*>* declarations); |
| 360 void DeclareGlobals(Handle<FixedArray> pairs); | 360 void DeclareGlobals(Handle<FixedArray> pairs); |
| 361 int DeclareGlobalsFlags(); |
| 361 | 362 |
| 362 // Try to perform a comparison as a fast inlined literal compare if | 363 // Try to perform a comparison as a fast inlined literal compare if |
| 363 // the operands allow it. Returns true if the compare operations | 364 // the operands allow it. Returns true if the compare operations |
| 364 // has been matched and all code generated; false otherwise. | 365 // has been matched and all code generated; false otherwise. |
| 365 bool TryLiteralCompare(CompareOperation* compare, | 366 bool TryLiteralCompare(CompareOperation* compare, |
| 366 Label* if_true, | 367 Label* if_true, |
| 367 Label* if_false, | 368 Label* if_false, |
| 368 Label* fall_through); | 369 Label* fall_through); |
| 369 | 370 |
| 370 // Platform-specific code for comparing the type of a value with | 371 // Platform-specific code for comparing the type of a value with |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 #endif // V8_TARGET_ARCH_IA32 | 549 #endif // V8_TARGET_ARCH_IA32 |
| 549 | 550 |
| 550 MacroAssembler* masm() { return masm_; } | 551 MacroAssembler* masm() { return masm_; } |
| 551 | 552 |
| 552 class ExpressionContext; | 553 class ExpressionContext; |
| 553 const ExpressionContext* context() { return context_; } | 554 const ExpressionContext* context() { return context_; } |
| 554 void set_new_context(const ExpressionContext* context) { context_ = context; } | 555 void set_new_context(const ExpressionContext* context) { context_ = context; } |
| 555 | 556 |
| 556 Handle<Script> script() { return info_->script(); } | 557 Handle<Script> script() { return info_->script(); } |
| 557 bool is_eval() { return info_->is_eval(); } | 558 bool is_eval() { return info_->is_eval(); } |
| 559 bool is_native() { return info_->is_native(); } |
| 558 bool is_strict_mode() { return function()->strict_mode(); } | 560 bool is_strict_mode() { return function()->strict_mode(); } |
| 559 StrictModeFlag strict_mode_flag() { | 561 StrictModeFlag strict_mode_flag() { |
| 560 return is_strict_mode() ? kStrictMode : kNonStrictMode; | 562 return is_strict_mode() ? kStrictMode : kNonStrictMode; |
| 561 } | 563 } |
| 562 FunctionLiteral* function() { return info_->function(); } | 564 FunctionLiteral* function() { return info_->function(); } |
| 563 Scope* scope() { return scope_; } | 565 Scope* scope() { return scope_; } |
| 564 | 566 |
| 565 static Register result_register(); | 567 static Register result_register(); |
| 566 static Register context_register(); | 568 static Register context_register(); |
| 567 | 569 |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 | 804 |
| 803 friend class NestedStatement; | 805 friend class NestedStatement; |
| 804 | 806 |
| 805 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); | 807 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); |
| 806 }; | 808 }; |
| 807 | 809 |
| 808 | 810 |
| 809 } } // namespace v8::internal | 811 } } // namespace v8::internal |
| 810 | 812 |
| 811 #endif // V8_FULL_CODEGEN_H_ | 813 #endif // V8_FULL_CODEGEN_H_ |
| OLD | NEW |