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 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 void (CodeGenerator::*method)(ZoneList<Expression*>*); | 488 void (CodeGenerator::*method)(ZoneList<Expression*>*); |
494 const char* name; | 489 const char* name; |
495 }; | 490 }; |
496 | 491 |
497 static InlineRuntimeLUT* FindInlineRuntimeLUT(Handle<String> name); | 492 static InlineRuntimeLUT* FindInlineRuntimeLUT(Handle<String> name); |
498 bool CheckForInlineRuntimeCall(CallRuntime* node); | 493 bool CheckForInlineRuntimeCall(CallRuntime* node); |
499 static bool PatchInlineRuntimeEntry(Handle<String> name, | 494 static bool PatchInlineRuntimeEntry(Handle<String> name, |
500 const InlineRuntimeLUT& new_entry, | 495 const InlineRuntimeLUT& new_entry, |
501 InlineRuntimeLUT* old_entry); | 496 InlineRuntimeLUT* old_entry); |
502 | 497 |
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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 void SetArgsReversed() { args_reversed_ = true; } | 728 void SetArgsReversed() { args_reversed_ = true; } |
736 bool HasSmiCodeInStub() { return (flags_ & NO_SMI_CODE_IN_STUB) == 0; } | 729 bool HasSmiCodeInStub() { return (flags_ & NO_SMI_CODE_IN_STUB) == 0; } |
737 bool HasArgumentsInRegisters() { return args_in_registers_; } | 730 bool HasArgumentsInRegisters() { return args_in_registers_; } |
738 bool HasArgumentsReversed() { return args_reversed_; } | 731 bool HasArgumentsReversed() { return args_reversed_; } |
739 }; | 732 }; |
740 | 733 |
741 | 734 |
742 } } // namespace v8::internal | 735 } } // namespace v8::internal |
743 | 736 |
744 #endif // V8_IA32_CODEGEN_IA32_H_ | 737 #endif // V8_IA32_CODEGEN_IA32_H_ |
OLD | NEW |