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

Unified Diff: src/code-stubs.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/ast.h ('k') | src/code-stubs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index c1d051b3d74e94f94deaf218c2831c20823896a0..68e6baf0c3b80b238d11302a0285275b0f24c3d8 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -591,12 +591,12 @@ class NumberToStringStub V8_FINAL : public HydrogenCodeStub {
class FastNewClosureStub : public HydrogenCodeStub {
public:
- FastNewClosureStub(Isolate* isolate,
- StrictMode strict_mode,
- bool is_generator)
+ FastNewClosureStub(Isolate* isolate, StrictMode strict_mode,
+ bool is_generator, bool is_concise_method)
: HydrogenCodeStub(isolate),
strict_mode_(strict_mode),
- is_generator_(is_generator) { }
+ is_generator_(is_generator),
+ is_concise_method_(is_concise_method) {}
virtual Handle<Code> GenerateCode() V8_OVERRIDE;
@@ -607,19 +607,23 @@ class FastNewClosureStub : public HydrogenCodeStub {
StrictMode strict_mode() const { return strict_mode_; }
bool is_generator() const { return is_generator_; }
+ bool is_concise_method() const { return is_concise_method_; }
private:
- class StrictModeBits: public BitField<bool, 0, 1> {};
- class IsGeneratorBits: public BitField<bool, 1, 1> {};
+ class StrictModeBits : public BitField<bool, 0, 1> {};
+ class IsGeneratorBits : public BitField<bool, 1, 1> {};
+ class IsMethodBits : public BitField<bool, 2, 1> {};
Major MajorKey() const { return FastNewClosure; }
int NotMissMinorKey() const {
return StrictModeBits::encode(strict_mode_ == STRICT) |
- IsGeneratorBits::encode(is_generator_);
+ IsGeneratorBits::encode(is_generator_) |
+ IsMethodBits::encode(is_concise_method_);
}
StrictMode strict_mode_;
bool is_generator_;
+ bool is_concise_method_;
};
« src/ast.h ('K') | « src/ast.h ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698