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

Unified Diff: src/hydrogen-instructions.h

Issue 477263002: ES6: Add support for method shorthand in object literals (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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
« src/ast.h ('K') | « src/globals.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index ec50f5bdfd2733c3ab9b8d96159c15c2e37e4865..da712780fd576bf672453d9f54459752798f5d53 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -7448,17 +7448,25 @@ class HFunctionLiteral V8_FINAL : public HTemplateInstruction<1> {
bool pretenure() const { return pretenure_; }
bool has_no_literals() const { return has_no_literals_; }
bool is_generator() const { return is_generator_; }
+ bool is_concise_method() const { return is_concise_method_; }
+ FunctionKind kind() const {
+ // TODO(arv): Update to handle concise generator methods.
+ // if (is_arrow()) return FunctionKind::kArrowFunction;
+ if (is_generator()) return FunctionKind::kGeneratorFunction;
+ if (is_concise_method()) return FunctionKind::kConciseMethod;
+ return FunctionKind::kNormalFunction;
+ }
StrictMode strict_mode() const { return strict_mode_; }
private:
- HFunctionLiteral(HValue* context,
- Handle<SharedFunctionInfo> shared,
+ HFunctionLiteral(HValue* context, Handle<SharedFunctionInfo> shared,
bool pretenure)
: HTemplateInstruction<1>(HType::JSObject()),
shared_info_(shared),
pretenure_(pretenure),
has_no_literals_(shared->num_literals() == 0),
is_generator_(shared->is_generator()),
+ is_concise_method_(shared->is_concise_method()),
strict_mode_(shared->strict_mode()) {
SetOperandAt(0, context);
set_representation(Representation::Tagged());
@@ -7471,6 +7479,7 @@ class HFunctionLiteral V8_FINAL : public HTemplateInstruction<1> {
bool pretenure_ : 1;
bool has_no_literals_ : 1;
bool is_generator_ : 1;
+ bool is_concise_method_ : 1;
StrictMode strict_mode_;
};
« src/ast.h ('K') | « src/globals.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698