OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_CRANKSHAFT_HYDROGEN_H_ | 5 #ifndef V8_CRANKSHAFT_HYDROGEN_H_ |
6 #define V8_CRANKSHAFT_HYDROGEN_H_ | 6 #define V8_CRANKSHAFT_HYDROGEN_H_ |
7 | 7 |
8 #include "src/accessors.h" | 8 #include "src/accessors.h" |
9 #include "src/allocation.h" | 9 #include "src/allocation.h" |
10 #include "src/ast/ast.h" | 10 #include "src/ast/ast.h" |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 bool IsConstant0(HConstant* constant); | 339 bool IsConstant0(HConstant* constant); |
340 bool IsConstant1(HConstant* constant); | 340 bool IsConstant1(HConstant* constant); |
341 bool IsConstantMinus1(HConstant* constant); | 341 bool IsConstantMinus1(HConstant* constant); |
342 bool IsConstantTrue(HConstant* constant); | 342 bool IsConstantTrue(HConstant* constant); |
343 bool IsConstantFalse(HConstant* constant); | 343 bool IsConstantFalse(HConstant* constant); |
344 bool IsConstantHole(HConstant* constant); | 344 bool IsConstantHole(HConstant* constant); |
345 bool IsConstantNull(HConstant* constant); | 345 bool IsConstantNull(HConstant* constant); |
346 bool IsStandardConstant(HConstant* constant); | 346 bool IsStandardConstant(HConstant* constant); |
347 | 347 |
348 HBasicBlock* CreateBasicBlock(); | 348 HBasicBlock* CreateBasicBlock(); |
349 HArgumentsObject* GetArgumentsObject() const { | |
350 return arguments_object_.get(); | |
351 } | |
352 | |
353 void SetArgumentsObject(HArgumentsObject* object) { | |
354 arguments_object_.set(object); | |
355 } | |
356 | 349 |
357 int GetMaximumValueID() const { return values_.length(); } | 350 int GetMaximumValueID() const { return values_.length(); } |
358 int GetNextBlockID() { return next_block_id_++; } | 351 int GetNextBlockID() { return next_block_id_++; } |
359 int GetNextValueID(HValue* value) { | 352 int GetNextValueID(HValue* value) { |
360 DCHECK(!disallow_adding_new_values_); | 353 DCHECK(!disallow_adding_new_values_); |
361 values_.Add(value, zone()); | 354 values_.Add(value, zone()); |
362 return values_.length() - 1; | 355 return values_.length() - 1; |
363 } | 356 } |
364 HValue* LookupValue(int id) const { | 357 HValue* LookupValue(int id) const { |
365 if (id >= 0 && id < values_.length()) return values_[id]; | 358 if (id >= 0 && id < values_.length()) return values_[id]; |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 ZoneList<HInstruction*>* uint32_instructions_; | 468 ZoneList<HInstruction*>* uint32_instructions_; |
476 SetOncePointer<HConstant> constant_undefined_; | 469 SetOncePointer<HConstant> constant_undefined_; |
477 SetOncePointer<HConstant> constant_0_; | 470 SetOncePointer<HConstant> constant_0_; |
478 SetOncePointer<HConstant> constant_1_; | 471 SetOncePointer<HConstant> constant_1_; |
479 SetOncePointer<HConstant> constant_minus1_; | 472 SetOncePointer<HConstant> constant_minus1_; |
480 SetOncePointer<HConstant> constant_true_; | 473 SetOncePointer<HConstant> constant_true_; |
481 SetOncePointer<HConstant> constant_false_; | 474 SetOncePointer<HConstant> constant_false_; |
482 SetOncePointer<HConstant> constant_the_hole_; | 475 SetOncePointer<HConstant> constant_the_hole_; |
483 SetOncePointer<HConstant> constant_null_; | 476 SetOncePointer<HConstant> constant_null_; |
484 SetOncePointer<HConstant> constant_invalid_context_; | 477 SetOncePointer<HConstant> constant_invalid_context_; |
485 SetOncePointer<HArgumentsObject> arguments_object_; | |
486 | 478 |
487 HOsrBuilder* osr_; | 479 HOsrBuilder* osr_; |
488 | 480 |
489 CompilationInfo* info_; | 481 CompilationInfo* info_; |
490 CallInterfaceDescriptor descriptor_; | 482 CallInterfaceDescriptor descriptor_; |
491 Zone* zone_; | 483 Zone* zone_; |
492 | 484 |
493 bool is_recursive_; | 485 bool is_recursive_; |
494 bool use_optimistic_licm_; | 486 bool use_optimistic_licm_; |
495 bool depends_on_empty_array_proto_elements_; | 487 bool depends_on_empty_array_proto_elements_; |
(...skipping 2554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3050 | 3042 |
3051 private: | 3043 private: |
3052 HGraphBuilder* builder_; | 3044 HGraphBuilder* builder_; |
3053 }; | 3045 }; |
3054 | 3046 |
3055 | 3047 |
3056 } // namespace internal | 3048 } // namespace internal |
3057 } // namespace v8 | 3049 } // namespace v8 |
3058 | 3050 |
3059 #endif // V8_CRANKSHAFT_HYDROGEN_H_ | 3051 #endif // V8_CRANKSHAFT_HYDROGEN_H_ |
OLD | NEW |