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

Side by Side Diff: src/hydrogen.h

Issue 6960009: Version 3.3.5 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: 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/heap-profiler.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 12 matching lines...) Expand all
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #ifndef V8_HYDROGEN_H_ 28 #ifndef V8_HYDROGEN_H_
29 #define V8_HYDROGEN_H_ 29 #define V8_HYDROGEN_H_
30 30
31 #include "v8.h" 31 #include "v8.h"
32 32
33 #include "allocation.h"
33 #include "ast.h" 34 #include "ast.h"
34 #include "compiler.h" 35 #include "compiler.h"
35 #include "hydrogen-instructions.h" 36 #include "hydrogen-instructions.h"
36 #include "zone.h" 37 #include "zone.h"
37 38
38 namespace v8 { 39 namespace v8 {
39 namespace internal { 40 namespace internal {
40 41
41 // Forward declarations. 42 // Forward declarations.
42 class BitVector; 43 class BitVector;
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 302
302 DISALLOW_COPY_AND_ASSIGN(HGraph); 303 DISALLOW_COPY_AND_ASSIGN(HGraph);
303 }; 304 };
304 305
305 306
306 Zone* HBasicBlock::zone() { return graph_->zone(); } 307 Zone* HBasicBlock::zone() { return graph_->zone(); }
307 308
308 309
309 class HEnvironment: public ZoneObject { 310 class HEnvironment: public ZoneObject {
310 public: 311 public:
312 enum CompilationPhase { HYDROGEN, LITHIUM };
313
311 HEnvironment(HEnvironment* outer, 314 HEnvironment(HEnvironment* outer,
312 Scope* scope, 315 Scope* scope,
313 Handle<JSFunction> closure); 316 Handle<JSFunction> closure);
314 317
315 // Simple accessors. 318 // Simple accessors.
316 Handle<JSFunction> closure() const { return closure_; } 319 Handle<JSFunction> closure() const { return closure_; }
317 const ZoneList<HValue*>* values() const { return &values_; } 320 const ZoneList<HValue*>* values() const { return &values_; }
318 const ZoneList<int>* assigned_variables() const { 321 const ZoneList<int>* assigned_variables() const {
319 return &assigned_variables_; 322 return &assigned_variables_;
320 } 323 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 HEnvironment* CopyWithoutHistory() const; 380 HEnvironment* CopyWithoutHistory() const;
378 HEnvironment* CopyAsLoopHeader(HBasicBlock* block) const; 381 HEnvironment* CopyAsLoopHeader(HBasicBlock* block) const;
379 382
380 // Create an "inlined version" of this environment, where the original 383 // Create an "inlined version" of this environment, where the original
381 // environment is the outer environment but the top expression stack 384 // environment is the outer environment but the top expression stack
382 // elements are moved to an inner environment as parameters. If 385 // elements are moved to an inner environment as parameters. If
383 // is_speculative, the argument values are expected to be PushArgument 386 // is_speculative, the argument values are expected to be PushArgument
384 // instructions, otherwise they are the actual values. 387 // instructions, otherwise they are the actual values.
385 HEnvironment* CopyForInlining(Handle<JSFunction> target, 388 HEnvironment* CopyForInlining(Handle<JSFunction> target,
386 FunctionLiteral* function, 389 FunctionLiteral* function,
387 bool is_speculative, 390 CompilationPhase compilation_phase,
388 HConstant* undefined) const; 391 HConstant* undefined) const;
389 392
390 void AddIncomingEdge(HBasicBlock* block, HEnvironment* other); 393 void AddIncomingEdge(HBasicBlock* block, HEnvironment* other);
391 394
392 void ClearHistory() { 395 void ClearHistory() {
393 pop_count_ = 0; 396 pop_count_ = 0;
394 push_count_ = 0; 397 push_count_ = 0;
395 assigned_variables_.Rewind(0); 398 assigned_variables_.Rewind(0);
396 } 399 }
397 400
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 const char* filename_; 1158 const char* filename_;
1156 HeapStringAllocator string_allocator_; 1159 HeapStringAllocator string_allocator_;
1157 StringStream trace_; 1160 StringStream trace_;
1158 int indent_; 1161 int indent_;
1159 }; 1162 };
1160 1163
1161 1164
1162 } } // namespace v8::internal 1165 } } // namespace v8::internal
1163 1166
1164 #endif // V8_HYDROGEN_H_ 1167 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/heap-profiler.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698