OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 2350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2361 ACCESSORS(DebugInfo, original_code, Code, kOriginalCodeIndex) | 2361 ACCESSORS(DebugInfo, original_code, Code, kOriginalCodeIndex) |
2362 ACCESSORS(DebugInfo, code, Code, kPatchedCodeIndex) | 2362 ACCESSORS(DebugInfo, code, Code, kPatchedCodeIndex) |
2363 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex) | 2363 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex) |
2364 | 2364 |
2365 ACCESSORS(BreakPointInfo, code_position, Smi, kCodePositionIndex) | 2365 ACCESSORS(BreakPointInfo, code_position, Smi, kCodePositionIndex) |
2366 ACCESSORS(BreakPointInfo, source_position, Smi, kSourcePositionIndex) | 2366 ACCESSORS(BreakPointInfo, source_position, Smi, kSourcePositionIndex) |
2367 ACCESSORS(BreakPointInfo, statement_position, Smi, kStatementPositionIndex) | 2367 ACCESSORS(BreakPointInfo, statement_position, Smi, kStatementPositionIndex) |
2368 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex) | 2368 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex) |
2369 #endif | 2369 #endif |
2370 | 2370 |
| 2371 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) |
2371 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) | 2372 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) |
2372 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) | |
2373 ACCESSORS(SharedFunctionInfo, instance_class_name, Object, | 2373 ACCESSORS(SharedFunctionInfo, instance_class_name, Object, |
2374 kInstanceClassNameOffset) | 2374 kInstanceClassNameOffset) |
2375 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset) | 2375 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset) |
2376 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) | 2376 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) |
2377 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset) | 2377 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset) |
2378 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset) | 2378 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset) |
2379 ACCESSORS(SharedFunctionInfo, this_property_assignments, Object, | 2379 ACCESSORS(SharedFunctionInfo, this_property_assignments, Object, |
2380 kThisPropertyAssignmentsOffset) | 2380 kThisPropertyAssignmentsOffset) |
2381 | 2381 |
2382 BOOL_ACCESSORS(FunctionTemplateInfo, flag, hidden_prototype, | 2382 BOOL_ACCESSORS(FunctionTemplateInfo, flag, hidden_prototype, |
(...skipping 11 matching lines...) Expand all Loading... |
2394 BOOL_ACCESSORS(SharedFunctionInfo, | 2394 BOOL_ACCESSORS(SharedFunctionInfo, |
2395 compiler_hints, | 2395 compiler_hints, |
2396 try_full_codegen, | 2396 try_full_codegen, |
2397 kTryFullCodegen) | 2397 kTryFullCodegen) |
2398 | 2398 |
2399 INT_ACCESSORS(SharedFunctionInfo, length, kLengthOffset) | 2399 INT_ACCESSORS(SharedFunctionInfo, length, kLengthOffset) |
2400 INT_ACCESSORS(SharedFunctionInfo, formal_parameter_count, | 2400 INT_ACCESSORS(SharedFunctionInfo, formal_parameter_count, |
2401 kFormalParameterCountOffset) | 2401 kFormalParameterCountOffset) |
2402 INT_ACCESSORS(SharedFunctionInfo, expected_nof_properties, | 2402 INT_ACCESSORS(SharedFunctionInfo, expected_nof_properties, |
2403 kExpectedNofPropertiesOffset) | 2403 kExpectedNofPropertiesOffset) |
| 2404 INT_ACCESSORS(SharedFunctionInfo, num_literals, kNumLiteralsOffset) |
2404 INT_ACCESSORS(SharedFunctionInfo, start_position_and_type, | 2405 INT_ACCESSORS(SharedFunctionInfo, start_position_and_type, |
2405 kStartPositionAndTypeOffset) | 2406 kStartPositionAndTypeOffset) |
2406 INT_ACCESSORS(SharedFunctionInfo, end_position, kEndPositionOffset) | 2407 INT_ACCESSORS(SharedFunctionInfo, end_position, kEndPositionOffset) |
2407 INT_ACCESSORS(SharedFunctionInfo, function_token_position, | 2408 INT_ACCESSORS(SharedFunctionInfo, function_token_position, |
2408 kFunctionTokenPositionOffset) | 2409 kFunctionTokenPositionOffset) |
2409 INT_ACCESSORS(SharedFunctionInfo, compiler_hints, | 2410 INT_ACCESSORS(SharedFunctionInfo, compiler_hints, |
2410 kCompilerHintsOffset) | 2411 kCompilerHintsOffset) |
2411 INT_ACCESSORS(SharedFunctionInfo, this_property_assignments_count, | 2412 INT_ACCESSORS(SharedFunctionInfo, this_property_assignments_count, |
2412 kThisPropertyAssignmentsCountOffset) | 2413 kThisPropertyAssignmentsCountOffset) |
2413 | 2414 |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2566 return instance_prototype(); | 2567 return instance_prototype(); |
2567 } | 2568 } |
2568 | 2569 |
2569 | 2570 |
2570 bool JSFunction::is_compiled() { | 2571 bool JSFunction::is_compiled() { |
2571 return shared()->is_compiled(); | 2572 return shared()->is_compiled(); |
2572 } | 2573 } |
2573 | 2574 |
2574 | 2575 |
2575 int JSFunction::NumberOfLiterals() { | 2576 int JSFunction::NumberOfLiterals() { |
| 2577 ASSERT(!IsBoilerplate()); |
2576 return literals()->length(); | 2578 return literals()->length(); |
2577 } | 2579 } |
2578 | 2580 |
2579 | 2581 |
2580 Object* JSBuiltinsObject::javascript_builtin(Builtins::JavaScript id) { | 2582 Object* JSBuiltinsObject::javascript_builtin(Builtins::JavaScript id) { |
2581 ASSERT(0 <= id && id < kJSBuiltinsCount); | 2583 ASSERT(0 <= id && id < kJSBuiltinsCount); |
2582 return READ_FIELD(this, kJSBuiltinsOffset + (id * kPointerSize)); | 2584 return READ_FIELD(this, kJSBuiltinsOffset + (id * kPointerSize)); |
2583 } | 2585 } |
2584 | 2586 |
2585 | 2587 |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3088 #undef WRITE_INT_FIELD | 3090 #undef WRITE_INT_FIELD |
3089 #undef READ_SHORT_FIELD | 3091 #undef READ_SHORT_FIELD |
3090 #undef WRITE_SHORT_FIELD | 3092 #undef WRITE_SHORT_FIELD |
3091 #undef READ_BYTE_FIELD | 3093 #undef READ_BYTE_FIELD |
3092 #undef WRITE_BYTE_FIELD | 3094 #undef WRITE_BYTE_FIELD |
3093 | 3095 |
3094 | 3096 |
3095 } } // namespace v8::internal | 3097 } } // namespace v8::internal |
3096 | 3098 |
3097 #endif // V8_OBJECTS_INL_H_ | 3099 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |