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

Side by Side Diff: src/hydrogen.h

Issue 6913021: Tiny refactoring - change compilation phase parameter for CopyForInlining from a boolean to an enum. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Reformat some line splitting. Created 9 years, 7 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/arm/lithium-arm.cc ('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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 301
302 DISALLOW_COPY_AND_ASSIGN(HGraph); 302 DISALLOW_COPY_AND_ASSIGN(HGraph);
303 }; 303 };
304 304
305 305
306 Zone* HBasicBlock::zone() { return graph_->zone(); } 306 Zone* HBasicBlock::zone() { return graph_->zone(); }
307 307
308 308
309 class HEnvironment: public ZoneObject { 309 class HEnvironment: public ZoneObject {
310 public: 310 public:
311 enum CompilationPhase { HYDROGEN, LITHIUM };
312
311 HEnvironment(HEnvironment* outer, 313 HEnvironment(HEnvironment* outer,
312 Scope* scope, 314 Scope* scope,
313 Handle<JSFunction> closure); 315 Handle<JSFunction> closure);
314 316
315 // Simple accessors. 317 // Simple accessors.
316 Handle<JSFunction> closure() const { return closure_; } 318 Handle<JSFunction> closure() const { return closure_; }
317 const ZoneList<HValue*>* values() const { return &values_; } 319 const ZoneList<HValue*>* values() const { return &values_; }
318 const ZoneList<int>* assigned_variables() const { 320 const ZoneList<int>* assigned_variables() const {
319 return &assigned_variables_; 321 return &assigned_variables_;
320 } 322 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 HEnvironment* CopyWithoutHistory() const; 379 HEnvironment* CopyWithoutHistory() const;
378 HEnvironment* CopyAsLoopHeader(HBasicBlock* block) const; 380 HEnvironment* CopyAsLoopHeader(HBasicBlock* block) const;
379 381
380 // Create an "inlined version" of this environment, where the original 382 // Create an "inlined version" of this environment, where the original
381 // environment is the outer environment but the top expression stack 383 // environment is the outer environment but the top expression stack
382 // elements are moved to an inner environment as parameters. If 384 // elements are moved to an inner environment as parameters. If
383 // is_speculative, the argument values are expected to be PushArgument 385 // is_speculative, the argument values are expected to be PushArgument
384 // instructions, otherwise they are the actual values. 386 // instructions, otherwise they are the actual values.
385 HEnvironment* CopyForInlining(Handle<JSFunction> target, 387 HEnvironment* CopyForInlining(Handle<JSFunction> target,
386 FunctionLiteral* function, 388 FunctionLiteral* function,
387 bool is_speculative, 389 CompilationPhase compilation_phase,
388 HConstant* undefined) const; 390 HConstant* undefined) const;
389 391
390 void AddIncomingEdge(HBasicBlock* block, HEnvironment* other); 392 void AddIncomingEdge(HBasicBlock* block, HEnvironment* other);
391 393
392 void ClearHistory() { 394 void ClearHistory() {
393 pop_count_ = 0; 395 pop_count_ = 0;
394 push_count_ = 0; 396 push_count_ = 0;
395 assigned_variables_.Rewind(0); 397 assigned_variables_.Rewind(0);
396 } 398 }
397 399
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 const char* filename_; 1157 const char* filename_;
1156 HeapStringAllocator string_allocator_; 1158 HeapStringAllocator string_allocator_;
1157 StringStream trace_; 1159 StringStream trace_;
1158 int indent_; 1160 int indent_;
1159 }; 1161 };
1160 1162
1161 1163
1162 } } // namespace v8::internal 1164 } } // namespace v8::internal
1163 1165
1164 #endif // V8_HYDROGEN_H_ 1166 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698