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

Side by Side Diff: src/ast.h

Issue 858673002: Fix issue with __proto__ when using ES6 object literals (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: git rebase Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/ast.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_AST_H_ 5 #ifndef V8_AST_H_
6 #define V8_AST_H_ 6 #define V8_AST_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/assembler.h" 10 #include "src/assembler.h"
(...skipping 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after
1445 1445
1446 void set_emit_store(bool emit_store); 1446 void set_emit_store(bool emit_store);
1447 bool emit_store(); 1447 bool emit_store();
1448 1448
1449 bool is_static() const { return is_static_; } 1449 bool is_static() const { return is_static_; }
1450 bool is_computed_name() const { return is_computed_name_; } 1450 bool is_computed_name() const { return is_computed_name_; }
1451 1451
1452 protected: 1452 protected:
1453 friend class AstNodeFactory; 1453 friend class AstNodeFactory;
1454 1454
1455 ObjectLiteralProperty(Zone* zone, AstValueFactory* ast_value_factory, 1455 ObjectLiteralProperty(Expression* key, Expression* value, Kind kind,
1456 Expression* key, Expression* value, bool is_static, 1456 bool is_static, bool is_computed_name);
1457 bool is_computed_name); 1457 ObjectLiteralProperty(AstValueFactory* ast_value_factory, Expression* key,
1458 1458 Expression* value, bool is_static,
1459 ObjectLiteralProperty(Zone* zone, bool is_getter, Expression* key,
1460 FunctionLiteral* value, bool is_static,
1461 bool is_computed_name); 1459 bool is_computed_name);
1462 1460
1463 private: 1461 private:
1464 Expression* key_; 1462 Expression* key_;
1465 Expression* value_; 1463 Expression* value_;
1466 Kind kind_; 1464 Kind kind_;
1467 bool emit_store_; 1465 bool emit_store_;
1468 bool is_static_; 1466 bool is_static_;
1469 bool is_computed_name_; 1467 bool is_computed_name_;
1470 Handle<Map> receiver_type_; 1468 Handle<Map> receiver_type_;
(...skipping 1877 matching lines...) Expand 10 before | Expand all | Expand 10 after
3348 ObjectLiteral* NewObjectLiteral( 3346 ObjectLiteral* NewObjectLiteral(
3349 ZoneList<ObjectLiteral::Property*>* properties, 3347 ZoneList<ObjectLiteral::Property*>* properties,
3350 int literal_index, 3348 int literal_index,
3351 int boilerplate_properties, 3349 int boilerplate_properties,
3352 bool has_function, 3350 bool has_function,
3353 int pos) { 3351 int pos) {
3354 return new (zone_) ObjectLiteral(zone_, properties, literal_index, 3352 return new (zone_) ObjectLiteral(zone_, properties, literal_index,
3355 boilerplate_properties, has_function, pos); 3353 boilerplate_properties, has_function, pos);
3356 } 3354 }
3357 3355
3356 ObjectLiteral::Property* NewObjectLiteralProperty(
3357 Expression* key, Expression* value, ObjectLiteralProperty::Kind kind,
3358 bool is_static, bool is_computed_name) {
3359 return new (zone_)
3360 ObjectLiteral::Property(key, value, kind, is_static, is_computed_name);
3361 }
3362
3358 ObjectLiteral::Property* NewObjectLiteralProperty(Expression* key, 3363 ObjectLiteral::Property* NewObjectLiteralProperty(Expression* key,
3359 Expression* value, 3364 Expression* value,
3360 bool is_static, 3365 bool is_static,
3361 bool is_computed_name) { 3366 bool is_computed_name) {
3362 return new (zone_) ObjectLiteral::Property( 3367 return new (zone_) ObjectLiteral::Property(ast_value_factory_, key, value,
3363 zone_, ast_value_factory_, key, value, is_static, is_computed_name);
3364 }
3365
3366 ObjectLiteral::Property* NewObjectLiteralProperty(bool is_getter,
3367 Expression* key,
3368 FunctionLiteral* value,
3369 int pos, bool is_static,
3370 bool is_computed_name) {
3371 return new (zone_) ObjectLiteral::Property(zone_, is_getter, key, value,
3372 is_static, is_computed_name); 3368 is_static, is_computed_name);
3373 } 3369 }
3374 3370
3375 RegExpLiteral* NewRegExpLiteral(const AstRawString* pattern, 3371 RegExpLiteral* NewRegExpLiteral(const AstRawString* pattern,
3376 const AstRawString* flags, 3372 const AstRawString* flags,
3377 int literal_index, 3373 int literal_index,
3378 int pos) { 3374 int pos) {
3379 return new (zone_) RegExpLiteral(zone_, pattern, flags, literal_index, pos); 3375 return new (zone_) RegExpLiteral(zone_, pattern, flags, literal_index, pos);
3380 } 3376 }
3381 3377
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
3524 3520
3525 private: 3521 private:
3526 Zone* zone_; 3522 Zone* zone_;
3527 AstValueFactory* ast_value_factory_; 3523 AstValueFactory* ast_value_factory_;
3528 }; 3524 };
3529 3525
3530 3526
3531 } } // namespace v8::internal 3527 } } // namespace v8::internal
3532 3528
3533 #endif // V8_AST_H_ 3529 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698