| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 // Allocate and install the code. | 292 // Allocate and install the code. |
| 293 static Handle<Code> MakeCodeEpilogue(FunctionLiteral* fun, | 293 static Handle<Code> MakeCodeEpilogue(FunctionLiteral* fun, |
| 294 MacroAssembler* masm, | 294 MacroAssembler* masm, |
| 295 Code::Flags flags, | 295 Code::Flags flags, |
| 296 Handle<Script> script); | 296 Handle<Script> script); |
| 297 | 297 |
| 298 #ifdef ENABLE_LOGGING_AND_PROFILING | 298 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 299 static bool ShouldGenerateLog(Expression* type); | 299 static bool ShouldGenerateLog(Expression* type); |
| 300 #endif | 300 #endif |
| 301 | 301 |
| 302 static void SetFunctionInfo(Handle<JSFunction> fun, | |
| 303 FunctionLiteral* lit, | |
| 304 bool is_toplevel, | |
| 305 Handle<Script> script); | |
| 306 | |
| 307 static void RecordPositions(MacroAssembler* masm, int pos); | 302 static void RecordPositions(MacroAssembler* masm, int pos); |
| 308 | 303 |
| 309 // Accessors | 304 // Accessors |
| 310 MacroAssembler* masm() { return masm_; } | 305 MacroAssembler* masm() { return masm_; } |
| 311 | |
| 312 VirtualFrame* frame() const { return frame_; } | 306 VirtualFrame* frame() const { return frame_; } |
| 307 Handle<Script> script() { return script_; } |
| 313 | 308 |
| 314 bool has_valid_frame() const { return frame_ != NULL; } | 309 bool has_valid_frame() const { return frame_ != NULL; } |
| 315 | 310 |
| 316 // Set the virtual frame to be new_frame, with non-frame register | 311 // Set the virtual frame to be new_frame, with non-frame register |
| 317 // reference counts given by non_frame_registers. The non-frame | 312 // reference counts given by non_frame_registers. The non-frame |
| 318 // register reference counts of the old frame are returned in | 313 // register reference counts of the old frame are returned in |
| 319 // non_frame_registers. | 314 // non_frame_registers. |
| 320 void SetFrame(VirtualFrame* new_frame, RegisterFile* non_frame_registers); | 315 void SetFrame(VirtualFrame* new_frame, RegisterFile* non_frame_registers); |
| 321 | 316 |
| 322 void DeleteFrame(); | 317 void DeleteFrame(); |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 | 488 |
| 494 struct InlineRuntimeLUT { | 489 struct InlineRuntimeLUT { |
| 495 void (CodeGenerator::*method)(ZoneList<Expression*>*); | 490 void (CodeGenerator::*method)(ZoneList<Expression*>*); |
| 496 const char* name; | 491 const char* name; |
| 497 }; | 492 }; |
| 498 static InlineRuntimeLUT* FindInlineRuntimeLUT(Handle<String> name); | 493 static InlineRuntimeLUT* FindInlineRuntimeLUT(Handle<String> name); |
| 499 bool CheckForInlineRuntimeCall(CallRuntime* node); | 494 bool CheckForInlineRuntimeCall(CallRuntime* node); |
| 500 static bool PatchInlineRuntimeEntry(Handle<String> name, | 495 static bool PatchInlineRuntimeEntry(Handle<String> name, |
| 501 const InlineRuntimeLUT& new_entry, | 496 const InlineRuntimeLUT& new_entry, |
| 502 InlineRuntimeLUT* old_entry); | 497 InlineRuntimeLUT* old_entry); |
| 503 static Handle<Code> ComputeLazyCompile(int argc); | |
| 504 Handle<JSFunction> BuildBoilerplate(FunctionLiteral* node); | |
| 505 void ProcessDeclarations(ZoneList<Declaration*>* declarations); | 498 void ProcessDeclarations(ZoneList<Declaration*>* declarations); |
| 506 | 499 |
| 507 static Handle<Code> ComputeCallInitialize(int argc, InLoopFlag in_loop); | 500 static Handle<Code> ComputeCallInitialize(int argc, InLoopFlag in_loop); |
| 508 | 501 |
| 509 // Declare global variables and functions in the given array of | 502 // Declare global variables and functions in the given array of |
| 510 // name/value pairs. | 503 // name/value pairs. |
| 511 void DeclareGlobals(Handle<FixedArray> pairs); | 504 void DeclareGlobals(Handle<FixedArray> pairs); |
| 512 | 505 |
| 513 // Instantiate the function boilerplate. | 506 // Instantiate the function boilerplate. |
| 514 void InstantiateBoilerplate(Handle<JSFunction> boilerplate); | 507 void InstantiateBoilerplate(Handle<JSFunction> boilerplate); |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 742 void SetArgsReversed() { args_reversed_ = true; } | 735 void SetArgsReversed() { args_reversed_ = true; } |
| 743 bool HasSmiCodeInStub() { return (flags_ & NO_SMI_CODE_IN_STUB) == 0; } | 736 bool HasSmiCodeInStub() { return (flags_ & NO_SMI_CODE_IN_STUB) == 0; } |
| 744 bool HasArgumentsInRegisters() { return args_in_registers_; } | 737 bool HasArgumentsInRegisters() { return args_in_registers_; } |
| 745 bool HasArgumentsReversed() { return args_reversed_; } | 738 bool HasArgumentsReversed() { return args_reversed_; } |
| 746 }; | 739 }; |
| 747 | 740 |
| 748 | 741 |
| 749 } } // namespace v8::internal | 742 } } // namespace v8::internal |
| 750 | 743 |
| 751 #endif // V8_X64_CODEGEN_X64_H_ | 744 #endif // V8_X64_CODEGEN_X64_H_ |
| OLD | NEW |