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

Unified Diff: src/objects.h

Issue 816913003: Implement ES6 rest parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix up the typos/pointless newline 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips64/full-codegen-mips64.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 61daada4b9ae57c13bb34bd15d84d6fab5ff5025..d9ec13f026b23201518644e5639cdb43266ac7f2 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -4174,6 +4174,10 @@ class ScopeInfo : public FixedArray {
// Return if this is a nested function within an asm module scope.
bool IsAsmFunction() { return AsmFunctionField::decode(Flags()); }
+ bool IsSimpleParameterList() {
+ return IsSimpleParameterListField::decode(Flags());
+ }
+
// Return the function_name if present.
String* FunctionName();
@@ -4331,6 +4335,7 @@ class ScopeInfo : public FixedArray {
class FunctionVariableMode : public BitField<VariableMode, 9, 3> {};
class AsmModuleField : public BitField<bool, 12, 1> {};
class AsmFunctionField : public BitField<bool, 13, 1> {};
+ class IsSimpleParameterListField : public BitField<bool, 13, 1> {};
arv (Not doing code reviews) 2015/02/12 21:48:43 14 or AsmFunctionField::kNext
caitp (gmail) 2015/02/12 22:12:03 Oops, fixed! I'm going with the kNext option, seem
// BitFields representing the encoded information for context locals in the
// ContextLocalInfoEntries part.
@@ -7019,6 +7024,8 @@ class SharedFunctionInfo: public HeapObject {
// Calculate the number of in-object properties.
int CalculateInObjectProperties();
+ inline bool is_simple_parameter_list();
+
// Dispatched behavior.
DECLARE_PRINTER(SharedFunctionInfo)
DECLARE_VERIFIER(SharedFunctionInfo)
@@ -7525,6 +7532,11 @@ class JSFunction: public JSObject {
// Returns if this function has been compiled to native code yet.
inline bool is_compiled();
+ // Returns `false` if formal parameters include rest parameters, optional
+ // parameters, or destructuring parameters.
+ // TODO(caitp): make this a flag set during parsing
+ inline bool is_simple_parameter_list();
+
// [next_function_link]: Links functions into various lists, e.g. the list
// of optimized functions hanging off the native_context. The CodeFlusher
// uses this link to chain together flushing candidates. Treated weakly
« no previous file with comments | « src/mips64/full-codegen-mips64.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698