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

Side by Side Diff: src/ast.h

Issue 12114054: Supporting AllocationSiteInfo for Nested arrays (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing a port compile failure Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/assembler.cc ('k') | src/full-codegen.h » ('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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 bool has_function() { return has_function_; } 1315 bool has_function() { return has_function_; }
1316 1316
1317 // Mark all computed expressions that are bound to a key that 1317 // Mark all computed expressions that are bound to a key that
1318 // is shadowed by a later occurrence of the same key. For the 1318 // is shadowed by a later occurrence of the same key. For the
1319 // marked expressions, no store code is emitted. 1319 // marked expressions, no store code is emitted.
1320 void CalculateEmitStore(Zone* zone); 1320 void CalculateEmitStore(Zone* zone);
1321 1321
1322 enum Flags { 1322 enum Flags {
1323 kNoFlags = 0, 1323 kNoFlags = 0,
1324 kFastElements = 1, 1324 kFastElements = 1,
1325 kHasFunction = 1 << 1 1325 kHasFunction = 1 << 1,
1326 kCreateAllocationSiteInfos = 1 << 2
1326 }; 1327 };
1327 1328
1328 struct Accessors: public ZoneObject { 1329 struct Accessors: public ZoneObject {
1329 Accessors() : getter(NULL), setter(NULL) { } 1330 Accessors() : getter(NULL), setter(NULL) { }
1330 Expression* getter; 1331 Expression* getter;
1331 Expression* setter; 1332 Expression* setter;
1332 }; 1333 };
1333 1334
1334 protected: 1335 protected:
1335 ObjectLiteral(Isolate* isolate, 1336 ObjectLiteral(Isolate* isolate,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1383 DECLARE_NODE_TYPE(ArrayLiteral) 1384 DECLARE_NODE_TYPE(ArrayLiteral)
1384 1385
1385 Handle<FixedArray> constant_elements() const { return constant_elements_; } 1386 Handle<FixedArray> constant_elements() const { return constant_elements_; }
1386 ZoneList<Expression*>* values() const { return values_; } 1387 ZoneList<Expression*>* values() const { return values_; }
1387 1388
1388 // Return an AST id for an element that is used in simulate instructions. 1389 // Return an AST id for an element that is used in simulate instructions.
1389 BailoutId GetIdForElement(int i) { 1390 BailoutId GetIdForElement(int i) {
1390 return BailoutId(first_element_id_.ToInt() + i); 1391 return BailoutId(first_element_id_.ToInt() + i);
1391 } 1392 }
1392 1393
1394 enum Flags {
1395 kNoFlags = 0,
1396 kCreateAllocationSiteInfos = 1
1397 };
1398
1393 protected: 1399 protected:
1394 ArrayLiteral(Isolate* isolate, 1400 ArrayLiteral(Isolate* isolate,
1395 Handle<FixedArray> constant_elements, 1401 Handle<FixedArray> constant_elements,
1396 ZoneList<Expression*>* values, 1402 ZoneList<Expression*>* values,
1397 int literal_index, 1403 int literal_index,
1398 bool is_simple, 1404 bool is_simple,
1399 int depth) 1405 int depth)
1400 : MaterializedLiteral(isolate, literal_index, is_simple, depth), 1406 : MaterializedLiteral(isolate, literal_index, is_simple, depth),
1401 constant_elements_(constant_elements), 1407 constant_elements_(constant_elements),
1402 values_(values), 1408 values_(values),
(...skipping 1548 matching lines...) Expand 10 before | Expand all | Expand 10 after
2951 private: 2957 private:
2952 Isolate* isolate_; 2958 Isolate* isolate_;
2953 Zone* zone_; 2959 Zone* zone_;
2954 Visitor visitor_; 2960 Visitor visitor_;
2955 }; 2961 };
2956 2962
2957 2963
2958 } } // namespace v8::internal 2964 } } // namespace v8::internal
2959 2965
2960 #endif // V8_AST_H_ 2966 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « src/assembler.cc ('k') | src/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698