Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Side by Side Diff: src/full-codegen.h

Issue 6880036: Merge revision 7664 (revert of 7644 and 7632) to trunk. (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/disassembler.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 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
11 // with the distribution. 11 // with the distribution.
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 // Load a value from a named property. 438 // Load a value from a named property.
439 // The receiver is left on the stack by the IC. 439 // The receiver is left on the stack by the IC.
440 void EmitNamedPropertyLoad(Property* expr); 440 void EmitNamedPropertyLoad(Property* expr);
441 441
442 // Load a value from a keyed property. 442 // Load a value from a keyed property.
443 // The receiver and the key is left on the stack by the IC. 443 // The receiver and the key is left on the stack by the IC.
444 void EmitKeyedPropertyLoad(Property* expr); 444 void EmitKeyedPropertyLoad(Property* expr);
445 445
446 // Apply the compound assignment operator. Expects the left operand on top 446 // Apply the compound assignment operator. Expects the left operand on top
447 // of the stack and the right one in the accumulator. 447 // of the stack and the right one in the accumulator.
448 void EmitBinaryOp(BinaryOperation* expr, 448 void EmitBinaryOp(Token::Value op,
449 Token::Value op,
450 OverwriteMode mode); 449 OverwriteMode mode);
451 450
452 // Helper functions for generating inlined smi code for certain 451 // Helper functions for generating inlined smi code for certain
453 // binary operations. 452 // binary operations.
454 void EmitInlineSmiBinaryOp(BinaryOperation* expr, 453 void EmitInlineSmiBinaryOp(Expression* expr,
455 Token::Value op, 454 Token::Value op,
456 OverwriteMode mode, 455 OverwriteMode mode,
457 Expression* left, 456 Expression* left,
458 Expression* right); 457 Expression* right);
459 458
460 // Assign to the given expression as if via '='. The right-hand-side value 459 // Assign to the given expression as if via '='. The right-hand-side value
461 // is expected in the accumulator. 460 // is expected in the accumulator.
462 void EmitAssignment(Expression* expr, int bailout_ast_id); 461 void EmitAssignment(Expression* expr, int bailout_ast_id);
463 462
464 // Complete a variable assignment. The right-hand-side value is expected 463 // Complete a variable assignment. The right-hand-side value is expected
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 StrictModeFlag strict_mode_flag() { 505 StrictModeFlag strict_mode_flag() {
507 return is_strict_mode() ? kStrictMode : kNonStrictMode; 506 return is_strict_mode() ? kStrictMode : kNonStrictMode;
508 } 507 }
509 FunctionLiteral* function() { return info_->function(); } 508 FunctionLiteral* function() { return info_->function(); }
510 Scope* scope() { return info_->scope(); } 509 Scope* scope() { return info_->scope(); }
511 510
512 static Register result_register(); 511 static Register result_register();
513 static Register context_register(); 512 static Register context_register();
514 513
515 // Helper for calling an IC stub. 514 // Helper for calling an IC stub.
516 void EmitCallIC(Handle<Code> ic, 515 void EmitCallIC(Handle<Code> ic, RelocInfo::Mode mode);
517 RelocInfo::Mode mode,
518 unsigned ast_id);
519 516
520 // Calling an IC stub with a patch site. Passing NULL for patch_site 517 // Calling an IC stub with a patch site. Passing NULL for patch_site
521 // or non NULL patch_site which is not activated indicates no inlined smi code 518 // or non NULL patch_site which is not activated indicates no inlined smi code
522 // and emits a nop after the IC call. 519 // and emits a nop after the IC call.
523 void EmitCallIC(Handle<Code> ic, 520 void EmitCallIC(Handle<Code> ic, JumpPatchSite* patch_site);
524 JumpPatchSite* patch_site,
525 unsigned ast_id);
526 521
527 // Set fields in the stack frame. Offsets are the frame pointer relative 522 // Set fields in the stack frame. Offsets are the frame pointer relative
528 // offsets defined in, e.g., StandardFrameConstants. 523 // offsets defined in, e.g., StandardFrameConstants.
529 void StoreToFrameField(int frame_offset, Register value); 524 void StoreToFrameField(int frame_offset, Register value);
530 525
531 // Load a value from the current context. Indices are defined as an enum 526 // Load a value from the current context. Indices are defined as an enum
532 // in v8::internal::Context. 527 // in v8::internal::Context.
533 void LoadContextField(Register dst, int context_index); 528 void LoadContextField(Register dst, int context_index);
534 529
535 // AST node visit functions. 530 // AST node visit functions.
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 744
750 friend class NestedStatement; 745 friend class NestedStatement;
751 746
752 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); 747 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator);
753 }; 748 };
754 749
755 750
756 } } // namespace v8::internal 751 } } // namespace v8::internal
757 752
758 #endif // V8_FULL_CODEGEN_H_ 753 #endif // V8_FULL_CODEGEN_H_
OLDNEW
« no previous file with comments | « src/disassembler.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698