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

Side by Side Diff: src/objects.h

Issue 816913003: Implement ES6 rest parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix typo in ARM port Created 5 years, 10 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
« no previous file with comments | « src/mips64/full-codegen-mips64.cc ('k') | src/objects.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 4156 matching lines...) Expand 10 before | Expand all | Expand 10 after
4167 4167
4168 // Return if contexts are allocated for this scope. 4168 // Return if contexts are allocated for this scope.
4169 bool HasContext(); 4169 bool HasContext();
4170 4170
4171 // Return if this is a function scope with "use asm". 4171 // Return if this is a function scope with "use asm".
4172 bool IsAsmModule() { return AsmModuleField::decode(Flags()); } 4172 bool IsAsmModule() { return AsmModuleField::decode(Flags()); }
4173 4173
4174 // Return if this is a nested function within an asm module scope. 4174 // Return if this is a nested function within an asm module scope.
4175 bool IsAsmFunction() { return AsmFunctionField::decode(Flags()); } 4175 bool IsAsmFunction() { return AsmFunctionField::decode(Flags()); }
4176 4176
4177 bool IsSimpleParameterList() {
4178 return IsSimpleParameterListField::decode(Flags());
4179 }
4180
4177 // Return the function_name if present. 4181 // Return the function_name if present.
4178 String* FunctionName(); 4182 String* FunctionName();
4179 4183
4180 // Return the name of the given parameter. 4184 // Return the name of the given parameter.
4181 String* ParameterName(int var); 4185 String* ParameterName(int var);
4182 4186
4183 // Return the name of the given local. 4187 // Return the name of the given local.
4184 String* LocalName(int var); 4188 String* LocalName(int var);
4185 4189
4186 // Return the name of the given stack local. 4190 // Return the name of the given stack local.
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
4324 4328
4325 // Properties of scopes. 4329 // Properties of scopes.
4326 class ScopeTypeField : public BitField<ScopeType, 0, 4> {}; 4330 class ScopeTypeField : public BitField<ScopeType, 0, 4> {};
4327 class CallsEvalField : public BitField<bool, 4, 1> {}; 4331 class CallsEvalField : public BitField<bool, 4, 1> {};
4328 STATIC_ASSERT(LANGUAGE_END == 3); 4332 STATIC_ASSERT(LANGUAGE_END == 3);
4329 class LanguageModeField : public BitField<LanguageMode, 5, 2> {}; 4333 class LanguageModeField : public BitField<LanguageMode, 5, 2> {};
4330 class FunctionVariableField : public BitField<FunctionVariableInfo, 7, 2> {}; 4334 class FunctionVariableField : public BitField<FunctionVariableInfo, 7, 2> {};
4331 class FunctionVariableMode : public BitField<VariableMode, 9, 3> {}; 4335 class FunctionVariableMode : public BitField<VariableMode, 9, 3> {};
4332 class AsmModuleField : public BitField<bool, 12, 1> {}; 4336 class AsmModuleField : public BitField<bool, 12, 1> {};
4333 class AsmFunctionField : public BitField<bool, 13, 1> {}; 4337 class AsmFunctionField : public BitField<bool, 13, 1> {};
4338 class IsSimpleParameterListField
4339 : public BitField<bool, AsmFunctionField::kNext, 1> {};
4334 4340
4335 // BitFields representing the encoded information for context locals in the 4341 // BitFields representing the encoded information for context locals in the
4336 // ContextLocalInfoEntries part. 4342 // ContextLocalInfoEntries part.
4337 class ContextLocalMode: public BitField<VariableMode, 0, 3> {}; 4343 class ContextLocalMode: public BitField<VariableMode, 0, 3> {};
4338 class ContextLocalInitFlag: public BitField<InitializationFlag, 3, 1> {}; 4344 class ContextLocalInitFlag: public BitField<InitializationFlag, 3, 1> {};
4339 class ContextLocalMaybeAssignedFlag 4345 class ContextLocalMaybeAssignedFlag
4340 : public BitField<MaybeAssignedFlag, 4, 1> {}; 4346 : public BitField<MaybeAssignedFlag, 4, 1> {};
4341 }; 4347 };
4342 4348
4343 4349
(...skipping 2687 matching lines...) Expand 10 before | Expand all | Expand 10 after
7031 7037
7032 // Source size of this function. 7038 // Source size of this function.
7033 int SourceSize(); 7039 int SourceSize();
7034 7040
7035 // Calculate the instance size. 7041 // Calculate the instance size.
7036 int CalculateInstanceSize(); 7042 int CalculateInstanceSize();
7037 7043
7038 // Calculate the number of in-object properties. 7044 // Calculate the number of in-object properties.
7039 int CalculateInObjectProperties(); 7045 int CalculateInObjectProperties();
7040 7046
7047 inline bool is_simple_parameter_list();
7048
7041 // Dispatched behavior. 7049 // Dispatched behavior.
7042 DECLARE_PRINTER(SharedFunctionInfo) 7050 DECLARE_PRINTER(SharedFunctionInfo)
7043 DECLARE_VERIFIER(SharedFunctionInfo) 7051 DECLARE_VERIFIER(SharedFunctionInfo)
7044 7052
7045 void ResetForNewContext(int new_ic_age); 7053 void ResetForNewContext(int new_ic_age);
7046 7054
7047 DECLARE_CAST(SharedFunctionInfo) 7055 DECLARE_CAST(SharedFunctionInfo)
7048 7056
7049 // Constants. 7057 // Constants.
7050 static const int kDontAdaptArgumentsSentinel = -1; 7058 static const int kDontAdaptArgumentsSentinel = -1;
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
7538 // not have one. Note that this method does not copy the initial map 7546 // not have one. Note that this method does not copy the initial map
7539 // if it has one already, but simply replaces it with the new value. 7547 // if it has one already, but simply replaces it with the new value.
7540 // Instances created afterwards will have a map whose [[class]] is 7548 // Instances created afterwards will have a map whose [[class]] is
7541 // set to 'value', but there is no guarantees on instances created 7549 // set to 'value', but there is no guarantees on instances created
7542 // before. 7550 // before.
7543 void SetInstanceClassName(String* name); 7551 void SetInstanceClassName(String* name);
7544 7552
7545 // Returns if this function has been compiled to native code yet. 7553 // Returns if this function has been compiled to native code yet.
7546 inline bool is_compiled(); 7554 inline bool is_compiled();
7547 7555
7556 // Returns `false` if formal parameters include rest parameters, optional
7557 // parameters, or destructuring parameters.
7558 // TODO(caitp): make this a flag set during parsing
7559 inline bool is_simple_parameter_list();
7560
7548 // [next_function_link]: Links functions into various lists, e.g. the list 7561 // [next_function_link]: Links functions into various lists, e.g. the list
7549 // of optimized functions hanging off the native_context. The CodeFlusher 7562 // of optimized functions hanging off the native_context. The CodeFlusher
7550 // uses this link to chain together flushing candidates. Treated weakly 7563 // uses this link to chain together flushing candidates. Treated weakly
7551 // by the garbage collector. 7564 // by the garbage collector.
7552 DECL_ACCESSORS(next_function_link, Object) 7565 DECL_ACCESSORS(next_function_link, Object)
7553 7566
7554 // Prints the name of the function using PrintF. 7567 // Prints the name of the function using PrintF.
7555 void PrintName(FILE* out = stdout); 7568 void PrintName(FILE* out = stdout);
7556 7569
7557 DECLARE_CAST(JSFunction) 7570 DECLARE_CAST(JSFunction)
(...skipping 3416 matching lines...) Expand 10 before | Expand all | Expand 10 after
10974 } else { 10987 } else {
10975 value &= ~(1 << bit_position); 10988 value &= ~(1 << bit_position);
10976 } 10989 }
10977 return value; 10990 return value;
10978 } 10991 }
10979 }; 10992 };
10980 10993
10981 } } // namespace v8::internal 10994 } } // namespace v8::internal
10982 10995
10983 #endif // V8_OBJECTS_H_ 10996 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mips64/full-codegen-mips64.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698