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

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

Issue 196133017: Experimental parser: merge r19949 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 9 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/frames-inl.h ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 Expression* sub_expr, 430 Expression* sub_expr,
431 NilValue nil); 431 NilValue nil);
432 432
433 // Bailout support. 433 // Bailout support.
434 void PrepareForBailout(Expression* node, State state); 434 void PrepareForBailout(Expression* node, State state);
435 void PrepareForBailoutForId(BailoutId id, State state); 435 void PrepareForBailoutForId(BailoutId id, State state);
436 436
437 // Feedback slot support. The feedback vector will be cleared during gc and 437 // Feedback slot support. The feedback vector will be cleared during gc and
438 // collected by the type-feedback oracle. 438 // collected by the type-feedback oracle.
439 Handle<FixedArray> FeedbackVector() { 439 Handle<FixedArray> FeedbackVector() {
440 return feedback_vector_; 440 return info_->feedback_vector();
441 } 441 }
442 void StoreFeedbackVectorSlot(int slot, Handle<Object> object) {
443 feedback_vector_->set(slot, *object);
444 }
445 void InitializeFeedbackVector();
446 442
447 // Record a call's return site offset, used to rebuild the frame if the 443 // Record a call's return site offset, used to rebuild the frame if the
448 // called function was inlined at the site. 444 // called function was inlined at the site.
449 void RecordJSReturnSite(Call* call); 445 void RecordJSReturnSite(Call* call);
450 446
451 // Prepare for bailout before a test (or compare) and branch. If 447 // Prepare for bailout before a test (or compare) and branch. If
452 // should_normalize, then the following comparison will not handle the 448 // should_normalize, then the following comparison will not handle the
453 // canonical JS true value so we will insert a (dead) test against true at 449 // canonical JS true value so we will insert a (dead) test against true at
454 // the actual bailout target from the optimized code. If not 450 // the actual bailout target from the optimized code. If not
455 // should_normalize, the true and false labels are ignored. 451 // should_normalize, the true and false labels are ignored.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 void EmitKeyedCallWithIC(Call* expr, Expression* key); 486 void EmitKeyedCallWithIC(Call* expr, Expression* key);
491 487
492 // Platform-specific code for inline runtime calls. 488 // Platform-specific code for inline runtime calls.
493 InlineFunctionGenerator FindInlineFunctionGenerator(Runtime::FunctionId id); 489 InlineFunctionGenerator FindInlineFunctionGenerator(Runtime::FunctionId id);
494 490
495 void EmitInlineRuntimeCall(CallRuntime* expr); 491 void EmitInlineRuntimeCall(CallRuntime* expr);
496 492
497 #define EMIT_INLINE_RUNTIME_CALL(name, x, y) \ 493 #define EMIT_INLINE_RUNTIME_CALL(name, x, y) \
498 void Emit##name(CallRuntime* expr); 494 void Emit##name(CallRuntime* expr);
499 INLINE_FUNCTION_LIST(EMIT_INLINE_RUNTIME_CALL) 495 INLINE_FUNCTION_LIST(EMIT_INLINE_RUNTIME_CALL)
500 INLINE_RUNTIME_FUNCTION_LIST(EMIT_INLINE_RUNTIME_CALL)
501 #undef EMIT_INLINE_RUNTIME_CALL 496 #undef EMIT_INLINE_RUNTIME_CALL
502 497
503 // Platform-specific code for resuming generators. 498 // Platform-specific code for resuming generators.
504 void EmitGeneratorResume(Expression *generator, 499 void EmitGeneratorResume(Expression *generator,
505 Expression *value, 500 Expression *value,
506 JSGeneratorObject::ResumeMode resume_mode); 501 JSGeneratorObject::ResumeMode resume_mode);
507 502
508 // Platform-specific code for loading variables. 503 // Platform-specific code for loading variables.
509 void EmitLoadGlobalCheckExtensions(Variable* var, 504 void EmitLoadGlobalCheckExtensions(Variable* var,
510 TypeofState typeof_state, 505 TypeofState typeof_state,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 void EmitAssignment(Expression* expr); 549 void EmitAssignment(Expression* expr);
555 550
556 // Complete a variable assignment. The right-hand-side value is expected 551 // Complete a variable assignment. The right-hand-side value is expected
557 // in the accumulator. 552 // in the accumulator.
558 void EmitVariableAssignment(Variable* var, 553 void EmitVariableAssignment(Variable* var,
559 Token::Value op); 554 Token::Value op);
560 555
561 // Helper functions to EmitVariableAssignment 556 // Helper functions to EmitVariableAssignment
562 void EmitStoreToStackLocalOrContextSlot(Variable* var, 557 void EmitStoreToStackLocalOrContextSlot(Variable* var,
563 MemOperand location); 558 MemOperand location);
564 void EmitCallStoreContextSlot(Handle<String> name, LanguageMode mode); 559 void EmitCallStoreContextSlot(Handle<String> name, StrictMode strict_mode);
565 560
566 // Complete a named property assignment. The receiver is expected on top 561 // Complete a named property assignment. The receiver is expected on top
567 // of the stack and the right-hand-side value in the accumulator. 562 // of the stack and the right-hand-side value in the accumulator.
568 void EmitNamedPropertyAssignment(Assignment* expr); 563 void EmitNamedPropertyAssignment(Assignment* expr);
569 564
570 // Complete a keyed property assignment. The receiver and key are 565 // Complete a keyed property assignment. The receiver and key are
571 // expected on top of the stack and the right-hand-side value in the 566 // expected on top of the stack and the right-hand-side value in the
572 // accumulator. 567 // accumulator.
573 void EmitKeyedPropertyAssignment(Assignment* expr); 568 void EmitKeyedPropertyAssignment(Assignment* expr);
574 569
(...skipping 25 matching lines...) Expand all
600 595
601 MacroAssembler* masm() { return masm_; } 596 MacroAssembler* masm() { return masm_; }
602 597
603 class ExpressionContext; 598 class ExpressionContext;
604 const ExpressionContext* context() { return context_; } 599 const ExpressionContext* context() { return context_; }
605 void set_new_context(const ExpressionContext* context) { context_ = context; } 600 void set_new_context(const ExpressionContext* context) { context_ = context; }
606 601
607 Handle<Script> script() { return info_->script(); } 602 Handle<Script> script() { return info_->script(); }
608 bool is_eval() { return info_->is_eval(); } 603 bool is_eval() { return info_->is_eval(); }
609 bool is_native() { return info_->is_native(); } 604 bool is_native() { return info_->is_native(); }
610 bool is_classic_mode() { return language_mode() == CLASSIC_MODE; } 605 StrictMode strict_mode() { return function()->strict_mode(); }
611 StrictModeFlag strict_mode() {
612 return is_classic_mode() ? kNonStrictMode : kStrictMode;
613 }
614 LanguageMode language_mode() { return function()->language_mode(); }
615 FunctionLiteral* function() { return info_->function(); } 606 FunctionLiteral* function() { return info_->function(); }
616 Scope* scope() { return scope_; } 607 Scope* scope() { return scope_; }
617 608
618 static Register result_register(); 609 static Register result_register();
619 static Register context_register(); 610 static Register context_register();
620 611
621 // Set fields in the stack frame. Offsets are the frame pointer relative 612 // Set fields in the stack frame. Offsets are the frame pointer relative
622 // offsets defined in, e.g., StandardFrameConstants. 613 // offsets defined in, e.g., StandardFrameConstants.
623 void StoreToFrameField(int frame_offset, Register value); 614 void StoreToFrameField(int frame_offset, Register value);
624 615
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 int loop_depth_; 833 int loop_depth_;
843 ZoneList<Handle<Object> >* globals_; 834 ZoneList<Handle<Object> >* globals_;
844 Handle<FixedArray> modules_; 835 Handle<FixedArray> modules_;
845 int module_index_; 836 int module_index_;
846 const ExpressionContext* context_; 837 const ExpressionContext* context_;
847 ZoneList<BailoutEntry> bailout_entries_; 838 ZoneList<BailoutEntry> bailout_entries_;
848 GrowableBitVector prepared_bailout_ids_; 839 GrowableBitVector prepared_bailout_ids_;
849 ZoneList<BackEdgeEntry> back_edges_; 840 ZoneList<BackEdgeEntry> back_edges_;
850 int ic_total_count_; 841 int ic_total_count_;
851 Handle<FixedArray> handler_table_; 842 Handle<FixedArray> handler_table_;
852 Handle<FixedArray> feedback_vector_;
853 Handle<Cell> profiling_counter_; 843 Handle<Cell> profiling_counter_;
854 bool generate_debug_code_; 844 bool generate_debug_code_;
855 845
856 friend class NestedStatement; 846 friend class NestedStatement;
857 847
858 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); 848 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
859 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); 849 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator);
860 }; 850 };
861 851
862 852
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 955
966 Address start_; 956 Address start_;
967 Address instruction_start_; 957 Address instruction_start_;
968 uint32_t length_; 958 uint32_t length_;
969 }; 959 };
970 960
971 961
972 } } // namespace v8::internal 962 } } // namespace v8::internal
973 963
974 #endif // V8_FULL_CODEGEN_H_ 964 #endif // V8_FULL_CODEGEN_H_
OLDNEW
« no previous file with comments | « src/frames-inl.h ('k') | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698