| Index: src/code-stubs.h
|
| diff --git a/src/code-stubs.h b/src/code-stubs.h
|
| index 4d021c2dc7dbe19c901d15753d288c1e8ad506ee..03b50194d2749accd0404bd9ad0acf94e95c1d83 100644
|
| --- a/src/code-stubs.h
|
| +++ b/src/code-stubs.h
|
| @@ -592,12 +592,9 @@ class NumberToStringStub V8_FINAL : public HydrogenCodeStub {
|
|
|
| class FastNewClosureStub : public HydrogenCodeStub {
|
| public:
|
| - FastNewClosureStub(Isolate* isolate,
|
| - StrictMode strict_mode,
|
| - bool is_generator)
|
| - : HydrogenCodeStub(isolate),
|
| - strict_mode_(strict_mode),
|
| - is_generator_(is_generator) { }
|
| + FastNewClosureStub(Isolate* isolate, StrictMode strict_mode,
|
| + FunctionKind kind)
|
| + : HydrogenCodeStub(isolate), strict_mode_(strict_mode), kind_(kind) {}
|
|
|
| virtual Handle<Code> GenerateCode() V8_OVERRIDE;
|
|
|
| @@ -607,20 +604,23 @@ class FastNewClosureStub : public HydrogenCodeStub {
|
| static void InstallDescriptors(Isolate* isolate);
|
|
|
| StrictMode strict_mode() const { return strict_mode_; }
|
| - bool is_generator() const { return is_generator_; }
|
| + FunctionKind kind() const { return kind_; }
|
| + bool is_arrow() const { return IsArrowFunction(kind_); }
|
| + bool is_generator() const { return IsGeneratorFunction(kind_); }
|
| + bool is_concise_method() const { return IsConciseMethod(kind_); }
|
|
|
| private:
|
| - class StrictModeBits: public BitField<bool, 0, 1> {};
|
| - class IsGeneratorBits: public BitField<bool, 1, 1> {};
|
| + class StrictModeBits : public BitField<bool, 0, 1> {};
|
| + class FunctionKindBits : public BitField<FunctionKind, 1, 3> {};
|
|
|
| Major MajorKey() const { return FastNewClosure; }
|
| int NotMissMinorKey() const {
|
| return StrictModeBits::encode(strict_mode_ == STRICT) |
|
| - IsGeneratorBits::encode(is_generator_);
|
| + FunctionKindBits::encode(kind_);
|
| }
|
|
|
| StrictMode strict_mode_;
|
| - bool is_generator_;
|
| + FunctionKind kind_;
|
| };
|
|
|
|
|
|
|