| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 // The optimization avoids allocating an arguments object if possible. | 433 // The optimization avoids allocating an arguments object if possible. |
| 434 void CallApplyLazy(Expression* applicand, | 434 void CallApplyLazy(Expression* applicand, |
| 435 Expression* receiver, | 435 Expression* receiver, |
| 436 VariableProxy* arguments, | 436 VariableProxy* arguments, |
| 437 int position); | 437 int position); |
| 438 | 438 |
| 439 // Control flow | 439 // Control flow |
| 440 void Branch(bool if_true, JumpTarget* target); | 440 void Branch(bool if_true, JumpTarget* target); |
| 441 void CheckStack(); | 441 void CheckStack(); |
| 442 | 442 |
| 443 struct InlineRuntimeLUT { | 443 static InlineRuntimeFunctionsTable::Entry* FindInlineRuntimeLUT( |
| 444 void (CodeGenerator::*method)(ZoneList<Expression*>*); | 444 Handle<String> name); |
| 445 const char* name; | |
| 446 int nargs; | |
| 447 }; | |
| 448 | |
| 449 static InlineRuntimeLUT* FindInlineRuntimeLUT(Handle<String> name); | |
| 450 bool CheckForInlineRuntimeCall(CallRuntime* node); | 445 bool CheckForInlineRuntimeCall(CallRuntime* node); |
| 451 static bool PatchInlineRuntimeEntry(Handle<String> name, | 446 static bool PatchInlineRuntimeEntry(Handle<String> name, |
| 452 const InlineRuntimeLUT& new_entry, | 447 const InlineRuntimeFunctionsTable::Entry& new_entry, |
| 453 InlineRuntimeLUT* old_entry); | 448 InlineRuntimeFunctionsTable::Entry* old_entry); |
| 454 | 449 |
| 455 static Handle<Code> ComputeLazyCompile(int argc); | 450 static Handle<Code> ComputeLazyCompile(int argc); |
| 456 void ProcessDeclarations(ZoneList<Declaration*>* declarations); | 451 void ProcessDeclarations(ZoneList<Declaration*>* declarations); |
| 457 | 452 |
| 458 static Handle<Code> ComputeCallInitialize(int argc, InLoopFlag in_loop); | 453 static Handle<Code> ComputeCallInitialize(int argc, InLoopFlag in_loop); |
| 459 | 454 |
| 460 static Handle<Code> ComputeKeyedCallInitialize(int argc, InLoopFlag in_loop); | 455 static Handle<Code> ComputeKeyedCallInitialize(int argc, InLoopFlag in_loop); |
| 461 | 456 |
| 462 // Declare global variables and functions in the given array of | 457 // Declare global variables and functions in the given array of |
| 463 // name/value pairs. | 458 // name/value pairs. |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 Vector<TypeInfo>* type_info_; | 570 Vector<TypeInfo>* type_info_; |
| 576 | 571 |
| 577 // Jump targets | 572 // Jump targets |
| 578 BreakTarget function_return_; | 573 BreakTarget function_return_; |
| 579 | 574 |
| 580 // True if the function return is shadowed (ie, jumping to the target | 575 // True if the function return is shadowed (ie, jumping to the target |
| 581 // function_return_ does not jump to the true function return, but rather | 576 // function_return_ does not jump to the true function return, but rather |
| 582 // to some unlinking code). | 577 // to some unlinking code). |
| 583 bool function_return_is_shadowed_; | 578 bool function_return_is_shadowed_; |
| 584 | 579 |
| 585 static InlineRuntimeLUT kInlineRuntimeLUT[]; | |
| 586 | |
| 587 friend class VirtualFrame; | 580 friend class VirtualFrame; |
| 581 friend class Isolate; |
| 588 friend class JumpTarget; | 582 friend class JumpTarget; |
| 589 friend class Reference; | 583 friend class Reference; |
| 590 friend class FastCodeGenerator; | 584 friend class FastCodeGenerator; |
| 591 friend class FullCodeGenerator; | 585 friend class FullCodeGenerator; |
| 592 friend class FullCodeGenSyntaxChecker; | 586 friend class FullCodeGenSyntaxChecker; |
| 587 friend class InlineRuntimeFunctionsTable; |
| 593 | 588 |
| 594 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); | 589 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); |
| 595 }; | 590 }; |
| 596 | 591 |
| 597 | 592 |
| 598 // Compute a transcendental math function natively, or call the | 593 // Compute a transcendental math function natively, or call the |
| 599 // TranscendentalCache runtime function. | 594 // TranscendentalCache runtime function. |
| 600 class TranscendentalCacheStub: public CodeStub { | 595 class TranscendentalCacheStub: public CodeStub { |
| 601 public: | 596 public: |
| 602 explicit TranscendentalCacheStub(TranscendentalCache::Type type) | 597 explicit TranscendentalCacheStub(TranscendentalCache::Type type) |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 984 return ObjectBits::encode(object_.code()) | | 979 return ObjectBits::encode(object_.code()) | |
| 985 OffsetBits::encode(offset_.code()) | | 980 OffsetBits::encode(offset_.code()) | |
| 986 ScratchBits::encode(scratch_.code()); | 981 ScratchBits::encode(scratch_.code()); |
| 987 } | 982 } |
| 988 }; | 983 }; |
| 989 | 984 |
| 990 | 985 |
| 991 } } // namespace v8::internal | 986 } } // namespace v8::internal |
| 992 | 987 |
| 993 #endif // V8_ARM_CODEGEN_ARM_H_ | 988 #endif // V8_ARM_CODEGEN_ARM_H_ |
| OLD | NEW |