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

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

Issue 6902066: Add AST ID to RelocInfo for type-recording ICs. Changes 7644 and 7632, combined. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix an issue where a switch statement label ID could be used for both a load IC and a compare IC. 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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2011 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(Token::Value op, 448 void EmitBinaryOp(BinaryOperation* expr,
449 Token::Value op,
449 OverwriteMode mode); 450 OverwriteMode mode);
450 451
451 // Helper functions for generating inlined smi code for certain 452 // Helper functions for generating inlined smi code for certain
452 // binary operations. 453 // binary operations.
453 void EmitInlineSmiBinaryOp(Expression* expr, 454 void EmitInlineSmiBinaryOp(BinaryOperation* expr,
454 Token::Value op, 455 Token::Value op,
455 OverwriteMode mode, 456 OverwriteMode mode,
456 Expression* left, 457 Expression* left,
457 Expression* right); 458 Expression* right);
458 459
459 // Assign to the given expression as if via '='. The right-hand-side value 460 // Assign to the given expression as if via '='. The right-hand-side value
460 // is expected in the accumulator. 461 // is expected in the accumulator.
461 void EmitAssignment(Expression* expr, int bailout_ast_id); 462 void EmitAssignment(Expression* expr, int bailout_ast_id);
462 463
463 // Complete a variable assignment. The right-hand-side value is expected 464 // Complete a variable assignment. The right-hand-side value is expected
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 StrictModeFlag strict_mode_flag() { 506 StrictModeFlag strict_mode_flag() {
506 return is_strict_mode() ? kStrictMode : kNonStrictMode; 507 return is_strict_mode() ? kStrictMode : kNonStrictMode;
507 } 508 }
508 FunctionLiteral* function() { return info_->function(); } 509 FunctionLiteral* function() { return info_->function(); }
509 Scope* scope() { return info_->scope(); } 510 Scope* scope() { return info_->scope(); }
510 511
511 static Register result_register(); 512 static Register result_register();
512 static Register context_register(); 513 static Register context_register();
513 514
514 // Helper for calling an IC stub. 515 // Helper for calling an IC stub.
515 void EmitCallIC(Handle<Code> ic, RelocInfo::Mode mode); 516 void EmitCallIC(Handle<Code> ic,
517 RelocInfo::Mode mode,
518 unsigned ast_id);
516 519
517 // Calling an IC stub with a patch site. Passing NULL for patch_site 520 // Calling an IC stub with a patch site. Passing NULL for patch_site
518 // or non NULL patch_site which is not activated indicates no inlined smi code 521 // or non NULL patch_site which is not activated indicates no inlined smi code
519 // and emits a nop after the IC call. 522 // and emits a nop after the IC call.
520 void EmitCallIC(Handle<Code> ic, JumpPatchSite* patch_site); 523 void EmitCallIC(Handle<Code> ic,
524 JumpPatchSite* patch_site,
525 unsigned ast_id);
521 526
522 // Set fields in the stack frame. Offsets are the frame pointer relative 527 // Set fields in the stack frame. Offsets are the frame pointer relative
523 // offsets defined in, e.g., StandardFrameConstants. 528 // offsets defined in, e.g., StandardFrameConstants.
524 void StoreToFrameField(int frame_offset, Register value); 529 void StoreToFrameField(int frame_offset, Register value);
525 530
526 // Load a value from the current context. Indices are defined as an enum 531 // Load a value from the current context. Indices are defined as an enum
527 // in v8::internal::Context. 532 // in v8::internal::Context.
528 void LoadContextField(Register dst, int context_index); 533 void LoadContextField(Register dst, int context_index);
529 534
530 // AST node visit functions. 535 // AST node visit functions.
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 749
745 friend class NestedStatement; 750 friend class NestedStatement;
746 751
747 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); 752 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator);
748 }; 753 };
749 754
750 755
751 } } // namespace v8::internal 756 } } // namespace v8::internal
752 757
753 #endif // V8_FULL_CODEGEN_H_ 758 #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