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 4464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4475 | 4475 |
4476 ACCESSORS(Script, source, Object, kSourceOffset) | 4476 ACCESSORS(Script, source, Object, kSourceOffset) |
4477 ACCESSORS(Script, name, Object, kNameOffset) | 4477 ACCESSORS(Script, name, Object, kNameOffset) |
4478 ACCESSORS(Script, id, Smi, kIdOffset) | 4478 ACCESSORS(Script, id, Smi, kIdOffset) |
4479 ACCESSORS_TO_SMI(Script, line_offset, kLineOffsetOffset) | 4479 ACCESSORS_TO_SMI(Script, line_offset, kLineOffsetOffset) |
4480 ACCESSORS_TO_SMI(Script, column_offset, kColumnOffsetOffset) | 4480 ACCESSORS_TO_SMI(Script, column_offset, kColumnOffsetOffset) |
4481 ACCESSORS(Script, data, Object, kDataOffset) | 4481 ACCESSORS(Script, data, Object, kDataOffset) |
4482 ACCESSORS(Script, context_data, Object, kContextOffset) | 4482 ACCESSORS(Script, context_data, Object, kContextOffset) |
4483 ACCESSORS(Script, wrapper, Foreign, kWrapperOffset) | 4483 ACCESSORS(Script, wrapper, Foreign, kWrapperOffset) |
4484 ACCESSORS_TO_SMI(Script, type, kTypeOffset) | 4484 ACCESSORS_TO_SMI(Script, type, kTypeOffset) |
4485 ACCESSORS_TO_SMI(Script, compilation_type, kCompilationTypeOffset) | |
4486 ACCESSORS_TO_SMI(Script, compilation_state, kCompilationStateOffset) | |
4487 ACCESSORS(Script, line_ends, Object, kLineEndsOffset) | 4485 ACCESSORS(Script, line_ends, Object, kLineEndsOffset) |
4488 ACCESSORS(Script, eval_from_shared, Object, kEvalFromSharedOffset) | 4486 ACCESSORS(Script, eval_from_shared, Object, kEvalFromSharedOffset) |
4489 ACCESSORS_TO_SMI(Script, eval_from_instructions_offset, | 4487 ACCESSORS_TO_SMI(Script, eval_from_instructions_offset, |
4490 kEvalFrominstructionsOffsetOffset) | 4488 kEvalFrominstructionsOffsetOffset) |
4489 ACCESSORS_TO_SMI(Script, flags, kFlagsOffset); | |
4490 Script::CompilationType Script::compilation_type() { | |
Michael Starzinger
2013/07/29 14:43:58
nit: Indentation is off, this should be at the top
Mike West
2013/07/29 14:52:12
Sure.
| |
4491 return BooleanBit::get(flags(), kCompilationTypeBit) ? | |
4492 COMPILATION_TYPE_EVAL : COMPILATION_TYPE_HOST; | |
4493 } | |
4494 void Script::set_compilation_type(CompilationType type) { | |
4495 set_flags(BooleanBit::set(flags(), kCompilationTypeBit, | |
4496 type == COMPILATION_TYPE_EVAL)); | |
4497 } | |
4498 Script::CompilationState Script::compilation_state() { | |
4499 return BooleanBit::get(flags(), kCompilationStateBit) ? | |
4500 COMPILATION_STATE_COMPILED : COMPILATION_STATE_INITIAL; | |
4501 } | |
4502 void Script::set_compilation_state(CompilationState state) { | |
4503 set_flags(BooleanBit::set(flags(), kCompilationStateBit, | |
4504 state == COMPILATION_STATE_COMPILED)); | |
4505 } | |
4506 | |
4491 | 4507 |
4492 #ifdef ENABLE_DEBUGGER_SUPPORT | 4508 #ifdef ENABLE_DEBUGGER_SUPPORT |
4493 ACCESSORS(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoIndex) | 4509 ACCESSORS(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoIndex) |
4494 ACCESSORS(DebugInfo, original_code, Code, kOriginalCodeIndex) | 4510 ACCESSORS(DebugInfo, original_code, Code, kOriginalCodeIndex) |
4495 ACCESSORS(DebugInfo, code, Code, kPatchedCodeIndex) | 4511 ACCESSORS(DebugInfo, code, Code, kPatchedCodeIndex) |
4496 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex) | 4512 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex) |
4497 | 4513 |
4498 ACCESSORS_TO_SMI(BreakPointInfo, code_position, kCodePositionIndex) | 4514 ACCESSORS_TO_SMI(BreakPointInfo, code_position, kCodePositionIndex) |
4499 ACCESSORS_TO_SMI(BreakPointInfo, source_position, kSourcePositionIndex) | 4515 ACCESSORS_TO_SMI(BreakPointInfo, source_position, kSourcePositionIndex) |
4500 ACCESSORS_TO_SMI(BreakPointInfo, statement_position, kStatementPositionIndex) | 4516 ACCESSORS_TO_SMI(BreakPointInfo, statement_position, kStatementPositionIndex) |
(...skipping 1706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6207 #undef WRITE_UINT32_FIELD | 6223 #undef WRITE_UINT32_FIELD |
6208 #undef READ_SHORT_FIELD | 6224 #undef READ_SHORT_FIELD |
6209 #undef WRITE_SHORT_FIELD | 6225 #undef WRITE_SHORT_FIELD |
6210 #undef READ_BYTE_FIELD | 6226 #undef READ_BYTE_FIELD |
6211 #undef WRITE_BYTE_FIELD | 6227 #undef WRITE_BYTE_FIELD |
6212 | 6228 |
6213 | 6229 |
6214 } } // namespace v8::internal | 6230 } } // namespace v8::internal |
6215 | 6231 |
6216 #endif // V8_OBJECTS_INL_H_ | 6232 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |