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

Side by Side Diff: src/objects.h

Issue 669240: - Remove function boilerplate objects and use SharedFunctionInfos in... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Committed Created 10 years, 9 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/ia32/full-codegen-ia32.cc ('k') | src/objects-inl.h » ('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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 3186 matching lines...) Expand 10 before | Expand all | Expand 10 after
3197 // on objects. 3197 // on objects.
3198 DECL_ACCESSORS(function_data, Object) 3198 DECL_ACCESSORS(function_data, Object)
3199 3199
3200 inline bool IsApiFunction(); 3200 inline bool IsApiFunction();
3201 inline FunctionTemplateInfo* get_api_func_data(); 3201 inline FunctionTemplateInfo* get_api_func_data();
3202 inline bool HasCustomCallGenerator(); 3202 inline bool HasCustomCallGenerator();
3203 3203
3204 // [script info]: Script from which the function originates. 3204 // [script info]: Script from which the function originates.
3205 DECL_ACCESSORS(script, Object) 3205 DECL_ACCESSORS(script, Object)
3206 3206
3207 // [num_literals]: Number of literals used by this function.
3208 inline int num_literals();
3209 inline void set_num_literals(int value);
3210
3207 // [start_position_and_type]: Field used to store both the source code 3211 // [start_position_and_type]: Field used to store both the source code
3208 // position, whether or not the function is a function expression, 3212 // position, whether or not the function is a function expression,
3209 // and whether or not the function is a toplevel function. The two 3213 // and whether or not the function is a toplevel function. The two
3210 // least significants bit indicates whether the function is an 3214 // least significants bit indicates whether the function is an
3211 // expression and the rest contains the source code position. 3215 // expression and the rest contains the source code position.
3212 inline int start_position_and_type(); 3216 inline int start_position_and_type();
3213 inline void set_start_position_and_type(int value); 3217 inline void set_start_position_and_type(int value);
3214 3218
3215 // [debug info]: Debug information. 3219 // [debug info]: Debug information.
3216 DECL_ACCESSORS(debug_info, Object) 3220 DECL_ACCESSORS(debug_info, Object)
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
3314 static const int kDebugInfoOffset = kScriptOffset + kPointerSize; 3318 static const int kDebugInfoOffset = kScriptOffset + kPointerSize;
3315 static const int kInferredNameOffset = kDebugInfoOffset + kPointerSize; 3319 static const int kInferredNameOffset = kDebugInfoOffset + kPointerSize;
3316 static const int kThisPropertyAssignmentsOffset = 3320 static const int kThisPropertyAssignmentsOffset =
3317 kInferredNameOffset + kPointerSize; 3321 kInferredNameOffset + kPointerSize;
3318 // Integer fields. 3322 // Integer fields.
3319 static const int kLengthOffset = 3323 static const int kLengthOffset =
3320 kThisPropertyAssignmentsOffset + kPointerSize; 3324 kThisPropertyAssignmentsOffset + kPointerSize;
3321 static const int kFormalParameterCountOffset = kLengthOffset + kIntSize; 3325 static const int kFormalParameterCountOffset = kLengthOffset + kIntSize;
3322 static const int kExpectedNofPropertiesOffset = 3326 static const int kExpectedNofPropertiesOffset =
3323 kFormalParameterCountOffset + kIntSize; 3327 kFormalParameterCountOffset + kIntSize;
3328 static const int kNumLiteralsOffset = kExpectedNofPropertiesOffset + kIntSize;
3324 static const int kStartPositionAndTypeOffset = 3329 static const int kStartPositionAndTypeOffset =
3325 kExpectedNofPropertiesOffset + kIntSize; 3330 kNumLiteralsOffset + kIntSize;
3326 static const int kEndPositionOffset = kStartPositionAndTypeOffset + kIntSize; 3331 static const int kEndPositionOffset = kStartPositionAndTypeOffset + kIntSize;
3327 static const int kFunctionTokenPositionOffset = kEndPositionOffset + kIntSize; 3332 static const int kFunctionTokenPositionOffset = kEndPositionOffset + kIntSize;
3328 static const int kCompilerHintsOffset = 3333 static const int kCompilerHintsOffset =
3329 kFunctionTokenPositionOffset + kIntSize; 3334 kFunctionTokenPositionOffset + kIntSize;
3330 static const int kThisPropertyAssignmentsCountOffset = 3335 static const int kThisPropertyAssignmentsCountOffset =
3331 kCompilerHintsOffset + kIntSize; 3336 kCompilerHintsOffset + kIntSize;
3332 // Total size. 3337 // Total size.
3333 static const int kSize = kThisPropertyAssignmentsCountOffset + kIntSize; 3338 static const int kSize = kThisPropertyAssignmentsCountOffset + kIntSize;
3339 static const int kAlignedSize = POINTER_SIZE_ALIGN(kSize);
3334 3340
3335 private: 3341 private:
3336 // Bit positions in start_position_and_type. 3342 // Bit positions in start_position_and_type.
3337 // The source code start position is in the 30 most significant bits of 3343 // The source code start position is in the 30 most significant bits of
3338 // the start_position_and_type field. 3344 // the start_position_and_type field.
3339 static const int kIsExpressionBit = 0; 3345 static const int kIsExpressionBit = 0;
3340 static const int kIsTopLevelBit = 1; 3346 static const int kIsTopLevelBit = 1;
3341 static const int kStartPositionShift = 2; 3347 static const int kStartPositionShift = 2;
3342 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); 3348 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1);
3343 3349
(...skipping 1748 matching lines...) Expand 10 before | Expand all | Expand 10 after
5092 } else { 5098 } else {
5093 value &= ~(1 << bit_position); 5099 value &= ~(1 << bit_position);
5094 } 5100 }
5095 return value; 5101 return value;
5096 } 5102 }
5097 }; 5103 };
5098 5104
5099 } } // namespace v8::internal 5105 } } // namespace v8::internal
5100 5106
5101 #endif // V8_OBJECTS_H_ 5107 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698