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

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

Issue 208533004: When deoptimizing use the code stored in the deopt information instead of current unoptimized code … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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 | « no previous file | runtime/vm/deopt_instructions.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_DEOPT_INSTRUCTIONS_H_ 5 #ifndef VM_DEOPT_INSTRUCTIONS_H_
6 #define VM_DEOPT_INSTRUCTIONS_H_ 6 #define VM_DEOPT_INSTRUCTIONS_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/code_generator.h" 10 #include "vm/code_generator.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 virtual DeoptInstr::Kind kind() const = 0; 248 virtual DeoptInstr::Kind kind() const = 0;
249 249
250 bool Equals(const DeoptInstr& other) const { 250 bool Equals(const DeoptInstr& other) const {
251 return (kind() == other.kind()) && (source_index() == other.source_index()); 251 return (kind() == other.kind()) && (source_index() == other.source_index());
252 } 252 }
253 253
254 // Decode the payload of a suffix command. Return the suffix length and 254 // Decode the payload of a suffix command. Return the suffix length and
255 // set the output parameter info_number to the index of the shared suffix. 255 // set the output parameter info_number to the index of the shared suffix.
256 static intptr_t DecodeSuffix(intptr_t source_index, intptr_t* info_number); 256 static intptr_t DecodeSuffix(intptr_t source_index, intptr_t* info_number);
257 257
258 // Get the function and return address which is encoded in this 258 // Get the code and return address which is encoded in this
259 // kRetAfterAddress deopt instruction. 259 // kRetAfterAddress deopt instruction.
260 static uword GetRetAddress(DeoptInstr* instr, 260 static uword GetRetAddress(DeoptInstr* instr,
261 const Array& object_table, 261 const Array& object_table,
262 Function* func); 262 Code* code);
263 263
264 // Return number of initialized fields in the object that will be 264 // Return number of initialized fields in the object that will be
265 // materialized by kMaterializeObject instruction. 265 // materialized by kMaterializeObject instruction.
266 static intptr_t GetFieldCount(DeoptInstr* instr) { 266 static intptr_t GetFieldCount(DeoptInstr* instr) {
267 ASSERT(instr->kind() == DeoptInstr::kMaterializeObject); 267 ASSERT(instr->kind() == DeoptInstr::kMaterializeObject);
268 return instr->source_index(); 268 return instr->source_index();
269 } 269 }
270 270
271 protected: 271 protected:
272 friend class DeoptInfoBuilder; 272 friend class DeoptInfoBuilder;
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 DeoptInfo* info, 382 DeoptInfo* info,
383 Smi* reason); 383 Smi* reason);
384 384
385 private: 385 private:
386 static const intptr_t kEntrySize = 3; 386 static const intptr_t kEntrySize = 3;
387 }; 387 };
388 388
389 } // namespace dart 389 } // namespace dart
390 390
391 #endif // VM_DEOPT_INSTRUCTIONS_H_ 391 #endif // VM_DEOPT_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/deopt_instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698