| OLD | NEW |
| 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 6065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6076 // Script describes a script which has been added to the VM. | 6076 // Script describes a script which has been added to the VM. |
| 6077 class Script: public Struct { | 6077 class Script: public Struct { |
| 6078 public: | 6078 public: |
| 6079 // Script types. | 6079 // Script types. |
| 6080 enum Type { | 6080 enum Type { |
| 6081 TYPE_NATIVE = 0, | 6081 TYPE_NATIVE = 0, |
| 6082 TYPE_EXTENSION = 1, | 6082 TYPE_EXTENSION = 1, |
| 6083 TYPE_NORMAL = 2 | 6083 TYPE_NORMAL = 2 |
| 6084 }; | 6084 }; |
| 6085 | 6085 |
| 6086 // Script compilation types. | |
| 6087 enum CompilationType { | |
| 6088 COMPILATION_TYPE_HOST = 0, | |
| 6089 COMPILATION_TYPE_EVAL = 1 | |
| 6090 }; | |
| 6091 | |
| 6092 // Script compilation state. | 6086 // Script compilation state. |
| 6093 enum CompilationState { | 6087 enum CompilationState { |
| 6094 COMPILATION_STATE_INITIAL = 0, | 6088 COMPILATION_STATE_INITIAL = 0, |
| 6095 COMPILATION_STATE_COMPILED = 1 | 6089 COMPILATION_STATE_COMPILED = 1 |
| 6096 }; | 6090 }; |
| 6097 | 6091 |
| 6098 // [source]: the script source. | 6092 // [source]: the script source. |
| 6099 DECL_ACCESSORS(source, Object) | 6093 DECL_ACCESSORS(source, Object) |
| 6100 | 6094 |
| 6101 // [name]: the script name. | 6095 // [name]: the script name. |
| (...skipping 30 matching lines...) Expand all Loading... |
| 6132 | 6126 |
| 6133 // [eval_from_instructions_offset]: the instruction offset in the code for the | 6127 // [eval_from_instructions_offset]: the instruction offset in the code for the |
| 6134 // function from which eval was called where eval was called. | 6128 // function from which eval was called where eval was called. |
| 6135 DECL_ACCESSORS(eval_from_instructions_offset, Smi) | 6129 DECL_ACCESSORS(eval_from_instructions_offset, Smi) |
| 6136 | 6130 |
| 6137 // [flags]: Holds an exciting bitfield. | 6131 // [flags]: Holds an exciting bitfield. |
| 6138 DECL_ACCESSORS(flags, Smi) | 6132 DECL_ACCESSORS(flags, Smi) |
| 6139 | 6133 |
| 6140 // [compilation_type]: how the the script was compiled. Encoded in the | 6134 // [compilation_type]: how the the script was compiled. Encoded in the |
| 6141 // 'flags' field. | 6135 // 'flags' field. |
| 6142 inline CompilationType compilation_type(); | 6136 inline v8::Script::CompilationType compilation_type(); |
| 6143 inline void set_compilation_type(CompilationType type); | 6137 inline void set_compilation_type(v8::Script::CompilationType type); |
| 6144 | 6138 |
| 6145 // [compilation_state]: determines whether the script has already been | 6139 // [compilation_state]: determines whether the script has already been |
| 6146 // compiled. Encoded in the 'flags' field. | 6140 // compiled. Encoded in the 'flags' field. |
| 6147 inline CompilationState compilation_state(); | 6141 inline CompilationState compilation_state(); |
| 6148 inline void set_compilation_state(CompilationState state); | 6142 inline void set_compilation_state(CompilationState state); |
| 6149 | 6143 |
| 6150 // [is_shared_cross_origin]: An opaque boolean set by the embedder via | 6144 // [is_shared_cross_origin]: An opaque boolean set by the embedder via |
| 6151 // ScriptOrigin, and used by the embedder to make decisions about the | 6145 // ScriptOrigin, and used by the embedder to make decisions about the |
| 6152 // script's level of privilege. V8 just passes this through. Encoded in | 6146 // script's level of privilege. V8 just passes this through. Encoded in |
| 6153 // the 'flags' field. | 6147 // the 'flags' field. |
| (...skipping 4017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10171 } else { | 10165 } else { |
| 10172 value &= ~(1 << bit_position); | 10166 value &= ~(1 << bit_position); |
| 10173 } | 10167 } |
| 10174 return value; | 10168 return value; |
| 10175 } | 10169 } |
| 10176 }; | 10170 }; |
| 10177 | 10171 |
| 10178 } } // namespace v8::internal | 10172 } } // namespace v8::internal |
| 10179 | 10173 |
| 10180 #endif // V8_OBJECTS_H_ | 10174 #endif // V8_OBJECTS_H_ |
| OLD | NEW |