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

Side by Side Diff: runtime/vm/intermediate_language.h

Issue 125943002: Use constants from the frame at OSR entry. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 11 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 | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/intermediate_language.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define VM_INTERMEDIATE_LANGUAGE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 1409
1410 intptr_t entry_count() const { return entry_count_; } 1410 intptr_t entry_count() const { return entry_count_; }
1411 void set_entry_count(intptr_t count) { entry_count_ = count; } 1411 void set_entry_count(intptr_t count) { entry_count_ = count; }
1412 1412
1413 intptr_t spill_slot_count() const { return spill_slot_count_; } 1413 intptr_t spill_slot_count() const { return spill_slot_count_; }
1414 void set_spill_slot_count(intptr_t count) { 1414 void set_spill_slot_count(intptr_t count) {
1415 ASSERT(count >= 0); 1415 ASSERT(count >= 0);
1416 spill_slot_count_ = count; 1416 spill_slot_count_ = count;
1417 } 1417 }
1418 1418
1419 // Number of stack slots reserved for compiling try-catch. For functions
1420 // without try-catch, this is 0. Otherwise, it is the number of local
1421 // variables.
1422 intptr_t fixed_slot_count() const { return fixed_slot_count_; }
1423 void set_fixed_slot_count(intptr_t count) {
1424 ASSERT(count >= 0);
1425 fixed_slot_count_ = count;
1426 }
1427 TargetEntryInstr* normal_entry() const { return normal_entry_; } 1419 TargetEntryInstr* normal_entry() const { return normal_entry_; }
1428 1420
1429 const ParsedFunction& parsed_function() const { 1421 const ParsedFunction& parsed_function() const {
1430 return *parsed_function_; 1422 return *parsed_function_;
1431 } 1423 }
1432 1424
1433 const GrowableArray<CatchBlockEntryInstr*>& catch_entries() const { 1425 const GrowableArray<CatchBlockEntryInstr*>& catch_entries() const {
1434 return catch_entries_; 1426 return catch_entries_;
1435 } 1427 }
1436 1428
1437 virtual void PrintTo(BufferFormatter* f) const; 1429 virtual void PrintTo(BufferFormatter* f) const;
1438 1430
1439 private: 1431 private:
1440 virtual void ClearPredecessors() {} 1432 virtual void ClearPredecessors() {}
1441 virtual void AddPredecessor(BlockEntryInstr* predecessor) { UNREACHABLE(); } 1433 virtual void AddPredecessor(BlockEntryInstr* predecessor) { UNREACHABLE(); }
1442 1434
1443 const ParsedFunction* parsed_function_; 1435 const ParsedFunction* parsed_function_;
1444 TargetEntryInstr* normal_entry_; 1436 TargetEntryInstr* normal_entry_;
1445 GrowableArray<CatchBlockEntryInstr*> catch_entries_; 1437 GrowableArray<CatchBlockEntryInstr*> catch_entries_;
1446 GrowableArray<Definition*> initial_definitions_; 1438 GrowableArray<Definition*> initial_definitions_;
1447 const intptr_t osr_id_; 1439 const intptr_t osr_id_;
1448 intptr_t entry_count_; 1440 intptr_t entry_count_;
1449 intptr_t spill_slot_count_; 1441 intptr_t spill_slot_count_;
1450 intptr_t fixed_slot_count_; // For try-catch in optimized code.
1451 1442
1452 DISALLOW_COPY_AND_ASSIGN(GraphEntryInstr); 1443 DISALLOW_COPY_AND_ASSIGN(GraphEntryInstr);
1453 }; 1444 };
1454 1445
1455 1446
1456 class JoinEntryInstr : public BlockEntryInstr { 1447 class JoinEntryInstr : public BlockEntryInstr {
1457 public: 1448 public:
1458 JoinEntryInstr(intptr_t block_id, intptr_t try_index) 1449 JoinEntryInstr(intptr_t block_id, intptr_t try_index)
1459 : BlockEntryInstr(block_id, try_index), 1450 : BlockEntryInstr(block_id, try_index),
1460 predecessors_(2), // Two is the assumed to be the common case. 1451 predecessors_(2), // Two is the assumed to be the common case.
(...skipping 5655 matching lines...) Expand 10 before | Expand all | Expand 10 after
7116 ForwardInstructionIterator* current_iterator_; 7107 ForwardInstructionIterator* current_iterator_;
7117 7108
7118 private: 7109 private:
7119 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 7110 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
7120 }; 7111 };
7121 7112
7122 7113
7123 } // namespace dart 7114 } // namespace dart
7124 7115
7125 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 7116 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698