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

Side by Side Diff: runtime/vm/raw_object.h

Issue 10928160: Limit the maximum number of formal parameters (32K fixed and 32K optional) (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | « runtime/vm/parser.cc ('k') | runtime/vm/raw_object_snapshot.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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_RAW_OBJECT_H_ 5 #ifndef VM_RAW_OBJECT_H_
6 #define VM_RAW_OBJECT_H_ 6 #define VM_RAW_OBJECT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/token.h" 10 #include "vm/token.h"
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 RawFunction* parent_function_; // Enclosing function of this local function. 605 RawFunction* parent_function_; // Enclosing function of this local function.
606 RawClass* signature_class_; // Only for closure or signature function. 606 RawClass* signature_class_; // Only for closure or signature function.
607 RawCode* closure_allocation_stub_; // Stub code for allocation of closures. 607 RawCode* closure_allocation_stub_; // Stub code for allocation of closures.
608 RawFunction* implicit_closure_function_; // Implicit closure function. 608 RawFunction* implicit_closure_function_; // Implicit closure function.
609 RawObject** to() { 609 RawObject** to() {
610 return reinterpret_cast<RawObject**>(&ptr()->implicit_closure_function_); 610 return reinterpret_cast<RawObject**>(&ptr()->implicit_closure_function_);
611 } 611 }
612 612
613 intptr_t token_pos_; 613 intptr_t token_pos_;
614 intptr_t end_token_pos_; 614 intptr_t end_token_pos_;
615 intptr_t num_fixed_parameters_;
616 intptr_t num_optional_positional_parameters_;
617 intptr_t num_optional_named_parameters_;
618 intptr_t usage_counter_; // Incremented while function is running. 615 intptr_t usage_counter_; // Incremented while function is running.
616 int16_t num_fixed_parameters_;
617 int16_t num_optional_parameters_; // > 0: positional; < 0: named.
619 uint16_t deoptimization_counter_; 618 uint16_t deoptimization_counter_;
620 uint16_t kind_tag_; 619 uint16_t kind_tag_;
621 }; 620 };
622 621
623 622
624 class RawField : public RawObject { 623 class RawField : public RawObject {
625 RAW_HEAP_OBJECT_IMPLEMENTATION(Field); 624 RAW_HEAP_OBJECT_IMPLEMENTATION(Field);
626 625
627 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } 626 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); }
628 RawString* name_; 627 RawString* name_;
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
1591 kExternalUint64ArrayCid == kByteArrayCid + 18 && 1590 kExternalUint64ArrayCid == kByteArrayCid + 18 &&
1592 kExternalFloat32ArrayCid == kByteArrayCid + 19 && 1591 kExternalFloat32ArrayCid == kByteArrayCid + 19 &&
1593 kExternalFloat64ArrayCid == kByteArrayCid + 20 && 1592 kExternalFloat64ArrayCid == kByteArrayCid + 20 &&
1594 kStacktraceCid == kByteArrayCid + 21); 1593 kStacktraceCid == kByteArrayCid + 21);
1595 return (index >= kByteArrayCid && index <= kExternalFloat64ArrayCid); 1594 return (index >= kByteArrayCid && index <= kExternalFloat64ArrayCid);
1596 } 1595 }
1597 1596
1598 } // namespace dart 1597 } // namespace dart
1599 1598
1600 #endif // VM_RAW_OBJECT_H_ 1599 #endif // VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698