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

Side by Side Diff: src/objects-inl.h

Issue 21062004: Revert 15940: "Compilation type and state allocate an unnecessary Smi on v8::Script." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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 | « src/objects.h ('k') | src/objects-printer.cc » ('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 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
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)
4485 ACCESSORS(Script, line_ends, Object, kLineEndsOffset) 4487 ACCESSORS(Script, line_ends, Object, kLineEndsOffset)
4486 ACCESSORS(Script, eval_from_shared, Object, kEvalFromSharedOffset) 4488 ACCESSORS(Script, eval_from_shared, Object, kEvalFromSharedOffset)
4487 ACCESSORS_TO_SMI(Script, eval_from_instructions_offset, 4489 ACCESSORS_TO_SMI(Script, eval_from_instructions_offset,
4488 kEvalFrominstructionsOffsetOffset) 4490 kEvalFrominstructionsOffsetOffset)
4489 ACCESSORS_TO_SMI(Script, flags, kFlagsOffset)
4490
4491 Script::CompilationType Script::compilation_type() {
4492 return BooleanBit::get(flags(), kCompilationTypeBit) ?
4493 COMPILATION_TYPE_EVAL : COMPILATION_TYPE_HOST;
4494 }
4495 void Script::set_compilation_type(CompilationType type) {
4496 set_flags(BooleanBit::set(flags(), kCompilationTypeBit,
4497 type == COMPILATION_TYPE_EVAL));
4498 }
4499 Script::CompilationState Script::compilation_state() {
4500 return BooleanBit::get(flags(), kCompilationStateBit) ?
4501 COMPILATION_STATE_COMPILED : COMPILATION_STATE_INITIAL;
4502 }
4503 void Script::set_compilation_state(CompilationState state) {
4504 set_flags(BooleanBit::set(flags(), kCompilationStateBit,
4505 state == COMPILATION_STATE_COMPILED));
4506 }
4507
4508 4491
4509 #ifdef ENABLE_DEBUGGER_SUPPORT 4492 #ifdef ENABLE_DEBUGGER_SUPPORT
4510 ACCESSORS(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoIndex) 4493 ACCESSORS(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoIndex)
4511 ACCESSORS(DebugInfo, original_code, Code, kOriginalCodeIndex) 4494 ACCESSORS(DebugInfo, original_code, Code, kOriginalCodeIndex)
4512 ACCESSORS(DebugInfo, code, Code, kPatchedCodeIndex) 4495 ACCESSORS(DebugInfo, code, Code, kPatchedCodeIndex)
4513 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex) 4496 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex)
4514 4497
4515 ACCESSORS_TO_SMI(BreakPointInfo, code_position, kCodePositionIndex) 4498 ACCESSORS_TO_SMI(BreakPointInfo, code_position, kCodePositionIndex)
4516 ACCESSORS_TO_SMI(BreakPointInfo, source_position, kSourcePositionIndex) 4499 ACCESSORS_TO_SMI(BreakPointInfo, source_position, kSourcePositionIndex)
4517 ACCESSORS_TO_SMI(BreakPointInfo, statement_position, kStatementPositionIndex) 4500 ACCESSORS_TO_SMI(BreakPointInfo, statement_position, kStatementPositionIndex)
(...skipping 1706 matching lines...) Expand 10 before | Expand all | Expand 10 after
6224 #undef WRITE_UINT32_FIELD 6207 #undef WRITE_UINT32_FIELD
6225 #undef READ_SHORT_FIELD 6208 #undef READ_SHORT_FIELD
6226 #undef WRITE_SHORT_FIELD 6209 #undef WRITE_SHORT_FIELD
6227 #undef READ_BYTE_FIELD 6210 #undef READ_BYTE_FIELD
6228 #undef WRITE_BYTE_FIELD 6211 #undef WRITE_BYTE_FIELD
6229 6212
6230 6213
6231 } } // namespace v8::internal 6214 } } // namespace v8::internal
6232 6215
6233 #endif // V8_OBJECTS_INL_H_ 6216 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698