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

Side by Side Diff: include/v8.h

Issue 11552033: This patch is the propagation version of https://codereview.chromium.org/10824032 patch (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years 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 | src/assembler.h » ('j') | src/assembler.h » ('J')
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 3003 matching lines...) Expand 10 before | Expand all | Expand 10 after
3014 * \param function the address of the function that's being entered. 3014 * \param function the address of the function that's being entered.
3015 * \param return_addr_location points to a location on stack where the machine 3015 * \param return_addr_location points to a location on stack where the machine
3016 * return address resides. This can be used to identify the caller of 3016 * return address resides. This can be used to identify the caller of
3017 * \p function, and/or modified to divert execution when \p function exits. 3017 * \p function, and/or modified to divert execution when \p function exits.
3018 * 3018 *
3019 * \note the entry hook must not cause garbage collection. 3019 * \note the entry hook must not cause garbage collection.
3020 */ 3020 */
3021 typedef void (*FunctionEntryHook)(uintptr_t function, 3021 typedef void (*FunctionEntryHook)(uintptr_t function,
3022 uintptr_t return_addr_location); 3022 uintptr_t return_addr_location);
3023 3023
3024
danno 2012/12/20 16:27:20 nit: Please don't remove whitespace not in accorda
3025 /** 3024 /**
3026 * A JIT code event is issued each time code is added, moved or removed. 3025 * A JIT code event is issued each time code is added, moved or removed.
3027 * 3026 *
3028 * \note removal events are not currently issued. 3027 * \note removal events are not currently issued.
3029 */ 3028 */
3030 struct JitCodeEvent { 3029 struct JitCodeEvent {
3031 enum EventType { 3030 enum EventType {
3032 CODE_ADDED, 3031 CODE_ADDED,
3033 CODE_MOVED, 3032 CODE_MOVED,
3034 CODE_REMOVED 3033 CODE_REMOVED,
3034 CODE_ADD_LINE_POS_INFO,
3035 CODE_START_LINE_INFO_RECORDING,
3036 CODE_END_LINE_INFO_RECORDING
3035 }; 3037 };
3036 3038
3037 // Type of event. 3039 // Type of event.
3038 EventType type; 3040 EventType type;
3039 // Start of the instructions. 3041 // Start of the instructions.
3040 void* code_start; 3042 void* code_start;
3041 // Size of the instructions. 3043 // Size of the instructions.
3042 size_t code_len; 3044 size_t code_len;
3045 // It can be Script info for CODE_ADDDED event or line_info_struct
danno 2012/12/20 16:27:20 How about removing the "It can be", and only two D
3046 // for CODE_ADD_LINE_POS_INFO and CODE_END_LINE_INFO_RECORDING event
3047 void* userdata;
danno 2012/12/20 16:27:20 user_data is probably better. Also, why not have t
3043 3048
3044 union { 3049 union {
3045 // Only valid for CODE_ADDED. 3050 // Only valid for CODE_ADDED.
3046 struct { 3051 struct {
3047 // Name of the object associated with the code, note that the string is 3052 // Name of the object associated with the code, note that the string is
3048 // not zero-terminated. 3053 // not zero-terminated.
3049 const char* str; 3054 const char* str;
3050 // Number of chars in str. 3055 // Number of chars in str.
3051 size_t len; 3056 size_t len;
3052 } name; 3057 } name;
3058
3059 // Only valid for CODE_ADD_LINE_INFO
danno 2012/12/20 16:27:20 CODE_ADD_LINE_POS_INFO
3060 struct {
3061 // PC offset
3062 unsigned offset;
danno 2012/12/20 16:27:20 Why use unsigned rather than a size_t? This seems
3063 // Code postion
3064 unsigned pos;
danno 2012/12/20 16:27:20 Same here
3065 // Whether this position is statement
danno 2012/12/20 16:27:20 How about you clarify what it is if it isn't a sta
3066 bool is_statement;
3067 } line_info;
3068
3053 // New location of instructions. Only valid for CODE_MOVED. 3069 // New location of instructions. Only valid for CODE_MOVED.
3054 void* new_code_start; 3070 void* new_code_start;
3055 }; 3071 };
3056 }; 3072 };
3057 3073
3058 /** 3074 /**
3059 * Option flags passed to the SetJitCodeEventHandler function. 3075 * Option flags passed to the SetJitCodeEventHandler function.
3060 */ 3076 */
3061 enum JitCodeEventOptions { 3077 enum JitCodeEventOptions {
3062 kJitCodeEventDefault = 0, 3078 kJitCodeEventDefault = 0,
(...skipping 1800 matching lines...) Expand 10 before | Expand all | Expand 10 after
4863 4879
4864 4880
4865 } // namespace v8 4881 } // namespace v8
4866 4882
4867 4883
4868 #undef V8EXPORT 4884 #undef V8EXPORT
4869 #undef TYPE_CHECK 4885 #undef TYPE_CHECK
4870 4886
4871 4887
4872 #endif // V8_H_ 4888 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/assembler.h » ('j') | src/assembler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698