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

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

Issue 12457034: Ensure that all goto instructions have deoptimization target. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Delete UNREACHABLE Created 7 years, 8 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/intermediate_language_x64.cc ('k') | runtime/vm/object.h » ('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_ISOLATE_H_ 5 #ifndef VM_ISOLATE_H_
6 #define VM_ISOLATE_H_ 6 #define VM_ISOLATE_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/thread.h" 10 #include "platform/thread.h"
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 void ScheduleInterrupts(uword interrupt_bits); 272 void ScheduleInterrupts(uword interrupt_bits);
273 uword GetAndClearInterrupts(); 273 uword GetAndClearInterrupts();
274 274
275 MessageHandler* message_handler() const { return message_handler_; } 275 MessageHandler* message_handler() const { return message_handler_; }
276 void set_message_handler(MessageHandler* value) { message_handler_ = value; } 276 void set_message_handler(MessageHandler* value) { message_handler_ = value; }
277 277
278 uword spawn_data() const { return spawn_data_; } 278 uword spawn_data() const { return spawn_data_; }
279 void set_spawn_data(uword value) { spawn_data_ = value; } 279 void set_spawn_data(uword value) { spawn_data_ = value; }
280 280
281 static const intptr_t kNoDeoptId = -1; 281 static const intptr_t kNoDeoptId = -1;
282 static const intptr_t kDeoptIdStep = 2;
283 static const intptr_t kDeoptIdBeforeOffset = 0;
284 static const intptr_t kDeoptIdAfterOffset = 1;
282 intptr_t deopt_id() const { return deopt_id_; } 285 intptr_t deopt_id() const { return deopt_id_; }
283 void set_deopt_id(int value) { 286 void set_deopt_id(int value) {
284 ASSERT(value >= 0); 287 ASSERT(value >= 0);
285 deopt_id_ = value; 288 deopt_id_ = value;
286 } 289 }
287 intptr_t GetNextDeoptId() { 290 intptr_t GetNextDeoptId() {
288 ASSERT(deopt_id_ != kNoDeoptId); 291 ASSERT(deopt_id_ != kNoDeoptId);
289 return deopt_id_++; 292 const intptr_t id = deopt_id_;
293 deopt_id_ += kDeoptIdStep;
294 return id;
295 }
296
297 static intptr_t ToDeoptAfter(intptr_t deopt_id) {
298 ASSERT(IsDeoptBefore(deopt_id));
299 return deopt_id + kDeoptIdAfterOffset;
300 }
301
302 static bool IsDeoptBefore(intptr_t deopt_id) {
303 return (deopt_id % kDeoptIdStep) == kDeoptIdBeforeOffset;
304 }
305
306 static bool IsDeoptAfter(intptr_t deopt_id) {
307 return (deopt_id % kDeoptIdStep) == kDeoptIdAfterOffset;
290 } 308 }
291 309
292 RawArray* ic_data_array() const { return ic_data_array_; } 310 RawArray* ic_data_array() const { return ic_data_array_; }
293 void set_ic_data_array(RawArray* value) { ic_data_array_ = value; } 311 void set_ic_data_array(RawArray* value) { ic_data_array_ = value; }
294 ICData* GetICDataForDeoptId(intptr_t deopt_id) const; 312 ICData* GetICDataForDeoptId(intptr_t deopt_id) const;
295 313
296 Debugger* debugger() const { return debugger_; } 314 Debugger* debugger() const { return debugger_; }
297 315
298 Simulator* simulator() const { return simulator_; } 316 Simulator* simulator() const { return simulator_; }
299 void set_simulator(Simulator* value) { simulator_ = value; } 317 void set_simulator(Simulator* value) { simulator_ = value; }
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 Isolate* new_isolate_; 546 Isolate* new_isolate_;
529 Isolate* saved_isolate_; 547 Isolate* saved_isolate_;
530 uword saved_stack_limit_; 548 uword saved_stack_limit_;
531 549
532 DISALLOW_COPY_AND_ASSIGN(SwitchIsolateScope); 550 DISALLOW_COPY_AND_ASSIGN(SwitchIsolateScope);
533 }; 551 };
534 552
535 } // namespace dart 553 } // namespace dart
536 554
537 #endif // VM_ISOLATE_H_ 555 #endif // VM_ISOLATE_H_
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698