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

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 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips64/full-codegen-mips64.cc ('k') | src/objects.cc » ('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 e1287088b3495cee1bcc698527f4754c0e70b63a..250ba07064046498f5fe22c3c1129ecaa0af9bd9 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,8 @@ 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, AsmFunctionField::kNext, 1> {};
// BitFields representing the encoded information for context locals in the
// ContextLocalInfoEntries part.
@@ -7038,6 +7044,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)
@@ -7545,6 +7553,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.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698