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

Side by Side Diff: src/hydrogen.h

Issue 7860035: Merge bleeding edge up to 9192 into the GC branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 3 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/heap-inl.h ('k') | src/hydrogen.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 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
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 // True if index is included in the expression stack part of the environment. 448 // True if index is included in the expression stack part of the environment.
449 bool HasExpressionAt(int index) const; 449 bool HasExpressionAt(int index) const;
450 450
451 void Initialize(int parameter_count, int local_count, int stack_height); 451 void Initialize(int parameter_count, int local_count, int stack_height);
452 void Initialize(const HEnvironment* other); 452 void Initialize(const HEnvironment* other);
453 453
454 // Map a variable to an environment index. Parameter indices are shifted 454 // Map a variable to an environment index. Parameter indices are shifted
455 // by 1 (receiver is parameter index -1 but environment index 0). 455 // by 1 (receiver is parameter index -1 but environment index 0).
456 // Stack-allocated local indices are shifted by the number of parameters. 456 // Stack-allocated local indices are shifted by the number of parameters.
457 int IndexFor(Variable* variable) const { 457 int IndexFor(Variable* variable) const {
458 Slot* slot = variable->AsSlot(); 458 ASSERT(variable->IsStackAllocated());
459 ASSERT(slot != NULL && slot->IsStackAllocated()); 459 int shift = variable->IsParameter()
460 int shift = (slot->type() == Slot::PARAMETER)
461 ? 1 460 ? 1
462 : parameter_count_ + specials_count_; 461 : parameter_count_ + specials_count_;
463 return slot->index() + shift; 462 return variable->index() + shift;
464 } 463 }
465 464
466 Handle<JSFunction> closure_; 465 Handle<JSFunction> closure_;
467 // Value array [parameters] [specials] [locals] [temporaries]. 466 // Value array [parameters] [specials] [locals] [temporaries].
468 ZoneList<HValue*> values_; 467 ZoneList<HValue*> values_;
469 ZoneList<int> assigned_variables_; 468 ZoneList<int> assigned_variables_;
470 int parameter_count_; 469 int parameter_count_;
471 int specials_count_; 470 int specials_count_;
472 int local_count_; 471 int local_count_;
473 HEnvironment* outer_; 472 HEnvironment* outer_;
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 } 771 }
773 772
774 // Generators for inline runtime functions. 773 // Generators for inline runtime functions.
775 #define INLINE_FUNCTION_GENERATOR_DECLARATION(Name, argc, ressize) \ 774 #define INLINE_FUNCTION_GENERATOR_DECLARATION(Name, argc, ressize) \
776 void Generate##Name(CallRuntime* call); 775 void Generate##Name(CallRuntime* call);
777 776
778 INLINE_FUNCTION_LIST(INLINE_FUNCTION_GENERATOR_DECLARATION) 777 INLINE_FUNCTION_LIST(INLINE_FUNCTION_GENERATOR_DECLARATION)
779 INLINE_RUNTIME_FUNCTION_LIST(INLINE_FUNCTION_GENERATOR_DECLARATION) 778 INLINE_RUNTIME_FUNCTION_LIST(INLINE_FUNCTION_GENERATOR_DECLARATION)
780 #undef INLINE_FUNCTION_GENERATOR_DECLARATION 779 #undef INLINE_FUNCTION_GENERATOR_DECLARATION
781 780
781 void HandleDeclaration(VariableProxy* proxy,
782 Variable::Mode mode,
783 FunctionLiteral* function);
784
782 void VisitDelete(UnaryOperation* expr); 785 void VisitDelete(UnaryOperation* expr);
783 void VisitVoid(UnaryOperation* expr); 786 void VisitVoid(UnaryOperation* expr);
784 void VisitTypeof(UnaryOperation* expr); 787 void VisitTypeof(UnaryOperation* expr);
785 void VisitAdd(UnaryOperation* expr); 788 void VisitAdd(UnaryOperation* expr);
786 void VisitSub(UnaryOperation* expr); 789 void VisitSub(UnaryOperation* expr);
787 void VisitBitNot(UnaryOperation* expr); 790 void VisitBitNot(UnaryOperation* expr);
788 void VisitNot(UnaryOperation* expr); 791 void VisitNot(UnaryOperation* expr);
789 792
790 void VisitComma(BinaryOperation* expr); 793 void VisitComma(BinaryOperation* expr);
791 void VisitLogicalExpression(BinaryOperation* expr); 794 void VisitLogicalExpression(BinaryOperation* expr);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 void PushAndAdd(HInstruction* instr); 847 void PushAndAdd(HInstruction* instr);
845 848
846 // Remove the arguments from the bailout environment and emit instructions 849 // Remove the arguments from the bailout environment and emit instructions
847 // to push them as outgoing parameters. 850 // to push them as outgoing parameters.
848 template <int V> HInstruction* PreProcessCall(HCall<V>* call); 851 template <int V> HInstruction* PreProcessCall(HCall<V>* call);
849 852
850 void TraceRepresentation(Token::Value op, 853 void TraceRepresentation(Token::Value op,
851 TypeInfo info, 854 TypeInfo info,
852 HValue* value, 855 HValue* value,
853 Representation rep); 856 Representation rep);
854 void AssumeRepresentation(HValue* value, Representation rep);
855 static Representation ToRepresentation(TypeInfo info); 857 static Representation ToRepresentation(TypeInfo info);
856 858
857 void SetupScope(Scope* scope); 859 void SetupScope(Scope* scope);
858 virtual void VisitStatements(ZoneList<Statement*>* statements); 860 virtual void VisitStatements(ZoneList<Statement*>* statements);
859 861
860 #define DECLARE_VISIT(type) virtual void Visit##type(type* node); 862 #define DECLARE_VISIT(type) virtual void Visit##type(type* node);
861 AST_NODE_LIST(DECLARE_VISIT) 863 AST_NODE_LIST(DECLARE_VISIT)
862 #undef DECLARE_VISIT 864 #undef DECLARE_VISIT
863 865
864 HBasicBlock* CreateBasicBlock(HEnvironment* env); 866 HBasicBlock* CreateBasicBlock(HEnvironment* env);
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 const char* filename_; 1231 const char* filename_;
1230 HeapStringAllocator string_allocator_; 1232 HeapStringAllocator string_allocator_;
1231 StringStream trace_; 1233 StringStream trace_;
1232 int indent_; 1234 int indent_;
1233 }; 1235 };
1234 1236
1235 1237
1236 } } // namespace v8::internal 1238 } } // namespace v8::internal
1237 1239
1238 #endif // V8_HYDROGEN_H_ 1240 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/heap-inl.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698