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

Side by Side Diff: src/hydrogen.h

Issue 16782004: Reland "Enable map dependency to in-flight compilation info." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: The fix. Created 7 years, 6 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/compiler.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 395
396 void MarkRecursive() { 396 void MarkRecursive() {
397 is_recursive_ = true; 397 is_recursive_ = true;
398 } 398 }
399 399
400 bool is_recursive() const { 400 bool is_recursive() const {
401 return is_recursive_; 401 return is_recursive_;
402 } 402 }
403 403
404 void MarkDependsOnEmptyArrayProtoElements() { 404 void MarkDependsOnEmptyArrayProtoElements() {
405 // Add map dependency if not already added.
406 if (depends_on_empty_array_proto_elements_) return;
407 isolate()->initial_object_prototype()->map()->AddDependentCompilationInfo(
408 DependentCode::kElementsCantBeAddedGroup, info());
409 isolate()->initial_array_prototype()->map()->AddDependentCompilationInfo(
410 DependentCode::kElementsCantBeAddedGroup, info());
405 depends_on_empty_array_proto_elements_ = true; 411 depends_on_empty_array_proto_elements_ = true;
406 } 412 }
407 413
408 bool depends_on_empty_array_proto_elements() {
409 return depends_on_empty_array_proto_elements_;
410 }
411
412 void RecordUint32Instruction(HInstruction* instr) { 414 void RecordUint32Instruction(HInstruction* instr) {
413 if (uint32_instructions_ == NULL) { 415 if (uint32_instructions_ == NULL) {
414 uint32_instructions_ = new(zone()) ZoneList<HInstruction*>(4, zone()); 416 uint32_instructions_ = new(zone()) ZoneList<HInstruction*>(4, zone());
415 } 417 }
416 uint32_instructions_->Add(instr, zone()); 418 uint32_instructions_->Add(instr, zone());
417 } 419 }
418 420
419 private: 421 private:
420 HConstant* GetConstant(SetOncePointer<HConstant>* pointer, 422 HConstant* GetConstant(SetOncePointer<HConstant>* pointer,
421 int32_t integer_value); 423 int32_t integer_value);
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 virtual ~HGraphBuilder() {} 963 virtual ~HGraphBuilder() {}
962 964
963 HBasicBlock* current_block() const { return current_block_; } 965 HBasicBlock* current_block() const { return current_block_; }
964 void set_current_block(HBasicBlock* block) { current_block_ = block; } 966 void set_current_block(HBasicBlock* block) { current_block_ = block; }
965 HEnvironment* environment() const { 967 HEnvironment* environment() const {
966 return current_block()->last_environment(); 968 return current_block()->last_environment();
967 } 969 }
968 Zone* zone() const { return info_->zone(); } 970 Zone* zone() const { return info_->zone(); }
969 HGraph* graph() const { return graph_; } 971 HGraph* graph() const { return graph_; }
970 Isolate* isolate() const { return graph_->isolate(); } 972 Isolate* isolate() const { return graph_->isolate(); }
973 CompilationInfo* top_info() { return info_; }
971 974
972 HGraph* CreateGraph(); 975 HGraph* CreateGraph();
973 976
974 // Bailout environment manipulation. 977 // Bailout environment manipulation.
975 void Push(HValue* value) { environment()->Push(value); } 978 void Push(HValue* value) { environment()->Push(value); }
976 HValue* Pop() { return environment()->Pop(); } 979 HValue* Pop() { return environment()->Pop(); }
977 980
978 // Adding instructions. 981 // Adding instructions.
979 HInstruction* AddInstruction(HInstruction* instr); 982 HInstruction* AddInstruction(HInstruction* instr);
980 void AddSimulate(BailoutId id, 983 void AddSimulate(BailoutId id,
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
1481 static const int kMaxFastLiteralDepth = 3; 1484 static const int kMaxFastLiteralDepth = 3;
1482 static const int kMaxFastLiteralProperties = 8; 1485 static const int kMaxFastLiteralProperties = 8;
1483 1486
1484 // Simple accessors. 1487 // Simple accessors.
1485 void set_function_state(FunctionState* state) { function_state_ = state; } 1488 void set_function_state(FunctionState* state) { function_state_ = state; }
1486 1489
1487 AstContext* ast_context() const { return ast_context_; } 1490 AstContext* ast_context() const { return ast_context_; }
1488 void set_ast_context(AstContext* context) { ast_context_ = context; } 1491 void set_ast_context(AstContext* context) { ast_context_ = context; }
1489 1492
1490 // Accessors forwarded to the function state. 1493 // Accessors forwarded to the function state.
1491 CompilationInfo* info() const { 1494 CompilationInfo* current_info() const {
1492 return function_state()->compilation_info(); 1495 return function_state()->compilation_info();
1493 } 1496 }
1494 AstContext* call_context() const { 1497 AstContext* call_context() const {
1495 return function_state()->call_context(); 1498 return function_state()->call_context();
1496 } 1499 }
1497 HBasicBlock* function_return() const { 1500 HBasicBlock* function_return() const {
1498 return function_state()->function_return(); 1501 return function_state()->function_return();
1499 } 1502 }
1500 TestContext* inlined_test_context() const { 1503 TestContext* inlined_test_context() const {
1501 return function_state()->test_context(); 1504 return function_state()->test_context();
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
2020 EmbeddedVector<char, 64> filename_; 2023 EmbeddedVector<char, 64> filename_;
2021 HeapStringAllocator string_allocator_; 2024 HeapStringAllocator string_allocator_;
2022 StringStream trace_; 2025 StringStream trace_;
2023 int indent_; 2026 int indent_;
2024 }; 2027 };
2025 2028
2026 2029
2027 } } // namespace v8::internal 2030 } } // namespace v8::internal
2028 2031
2029 #endif // V8_HYDROGEN_H_ 2032 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698