OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 void (CodeGenerator::*method)(ZoneList<Expression*>*); | 504 void (CodeGenerator::*method)(ZoneList<Expression*>*); |
505 const char* name; | 505 const char* name; |
506 }; | 506 }; |
507 | 507 |
508 static InlineRuntimeLUT* FindInlineRuntimeLUT(Handle<String> name); | 508 static InlineRuntimeLUT* FindInlineRuntimeLUT(Handle<String> name); |
509 bool CheckForInlineRuntimeCall(CallRuntime* node); | 509 bool CheckForInlineRuntimeCall(CallRuntime* node); |
510 static bool PatchInlineRuntimeEntry(Handle<String> name, | 510 static bool PatchInlineRuntimeEntry(Handle<String> name, |
511 const InlineRuntimeLUT& new_entry, | 511 const InlineRuntimeLUT& new_entry, |
512 InlineRuntimeLUT* old_entry); | 512 InlineRuntimeLUT* old_entry); |
513 | 513 |
| 514 static Handle<Code> ComputeLazyCompile(int argc); |
514 Handle<JSFunction> BuildBoilerplate(FunctionLiteral* node); | 515 Handle<JSFunction> BuildBoilerplate(FunctionLiteral* node); |
515 void ProcessDeclarations(ZoneList<Declaration*>* declarations); | 516 void ProcessDeclarations(ZoneList<Declaration*>* declarations); |
516 | 517 |
517 Handle<Code> ComputeCallInitialize(int argc, InLoopFlag in_loop); | 518 static Handle<Code> ComputeCallInitialize(int argc, InLoopFlag in_loop); |
518 | 519 |
519 // Declare global variables and functions in the given array of | 520 // Declare global variables and functions in the given array of |
520 // name/value pairs. | 521 // name/value pairs. |
521 void DeclareGlobals(Handle<FixedArray> pairs); | 522 void DeclareGlobals(Handle<FixedArray> pairs); |
522 | 523 |
523 // Instantiate the function boilerplate. | 524 // Instantiate the function boilerplate. |
524 void InstantiateBoilerplate(Handle<JSFunction> boilerplate); | 525 void InstantiateBoilerplate(Handle<JSFunction> boilerplate); |
525 | 526 |
526 // Support for type checks. | 527 // Support for type checks. |
527 void GenerateIsSmi(ZoneList<Expression*>* args); | 528 void GenerateIsSmi(ZoneList<Expression*>* args); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 // in a spilled state. | 611 // in a spilled state. |
611 bool in_spilled_code_; | 612 bool in_spilled_code_; |
612 | 613 |
613 static InlineRuntimeLUT kInlineRuntimeLUT[]; | 614 static InlineRuntimeLUT kInlineRuntimeLUT[]; |
614 | 615 |
615 friend class VirtualFrame; | 616 friend class VirtualFrame; |
616 friend class JumpTarget; | 617 friend class JumpTarget; |
617 friend class Reference; | 618 friend class Reference; |
618 friend class Result; | 619 friend class Result; |
619 friend class FastCodeGenerator; | 620 friend class FastCodeGenerator; |
| 621 friend class CodeGenSelector; |
620 | 622 |
621 friend class CodeGeneratorPatcher; // Used in test-log-stack-tracer.cc | 623 friend class CodeGeneratorPatcher; // Used in test-log-stack-tracer.cc |
622 | 624 |
623 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); | 625 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); |
624 }; | 626 }; |
625 | 627 |
626 | 628 |
627 // Flag that indicates whether how to generate code for the stub. | 629 // Flag that indicates whether how to generate code for the stub. |
628 enum GenericBinaryFlags { | 630 enum GenericBinaryFlags { |
629 NO_GENERIC_BINARY_FLAGS = 0, | 631 NO_GENERIC_BINARY_FLAGS = 0, |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 void SetArgsReversed() { args_reversed_ = true; } | 713 void SetArgsReversed() { args_reversed_ = true; } |
712 bool HasSmiCodeInStub() { return (flags_ & NO_SMI_CODE_IN_STUB) == 0; } | 714 bool HasSmiCodeInStub() { return (flags_ & NO_SMI_CODE_IN_STUB) == 0; } |
713 bool HasArgumentsInRegisters() { return args_in_registers_; } | 715 bool HasArgumentsInRegisters() { return args_in_registers_; } |
714 bool HasArgumentsReversed() { return args_reversed_; } | 716 bool HasArgumentsReversed() { return args_reversed_; } |
715 }; | 717 }; |
716 | 718 |
717 | 719 |
718 } } // namespace v8::internal | 720 } } // namespace v8::internal |
719 | 721 |
720 #endif // V8_IA32_CODEGEN_IA32_H_ | 722 #endif // V8_IA32_CODEGEN_IA32_H_ |
OLD | NEW |