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

Side by Side Diff: src/hydrogen.cc

Issue 66693002: Do not add values to HGraph in Lithium. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 701
702 DEFINE_GET_CONSTANT(Undefined, undefined, HType::Tagged(), false) 702 DEFINE_GET_CONSTANT(Undefined, undefined, HType::Tagged(), false)
703 DEFINE_GET_CONSTANT(True, true, HType::Boolean(), true) 703 DEFINE_GET_CONSTANT(True, true, HType::Boolean(), true)
704 DEFINE_GET_CONSTANT(False, false, HType::Boolean(), false) 704 DEFINE_GET_CONSTANT(False, false, HType::Boolean(), false)
705 DEFINE_GET_CONSTANT(Hole, the_hole, HType::Tagged(), false) 705 DEFINE_GET_CONSTANT(Hole, the_hole, HType::Tagged(), false)
706 DEFINE_GET_CONSTANT(Null, null, HType::Tagged(), false) 706 DEFINE_GET_CONSTANT(Null, null, HType::Tagged(), false)
707 707
708 708
709 #undef DEFINE_GET_CONSTANT 709 #undef DEFINE_GET_CONSTANT
710 710
711 #define DEFINE_IS_CONSTANT(Name, name) \
712 bool HGraph::IsConstant##Name(HConstant* constant) { \
713 return constant_##name##_.is_set() && constant == constant_##name##_.get(); \
714 }
715 DEFINE_IS_CONSTANT(Undefined, undefined)
716 DEFINE_IS_CONSTANT(0, 0)
717 DEFINE_IS_CONSTANT(1, 1)
718 DEFINE_IS_CONSTANT(Minus1, minus1)
719 DEFINE_IS_CONSTANT(True, true)
720 DEFINE_IS_CONSTANT(False, false)
721 DEFINE_IS_CONSTANT(Hole, the_hole)
722 DEFINE_IS_CONSTANT(Null, null)
723
724 #undef DEFINE_IS_CONSTANT
725
711 726
712 HConstant* HGraph::GetInvalidContext() { 727 HConstant* HGraph::GetInvalidContext() {
713 return GetConstant(&constant_invalid_context_, 0xFFFFC0C7); 728 return GetConstant(&constant_invalid_context_, 0xFFFFC0C7);
714 } 729 }
715 730
716 731
717 bool HGraph::IsStandardConstant(HConstant* constant) { 732 bool HGraph::IsStandardConstant(HConstant* constant) {
718 if (constant == GetConstantUndefined()) return true; 733 if (IsConstantUndefined(constant)) return true;
719 if (constant == GetConstant0()) return true; 734 if (IsConstant0(constant)) return true;
720 if (constant == GetConstant1()) return true; 735 if (IsConstant1(constant)) return true;
721 if (constant == GetConstantMinus1()) return true; 736 if (IsConstantMinus1(constant)) return true;
722 if (constant == GetConstantTrue()) return true; 737 if (IsConstantTrue(constant)) return true;
723 if (constant == GetConstantFalse()) return true; 738 if (IsConstantFalse(constant)) return true;
724 if (constant == GetConstantHole()) return true; 739 if (IsConstantHole(constant)) return true;
725 if (constant == GetConstantNull()) return true; 740 if (IsConstantNull(constant)) return true;
726 return false; 741 return false;
727 } 742 }
728 743
729 744
730 HGraphBuilder::IfBuilder::IfBuilder(HGraphBuilder* builder) 745 HGraphBuilder::IfBuilder::IfBuilder(HGraphBuilder* builder)
731 : builder_(builder), 746 : builder_(builder),
732 finished_(false), 747 finished_(false),
733 deopt_then_(false), 748 deopt_then_(false),
734 deopt_else_(false), 749 deopt_else_(false),
735 did_then_(false), 750 did_then_(false),
(...skipping 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after
2274 phi_list_(NULL), 2289 phi_list_(NULL),
2275 uint32_instructions_(NULL), 2290 uint32_instructions_(NULL),
2276 osr_(NULL), 2291 osr_(NULL),
2277 info_(info), 2292 info_(info),
2278 zone_(info->zone()), 2293 zone_(info->zone()),
2279 is_recursive_(false), 2294 is_recursive_(false),
2280 use_optimistic_licm_(false), 2295 use_optimistic_licm_(false),
2281 depends_on_empty_array_proto_elements_(false), 2296 depends_on_empty_array_proto_elements_(false),
2282 type_change_checksum_(0), 2297 type_change_checksum_(0),
2283 maximum_environment_size_(0), 2298 maximum_environment_size_(0),
2284 no_side_effects_scope_count_(0) { 2299 no_side_effects_scope_count_(0),
2300 disallow_adding_new_values_(false) {
2285 if (info->IsStub()) { 2301 if (info->IsStub()) {
2286 HydrogenCodeStub* stub = info->code_stub(); 2302 HydrogenCodeStub* stub = info->code_stub();
2287 CodeStubInterfaceDescriptor* descriptor = 2303 CodeStubInterfaceDescriptor* descriptor =
2288 stub->GetInterfaceDescriptor(isolate_); 2304 stub->GetInterfaceDescriptor(isolate_);
2289 start_environment_ = 2305 start_environment_ =
2290 new(zone_) HEnvironment(zone_, descriptor->environment_length()); 2306 new(zone_) HEnvironment(zone_, descriptor->environment_length());
2291 } else { 2307 } else {
2292 start_environment_ = 2308 start_environment_ =
2293 new(zone_) HEnvironment(NULL, info->scope(), info->closure(), zone_); 2309 new(zone_) HEnvironment(NULL, info->scope(), info->closure(), zone_);
2294 } 2310 }
(...skipping 7561 matching lines...) Expand 10 before | Expand all | Expand 10 after
9856 if (ShouldProduceTraceOutput()) { 9872 if (ShouldProduceTraceOutput()) {
9857 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 9873 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
9858 } 9874 }
9859 9875
9860 #ifdef DEBUG 9876 #ifdef DEBUG
9861 graph_->Verify(false); // No full verify. 9877 graph_->Verify(false); // No full verify.
9862 #endif 9878 #endif
9863 } 9879 }
9864 9880
9865 } } // namespace v8::internal 9881 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen.h ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | src/lithium.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698