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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 void GenerateFastCaseSwitchStatement(SwitchStatement* node, | 393 void GenerateFastCaseSwitchStatement(SwitchStatement* node, |
394 int min_index, | 394 int min_index, |
395 int range, | 395 int range, |
396 int default_index); | 396 int default_index); |
397 | 397 |
398 // Fast support for constant-Smi switches. Tests whether switch statement | 398 // Fast support for constant-Smi switches. Tests whether switch statement |
399 // permits optimization and calls GenerateFastCaseSwitch if it does. | 399 // permits optimization and calls GenerateFastCaseSwitch if it does. |
400 // Returns true if the fast-case switch was generated, and false if not. | 400 // Returns true if the fast-case switch was generated, and false if not. |
401 bool TryGenerateFastCaseSwitchStatement(SwitchStatement* node); | 401 bool TryGenerateFastCaseSwitchStatement(SwitchStatement* node); |
402 | 402 |
403 | 403 // Methods used to indicate which source code is generated for. Source |
404 // Bottle-neck interface to call the Assembler to generate the statement | 404 // positions are collected by the assembler and emitted with the relocation |
405 // position. This allows us to easily control whether statement positions | 405 // information. |
406 // should be generated or not. | 406 void CodeForStatement(Node* node); |
407 void RecordStatementPosition(Node* node); | 407 void CodeForSourcePosition(int pos); |
408 | 408 |
409 bool is_eval_; // Tells whether code is generated for eval. | 409 bool is_eval_; // Tells whether code is generated for eval. |
410 Handle<Script> script_; | 410 Handle<Script> script_; |
411 List<DeferredCode*> deferred_; | 411 List<DeferredCode*> deferred_; |
412 | 412 |
413 // Assembler | 413 // Assembler |
414 MacroAssembler* masm_; // to generate code | 414 MacroAssembler* masm_; // to generate code |
415 | 415 |
416 // Code generation state | 416 // Code generation state |
417 Scope* scope_; | 417 Scope* scope_; |
(...skipping 10 matching lines...) Expand all Loading... |
428 friend class VirtualFrame; | 428 friend class VirtualFrame; |
429 friend class Reference; | 429 friend class Reference; |
430 | 430 |
431 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); | 431 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); |
432 }; | 432 }; |
433 | 433 |
434 | 434 |
435 } } // namespace v8::internal | 435 } } // namespace v8::internal |
436 | 436 |
437 #endif // V8_CODEGEN_IA32_H_ | 437 #endif // V8_CODEGEN_IA32_H_ |
OLD | NEW |