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

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

Issue 2683633005: Add exception handler cache to isolate (Closed)
Patch Set: Address review commments Created 3 years, 10 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 RUNTIME_VM_RAW_OBJECT_H_ 5 #ifndef RUNTIME_VM_RAW_OBJECT_H_
6 #define RUNTIME_VM_RAW_OBJECT_H_ 6 #define RUNTIME_VM_RAW_OBJECT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/atomic.h" 9 #include "vm/atomic.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 // Variable info with [num_entries_] entries. 1396 // Variable info with [num_entries_] entries.
1397 VarInfo* data() { 1397 VarInfo* data() {
1398 return reinterpret_cast<VarInfo*>(nameAddrAt(ptr()->num_entries_)); 1398 return reinterpret_cast<VarInfo*>(nameAddrAt(ptr()->num_entries_));
1399 } 1399 }
1400 1400
1401 friend class Object; 1401 friend class Object;
1402 }; 1402 };
1403 1403
1404 1404
1405 class RawExceptionHandlers : public RawObject { 1405 class RawExceptionHandlers : public RawObject {
1406 public:
1407 // The index into the ExceptionHandlers table corresponds to
1408 // the try_index of the handler.
1409 struct HandlerInfo {
1410 uint32_t handler_pc_offset; // PC offset value of handler.
1411 int16_t outer_try_index; // Try block index of enclosing try block.
1412 int8_t needs_stacktrace; // True if a stacktrace is needed.
1413 int8_t has_catch_all; // Catches all exceptions.
1414 };
1415
1416 private: 1406 private:
1417 RAW_HEAP_OBJECT_IMPLEMENTATION(ExceptionHandlers); 1407 RAW_HEAP_OBJECT_IMPLEMENTATION(ExceptionHandlers);
1418 1408
1419 // Number of exception handler entries. 1409 // Number of exception handler entries.
1420 int32_t num_entries_; 1410 int32_t num_entries_;
1421 1411
1422 // Array with [num_entries_] entries. Each entry is an array of all handled 1412 // Array with [num_entries_] entries. Each entry is an array of all handled
1423 // exception types. 1413 // exception types.
1424 RawArray* handled_types_data_; 1414 RawArray* handled_types_data_;
1425 1415
(...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after
2438 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 2428 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
2439 kTypedDataInt8ArrayViewCid + 15); 2429 kTypedDataInt8ArrayViewCid + 15);
2440 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2430 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2441 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2431 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2442 return (kNullCid - kTypedDataInt8ArrayCid); 2432 return (kNullCid - kTypedDataInt8ArrayCid);
2443 } 2433 }
2444 2434
2445 } // namespace dart 2435 } // namespace dart
2446 2436
2447 #endif // RUNTIME_VM_RAW_OBJECT_H_ 2437 #endif // RUNTIME_VM_RAW_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698